Grub2-mkconfig and BTRFS boot

Hello, I am a long time Fedora user and have used EXT4 partitions on all my installs. I am dual booting on an UEFI system, with Fedora as my daily driver and Windows 11 as a dual boot option (I have CAD software that has to use Microsoft). I decided to try using BTRFS as the snapshot feature is very appealing.

I desire to keep the /boot section within the BTRFS subvolume. By default, Fedora creates a separate EXT4 /boot, but the rate that new kernels are released, having a snapshot that isn’t inclusive of the boot kernel can lead to issues.

System is set up with a BTRFS volume with @ and @home subvolumes, mounted at / and /home, respectively. I have /boot/efi mounted to a separate EFI partition that houses the boot image for Windows. Installing this way works, no issues, updates the bootloader when a new kernel is installed.

However, when I run the following command as root “grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg”, the bootloader removes all entries for Fedora, like the prober does not see Fedora at all.

When I run grubby --info=ALL, all entries exist.

Any ideas how to fix this? Thanks!

Have you looked at this?

Specifically this part:

Refrain from using grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg going forward. This is a valid location on Fedora 33 and earlier. However on Fedora 34 and later, it is a small stub file that merely forwards to /boot/grub2/grub.cfg . See the Reinstalling GRUB section if you have accidentally overwritten this file.

1 Like

I didn’t know that, thank you.

I ran grub2-mkconfig -o /etc/grub2.cfg and grub2-mkconfig -o /etc/grub2-efi.cfg

This fixed the issue. Thank you for your insight and rapid response.

1 Like