Switching from RHEL 10 to Fedora 43 breaks boot loader due to missing grub.cfg
I originally installed a machine from a RHEL 10 bootc image, which places the boot loader under EFI/redhat/ on the EFI partition. Booting a Fedora 42 bootc image does not touch the RHEL 10 boot loader, but booting a Fedora 43 bootc image the first time does:
bootupctl[1646]: Previous EFI: grub2-efi-x64-1:2.12-29.el10_1.x86_64,shim-x64-15.8-5.el10_0.x86_64
bootupctl[1646]: Updated EFI: grub2-efi-x64-1:2.12-40.fc43.x86_64,shim-x64-15.8-3.x86_64
systemd[1]: Finished bootloader-update.service - Update bootloader on boot.
bootupctl update replaces the boot loader such that loader and configuration are now in separate directories:
# mount /dev/nvme0n1p1 /boot/efi/
# ll -R /boot/efi/
/boot/efi/:
total 4
drwxr-xr-x. 5 root root 4096 Oct 17 13:14 EFI/
/boot/efi/EFI:
total 12
drwxr-xr-x. 2 root root 4096 Oct 17 13:14 BOOT/
drwxr-xr-x. 2 root root 4096 Oct 17 13:14 fedora/
drwxr-xr-x. 2 root root 4096 Oct 17 13:14 redhat/
/boot/efi/EFI/BOOT:
total 1016
-rwxr-xr-x. 1 root root 949424 Oct 17 13:14 BOOTX64.EFI
-rwxr-xr-x. 1 root root 87816 Oct 17 13:14 fbx64.efi
/boot/efi/EFI/fedora:
total 6644
-rwxr-xr-x. 1 root root 110 Oct 17 13:14 BOOTX64.CSV
-rwxr-xr-x. 1 root root 4046144 Oct 17 13:14 grubx64.efi
-rwxr-xr-x. 1 root root 848080 Oct 17 13:14 mmx64.efi
-rwxr-xr-x. 1 root root 949424 Oct 17 13:14 shim.efi
-rwxr-xr-x. 1 root root 949424 Oct 17 13:14 shimx64.efi
/boot/efi/EFI/redhat:
total 8
-rwxr-xr-x. 1 root root 53 Oct 7 19:15 bootuuid.cfg
-rwxr-xr-x. 1 root root 657 Oct 7 19:15 grub.cfg
In this state, the machine fails to boot a second time since grub.cfg cannot be found.
The issue may be worked around by copying the configuration manually to both EFI/fedora/ and EFI/redhat/, after which the machine is guaranteed to boot regardless of which boot loader was installed by bootupctl update.
mira:/boot/efi/EFI/redhat# cp -avi bootuuid.cfg grub.cfg ../fedora
'bootuuid.cfg' -> '../fedora/bootuuid.cfg'
'grub.cfg' -> '../fedora/grub.cfg'
Could bootupd be extended with some kind of hook which ensures that grub.cfg and bootuuid.cfg are always placed beside the updated boot loader, in the same directory?
Hmm this sounds like a bad bug indeed. Though note it should be filed against https://github.com/coreos/bootupd/
This also happens from/to CentOS Stream, or anything that does not have the same hardcoded variables from the image you've started from