Grub cannot find the other linux os installed on the hard drive

Hey
I have made a multiboot system, with windows, fedora and EndeavourOS.
I have installed EndeavourOS as the last os.

When I log in, EndeavorOS grub cannot find the other boot options. I edited /etc/default/grub and enabled os-prober.

Now EndeavourOS can find windows boot option. But it can’t find fedora. What should I do here?

I have also tried fedora grub and it can find all boot options but it cannot boot into EndeavourOS. It comes up with an error saying it can’t find the kernel.

Fedora uses:
/boot
/boot/efi
/
/home
and so on.

When I had to install EndeavorOS, I mounted /boot/efi. And nothing else.
Did I do something wrong here? should i have mounted /boot too?

Can you share the full output of sudo grub-mkconfig ?

Fedora’s os-prober/grub doesn’t properly detect/handle Arch-based distros because there are two initrd entries.

Ok, fedora grub shows all boot options. It just can’t boot them.
But for me it doesn’t matter what kind of grub I have to use, as long as it shows and boots them all.

sudo grub-mkconfig

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
if loadfont /@/boot/grub/fonts/DejaVuSansMono36.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_DK
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
insmod png
background_image -m stretch /@/usr/share/endeavouros/splash.png
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'EndeavourOS Linux, with Linux linux-zen' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
	echo	'Loading Linux linux-zen ...'
	linux	/@/boot/vmlinuz-linux-zen root=UUID=ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49 rw rootflags=subvol=@  loglevel=3 nowatchdog nvme_load=YES
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/intel-ucode.img /@/boot/initramfs-linux-zen.img
}
menuentry 'EndeavourOS Linux, with Linux linux-zen (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
	echo	'Loading Linux linux-zen ...'
	linux	/@/boot/vmlinuz-linux-zen root=UUID=ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49 rw rootflags=subvol=@  loglevel=3 nowatchdog nvme_load=YES
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/intel-ucode.img /@/boot/initramfs-linux-zen-fallback.img
}
menuentry 'EndeavourOS Linux, with Linux linux-lts' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
	echo	'Loading Linux linux-lts ...'
	linux	/@/boot/vmlinuz-linux-lts root=UUID=ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49 rw rootflags=subvol=@  loglevel=3 nowatchdog nvme_load=YES
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/intel-ucode.img /@/boot/initramfs-linux-lts.img
}
menuentry 'EndeavourOS Linux, with Linux linux-lts (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
	echo	'Loading Linux linux-lts ...'
	linux	/@/boot/vmlinuz-linux-lts root=UUID=ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49 rw rootflags=subvol=@  loglevel=3 nowatchdog nvme_load=YES
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/intel-ucode.img /@/boot/initramfs-linux-lts-fallback.img
}
menuentry 'EndeavourOS Linux, with Linux linux' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
	echo	'Loading Linux linux ...'
	linux	/@/boot/vmlinuz-linux root=UUID=ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49 rw rootflags=subvol=@  loglevel=3 nowatchdog nvme_load=YES
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/intel-ucode.img /@/boot/initramfs-linux.img
}
menuentry 'EndeavourOS Linux, with Linux linux (fallback initramfs)' --class endeavouros --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod btrfs
	search --no-floppy --fs-uuid --set=root ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49
	echo	'Loading Linux linux ...'
	linux	/@/boot/vmlinuz-linux root=UUID=ff2697a2-0ea1-44b9-83a2-3d4f0bb9ef49 rw rootflags=subvol=@  loglevel=3 nowatchdog nvme_load=YES
	echo	'Loading initial ramdisk ...'
	initrd	/@/boot/intel-ucode.img /@/boot/initramfs-linux-fallback.img
}

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

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-B8ED-F5C9' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root B8ED-F5C9
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
fwsetup --is-supported
if [ "$grub_platform" = "efi" -a "$?" = 0 ]; then
	menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
		fwsetup
	}
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

Yes, that is normal.

This looks normal.

I think that I have seen that Arch grub/os-prober has trouble detecting Fedora.

I know that Fedora grub can detect but not boot Arch.

I think your best bet is to setup manual boot stanzas instead of trying to use auto-detection.

Alternatively, you could install refind which will detect both grub installs and let you choose between them.

Ok, thanks for the help. It’s good to know that I didn’t do anything wrong in the installation.

Do you have a link or can you point me in the direction of how to make a manual boot stanzas?

https://wiki.archlinux.org/title/GRUB#Boot_menu_entry_examples

thank you:-)

1 Like

If I remember correctly the “regular” os-prober is not capable of detecting other operating systems on BTRFS, assuming your Fedora is on BTRFS.

Some patched version of os-prober could do this:

https://aur.archlinux.org/packages/os-prober-btrfs

Fedora ships with an ext4 /boot so I am not sure that would be the problem in this case, would it?

Ah, I see. In that case that shouldn’t be an issue.

On another note, I’ve got a Fedora install, with everything on one and the same EXT4 partition. From an Arch install on the same disk, os-prober and grub-mkconfig seem to be working as they should, detecting and generating a bootable entry for Fedora.

1 Like

os-prober-btrfs works fine on the terminal. It shows that it has found fedora.

But EndeavorOS grub doesn’t show fedora.

I’m thinking of doing a fresh endeavourOS installation.

Where I this time, mount:
/boot
and
/boot/efi

The error fedora’s grub comes with is that it cannot find the kernel in /boot.

When I uninstall it again, I think that quite a few files will be placed on my /boot/efi partition from EndeavorOS.

Do you have an idea how I can clean it up. So that I ensure that I don’t delete anything from fedora?

It could also be that I should just install EndeavorOS on it in the aforementioned way. If that works, then I can reinstall both fedora and EndeavorOS?

There was a known “grub guy” (gohlip?) in old manjaro forums whose tutorials were great imo. I wanted to post the relevant one but those forums seems to be broken now? :frowning_face:

Thanks for thinking about it.

But I’ve read a little more into it.

It is not a good idea for multiple distros to share the /boot partition. Only /boot/efi should be shared.

And the solution is written a little further up. I have to create manual entries for each distro i want to see in the grub menu.
fedora and arch based distros don’t mix very well.

I am not sure what is meant by “mix” in this context. When it comes to use Arch’s grub to boot Fedora, as previously mentioned, I have no issues doing so. That being said, I should mention that my Fedora is installed in one EXT4 partition.

This is correct.

This is an issue with Fedora boot method, and nothing on Archlinux, or btrfs.
Fedora does not use normal upstream grub, but a seriously modified, using a different method (Fedora patent, a combination of grub and systemd-boot type of configuration, if I could give a short description), which cannot provide data searched by other distros grub/os-prober.

I don’t think FS makes a difference, but the fact that you probably use the Legacy grub method (same old grub), which is still possible. You might want to confirm this, when/if you find time.

@culcal only support option for this is at Fedora support forum, or documentation. They have instructions on how to use the Legacy grub method.

IAMOF, I was his student, assistant, and successor, as he has authorized me to continue his legacy :stuck_out_tongue:

2 Likes

I have looked at some posts from the fedora forum. And they write more or less the same as you write about fedora grub and multiboot.
The solution is to make manual entries as @dalto mentions further up according to fedora-forum.
It’s fine with me making manual entries. It only needs to be done once, then it’s up and running.
The most important thing is that I can boot into the different distros from the same grub menu.

2 Likes

Sorry. I had just forgotten that you wrote that it works fine on your system.

What I meant by fedora and arch don’t “mix”. Was that their grub behaved differently. And according to fedorafrum its not possible to boot arch based distros from fedora grub.

The error message I get from fedora grub is that it cannot find the EOS kernel, in /boot.
But my EOS doesn’t have /boot partition.
Something tells me it will be worth the time to try to create a separate /boot partition for EOS, just like fedora has a separate boot partition, and then see if that works.

What I understand from the error message is that EOS has its boot directory, which is located in /root. And fedora is not looking there. It searches for the kernel in the fedora /boot partition.
So if each system has its own /boot partition then maybe it should work.

Of course I haven’t forgotten that it works on your system. And it might be because of EXT4 partition or maybe as @petsam mentions because of legacy grub.

1 Like

I don’t know what the Legacy grub method is. I use the current regular os-prober and grub from Arch’s repo:

$ sudo os-prober
[sudo] password for pebcak: 
/dev/sda2:Fedora Linux 38 (Workstation Edition Prerelease):Fedora:linux

And Fedora’s boot entry in grub.cfg:

menuentry 'Fedora Linux 38 (Workstation Edition Prerelease) (on /dev/sda2)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-543143af-f63f-4ebf-a33f-44df242700ab' {
	insmod part_gpt
	insmod ext2
	search --no-floppy --fs-uuid --set=root 543143af-f63f-4ebf-a33f-44df242700ab
	linux /boot/vmlinuz-6.1.0-0.rc7.51.fc38.x86_64 root=/dev/sda2
	initrd /boot/initramfs-6.1.0-0.rc7.51.fc38.x86_64.img
1 Like

There are a lot of people who have reported that Arch grub cannot locate their Fedora install.

Did you use automatic partitioning or manual? Also, it looks like you are running rawhide or something similar.