Is it worth booting another OS via grub if they live on different drives?

Foreword

This is technically not a Ubuntu-specific question but I suspect it’s a valid question for Ubuntu users.

Actual question

Is it really worth booting a non-Ubuntu OS via grub, if it lives on a different physical drive than Ubuntu?

Context

Setup

My setup looks (or rather looked) as follows:

  • Desktop computer
  • Ubuntu on a SATA hybrid SSD
  • Windows 10 on a M2 SSD
  • I boot(ed) both Ubuntu and Windows 10 from the hybrid SSD where Ubuntu was, in a dedicated boot partition, via grub2
  • Everything EFI if that is relevant

I use Windows for things that only work with Windows due to market dominance, Ubuntu for literally everything else.

Background

A couple of days ago, my SATA hybrid SSD drive, where Ubuntu was sitting on, suffered a catastrophic failure, and became eminently unusable.

(note: in hindsight, this was doomed to happen – one of those infamous Samsung EVO 870s from 2021…)

I soon realized I could not even boot with Windows, since the drive was just gone, and the BIOS would not know how to boot from the drive where Windows was sitting.

Elaborated question

After a 2-day crunch buying a new hard drive, reinstalling and setting everything up (which is not nearly over), I’ve come to wonder what is the actual advantage of booting Windows or any non-Ubuntu OS for that matter via grub, on the drive where Ubuntu lives.

The alternative being, choose which drive to boot from by going to the BIOS settings when starting the machine.

If I had gone without grub and booted each OS on their own drive, I could have still used Windows without having to reinstall it as well.

The only thing I could think of was convenience – it’s easier to navigate grub’s menus rather than moving drive boot priorities in the BIOS.

However, I may be missing something technical that makes it a requisite to boot different OSes from the same drive and partition, regardless of the fact those OSes are sitting in different physical drives.

This is what I would like to better understand, in order to make an informed decision on the setup I am painfully rebuilding.

Asked By: Mena

||

Question

Is it really worth booting a non-Ubuntu OS via grub, if it lives on a
different physical drive than Ubuntu?

Answer

Yes. Grub is very flexible and easy to configure. It can easily work with Windows in a dualboot setup. The Windows bootloader [BCDEdit?] does not care about Ubuntu. In my opinion replacing grub with the Windows bootloader is asking from trouble.

I will not go into other OSes, such as installing multiple distros of Linux and the merits and demerits of using Grub from Ubuntu, Grub from another distro, or another bootloader from another distro.

To be clear, when we use Grub in an Ubuntu-Windows dual boot system, we keep both the bootloaders. Grub gets the leadership role and loads first. If Windows is selected from within Grub, it passes the job of booting Windows to the Windows bootloader.

What About the BIOS (UEFI) Boot Menu?

It is not as convenient and it keeps both Grub and Windows bootloader. The UEFI Boot Option just lets you choose between Grub and the Windows bootloader. You will still have Grub (for Ubuntu only) though it may not show you the menu and boot straight to Ubuntu.

Digging Deeper…

The main issue (as I understand it) is: What is the best way to handling booting when I have two disks with one OS in each?

UEFI and ESP

Computers these days come with UEFI the successor of BIOS. While in the olden days of floppy drives and Cathode Ray Tubes BIOS didn’t need a separate partition, UEFI needs a dedicated partition called (U)EFI System Partition (ESP). Each computer should have (at least) one ESP in one of the disks. One ESP is sufficient to handle multiple OSes in multiple disks. However, it is possible to have two ESPs, one in each disk.

ESPs and Bootloader

In the olden days bootloaders were installed in the boot disk’s system partition. With UEFI parts of the bootloader get installed in the ESP. Therefore, as much as it matters which bootloader, Grub, or Windows, you use, you need to understand in which disk the ESP is (or if each disk has its own) and thus where the bootloaders are installed.

2 Disks 1 ESP

Typically a computer comes with Windows installed. That means the ESP is usually in the same physical disks as the Windows. Until version 23.04, the Ubuntu installation process would put Grub in the first ESP it found (that is the one in the Windows disk) when you installed Ubuntu in a second disk.

In this setup if your Ubuntu disk died, you could still boot the computer by getting into UEFI setup and making the Windows bootloader the top choice.

What would happen if the Windows disk stops working? Well, in that case you can’t boot either Windows or Ubuntu as the ESP would be gone with the disk.

The other disadvantage of a single ESP is that from time to time during a routine Windows update/upgrade it would notice that the Windows bootloader is not the default and make it the default. After that the computer would boot straight to Windows without showing the Grub boot menu. Though lately I have not seen this happen as much. This is easy to fix by going into the UEFI setup and changing the default or using an utility like boot-repair.

2 disk, 2 ESP

In this setup each physical disk gets its own ESP. That way the Grub goes into the ESP of the Ubuntu disk, and the Windows bootloader goes into the ESP of the Windows disks. Grub would still be in control. That is, you would still see the familiar Grub boot menu and select Ubuntu or Windows as before. Grub is smart enough (using the OS_prober) to find out Windows bootloader is in another ESP in another disks. Windows on the other hand would remain blissfully ignorant of the other ESP, Grub, and Ubuntu. Therefore, a Windows upgrade will not mess with the default bootloader.

Second. If either of the two disks dies, the computer can still be booted using the other disk and the other OS.

See Installing Ubuntu without touching Windows for more on how to setup a 2 disk 2 ESP dualboot system.

Bottom Line

Whether you have two ESPs or one, you should make Grub the default bootloader.

Hope this helps

Answered By: user68186
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.