I now have 4 OSes on my machine, so have invested some time to getting reFind working.
I have…
- (1) Manjaro (with KDE) [nvme0n1p4 - btrfs]
- (2) Windows 11 [nvme1n1p3 - ntfs]
- (3) Fedora [nvme1n1p6 - btrfs]
- (4) Manjaro (with Gnome) [sdc2 - ext4]
I have got as far as rEFInd auto detecting 1, 2 & 3 but 4 is giving me problems. The first 3 all have their own EFI boot loaders from what I can see while 4 doesn’t. It seems to be bootable at the moment purely by selecting it from the grub menu for the Manjaro KDE install (1).
I want to be able to disable the OS Prober on my main Manjaro instance (1) and just use rEFInd, as I’ve done with Fedora. For now I’m having to keep both so I can get to the Gnome Manjaro instance (which I don’t use very much).
I have tried adding a menu entry like this to refind.conf (with several variants) and keep getting an “Invalid loader file” error.
menuentry "Manjaro (Gnome)" {
icon /EFI/refind/icons/os_linux.png
ostype Linux
volume {GUID} or Manjaro_Gnome
loader /boot/vmlinuz-5.15-x86_64
initrd /boot/initramfs-5.15-x86_64.img
options "root=/dev/sdc2 rootfstype=ext4 rw quiet"
}
(Also, if anyone can advise on how on earth you can pull anything off nano
to paste on here when you’re in sudo
I’d appreciate it - I had to manually type the above out so here’s hoping I don’t have typos!)
From Grub
The OS Prober part of the Grub menu on the main Manjaro install (1) looks like this…
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme1n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-C459-1F93' {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root C459-1F93
chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
menuentry 'Manjaro Linux (22.0.1) (on /dev/sdc2)' --class manjarolinux --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5fe8aabe-45b7-490a-a64a-bf255650c1d0' {
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 5fe8aabe-45b7-490a-a64a-bf255650c1d0
else
search --no-floppy --fs-uuid --set=root 5fe8aabe-45b7-490a-a64a-bf255650c1d0
fi
linux /boot/vmlinuz-5.15-x86_64 root=UUID=5fe8aabe-45b7-490a-a64a-bf255650c1d0 rw quiet splash apparmor=1 security=apparmor resume=UUID=20e13c13-0198-440d-932c-da4e8560f4c3 udev.log_priority=3
initrd /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
}
submenu 'Advanced options for Manjaro Linux (22.0.1) (on /dev/sdc2)' $menuentry_id_option 'osprober-gnulinux-advanced-5fe8aabe-45b7-490a-a64a-bf255650c1d0' {
menuentry 'Manjaro Linux (on /dev/sdc2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.15-x86_64--5fe8aabe-45b7-490a-a64a-bf255650c1d0' {
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 5fe8aabe-45b7-490a-a64a-bf255650c1d0
else
search --no-floppy --fs-uuid --set=root 5fe8aabe-45b7-490a-a64a-bf255650c1d0
fi
linux /boot/vmlinuz-5.15-x86_64 root=UUID=5fe8aabe-45b7-490a-a64a-bf255650c1d0 rw quiet splash apparmor=1 security=apparmor resume=UUID=20e13c13-0198-440d-932c-da4e8560f4c3 udev.log_priority=3
initrd /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
}
menuentry 'Manjaro Linux (Kernel 5.15.89-1-MANJARO x64) (on /dev/sdc2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.15-x86_64--5fe8aabe-45b7-490a-a64a-bf255650c1d0' {
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 5fe8aabe-45b7-490a-a64a-bf255650c1d0
else
search --no-floppy --fs-uuid --set=root 5fe8aabe-45b7-490a-a64a-bf255650c1d0
fi
linux /boot/vmlinuz-5.15-x86_64 root=UUID=5fe8aabe-45b7-490a-a64a-bf255650c1d0 rw quiet splash apparmor=1 security=apparmor resume=UUID=20e13c13-0198-440d-932c-da4e8560f4c3 udev.log_priority=3
initrd /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
}
menuentry 'Manjaro Linux (Kernel 5.15.89-1-MANJARO x64 - fallback initramfs) (on /dev/sdc2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.15-x86_64--5fe8aabe-45b7-490a-a64a-bf255650c1d0' {
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 5fe8aabe-45b7-490a-a64a-bf255650c1d0
else
search --no-floppy --fs-uuid --set=root 5fe8aabe-45b7-490a-a64a-bf255650c1d0
fi
linux /boot/vmlinuz-5.15-x86_64 root=UUID=5fe8aabe-45b7-490a-a64a-bf255650c1d0 rw quiet splash apparmor=1 security=apparmor resume=UUID=20e13c13-0198-440d-932c-da4e8560f4c3 udev.log_priority=3
initrd /boot/initramfs-5.15-x86_64-fallback.img
}
menuentry 'Memory Tester (memtest86+) (on /dev/sdc2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/memtest86+/memtest.bin--5fe8aabe-45b7-490a-a64a-bf255650c1d0' {
insmod part_gpt
insmod ext2
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 5fe8aabe-45b7-490a-a64a-bf255650c1d0
else
search --no-floppy --fs-uuid --set=root 5fe8aabe-45b7-490a-a64a-bf255650c1d0
fi
linux /boot/memtest86+/memtest.bin
}
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
Not sure if that helps any.
Alternative Options
If this is just impossible due to the way that the EFI bootloader “finds” Manjaro and can’t be configured then I can look to replace the Manjaro Gnome instance with something else (long term I’ll probably do that anyway - It’s a legacy install) but in the shorter term, is there a way I can exclude certain things from the OS Prober on Manjaro’s grub, so it doesn’t give me Windows twice over?