Changing partitions uuids with one's own choice?

Hello everyone,

after changing my mac hard disk, replacing a ssd sata with a ssd nvme i wanted to clone my triple boot installation on btrfs from a smaller disk to the new, larger 1to disk… with clonezilla…

the boot of the cloned disk went into error (blocked on busy box). The log (journalctl) shows that this is due to a bad-block cause…

After some research, it seems that this kind of operation shouldn’t be a problem, but even if I try again, I still have the same problem… I have no idea and I’m not going to bother…

So, on a fresh install, I’m thinking of restoring my old volumes backed up with btrbk on an external dd.

My problem is as follows: I’d like to change the uids of my new install to match those in the fstab of my old install, rather than having to align the uuids of the three fstabs of my old install…

However, it seems that gparted can only generate random uuids… yet it seems that in the past I’ve managed to set the uuid of my choice… Is this the case? And which command should I use?


Edit : afterthat I guess I will have to rebuild the initramfs to point to the new uuid, through a chroot…

Translated with (free version)

1 Like

Look into tune2fs ( for EXT partitions) and btrfstue (for btrfs)


sudo tune2fs -U UUID /dev/sda1

sudo btrfstune -U UUID /dev/sda1

Change UUID and /dev/sda1 to the proper values.

For more info:

1 Like

thk @pebcak

tune2fs for changing the UUID of efi partition , right ?

tune2fs allows the system administrator to adjust various tunable file system parameters on Linux ext2, ext3, or ext4 file systems.

I don’t know of any equivalent tool for FAT32 formatted partitions which is used for ESP (EFI System partition).

Perhaps other users could chime in.

@pebcak and others :

thanks for the info on changing the uuid for btrfs partitions (and ext…)

regarding changing the uuid of the EFI partition to FAT 32, here’s what I did:

sudo mlabel -N [UUID ] -i /dev/sd[partition] :: (or /dev/nvme…)

then on a fresh install of endeavour, I simply restored the backups of my sub-volumes created by btrbk on an external disk using this French tutorial (suis français)

once these volumes were restored, I deleted the contents of the EFI partition of the new installation, and restored those of the old installation, which I had carefully saved, (so my initramfs etc. ) are consistent with the configuration of my partitions… (I use systemd-boot) with grub there might also be some adaptations to make)

I reboot and … I’m back to my old configuration, with all applications and settings :slight_smile:

All I have to do now is restore my volumes for Mint and Sid…

Not the easiest way, but frankly I don’t know what happened with clonezilla, I don’t seem to like Btrfs

Translated with (free version)

1 Like

Sounds great! Glad you got everything sorted out!

And thanks for sharing the info! It’s good to know!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.