0

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 use `exfatlabel` or `tune.exfat` (see the question Nikita proposed as duplicate). – Vojtech Trefny Nov 23 '22 at 04:44
  • The UUID of an exFAT file system isn’t its label, but its serial number; see [this answer](https://unix.stackexchange.com/a/578319/86440) for a recipe to change that. – Stephen Kitt Nov 23 '22 at 05:13

0 Answers0