main /postmarketos-android-recovery-installer: Install fails when partition labels are not present
Hello and thank you for all your work on this cool project!
I am trying to install PMOS to the B&N Nook Color. Installation of an android recovery zip currently fails here:
+ ui_print 'Extracting partition table...'
+ echo 'ui_print Extracting partition table...'
+ echo ui_print
+ extract_partition_table
+ fstab_recovery=recovery.fstab
+ '[' '!' -e /recovery.fstab ]
+ findfs 'PARTLABEL=system'
findfs: unable to resolve 'PARTLABEL=system'
+ _INSTALL_DEVICE=
+ awk '$1 == "/system" {print $3; exit;}' /recovery.fstab
+ readlink -fn
+ _INSTALL_DEVICE=
The installer script is trying to find the system partition based on the LABEL alone: https://gitlab.com/postmarketOS/pmaports/blob/ba0ba4e869a481977a76bdc12fbe90ff9ee4a0a4/main/postmarketos-android-recovery-installer/pmos_install_functions#L43
However, my device does not come with such labels:
~ # busybox blkid
/dev/block/vold/179:8: LABEL="MyNOOKcolor" UUID="2EFA-E42B" TYPE="vfat"
/dev/block/vold/179:7: UUID="0ec9ec39-4c05-4db4-abfe-ffbc68447e2e" TYPE="f2fs"
/dev/block/vold/179:6: UUID="54cf2313-45e7-440c-924a-d5288c6a0b81" TYPE="f2fs"
/dev/block/vold/179:5: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/vold/179:3: LABEL="factory" UUID="0b15b6a1-3338-42f5-a101-e0871aac3020" TYPE="ext2
Here is the fstab:
~ # cat /etc/fstab
/dev/block/by-name/boot /boot vfat rw
/dev/block/mmcblk0p7 /cache f2fs rw
/dev/block/by-name/userdata /data f2fs rw
/dev/block/by-name/system /system ext4 rw
...and lastly the symlinked block devices:
~ # ls -ls /dev/block/by-name/
0 lrwxrwxrwx 1 root root 8 Sep 10 12:27 bcb -> /rom/BCB
0 lrwxrwxrwx 1 root root 20 Sep 10 12:27 boot -> /dev/block/mmcblk0p1
0 lrwxrwxrwx 1 root root 20 Sep 10 12:27 system -> /dev/block/mmcblk0p5
0 lrwxrwxrwx 1 root root 20 Sep 10 12:27 userdata -> /dev/block/mmcblk0p6
I expect the same situation for the boot partition as soon as the script gets to it.
Is it a hard requirement to have these partition labels? I guess it's the only useful parameter to use for findfs
, but without any way for me to define the install device from the deviceinfo
file (for example), I think I am stuck now.
I could hack the installer script to hardcode my partition, or assign the labels myself on the device, but those options would only work for my device and are clearly not a general solution for proper device porting effort.
What do you suggest?