How to dual boot EndeavorOS and openSUSE

You can always just grub chainload OpenSuse from EndeavourOS.

Modify /etc/grub.d/40_custom and add custom entry for OpenSuse.

menuentry "OpenSuse" {
set root="hdX,gptY"
chainloader /EFI/OpenSuse/grubx64.efi
}

Root is the OpenSuse efi partition.

hdX is the disk number (zero based), /dev/sda would be hd0 … and so on.

gptY is the partition ID, /dev/sda1 would be gpt1 … and so on.

Use chainloader with path to OpenSuse grubx64.efi within efi partition. Check the actual path, above is just an example.

This will create a separate grub entry which will launch OpenSuse grub.

Much simpler, especially for encrypted systems or setups where os-prober is inconsistent or just useless.

1 Like

I tried adding t he menuentry from openSUSE’s grub.cfg but that didn’t work. openSUSE shows up alright but can not boot it, it cannot find the kernel or initrd files.

Is your EndeavourOS or openSUSE encrypted?

You could also use the chainloading idea presented by @otherbarry above, but instead I’d add that to file /boot/grub/custom.cfg.

Why?

40_custom is what entries like this are for, they will be included whenever grub-mkconfig is run to generate grub.cfg.

1 Like

Not encrypted either. Will try the chainloader option when I get home. But since my efi partition is on /dev/sdc1 I guess I have to point it there?

I created the menuentry in /etc/grub.d/40_custom.

menuentry "openSUSE" {
        set root="hd2,gpt1"
        chainloader /boot/efi/EFI/opensuse/grubx64.efi
}

But when trying to boot it grub claims that it can not find the path. This is the correct path:

isak@motherbrain /e/grub.d> sudo ls -al /boot/efi/EFI/opensuse/grubx64.efi
-rwx------ 1 root root 315392 14 sep 18.48 /boot/efi/EFI/opensuse/grubx64.efi

But looking in efibootmgr -v the path is /EFI/opensuse/grubx64.efi I find this odd. My EFI partitions is mounted at /boot/efi.
What am I doing wrong here?

chainloader /EFI/opensuse/grubx64.efi

/boot/efi/ is a mount point, /EFI/opensuse/grubx64.efi is the path within the efi partition.

It is otherwise a good place, but whenever package grub is updated, that file will be overwritten gets a new version. It won’t be overwritten directly, but may require manual intervention.

/boot/grub/custom.cfg is free from that.

1 Like

It won’t create a .pacnew file?

Yes it should do that.

Menuentry already “knows” your EFI partition, and the chainloader is given a path inside the EFI partition.
(But @otherbarry already said the same thing…)

Thanks all who have been helping me figuring this out! Much appreciated! The chainloader solution worked!

3 Likes

The main thing is that the problem is solved.

I just wish that they would standardize the implementation of Grub settings and ucode and dual boot so it all works the same on ALL Linux distributions.

3 Likes

Is there any downside to clean up my EFI partition?

# efibootmgr
BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0005,0003,0004,0000,0002,0001
Boot0000* EndeavourOS
Boot0001* Hard Drive
Boot0002* UEFI OS
Boot0003* opensuse
Boot0004* grub
Boot0005* EndevourOS-grub

This is what I got. What are your thoughts?

I keep mine clean with only what i need.

#efibootmgr
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0005
Boot0000* Windows Boot Manager
Boot0001* EndeavourOS
Boot0005* UEFI OS

Mine boots from Grub on EndeavourOS

Great, thanks!