Score:0

Cloned boot disk means my system will now not boot

cg flag

I used dd if=/dev/sda1... of=/dev/sda2 command to make a complete clone of my primary NVMe drive onto an identical sized SSD. This was successful and it cloned the boot partition (UEFI) and the entire main drive. All good so far. But on rebooting the system it failed to find a boot partition. If I remove the SSD it boots just fine. I tried holding down ESC during boot to see if I could get into Grub but no success. How do I 'disable' Ubuntu or Grub seeing my cloned drive and just booting off the NVMe as always?

oldfred avatar
cn flag
You cannot have duplicate UUIDs or partUUIDs(GUIDs). System gets very confused if you try to boot with both drives. Usually better to do new install so everything is unique and copy your data from your normal backup to second drive. Also verifies that your backups are complete.
Simon Bunn avatar
cg flag
In Windows cloning a drive is a quick and very effective backup. Are you saying Ubuntu does not support this? I am using deja-dup for backups but it endlessly complains that it cannot back up various folders and anything used by a running application like Docker and VMs. Sigh, seems like backing up is a lot harder in Linux than Windows.
C.S.Cameron avatar
cn flag
I would use `sudo dd if=/dev/sda of=/dev/sdb` to clone NVMe disk sda to SSD disk sdb. (not from NVMe partition sda1 to NVMe partition sda2). If you have trouble with UUID numbers, you can use GParted to create a new UUID on one of the disks. boot loader is on the disk, not a partition.
oldfred avatar
cn flag
there are multiple tools to clone a drive, but they really need to be run from a live installer or another install. If working install files are constantly changing & you have lock files preventing copy. https://help.ubuntu.com/community/BackupYourSystem & https://help.ubuntu.com/community/CategoryBackupRecovery But many do not want to copy/clone drive as that also copies unused space, and then is slow. And Ubuntu is not proprietary, so easy to reinstall & just restore your data.
Simon Bunn avatar
cg flag
Thanks for these notes. C.S.Cameron, I did actually use sda and sdb instead of partitions, I just mocked up my command line for this question. It seems that it clones the UUID and that then confuses the system on boot. Not sure how I can resolve this, maybe boot onto a USB stick with Ubuntu and then use gparted? oldfred, I still don't quite understand your comment about a clean install and recover data. Ubuntu puts data into a huge number of folders, many of which are operating system like /etc/network and all of these files need to be present for the system to work correctly.
C.S.Cameron avatar
cn flag
@Simon Bunn: - Boot Primary Ubuntu - Plug in cloned SSD - Open GParted - Select SSD drive - Right click partition that has duplicate UUID - `Click Unmount` - Click `New UUID` then `Apply all operations` - Check /etc/fstab to see if the UUID needs updating there - Check /boot/grub/grub.cfg to see if the UUID needs updating there also.
I sit in a Tesla and translated this thread with Ai:

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.