grub2-mkconfig detects other os but does not add it to grub.cfg

I have UEFI with 4 OSes

they all get detected and listed but Fedora is never added as menu entry

suser@laprusxps17:~>sudo grub2-mkconfig -o /tmp/grub.cfg 
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-5.11.6-1-default
Found initrd image: /boot/initrd-5.11.6-1-default
Found linux image: /boot/vmlinuz-5.11.4-1-default
Found initrd image: /boot/initrd-5.11.4-1-default
Found Windows Boot Manager on /dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 20.04.2 LTS on /dev/nvme0n1p8
Found Ubuntu 20.04.2 LTS on /dev/nvme0n1p8
Found Fedora 34 (Workstation Edition Prerelease) on /dev/nvme0n1p9
done

suser@laprusxps17:~> sudo grep -i fedora /tmp/grub.cfg 
suser@laprusxps17:~> 


any hints?

Is the Fedora partition btrfs? When I used Fedora, that version of grub wouldn’t create entries for btrfs partitions. If openSUSE uses the same upstream, that could be a problem here, too.

Gene

What does efibootmgr -v report?

Post journalctl output that includes os-prober run. E.g.

START_TIME=$(date +%s)
grub2-mkconfig
journalctl --since=@$START_TIME

and provide full output of all commands.

yes fedora /opensuse and ubuntu all use btrfs and I have created another efi partition for Fedora to store its bootmanager just to be able to run it as opensuse grub does not list fedora at the moment

for Ubuntu partition I had to add symlinks from
/@/boot to /boot
and
/@/etc/ to /etc

for Opensuse grub to detect ubuntu - but it works now.

For fedora there’s no @ so the same trick did not work.

sudo efibootmgr -v 
BootCurrent: 0001 
Timeout: 2 seconds 
BootOrder: 0001,0006,0000,0004,0005 
Boot0000* Windows Boot Manager  HD(2,GPT,1ddaa2fb-2092-4156-bcc3-05e541d6b13f,0x109000,0x31800)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.
4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...I................ 
Boot0001* opensuse-secureboot   HD(10,GPT,33268e06-15dd-407a-aa79-e78b3620b51e,0x745bd000,0x149d8f)/File(\EFI\opensuse\shim.efi) 
Boot0004* UEFI PNY CS2130 1TB SSD PNY21012101040106D25 1        PciRoot(0x0)/Pci(0x1b,0x0)/Pci(0x0,0x0)/NVMe(0x1,64-79-A7-45-40-50-07-81)/HD(2,GPT,1ddaa2fb-2092-4156-bcc3-05e541d6b13f,0x109000,0x31800)/Fi
le(\EFI\Boot\BootX64.efi)N.....YM....R,Y. 
Boot0005* UEFI PNY CS2130 1TB SSD PNY21012101040106D25 1 2      PciRoot(0x0)/Pci(0x1b,0x0)/Pci(0x0,0x0)/NVMe(0x1,64-79-A7-45-40-50-07-81)/HD(10,GPT,33268e06-15dd-407a-aa79-e78b3620b51e,0x745bd000,0x149d8f
)/File(\EFI\Boot\BootX64.efi)N.....YM....R,Y. 
Boot0006* Fedora        HD(10,GPT,33268e06-15dd-407a-aa79-e78b3620b51e,0x745bd000,0x149d8f)/File(\EFI\fedora\shimx64.efi)



here is the output
https://pastebin.com/YPavBs53so it seems like Fedora is detected but not added.

I asked you for logs and there are no logs.

FWIW, you might wish to consider my approach to Fedora as spelled out showing use of custom.cfg here. That particular example predates my putting Fedora on NVME and UEFI. Here’s one such:

menuentry "Fedora 34 on P18" {
	load_video
	set gfxpayload=keep
	search --no-floppy --set=root --hint-efi=hd0,gpt18 --label zm2p18f34
	linux	/boot/vmlinuz root=LABEL=zm2p18f34 mitigations=auto consoleblank=0 
	initrd	/boot/initrd
}

Note Fedora doesn’t automatically generate kernel or initrd symlinks, so you would have to set that up yourself. I don’t bother installing every new kernel that comes along, so to me it’s trivial to deal with.

here they go https://pastebin.com/BeAR6B6F

os-prober extracts boot menu entries from known bootloader configuration files. Fedora apparently has switched to using BLS (Boot Loaded Specification) so its grub.cfg contains only instruction to parse it. There are no menu entries in fedora’s grub.cfg, they are generated dynamically at boot time, so no menu entries are extracted and imported by os-prober. And os-prober does not support BLS directly.

### BEGIN /etc/grub.d/10_linux ###insmod part_gpt
insmod btrfs
if  x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root  7f61ad15-9c13-4860-aeea-0929075863ce
else
search --no-floppy --fs-uuid --set=root 7f61ad15-9c13-4860-aeea-0929075863ce
fi
insmod part_gpt
insmod fat
if  x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=boot  2A84-4085
else
search --no-floppy --fs-uuid --set=boot 2A84-4085
fi


# This section was generated by a script. Do not modify the generated file - all changes
# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
#
# The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
# populates the boot menu. Please refer to the Boot Loader Specification documentation
# for the files format: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/.


# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
# entries populated from BootLoaderSpec files that use this variable work correctly even
# without a grubenv file, define a fallback kernelopts variable if this has not been set.
#
# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
if  -z "${kernelopts}" ]; then
set kernelopts="root=UUID=7f61ad15-9c13-4860-aeea-0929075863ce ro resume=UUID=dbcffef6-f795-4793-8de3-71ded440546c rhgb quiet "
fi


insmod blscfg
blscfg
### END /etc/grub.d/10_linux ###