Score:0

Installed Grub on External Drive - Still Needs Main Drive to Boot

br flag

I have a secondary drive just for Linux, so when I installed Kubuntu, I chose an installer option to just install GRUB on my secondary drive. As expected, when I boot my PC, it goes straight to Windows, and I have to press F12 to go to the boot menu and choose Ubuntu to see GRUB and get into Ubuntu.

Recently, I pulled my main drive, and I expected my PC to boot into Ubuntu, but I can't boot into Ubuntu without my main drive installed. This completely defeats the purpose of putting my Linux installs on a second drive, and I want to fix this.

Ideally, I'd have GRUB on the main drive where I can choose which Linux distro to boot to, or just boot into Windows. Then I'd have GRUB on my secondary drive, and if my main drive is unplugged, it'll show my boot options for Linux.

It's okay if I can only have GRUB installed on my secondary drive or I have to go through two GRUB screens, but the secondary drive should work independent of the main one. How can I do that?

Also, the main drive boots fine without the secondary drive plugged in.

aq flag
Did you change the boot order in the BIOS?
Byte11 avatar
br flag
Yea, I also tried manually booting to it. Just said the drive wasn't bootable
oldfred avatar
cn flag
Lets see details, with all drives plugged in. Please copy & paste the pastebin link to the Boot-info summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install, not Boot-Repair ISO (unless 21.10) https://help.ubuntu.com/community/Boot-Repair Just to confirm all installs are UEFI (or all BIOS). External drives boot directly from UEFI using /EFI/boot/bootx64.efi or the drive entry like the installer, not an ubuntu entry.
cc flag
Sounds like launchpad bug 1396379 -- installer puts grub onto first disk's EFI, not the one you specify (the external drive). Look in its EFI partition, probably empty. Several fixes in bug, but you can make disk bootable simply by copying all fist disk's EFI to second disk's. Do add yourself to the bug's "Does this affect me?" list and turn the heat up so it may get eventually fixed.
Byte11 avatar
br flag
@oldfred https://paste.ubuntu.com/p/3wGVxbbvmm/, Thanks
oldfred avatar
cn flag
External or second drives need an ESP with boot files. External drives boot from /EFI/Boot/bootx64.efi or a drive type entry like the installer. To be able to boot any second drive in UEFI boot mode, you must have an ESP on that drive. Your Ubuntu UEFI files are in the NVMe drive's ESP. Your sda drive is small enough, you can just shrink sda1 & add an ESP. If you ever do an install in sdb, you need to have ESP at beginning of drive. http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu Then use Boot-Repair advanced to totally reinstall grub to sdb's ESP.
Score:0
br flag

The solution was to use Refind boot manager.

My setup right now has my Windows drive unchanged from a fresh Windows install, meaning it has the Windows boot manager. On the Linux drive, I have both GRUB and Refind installed with partitions for Fedora and Ubuntu.

I've let Fedora manage the GRUB installation. This is important because Fedora uses BTRFS, which GRUB doesn't fully support, so Fedora needs to manage all the entries because Ubuntu won't see the Fedora partition.

When the computer boots, it goes to the secondary drive, giving me the option to go back to the main drive and boot to Windows or boot to Ubuntu or Fedora. If I choose Ubuntu, it goes straight to Ubuntu. If I choose Fedora, it goes to the GRUB bootloader that Fedora manages. I couldn't get the Fedora option to go straight to Fedora, probably because Refind can't see Fedora's BTRFS partition. Another reason to let Fedora manage GRUB.

If I pull the Linux drive, my BIOS will still have the entry for the Windows Boot Manager, and it will boot straight to it, as if I'd never installed Linux. If I pull the Windows drive, Refind will just show the Ubuntu and Fedora options, as if Windows had never existed.

This solution works perfectly, the only tricky part would be if you had two BTRFS operating systems that couldn't see each other. I'm not sure how to solve that.

After all this, I really feel that any multi boot system should use Refind. It solved all my problems and took 10 minutes to install.

jp flag
rEFInd should be able to read Linux kernels on Btrfs partitions *IF* you install the Btrfs driver. There are some additional caveats with that driver, though, because its sub-volume features. See the rEFInd drivers documentation (https://www.rodsbooks.com/refind/drivers.html) for more information on this.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.