main/postmarketos-initramfs: always mount the correct rootfs, make /boot optional
- If we have
pmos_root_uuid=
on cmdline (generated by boot-deploy based on fstab), then look only for that root partition and don't fallback to mounting others. This avoids accidentally mounting the wrong rootfs based on enumeration order or timing, when you have multiple installations of pmOS attached to the system. - For encrypted installations of pmOS, skip falling back to the unreliable auto detection routine. Instead mount
/dev/mapper/root
directly as rootfs.
There are also two commits that make it possible to boot pmOS in "single partition mode" where there is just a root partition and no boot partition (see pmbootstrap!2512):
- Don't mount subpartitions just to find the boot partition, since it might not exist. This isn't needed anymore since we now look only for the correct rootfs given by
pmos_root_uuid=
. Reverts !5625 (merged) - Adjust workaround for old installations of pmOS without proper fstab to check if the fstab is empty instead of looking for a /boot entry.
These can go in independent of the pmbootstrap MR though, since the changes are minimal and there are no negative effects for existing installation options.
See commit log for details.
Cc: @caleb @craftyguy
Edited by Minecrell