pmbootstrap install: support new ondev boot label
In order to support FAT32 as boot partition, the label is shortened from pmOS_inst_boot to pmOS_i_boot in pmaports!2337. Read the value from pmaports.cfg and fall back to the old value, so both are supported (-> building v21.06 and v21.03 will use the old label).
Remove the old codepath that would set "pmOS_boot" as label for the install partition, if the postmarketos-ondev package was older than 0.4.0. This is only the case on the long unsupported v20.05 branch.
Fixes #2041 (closed)
(Order of merging doesn't really matter since it's all backwards compatible, but I've added the "fixes" here, so let's merge the pmaports MR first and then this one.)
Merge request reports
Activity
added type::feature label
assigned to @ollieparanoid
By Oliver Smith on 2021-07-11T21:14:58
mentioned in issue #2041 (closed)
By Oliver Smith on 2021-07-11T21:15:40
mentioned in merge request postmarketos-ondev!5 (merged)
By Oliver Smith on 2021-07-11T21:20:37
- Resolved by Administrator
I have a device with uefi booting from fat32 and I tried this:
- This doesn't break just booting a non-ondev image from usb
- This lets an ondev image boot without issue
Actually installing the ondev image seems to still be broken, possibly because I haven't figured out how to install from external usb to internal emmc. At any rate, I get this error at the very end of Calamares:
Installation Failed Command ondev-post-install finished with exit code 1. Output: + '[' -e /tmp/ondev-internal-storage ] + tune2fs -L pmOS_deleteme /dev/disk/by-label/pmOS_install tune2fs 1.46.2 (28-Feb-2021) + part_path=/dev/disk/by-label/pmOS_i_boot /de/disk/by-label/pmOS_i_boot contains a vfat file system labelled 'pmOS_i_boot'
(It's trying to rename a vfat file system with tune2fs and failing here: https://gitlab.com/postmarketOS/postmarketos-ondev/-/blob/master/ondev-post-install.sh#L23)
By Théo Friberg on 2021-07-13T14:51:14
Edited by Ghost User
mentioned in issue postmarketos-ondev#51
By Oliver Smith on 2021-07-13T17:49:24
enabled an automatic merge when the pipeline for 68fe7df0 succeeds
By Oliver Smith on 2021-07-13T17:59:48
@jenneron:
I have this error when installing to USB storage too. I didn't know about this before as i hadn't tried because installing to external storage is useless for EFI devices which can't boot from sd card.
I'm curious, how do you boot into the installer then, if you can't boot from SD?
Depending on that it might make sense to hide the "install to external" option for your device (we could implement that).
By Oliver Smith on 2021-07-13T18:55:26
Edited by Ghost UserMy device has USB type A port, it can boot only from USB or eMMC
By jenneron on 2021-07-13T18:55:48
Edited by Administratorwell, maybe somebody wants to install it to the usb disk. so I think it makes sense to keep it (doesn't really hurt your use case, you can just select the other option).
regarding being broken, I guess it would get fixed once we fix installing to internal as well, it's probably the same issue with renaming the partition?
By Oliver Smith on 2021-07-13T20:38:52
Installing to internal works for me. Installing and booting installed OS. My device boots a
\efi\boot\bootarm.efi
file from any FAT32 partition on eMMC. I don't know how and why it does so because our efivars are encrypted, we can't read and write them. But i figured that out in experimental way.I don't know which device @fsmnarmosta uses and how it is configured. It may do same thing with different filename, but it also may require adding an EFI boot entry to efivars. This case would need additional changes in postmarketos-ondev with
efibootmgr
tool.BTW installing to external is not completely broken, system boots after installing, but installed system has messed up partition layout. We need to look deeper at the stage on which installer fails.
Speaking of booting from SD card we can implement mixed installation by flashing boot partition to eMMC and root partition to SD card.
By jenneron on 2021-07-13T20:51:02
Edited by Administrator