Ubuntu – Dual Booting W10/Ubuntu with 2 separate SSDs in UEFI mode

dual-bootgrub2uefi

I have 2 drives installed in my desktop.

  • 1TB NVMe (shows up as /dev/nvme0n)
  • 2TB SSD (shows up as /dev/sda)

The NVMe has Windows 10 installed, and later had Ubuntu 20.04 installed alongside it.

I want to clean install Ubuntu 20.04 again on the 2TB, and wipe all traces of Ubuntu from the NVMe. (including bootloader entries and entries that would show up on my BIOS)

So I tried installing Ubuntu using "Something Else" when partitioning. I created a GPT table on the SSD, created a 500MB EFI partition, and a 128GB ext4 mounted at /.

However, when I reboot and hit F12 to bring up my boot selection, it shows

  • Windows bootloader (ADATA) <— (ADATA is the NVMe)
  • adata (ubuntu) <— (old ubuntu installation, which is still installed)
  • WD SSD <— (the new SSD)
  • Samsung USB partition 2 <— (Ventoy bootable USB, how I installed Ubuntu both times)

Choosing the WD SSD, my screen goes black for a second, then it goes back into the boot menu again, as if it failed to boot.

During installation, I've tried installing the bootloader to /dev/sda, /dev/sda1 (efi), and /dev/sda2 (root), but none have worked.

Checking GParted (from the Ubuntu live USB), it shows that I have 2 partitions

  • /dev/sda1 (boot, esp)
  • /dev/sda2

How do I properly dual boot ubuntu in this situation? And is it possible to fix this without having to reinstall Ubuntu entirely?

Best Answer

The options to choose where to install boot loader in UEFI mode do not work.

The old Ubuntu install entry in NVMe drive will be overwritten and boot new install.

Posted work around to manually unmount & mount correct ESP during install #23 & #26. Very old bug but still an issue if not installing to same drive as Windows.

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379

Others suggest disconnecting all other drives physically or logically in UEFI settings, so install drive is first drive.

Or removing boot flag/esp flag from first drive, so only ESP is install drive. (I have not had that work, but others have.)

Or if you have ESP on second or external drive, you can just reinstall grub, either manually or using Boot-Repair's advanced mode & full reinstall to correct drive.

If you have ESP on second drive, use Boot-Repair's advanced mode to reinstall grub to second drive. Default fix may not be correct, only use advanced mode. Grub installs to any drive without issue, it is Ubuntu's Ubiquity installer that only wants to use first ESP found.

https://help.ubuntu.com/community/Boot-Repair

UEFI/gpt partitioning in Advance, newer versions do not need swap partition as swap file is now used since 17.10:

How to prepare a disk on an EFI based PC for Ubuntu?

Related Question