Multiboot - Fedora grub doesn't load other os kernel

Hello there,

I have the following problem: os-prober detects MX-Linux as Debian 11 (which was previously installed in place of MX, not sure how relevant that is).

 $ sudo os-prober
    /dev/sda5@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
    /dev/sdb3:Debian GNU/Linux 11 (bullseye):Debian:linux

Upon selecting the Debian 11 entry in my grub, MX doesn’t load and I get dropped in the (initramfs) shell.When selecting directly MX’s grub (sdb2), it loads as it should. I can access fedora (but boot doesn’t complete, something something amdgpu drm message).

When comparing Fedora’s grub.cfg with MX’s grub.cfg, the entries are very similar:Am I missing something ?

Fedora grub.cfg:

   menuentry 'Debian GNU/Linux 11 (bullseye) (on /dev/sdb3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-6.0.0-6mx-amd64--7cc60493-a401-41f7-926c-b38fa60a6e4d' {
                    insmod part_gpt
                    insmod btrfs
                    set root='hd1,gpt3'
                    if [ x$feature_platform_search_hint = xy ]; then
                      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  7cc60493-a401-41f7-926c-b38fa60a6e4d
                    else
                      search --no-floppy --fs-uuid --set=root 7cc60493-a401-41f7-926c-b38fa60a6e4d
                    fi
                    linux /boot/vmlinuz-6.0.0-6mx-amd64 root=/dev/sdb3
                    initrd /boot/initrd.img-6.0.0-6mx-amd64

MX grub.cfg:

 menuentry 'MX 21.3 Wildflower' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7cc60493-a401-41f7-926c-b38fa60a6e4d' {
    	load_video
    	insmod gzio
    	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    	insmod part_gpt
    	insmod btrfs
    	set root='hd1,gpt3'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  7cc60493-a401-41f7-926c-b38fa60a6e4d
    	else
    	  search --no-floppy --fs-uuid --set=root 7cc60493-a401-41f7-926c-b38fa60a6e4d
    	fi
    	echo	'Loading Linux 6.0.0-6mx-amd64 ...'
    	linux	/boot/vmlinuz-6.0.0-6mx-amd64 root=UUID=7cc60493-a401-41f7-926c-b38fa60a6e4d ro  quiet splash
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-6.0.0-6mx-amd64
    }

Furthermore grubby only displays fedora boot entries, no windows, no “Debian”;

sudo grubby --info=ALL
    index=0
    kernel="/boot/vmlinuz-6.2.12-300.fc38.x86_64"
    args="ro loglevel=3 ${extra_cmdline}"
    root="UUID=d0cdf429-d6c0-4a56-82f5-43cbfe3b41fc"
    initrd="/boot/initramfs-6.2.12-300.fc38.x86_64.img"
    title="Fedora Linux (6.2.12-300.fc38.x86_64) 38 (KDE Plasma)"
    id="465125b6dc80477698faaf5211543315-6.2.12-300.fc38.x86_64"
    index=1
    kernel="/boot/vmlinuz-6.2.11-300.fc38.x86_64"
    args="ro loglevel=3 ${extra_cmdline}"
    root="UUID=d0cdf429-d6c0-4a56-82f5-43cbfe3b41fc"
    initrd="/boot/initramfs-6.2.11-300.fc38.x86_64.img"
    title="Fedora Linux (6.2.11-300.fc38.x86_64) 38 (KDE Plasma)"
    id="465125b6dc80477698faaf5211543315-6.2.11-300.fc38.x86_64"
    index=2
    kernel="/boot/vmlinuz-6.2.11-100.fc36.x86_64"
    args="ro loglevel=3 ${extra_cmdline}"
    root="UUID=d0cdf429-d6c0-4a56-82f5-43cbfe3b41fc"
    initrd="/boot/initramfs-6.2.11-100.fc36.x86_64.img"
    title="Fedora Linux (6.2.11-100.fc36.x86_64) 36 (KDE Plasma)"
    id="465125b6dc80477698faaf5211543315-6.2.11-100.fc36.x86_64"
    index=3
    kernel="/boot/vmlinuz-0-rescue-465125b6dc80477698faaf5211543315"
    args="ro loglevel=3 ${extra_cmdline}"
    root="UUID=d0cdf429-d6c0-4a56-82f5-43cbfe3b41fc"
    initrd="/boot/initramfs-0-rescue-465125b6dc80477698faaf5211543315.img"
    title="Fedora Linux (0-rescue-465125b6dc80477698faaf5211543315) 36 (KDE Plasma)"
    id="465125b6dc80477698faaf5211543315-0-rescue"

Additional infos:

OS: Fedora Linux 38 (KDE Plasma) x86_64
Kernel: 6.2.12-300.fc38.x86_64
CPU: AMD Ryzen 5 5600X (12) @ 3.700GHz

Partitions


    sda                465.8G                     
    ├─sda1               529M Récupération ntfs   
    ├─sda2 /boot           1G boot         ext4   
    ├─sda3                16M                     
    ├─sda4               136G windows      ntfs  
    ├─sda5 /boot/efi     512M efi          vfat   
    └─sda6 /var        327.1G fedora       btrfs  
    sdb                447.1G                     
    ├─sdb1             416.6G EXT002       ext4   
    ├─sdb2               513M              vfat  
    ├─sdb3              20.3G rootMX21     btrfs  
    └─sdb4               9.8G homeMX       btrfs

More questions/hypothesis

  1. How can I make grubby detect all OS’s ?

  2. Why is my MX install displayed as “Debian 11” on fedora’s OS prober and how can I fix that ?

  3. Is it possible that Fedora’s grub has troubles accessing MX’s kernel (which is on another disk/partition)

More infos:
MX was installed in UEFI mode.
Yes, I ran sudo grub2-mkconfig -o /etc/grub2-efi.cfg
Debian 11 was previously installed on sdb

What is the content of /boot/efi/EFI? Please post ls -l /boot/efi/EFI

You said MX was installed on sdb, but what I fail to see is where you have your fedora root partition.
sda 465.8G
├─sda1 529M Récupération ntfs
├─sda2 /boot 1G boot ext4
├─sda3 16M
├─sda4 136G windows ntfs
├─sda5 /boot/efi 512M efi vfat
└─sda6 /var 327.1G fedora btrfs
sdb 447.1G
├─sdb1 416.6G EXT002 ext4
├─sdb2 513M vfat
├─sdb3 20.3G rootMX21 btrfs
└─sdb4 9.8G homeMX btrfs

I see /boot, /boot/efi, and /var, but nothing about / or /home unless they are the ones in sdb3 & sdb4. If that is where they are then it would appear you may have overwritten the MX install with fedora.

When posting please just highlight the pasted text then click the </> button on the tool bar so the entire text is enclosed in the preformatted text tags. Doing as you did one line at a time does not retain the onscreen formatting.

1 Like

Hello, thanks for the reply !

(edit: here it is)

ls -l /boot/efi/EFI/
total 12
drwx------. 2 root root 4096 Jan 19 01:00 BOOT/
drwx------. 2 root root 4096 Apr 21 21:10 fedora/
drwx------. 4 root root 4096 May 24  2022 Microsoft/

Fedora is installed on sb6, I dont know why it says /var is mounted there !
I didn’t install fedora with separate partitions, other than the mandatory efi partition.
I’m not sure why I put the boot flag on sda2.

Mx hasn’t been overwritten since I have access to it when I boot from sdb (selecting the mx boot loader from the bios f8 boot from other device).

Sorry about the formatting and thanks for the heads up, it happened because I copy pasted from reddit and didn’t pay attention. I’ll fix it as soon as I Haven access to my pc. Edit: fixed