Skip to content

postmarketos-initramfs: switch to udev and refine root/boot partition detection and waiting

Administrator requested to merge caleb/initramfs-better-wait into master

These changes are based on !5000 (closed) , hence this MR targets that branch. I split them up as these are separate features and I don't want to hold the other MR back.

postmarketos-initramfs: check for root subpartition

In mount_subpartition we currently try to look for the boot partition, to see if we're done (either we aren't using subpartitions or we found the right one). However it is possible that a device might have originally used the subpartition scheme, but was later converted to have a real boot partition (for EFI for example).

In this scenario, the boot partition would be found immediately, but the root subpartition would not be.

Address this by making mount_subpartition check for success by calling find_root_partition instead of find_boot_partition. For most installations this has no impact.

postmarketos-initramfs: better wait_[br]oot_partition

Rework the messages and avoid re-spawning the splash on every check. Additionally, add a call to check_keys, this lets users drop to a debug shell or export logs to triage this failure (particularly useful for hard-to-reproduce issues).

Finally, add a (liberal) 30 second timeout and dump logs at the end. If we're just waiting for a device to show up and it doesn't after 30 seconds then it's probably never going to...

Merge request reports

Loading