Open LukeShortCloud opened 2 years ago
ext* file systems must (1) run a FSCK first and (2) cannot be mounted.
$ sudo e2fsck -f /dev/<DEVICE><PARTITION>
$ sudo tune2fs -U $(uuidgen) /dev/<DEVICE><PARTITION>
Actually, all file systems (regardless of type) require to be unmounted first.
FAT* file systems must use the mlabel
command and set a 8 digit serial to be used as the UUID.
$ sudo mlabel -N $(uuidgen | head -c8) -i /dev/<DEVICE><PARTITION> ::
https://superuser.com/questions/1247972/how-to-change-vfat-partition-uuid
exFAT:
$ sudo exfatlabel -i /dev/<DEVICE><PARTITION> <EIGHT_DIGIT_SERIAL_UUID>
https://github.com/exfatprogs/exfatprogs/issues/138#issuecomment-772904616
ext:
tune2fs -U <UUID> /dev/<DEVICE>
Btrfs:btrfstune -U <UUID> /dev/<DEVICE>
https://unix.stackexchange.com/questions/12858/how-to-change-filesystem-uuid-2-same-uuid