How can I “isolate” GRUB from one distro to another on a multi-boot setup? (Update: now using rEFInd; but need help)

I have a triple boot setup with KDE Neon Unstable (we’ll call this the primary since that’s the one I use the most so far), Ubuntu MATE development release, & Windows 10 on a laptop (thanks to 500GB + 1TB SSDs I can add a few more in the future).

How can I “isolate” GRUB of a non-primary distro (installed on the partition where the distro is installed), and have a “master” GRUB from the primary distro that’s install on the disk itself? I’d like to be able to update GRUB on each non-primary distro without screwing the theme and setup of another, especially the primary GRUB.

I was thinking that, similar to how we can boot to Windows Boot Manager from GRUB, I can boot to my Ubuntu MATE’s GRUB from my Neon’s GRUB if need be.

I’m guessing you have both linux distros on different partitions on the same drive. If you do trying going into UEFI and seeing if those partitions are seen as separate drives. Then make KDE Neon the first drive from which to boot. The grub boot for that drive will will be the one used. Or it should be.

Presently I’m trying to figure out how to install Feren along side Endeavour on a 1 TB nvme. Last night I cloned Endeavour to the new drive. Windows 10 is on a 3.5" ssd. When I installed Feren along side Endeavour it installed its Grub over Endeavour’s. I’m presently trying to figure out how to install Feren without a boot. Considering designating a usb as the boot location for Feren so I can just yank it and update grub in Endeavour so it recognizes the Feren partition.

You should only need to install grub once. There should be options to not install grub when your installing the other non-primary distros. Then you boot into the primary OS and update or reinstall grub from there. It should find the other OS and add them to the boot list.

Potentially grub might panic when the partitions change but if you know a little bit about grub recovery mode its a quick fix.

Some distroes for inexplicable reasons don’t offer the option to not install grub boot loader. When I attempted to install Feren the option wasn’t there. I couldn’t find the options in the Calamares installer in terminal either.

1 Like

As @haroldcrews said, some distros don’t offer it.

Main reason why I’m asking is because on distros that don’t have GRUB package installed, restarting to boot the non-primary distro (where GRUB isn’t installed) doesn’t work until I fully turn it off (though occasionally it wouldn’t boot at all until couple of hours after). I was thinking, in a similar manner to how we can have Windows Boot Manager in GRUB, I can boot to Ubuntu MATE’s GRUB (which is the non-primary distro), and it wouldn’t screw around with the config of my KDE Neon’s GRUB.

I think the Ubiquity installer does have the option to install without installing the boot loader but you have to start the installer from the terminal and use the option to not install the boot loader. Or at least it did. That option may be there where it may not be present in the gui installer. While searching for a way to install Feren I did found this video on installing Mint without installing the grub boot loader.

So I updated my Ubuntu MATE system last night & totally forgot to remove GRUB. Now, GRUB is stuck using the one from Ubuntu MATE & I can’t use the one from Neon anymore.

That’s one half of my problem solved, I guess.

I’m just a hack, but my technique to get GRUB unscrewed has been to get into my “main” install and run “Boot Repair” from that install setting it as the primary. “Boot Repair” may be in your distro’s repository.

Another option that I haven’t used (I’m running a steam powered antique from the before EFI times.) is rEFInd. It seems like a neat GRUB killer. It has been mentioned positively on Destination Linux in the past. It acts as your first boot, surveys your machine for OSes available and then presents a selection dialog. Any changes since last boot are accounted for because it is surveying for efi boot loaders each time.

I hope this is at least interesting.

Only took a glance at it, but it reminds me of Clover bootloader. Interesting. I’m gonna give that a whirl, and customize the theme (I hate bright themes).

I’ll be interested to hear how you make out. At some point after the market sorts itself out I plan to move forward to something that has more than four cores and 8 gb of ram.

Use LILO (just kidding I’m not really suggesting this).

Have you tried using Grub Rescue? That should allow you to go into the desired system. Once there you can go into Grub Customizer and just save the settings as they are. That supposedly re-installs grub for the system you desire to be the primary system. Ultimately though it’s best to remove the grub bootloader from the non-primary systems. There should only be one bootloader on your system.

Grub Rescue will do that for me, too?

I’m still playing around with it, but it didn’t really help me. I made sure that it would boot GRUB from Neon, but it still boots to Ubuntu MATE.

The only one that works is vmlinuz from 5.4 kernel, but I’m already running 5.8.

Update: totally removed GRUB from all of my distros, and just sticking with rEFInd. It detected vmlinuz-5.4.x from my KDE Neon, but not 5.8.

Both Clover and rEFInd are forks of rEFIt so it’s not hard to see a resemblance.

I just installed Arch an hour ago. I’m getting this error when trying to boot it using rEFInd:

Invalid loader file!
Error: Not found while loading vmlinuz-linux

I installed Arch on my laptop’s secondary drive and formatted using Btrfs, and the ESP is on the primary. rEFInd was installed few weeks back with KDE Neon, if that helps.

Following instructions on Arch Wiki about setting up rEFInd, here’s the menu entry for Arch on my laptop:

menuentry "Arch Linux" {
    icon     /EFI/refind/icons/os_arch.png
    volume   "Arch"
    loader   /boot/vmlinuz-linux
    initrd   /boot/initramfs-linux.img
    options  "root=PARTUUID=12c1d277-ab6f-764f-aa41-92a11fd1b4c5 rw rootfstype=btrfs add_efi_memmap initrd=boot\intel-ucode.img"
    submenuentry "Boot using fallback initramfs" {
        initrd /boot/initramfs-linux-fallback.img
    }
    submenuentry "Boot to terminal" {
        add_options "systemd.unit=multi-user.target"
    }
}

I tried using the PARTUUID from my EFI partition and my Arch partition, but no go.

I also double checked if subvolumes exist on that partition, but none exist:

$ sudo btrfs subvolume list /mnt
ID 258 gen 20 top level 5 path var/lib/portables
ID 259 gen 21 top level 5 path var/lib/machines

Is there something I’m missing?

Do btrfs mount points start with an “@”? I don’t manually setup btrfs but last I tried there was something about “@” that I messed up. You probably know more than I do…

Nah. I only just started on Btrfs with that Arch install I did today. I don’t know what exactly I’m looking for. The guide on Arch wiki about rEFInd had a section for Btrfs subvolume, but that doesn’t apply to me.

Quick update: I just noticed this when I booted my laptop again. The Arch entry is looking for my ESP. I already changed the PARTUUID to look for my Arch partition. Also, I noticed that in /boot/efi/EFI/refind/drivers_x64/, it only had drivers for ext4, so I copied Btrfs driver from /usr/share/refind/refind/drivers_x64. Still didn’t work, though.

SOLVED: not sure how, but I powered it down before leaving for work. After I got home, it’s working! Huh…

1 Like

I just installed Void Linux, but rEFInd couldn’t boot it up

Any idea what could be the issue?

I assumed it was because the EFI partition was missing, so I mounted it on /boot/efi, but that wasn’t the case.

Edit: I switched the filesystem from XFS to Btrfs, and that worked.