Two distros (Fedora ❤ Tumbleweed) - two NVMe - grub2 menu

Hi, I installed an additional Linux distribution on a separate NVMe disk. After running the command:

tomasz@fedora:~$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found openSUSE Tumbleweed on /dev/nvme0n1p2
Found openSUSE Tumbleweed on /dev/nvme0n1p2
Adding boot menu entry for UEFI Firmware Settings ...
done
tomasz@fedora:~$

Unfortunately, after restarting the computer, there are no new entries in the grub menu…
What could be the reason for this?

Please show us the output of lsblk -f

tomasz@fedora:~$ lsblk -f
NAME        FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
zram0       swap   1     zram0  3bd58d8a-50ee-41f7-a436-a0caf04a93d1                [SWAP]
nvme1n1                                                                             
├─nvme1n1p1 vfat   FAT32        C75A-3BE9                             579,5M     3% /boot/efi
├─nvme1n1p2 ext4   1.0          7ea81d20-4e85-49ca-9ad2-897fe6f07b17    1,3G    24% /boot
└─nvme1n1p3 btrfs        fedora 09ace576-16e0-4301-9786-e418e5c1161b    1,6T    11% /home
                                                                                    /
nvme0n1                                                                             
├─nvme0n1p1 vfat   FAT32        A97C-44DE                                           
├─nvme0n1p2 btrfs               294b59d7-89eb-418c-bd5e-376c1cf6151f                
└─nvme0n1p3 swap   1            6f6cf837-534d-4981-9b83-1f238ed0e3b1                
tomasz@fedora:~$

I don’t really have an answer but I remember a user recently had a similar problem (with Nobara as the “other” OS instead of Tumbleweed).

os-prober (the module that grub-mkconfig uses to find other OSes) should have been able to find the Nobara install on a btrfs partition, but for some reason it didn’t.

If you wanted to dig deeper, you could try replicating from a terminal the linux-boot-prober commands that os-prober is supposed to use (in the code quoted in my linked post above).

In this case, apparently it did find Tumbleweed, according to the OP. However, the partition for tumbleweed that is shown in his post (nvme0n1p2) appears to be btrfs.
AFAIK with a routine installation the bios cannot use a /boot in btrfs for booting (the btrfs drivers have not been loaded at that stage). This is why for fedora /boot is an ext4 filesystem.

@tbojanowski for the current conditions you should be able to boot tumbleweed from the bios boot menu. It may be necessary to use that exclusively since the bios does not allow booting fedora with /boot in btrfs.

For a final fix you should be able to create a custom menu entry in grub to allow booting from the tumbleweed drive by editing the file /etc/grub.d/40_custom and making the necessary entries there to boot the other OS, but probably would need to use the efi partition on the tumbleweed drive for booting.

1 Like

What OP sees is:

  1. Messages from os-prober showing that it found the Tumbleweed partition
  2. Nothing in the GRUB menu for Tumbleweed

Now, once os-prober finds a partition, the next step (per the code I highlighted in the linked thread) is that it calls linux-boot-prober to get further details necessary to create the GRUB config.

So since OP sees the first step happening correctly (os-prober finds the partition) but no GRUB config gets written for Tumbleweed, it seems to be that linux-boot-prober step which isn’t doing what is expected.

GRUB can boot from btrfs, albeit with some limitations (e.g. the Hidden Menu feature doesn’t work without patching).

In any case though, it’s not that GRUB is trying and failing to boot from btrfs. It’s that the entries for Tumbleweed don’t get written into the GRUB config when grub2-mkconfig is called.

Thanks for the info. Until I figure out this problem, I’m running openSUSE using F11 (UEFI boot).

However, I don’t know how to configure /etc/grub.d/40_custom in my case.

You can’t because the other OS is using btrfs for /boot,
as explained above.

GRUB can boot from a btrfs partition. Though if you’re booting from Fedora’s GRUB (without openSUSE’s patches), there will be limitations, e.g. GRUB2_SAVEDEFAULT won’t work because the grubenv data won’t be written.

Another option, as @computersavvy mentioned, would be to add a GRUB entry that just chainloads the openSUSE EFI.