renaming a fat16 volume
What's the easiest way to rename (change the volume label of) a fat16 volume (e.g. on a USB drive) from linux? It seems like mlabel
from the mtools
package is meant to do this, but the documentation is not geared to rapid assimilation.
Solution 1:
Found this guide to using mtools, which explains the following:
Check the current label
sudo mlabel -i <device> -s ::
eg:
sudo mlabel -i /dev/sdb1 -s ::
Note that we're using the special "::" drive which allows us to specify the device descriptor on the command line; otherwise we'd have to edit ~/.mtoolsrc to assign a drive letter (see Option 2 under "Change the label").
Change the label
After unmounting and checking the current label (above), use
sudo mlabel -i <device> ::<label>
eg:
sudo mlabel -i /dev/sdb1 ::my_external
Ignore the "Volume label is XYZ" output as this is the old label. Jump to the Verify the Change section below.
My initial confusion stemmed from the fact that the -i
option is not documented in the mlabel
manpage. The full version of the manual doesn't mention this option specifically for mlabel
; I'm guessing it's a general option that applies to all of the mtools
utils, but haven't dug around in the manual to check for the existence of documentation to that effect.
However, I'm finding that setting a 10-character volume label ("KATAROWSKI") doesn't work: there is some extra stuff appended to the end of the label that translates, under linux to the à
character, and under Windows showed up as a ?
.