I am trying to change the UUID of a USB stick formatted with exFAT. I double checked that /dev/sdb2
is the correct target. The entire USB contains one exFAT partition with no empty space. When I try to give a new UUID using tune2fs
I get an error message:
root@DESKTOP:/# tune2fs /dev/sdb2 -U random
/sbin/tune2fs: Bad magic number in super-block while trying to open /dev/sdb2
/dev/sdb2 contains a exfat file system
The partition is not corrupt, nor does it contain any corrupted files. What is wrong here?
tune2fs
is tool for managing ext2/3/4 filesystems, not exfat, you need to useexfatlabel
ortune.exfat
(see the question Nikita proposed as duplicate). – Vojtech Trefny Nov 23 '22 at 04:44