Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support updating multiple EFIs in mirrored setups #132

Open
jlebon opened this issue Jan 6, 2021 · 5 comments
Open

Support updating multiple EFIs in mirrored setups #132

jlebon opened this issue Jan 6, 2021 · 5 comments
Labels
enhancement New feature or request jira For syncing with Jira

Comments

@jlebon
Copy link
Member

jlebon commented Jan 6, 2021

Follow-up to #127 (specifically #127 (comment)). 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.

@bgilbert
Copy link
Contributor

bgilbert commented Jan 7, 2021

One small correction: in the mirrored boot disk case, no partitions are labeled EFI-SYSTEM.

@jlebon
Copy link
Member Author

jlebon commented Dec 2, 2021

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).

@travier
Copy link
Member

travier commented Jun 27, 2024

Notes for implementing this for Fedora CoreOS:

But unfortunately we might have to add more heuristics to support Anaconda installations.

@travier
Copy link
Member

travier commented Sep 2, 2024

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

@HuijingHei
Copy link
Member

Test failed with multiple EFIs in mirrored setups (using latest bootupd in copr build):

$ cosa run --add-disk 10G -B ../ign/mirror.bu --qemu-firmware uefi -m 4096
[root@cosa-devsh ~]# mount -o remount,rw /boot
[root@cosa-devsh ~]# mv /boot/bootupd-state.json .
[root@cosa-devsh ~]# bootupctl adopt-and-update
Running as unit: bootupd.service
lsblk: : not a block device
error: Failed to run lsblk

mirror.bu is refered to doc

variant: fcos
version: 1.5.0
boot_device:
  mirror:
    devices:
      - /dev/vda
      - /dev/vdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jira For syncing with Jira
Projects
None yet
Development

No branches or pull requests

4 participants