Score:1

How do I tell the Ubuntu bootloader to boot from a different drive?

cn flag

This should be a simple question. My system is set to dual boot Ubuntu 20.04 and Windows 10. I previously had only a small SSD (256 GB), so I had only the EFI partition and the Windows system partition on the SSD and the Ubuntu partition on an internal HDD. The HDD is only 5400 RPM and the slow low load time was a constant source of aggravation.

I just purchased a new 2TB SSD and would like to have both OS's boot from that drive. I copied the partitions from the two old drives onto the new drive using Gparted and set the bios to boot from the new drive. Surprisingly, the bootloader on the copied efi partition works and the system still boots. The only problem is, the Ubuntu partition it loads is the copy on the old HDD, not the clone I made on the new SSD.

Gparted shows the new drive's efi partition mounted as /dev/efi but the Ubuntu partition from the old HDD is still set as the root directory. How can I change the bootloader to boot from the new drive?

cc flag
Try running sudo update-grub, that should pick up the new installation. Boot that, and after you remove the old hdd, rerun update-grub. Easier than editing the grub.cfg file to change the root.
oldfred avatar
cn flag
Do you have duplicate UUIDs and GUIDs (partUUID). That is not allowed but often occurs if cloning a drive & not removing old drive. Lets see details, use ppa version with your live installer (2nd option) or any working install, not Boot-Repair ISO: Please copy & paste the pastebin link to the Boot-info summary report ( do not post report), do not run the auto fix till reviewed. https://help.ubuntu.com/community/Boot-Repair
Score:0
cn flag

Here is how I fixed the issue:

  1. Using Gparted, assign the new Ubuntu partition a different UUID. After cloning,the UUID was in fact the same on both partitions. (Thanks to @oldfred for calling this out).

  2. Boot from Ubuntu flash drive then install/run boot-repair.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
  1. Expand "Advanced options" and on the "Grub location" tab, select the device file with the new Ubuntu partition.

  2. Click "apply" and follow the prompts.

  3. When I restarted, the default boot option in the Grub loader was the new partition. It still gives me the option to boot from the old drive which is fine for now. The new installation booted without issue and everything runs much faster now!

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.