You are here
Changing FAT Labels
I use a lot of SD cards and USB thumb-drives; when plugging in these devices automount in /media as either the file-system label (if set) or some arbitrary thing like /media/disk46. So how can one modify or set the label on an existing FAT filesystem? Easy as:
mlabel -i /dev/mmcblk0p1 -s ::WMMI06
Volume has no label
mlabel -i /dev/mmcblk0p1 ::WMMI06
mlabel -i /dev/mmcblk0p1 -s ::
Volume label is WMMI06
mlabel -i /dev/sdb1 -s ::
Volume label is Cruzer
mlabel -i /dev/sdb1 ::DataCruzer
mlabel -i /dev/sdb1 -s ::
Volume label is DataCruzer (abbr=DATACRUZER )
mlabel is provided by the mtools package. Since we don't have a drive letter the "::" is used to defer to the actual device specified using the "-i" directive. The "-s" directive means show, otherwise the command attempts to set the label to the value immediately following (no whitespace!) the drive designation [default behavior is to set, not show].
- Log in to post comments