FATLABEL(8)

โœจ FATLABEL(8) โœจ

System Manager's Manual ๐Ÿ’– okay bestie, this is the manual page for fatlabel ๐ŸŽ€

๐Ÿงš NAME

fatlabel - set or get MS-DOS filesystem label or volume ID ๐Ÿ“

๐Ÿ’… SYNOPSIS

fatlabel [OPTIONS] DEVICE [NEW]

๐Ÿฆ‹ DESCRIPTION

okay so fatlabel is the girlie that lets you display or change the volume label or volume ID on the MS-DOS filesystem sitting on DEVICE ๐Ÿ’œ by default it's in label mode, but you can switch to volume ID mode with -i or --volume-id โœจ

if you leave out NEW, it just spits the existing label or volume ID out to standard output ๐Ÿ‘€ a label can't be longer than 11 bytes, and it's giving best compatibility when it's all upper case ๐Ÿ”ฅ an empty string or a label that's only whitespace is a big no-no ๐Ÿ™ˆ a volume ID has to be a hexadecimal number (no leading 0x or anything like that) and it must fit into 32 bits ๐Ÿ’€

๐Ÿ‘‘ OPTIONS

  • -i, --volume-id โ€” switch to volume ID mode, bestie ๐Ÿฆ‹
  • -r, --reset โ€” remove the label in label mode, or generate a brand new ID in volume ID mode ๐Ÿซถ
  • -c PAGE, --codepage=PAGE โ€” use DOS codepage PAGE to encode/decode the label ๐ŸŒธ if you don't pick one, it defaults to codepage 850 ๐Ÿ’…
  • -h, --help โ€” shows a help message and then it bounces ๐Ÿ‘‹
  • -V, --version โ€” shows the version number and then it bounces too ๐Ÿงš

๐ŸŒˆ COMPATIBILITY and BUGS

okay so this part is kind of messy, bestie, but you need to know it ๐Ÿ˜ญ

for historic reasons, the FAT label lives in two different spots: the boot sector, and a special volume label entry in the root directory ๐Ÿ’€ MS-DOS 5.00, MS-DOS 6.22, MS-DOS 7.10, Windows 98, Windows XP, and also Windows 10 only read the FAT label from the root directory ๐Ÿ™ˆ if there's no volume label in the root directory, they treat it as empty or no label, even if the boot sector has a perfectly valid one.

when Windows XP or Windows 10 changes a FAT label, it only stores it in the root directory and leaves the boot sector alone ๐Ÿ˜ญ that causes problems when a label gets removed on Windows, because the old label is still hanging out in the boot sector but it's been wiped from the root directory. not it.

dosfslabel prior to version 3.0.7 only worked with FAT labels stored in the boot sector and totally ignored the volume label in the root directory ๐Ÿฅ€

dosfslabel in versions 3.0.7โ€“3.0.15 reads FAT labels from the root directory, and if there's nothing there, it fallbacks to the label in the boot sector ๐Ÿ’… changing a label updated the boot sector and sometimes the root directory too, because of a bug ๐Ÿ™ƒ that bug got fixed in dosfslabel version 3.0.16, and ever since then dosfslabel updates the label in both locations โœจ

since version 4.2, fatlabel only reads a FAT label from the root directory (just like MS-DOS and Windows), but it changes a FAT label in both locations ๐Ÿ”ฅ version 4.2 also fixed how empty labels are handled and labels that start with a byte 0xE5 ๐Ÿงš it added support for non-ASCII labels based on the DOS codepage you pick, and it added checks to make sure a new label is valid ๐Ÿซถ

it's strongly suggested that you do NOT use dosfslabel prior to version 3.0.16 ๐Ÿšซ๐Ÿ’€

๐ŸŒ DOS CODEPAGES

MS-DOS and Windows use the DOS (OEM) codepage to encode and decode FAT labels ๐Ÿ’œ on Windows, the DOS codepage is global for all running apps and can't be configured explicitly ๐Ÿ˜ญ it gets set implicitly by the Language option for non-Unicode programs, which you can find in Regional and Language Options through the Control Panel โœจ the default DOS codepage for fatlabel is 850 ๐ŸŽ€ here's the mapping table between DOS codepage and Language for non-Unicode programs, iykyk ๐Ÿ‘€

Codepage   Language
  437      English (India), English (Malaysia), English (Republic of the
           Philippines), English (Singapore), English (South Africa),
           English (United States), English (Zimbabwe), Filipino, Hausa,
           Igbo, Inuktitut, Kinyarwanda, Kiswahili, Yoruba
  720      Arabic, Dari, Persian, Urdu, Uyghur
  737      Greek
  775      Estonian, Latvian, Lithuanian
  850      Afrikaans, Alsatian, Basque, Breton, Catalan, Corsican,
           Danish, Dutch, English (Australia), English (Belize), English
           (Canada), English (Caribbean), English (Ireland), English
           (Jamaica), English (New Zealand), English (Trinidad and
           Tobago), English (United Kingdom), Faroese, Finnish, French,
           Frisian, Galician, German, Greenlandic, Icelandic,
           Indonesian, Irish, isiXhosa, isiZulu, Italian, K'iche, Lower
           Sorbian, Luxembourgish, Malay, Mapudungun, Mohawk, Norwegian,
           Occitan, Portuguese, Quechua, Romansh, Sami, Scottish Gaelic,
           Sesotho sa Leboa, Setswana, Spanish, Swedish, Tamazight,
           Upper Sorbian, Welsh, Wolof
  852      Albanian, Bosnian (Latin), Croatian, Czech, Hungarian,
           Polish, Romanian, Serbian (Latin), Slovak, Slovenian, Turkmen
  855      Bosnian (Cyrillic), Serbian (Cyrillic)
  857      Azeri (Latin), Turkish, Uzbek (Latin)
  862      Hebrew
  866      Azeri (Cyrillic), Bashkir, Belarusian, Bulgarian, Kyrgyz,
           Macedonian, Mongolian, Russian, Tajik, Tatar, Ukrainian,
           Uzbek (Cyrillic), Yakut
  874      Thai
  932      Japanese
  936      Chinese (Simplified)
  949      Korean
  950      Chinese (Traditional)
  1258     Vietnamese

๐Ÿ”— SEE ALSO

fsck.fat(8), mkfs.fat(8) ๐Ÿซถ

๐Ÿก HOMEPAGE

the home for the dosfstools project is its GitHub project page ๐Ÿ™โœจ

๐Ÿ‘ฉโ€๐Ÿ’ป AUTHORS

dosfstools were written by Werner Almesberger, Roman Hodek, and others ๐ŸŒธ the current maintainers are Andreas Bombe and Pali Rohรกr ๐Ÿ’–


bestie, that's the whole page ๐ŸŽ€ dosfstools 4.2 vibes, dated 2021-01-31, and the FATLABEL(8) energy never left ๐Ÿ’…๐ŸŒˆ

๐Ÿ“ฆ where this page comes from