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
  • 351
  • No, It's not possible to "wipe all traces of Ubuntu" and not reinstall the operating system.... – Nmath Nov 29 '20 at 04:37
  • @Nmath That part is trivial as of right now. I'm more worried about getting the new installation to boot, as it is unbootable. I'm even willing to reinstall windows if I need to to remove all traces of Ubuntu from the first disk. – cclloyd Nov 29 '20 at 04:58
  • It's a new installation and it was done incorrectly... what is there to preserve except bad things? Your best path is to wipe the hard drive and reinstall it. – Nmath Nov 29 '20 at 05:00
  • @Nmath I've tried reinstalling it, multiple times. I still can't get it to boot... I'm not sure you're reading my question in its entirety. – cclloyd Nov 29 '20 at 05:03
  • I have and I'm suggesting that you Format/Erase the drive before you attempt to install Ubuntu. As long as you have unpartitioned free space and you are consistent in your use of UEFI or BIOS, you should get an option to "Install Alongside Windows". Trying to save a failed installation is not a very good path – Nmath Nov 29 '20 at 05:07
  • You already have an EFI partition where Windows is installed, you do not need to create another one. – Nmath Nov 29 '20 at 05:09
  • @Nmath The options were reinstall Ubuntu while keeping files, erase and install extisting installation, and something else. I chose something else, so I could install it to the other drive. After installing, the new installation still isn't booting at all. the installation USB only boots into UEFI mode. I need to get the new installation working first so I can copy stuff from the old installation, THEN remove the old installation. As for the new drive, I've tried formatting/partitioning it from scratch every time I tried installing it. And I dont want to alter EFI on the first disk. – cclloyd Nov 29 '20 at 05:10
  • You didn't get the "install alongside Windows" option because you didn't format the disk first and you had no unpartitioned free space for Ubuntu. EFI is the boot partition for the whole system. Your supposed to only have one. If you insist on doing it your own way, it's possible -- just physically disconnect the disk that has your Windows installation prior to installing Ubuntu. You won't get the "install Alongside windows option" this way either. Know that by creating two EFI partitions on the same system you inviting conflict between the two OS. – Nmath Nov 29 '20 at 05:22

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,100
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