Pmbootstrap: [recovery-installer] dd: can't open '/dev/block/mmcblk0p5

Created on 11 Mar 2018  路  11Comments  路  Source: postmarketOS/pmbootstrap

device: Samsung Galaxy Tab 2 10.1" (samsung-espresso10)

hello,
trying to install postmarketOS on a Samsung Tab 2 espresso, get stuck on "Failed to mount '/system' (Device or resource busy)" by trying to install pmos-samsung-espresso10.zip through TWRP ( built with pmbootstrap install --no-fde --android-recovery-zip ) anyone have any idea ? ( tried also by wiping all, disconnect cable, reboot,... ). my pmos.log is here https://bpaste.net/show/d1ed95aeaebe

TWRP 3.2.1
( lineageos install is working )

here is mount output:

rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p10 on /data type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p10 on /sdcard type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
tmpfs on /tmp/postmarketos/chroot/dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
proc on /tmp/postmarketos/chroot/proc type proc (rw,relatime)
sysfs on /tmp/postmarketos/chroot/sys type sysfs (rw,seclabel,relatime)
tmpfs on /tmp/postmarketos/chroot/pmos.log type tmpfs (rw,seclabel,relatime)
/dev/block/mmcblk0p10 on /tmp/postmarketos/chroot/pmos.zip type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
tmpfs on /tmp/postmarketos/chroot/dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
proc on /tmp/postmarketos/chroot/proc type proc (rw,relatime)
sysfs on /tmp/postmarketos/chroot/sys type sysfs (rw,seclabel,relatime)
/dev/mapper/mmcblk0p9p2 on /tmp/postmarketos/chroot/mnt/pmOS type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
/dev/mapper/mmcblk0p9p1 on /tmp/postmarketos/chroot/mnt/pmOS/boot type ext2 (rw,seclabel,relatime,user_xattr,barrier=1)

cat /tmp/recovery.log

```
...
Flashing boot.img...
Failed. Check /tmp/postmarketos/pmos.log for more info!
Updater process ended with ERROR: 1
I:Install took 33 second(s).
Error installing zip file '/sdcard/imgs/pmos-samsung-espresso10.zip'
Updating partition details...
I:Can't probe device /dev/block/mmcblk0p9
Failed to mount '/system' (Device or resource busy)
I:Actual block device: '/dev/block/mmcblk0p9', current file system: 'ext4'
I:Data backup size is 0MB, free: 11870MB.
I:Unable to mount '/external_sd'
I:Actual block device: '', current file system: 'vfat'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
...done
I:Set page: 'flash_done'
I:operation_end - status=1
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
E:[MTP] request read returned -1, errno: 5, exiting MtpServer::run loop
I:[MTP] MtpServer::run fd: 19
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:Set overlay: ''
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:Set overlay: ''
I:Set page: 'clear_vars'
I:Set page: 'main2'

android-recovery-zip bug

All 11 comments

@ata2001: could you take a look?
@lduboeuf: Thanks for the detailed bug report! In the meantime, you could try another installation method, such as SD card (pmbootstrap install --sdcard=/dev/mmcblk) if your device has any, or netcat.

fine, thank you for the proposed work around. I will try it soon as i found a sdcard...

@lduboeuf The error message you mentioned is normal, since twrp can't mount the system partition after the pmos installer sets up the subpartitions. However the log suggests, that there is two entries marked as /boot in your /recovery.fstab, and the first one is for sure not the one we need. Could you start your phone in recovery mode (twrp) and post the contents of /recovery.fstab?

hi, here it is:

cat /etc/recovery.fstab:

```
/system ext4 /dev/block/mmcblk0p9
/cache ext4 /dev/block/mmcblk0p7
/data ext4 /dev/block/mmcblk0p10 length=-16384
/efs ext4 /dev/block/mmcblk0p1 flags=display="EFS";backup=1
/boot emmc /dev/block/mmcblk0p5
/recovery emmc /dev/block/mmcblk0p6
/bootloader emmc /dev/block/mmcblk0p2
/preload ext4 /dev/block/mmcblk0p11
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable

@lduboeuf Thanks. Apparently the regular expression is incorrect in the recovery installer. I will create a patch soon.

@lduboeuf I created #1339 in order to resolve this. If you have time, you could help us make sure it fixes the issue by testing it on your device.

@ata2001 sure i will.
btw install works fine with an sdcard

so regarding the #1339 PR and master, there seems to be no more error on pmos.log for dd, i still face that when installing with TWRP:

I:Can't probe device /dev/block/mmcblk0p9
Failed to mount '/system' (Device or resource busy)

should i open a new issue or it is nothing to do with pmos ?

You shall not worry about that error, it only means, that because we have already mounted it, twrp can't access it anymore.

ah ok, well after flashing kernel, i'm on a boot loop now :) ( by installed pmos on sdcard, it boots fine).

boot loop fixed with last PR #1339 :) thanks for your support.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

schvabodka-man picture schvabodka-man  路  6Comments

ghost picture ghost  路  4Comments

erhoof picture erhoof  路  4Comments

MartijnBraam picture MartijnBraam  路  6Comments

ollieparanoid picture ollieparanoid  路  5Comments