The solution is to use mkdosfs (mkfs.vfat) : it lets the user specify the volume label using the -n flag, and lowercase letters are kept lowercase, but this tool recreates the filesystem, so all data will be lost.
The non-destructive solution below is a combination of the mlabel and dosfslabel command-line tools.
- Connect the device to the computer if not already connected.
- Open a terminal window.
blkid | grep ' TYPE="vfat"' and </proc/mounts grep ' vfat ' to figure out the name of the device (e.g.
/dev/sdb1). Look around
in /media etc. to confirm you have picked the right device. If unsure,
unplug it, run the commands again, see it disappear, plug it back, and
run the commands again.
- Unmount the device by running
umount /dev/sdb1 (substituting
/dev/sdb1 with the name of the device found above). If it was mounted,
and the unmount failed, then close some windows, kill some programs
fuser -m /dev/sdb1), and try unmounting again.
sudo env MTOOLS_SKIP_CHECK=1 mlabel -i /dev/sdb1 ::x (substituting /dev/sdb1 with the name of the device found above). If
the system can't find mlabel, then install it by running sudo apt-get
install mtools , and try again.
sudo dosfslabel /dev/sdb1 MyLabel (substituting MyLabel with the desired label and
/dev/sdb1 with the name of the device found
above). Ignore any warnings about boot sector differences. If the
system can't find dosfslabel, then install it by running sudo apt-get
install dosfstools , and try again.
blkid | grep ' TYPE="vfat"', and examine its output to verify that the label has been changed properly. Optionally, unplug
the device, and then plug it back in. The system will recognize it,
and mount it under /media/MyLabel, without converting lowercase
letters in the volume label to uppercase.
Please note that there is an 11 character limit on the length of a VFAT volume label. If you specify a longer label, it will be truncated. There is another restriction: the label can contain only (some) ASCII characters: accented letters etc. won't work.