Skip to content

Switching from RHEL 10 to Fedora 43 breaks boot loader due to missing grub.cfg #1024

@HuijingHei

Description

@HuijingHei

Copy the issue from bootc bootc-dev/bootc#1734

When doing switches from RHEL 10 to Fedora 43, after reboot, check grub.cfg and bootuuid.cfg are in old vendor redhat, that will make the machine fails to boot a second time since grub.cfg cannot be found.

I think this is because bootupctl update only cares about EFI components like grub2 & shim, but do not update grub.cfg and bootuuid.cfg, although we have bootupctl adopt-and-update --with-static-config (PR#945), that will only update the 2 files in case ostree config --repo=/sysroot/ostree/repo get sysroot.bootloader is not set.

# 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions