Open jlebon opened 3 years ago
One small correction: in the mirrored boot disk case, no partitions are labeled EFI-SYSTEM
.
Note that just dumbly doing a type GUID match will not work for things like multipath. We solved this in rdcore
by looking for ESPs only on the same devices which back the boot partition: https://github.com/coreos/coreos-installer/blob/78e2a7a4bf8d9ddb90b5e4fb5729a2550999ad11/src/blockdev.rs#L880-L945
Would probably make sense for bootupd to use the same heuristic (or if it finds a better heuristic to use, update coreos-installer to match).
Notes for implementing this for Fedora CoreOS:
But unfortunately we might have to add more heuristics to support Anaconda installations.
As far as I could see when trying various RAID setups in Anaconda (https://docs.fedoraproject.org/en-US/fedora/f36/install-guide/install/Installing_Using_Anaconda/#sect-installation-gui-manual-partitioning-swraid), they only create a single EFI system partition.
So Fedora CoreOS should be the only case with one per disk, unless someone use manual partitioning and explicitly set up two.
See also: https://gitlab.com/fedora/ostree/sig/-/issues/1#note_2086744541
Follow-up to https://github.com/coreos/bootupd/pull/127 (specifically https://github.com/coreos/bootupd/pull/127#discussion_r546995248). We need to update the EFI in all the devices matching the appropriate GUID, not just the one which wins the
/dev/disk/by-partlabel/EFI-SYSTEM
race.