• Welcome to Peterborough Linux User Group (Canada) Forum.
 

Cloning duplicates UUID#; implications for connecting source and target

Started by fox, June 22, 2017, 12:12:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fox

I recently used clonezilla for cloning one SSD onto a second larger SSD. I was intending on removing the older, smaller SSD, but was unable, so I left them both in my computer. What I hadn't thought about was that a cloned partition has exactly the same UUID # as its source, and since grub typically uses the UUID to specify which drive to load, this sets up a conflict between the source and target partition. In my case, the result was that it was always loading the partition from the smaller SSD and ignoring the new one. Even when I thought I was selecting the new one, I was not. It took about a month before I discovered this.

The solution is to change the UUID # of one of the drives, which one can easily do with gparted, or less easily on the command line. gparted will reassign the UUID with a random number. That would end the conflict and allow both drives to be accessible through your grub menu.

Perhaps the situation is unusual because most people would remove the old source drive once it is cloned onto the new one. But if you were running a desktop computer, there is often space for one or more drives and one might then keep both drives attached. If you do, change make the UUID numbers different if you want to be able to boot up either partition. In my case, I had an additional complication. I am using a Mac mini and because I also want easy access to the Mac OS (although I rarely use it anymore), I installed refind, which uses grub input but changes the boot menu to icons representing the various bootable partitions that it sees. Problem is that it uses a config file that doesn't change the UUID even after you change it yourself and update your grub. It took me awhile to find that file and edit it to put the changed UUID #. Once I did, all worked well and the cloned Linux partition became readily accessible on both the source and cloned drives.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13

ssfc72

Sooo! Did you reformat the older smaller SSD, so that all the files on it were deleted?
Or did you leave the older SSD with all the original files, still on it?
Mint 20.3 on a Dell 14" Inspiron notebook, HP Pavilion X360, 11" k120ca notebook (Linux Lubuntu), Dell 13" XPS notebook computer (MXLinux)
Cellphone Samsung A50, Koodo pre paid service

fox

I left the old SSD exactly as it was; files partitions, etc. The UUID I changed was on the new SSD.
Ubuntu 23.10 on 2019 5k iMac
Ubuntu 22.04 on Dell XPS 13