Booting Multiple Manjaro Instances with rEFInd

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?

To what? rEFInd is not GRUB and is configured separately.

Please post your /boot/refind_linux.conf.

This is mine, for example:

"Boot with standard options"    "root=UUID=cf70171e-27dd-43ec-a0b7-52a1fa96be2a rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\initramfs-%v.img ec_sys.write_support=1 udev.log_priority=3"
"Boot to single-user mode"      "root=UUID=cf70171e-27dd-43ec-a0b7-52a1fa96be2a rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\initramfs-%v.img ec_sys.write_support=1 udev.log_priority=3 single"
"Boot with minimal options"     "ro root=/dev/nvme0n1p1"
"Boot to terminal"              "root=UUID=cf70171e-27dd-43ec-a0b7-52a1fa96be2a rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\initramfs-%v.img ec_sys.write_support=1 udev.log_priority=3 systemd.unit=multi-user.target"
"Boot using fallback initramfs" "root=UUID=cf70171e-27dd-43ec-a0b7-52a1fa96be2a rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\initramfs-%v-fallback.img ec_sys.write_support=1 udev.log_priority=3"

Manjaro Gnome (4) has its own grub already, so I was hoping to kick to that, using the menu entry above in ‘refind.conf’ - this is how the other Linux installations all boot up but, as long as it starts up I’m not that fussy how, but like to understand why.

I don’t think I’ve got ‘/boot/refind_linux.conf’ files anywhere - is this an alternative option for configuration so that rEFInd auto detection will pick up the partition? (I think I prefer this approach to what I’ve been trying if my understanding is right).

If so, where does this file go, into the boot directory that contains /boot/efi/EFI/refind or in the /boot directory in the drive and partition containing Manjaro Gnome (4) or does it not matter at all? (I’ve found I can shuffle the EFI bootloaders to different EFI partitions and it makes no difference).

I’ve posted the os prober generated output from the grub on my primary Manjaro KDE (1) partition as I’ve been using that as an information source to try and figure out what to put in rEFInd’s menu entry.

I do have this file on my main Manjaro KDE (1) partition - apologies.

Mine looks like this…

"Boot with standard options"  "root=UUID=656d8930-a03a-4850-a10b-696abf952cd4 rw rootflags=subvol=@ quiet splash udev.log_priority=3 ibt=off"
"Boot to single-user mode"    "root=UUID=656d8930-a03a-4850-a10b-696abf952cd4 rw rootflags=subvol=@ quiet splash udev.log_priority=3 ibt=off single"
"Boot with minimal options"   "ro root=/dev/nvme0n1p4"

I’m going to try cloning it into /boot on the other partition and changing the roots.

@Yochanan - I do have this file on my main Manjaro KDE (1) partition - apologies.

Mine looks like this…

"Boot with standard options"  "root=UUID=656d8930-a03a-4850-a10b-696abf952cd4 rw rootflags=subvol=@ quiet splash udev.log_priority=3 ibt=off"
"Boot to single-user mode"    "root=UUID=656d8930-a03a-4850-a10b-696abf952cd4 rw rootflags=subvol=@ quiet splash udev.log_priority=3 ibt=off single"
"Boot with minimal options"   "ro root=/dev/nvme0n1p4"

I cloned it into /boot on the other partition and changed it as follows…

"Boot with standard options"  "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"
"Boot to single-user mode"    "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 single"
"Boot with minimal options"   "ro root=/dev/sdc2"

With that alone I’m not seeing anything new appearing in rEFInd - Do I need to activate the menuentry as well?

rEFInd should only be installed once on the primary drive with your ESP. It will automatically detect EFI’s and kernels across all your parititons / drives.

Reading material:

I only have rEFInd installed once (on my first NVM drive EFI partition) - I have 3 ESPs - 1 on each NVM drive and 1 on the /dev/sdc device that had an old ubuntu bootloader from years ago but was otherwise useless.

It’s detecting the EFI bootloaders fine (Manjro KDE, Windows and Fedora) wherever they may be and it also detects the kernel for Manjaro KDE at /@/boot/ on it’s btrfs partition on /nvme0n1p4, but it doesn’t detect the kernel for Manjaro GNOME on /dev/sdc.

This is the meat of my question - It isn’t automatically detecting it - It doesn’t have it’s own EFI bootloader anywhere - how can I get it to boot? Am I actually trying to get something to work that’s impossible because I have 2 Manjaro instances installed or am I missing something?

The instructions I’ve read so far on the rEFInd site have suggested a manual menuentry in refind.conf in /boot/efi/EFI/refind but I’ve hit a bit of a brick wall with that, in that I can’t seem to get it working (This also really doesn’t feel like the right way to go).

I’ve been following this guide, which has been very useful: https://medium.com/@manujarvinen/setting-up-a-multi-boot-of-5-linux-distributions-ca1fcf8d502
(up until something unexpected does (or doesn’t) happen!)

The root of my problem though was this (Thanks to @Yochanan for the ArchWiki pointer)…

By default refind-install installs only the driver for the file system on which kernel resides. Additional file systems need to be installed manually by copying them from /usr/share/refind/drivers_x64/ to esp/EFI/refind/drivers_x64/ , or you can install all drivers with the --alldrivers option. This is useful for bootable USB flash drives.

My Manjaro KDE and Fedora installations were both btrfs but the older Manjaro Gnome install was on ext4.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.