System copy (clone) for multiboot - UUID question

I want to clone my system as a backup system on another SSD …
I guess after that I have to set new UUIDs for the clone SSD and afterwards replace them in grub.cfg too…
are there any other things I have to consider?

mount /dev/sdb1 /mnt
find /mnt/boot/grub -type f -exec sed -i ‘s/36bb0a6d-3689-48a5-9538-45292fc4bb94/d41f34b7-7704-4370-80ef-de0bc24af4b4/g’ {} ;
sudo grub-mkconfig -o /boot/grub/grub.cfg

or should I better rsync partitions only and re-install grub from the original system?

it depends on how you clone the drive. If you do an actual byte level clone with some thing like DD the UUID’s will stay the same as they are tied to the partitions (but you preserved them) if you do an rsync and restore you would need to set them up again.
I tend to not backup system level stuff if i can get away with it. I try to just backup data and rebuild a fresh system and restore data as needed.

1 Like

I would like to get a full working backup system incl. grub (efi) in case original system can no longer boot so I can switch the boot order in bios & boot into the backup system …
maybe I could use clonezilla live and change drive UUIDs afterwards via gparted and set the new UUIDs in /boot/grub/grub.cfg via sed …
find /mnt/boot/grub -type f -exec sed -i ‘s/org-UUID/new-UUID/g’ {} ;

if that’s what you are looking for then yeah it looks like fstab and grub are your biggest concerns.

The arch wiki mentions it here


ouh, thank you for reminding :wink:

1 Like

it works :wink:
if a swapfile is used it must be recreated for sdb1 so that a new UUID is assigned for it, a UUID may only be present once in the system otherwise there will be hangers during shutdown or reboot