1

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?

cclloyd
  • 361

2 Answers2

2

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. See Tim Richardson's answer in second link in concord42's answer above.

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

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 as default since 17.10, but some still prefer swap partition and it will be used if created in advance:

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

Windows settings also required, if you want to dual boot or read NTFS partitions from Ubuntu. Particularly UEFI fast boot and Windows fast start up.

https://help.ubuntu.com/community/UEFI

oldfred
  • 12,583
0

Even I faced the same issue a you.

  • To completely remove the Ubuntu installation on the nvme ssd, delete the existing Ubuntu partitions and to remove the grub bootloader follow https://askubuntu.com/a/1139921/1172133

  • The Ubuntu installer has a bug because of which the installer doesnt install the bootloader in the chosen location instead installs it in the first efi partition. A workaround that worked for me is https://askubuntu.com/a/1056079/1172133

After this the Ubuntu bootloader will be installed on the 2TB sata ssd and you can boot to it from the boot menu