18

I read in an Internet article to format a partition to FAT32 with the following command:

sudo mkfs.vfat -F 32 /dev/sdXn

Now I read the man page for mkfs.vfat and it shows mkfs.fat as the name of the command without the v. After that I tried formatting a partition without the v and expectedly it worked. Why is there a synonymous command called mkfs.vfat instead of just mkfs.fat?

Edit: Oh, and in man mkfs mkfs.vfat is listed instead of mkfs.fat in "SEE ALSO".

20

FAT is a family of filesystems, comprising at least, in chronological order:

  • FAT12, a filesystem used on floppies since the late 1980s, in particular by MS-DOS;
  • FAT16, a small modification of FAT12 supporting larger media, introduced to support hard disks;
  • vFAT, which is backward compatible with FAT, but allows files to have longer names which only vFAT-aware applications running on vFAT-aware operating systems can see;
  • FAT32, another modification of FAT16 designed to support larger disk sizes. In practice FAT32 is almost always used with vFAT long file name support, but technically 16/32 and long-file-names-yes/no are independent.

Because those filesystems are very similar, they're usually handled by the same drivers and tools. mkfs.vfat and mkfs.fat are the same tool; an empty FAT16 filesystem and an empty vFAT filesystem look exactly the same, so mkfs doesn't need to distinguish between them. (You can think of FAT16 and vFAT as two different ways of seeing the same filesystem rather than two separate filesystem formats.)

  • Did I understand it right that in vFAT additional hidden files are added and the filenames are concatenated for the longer filenames? – mkdrive2 Feb 17 '16 at 9:30
  • 1
    @mkdrive2 Yes (well, more precisely, these are hidden directory entries that FAT16-only systems treat as unused and vFAT systems treat as giving a long file name to a file in that directory). – Gilles Feb 17 '16 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.