OS Manuals

/usr/bin/mkfs.msdos

DOS filesystem utilities

From dosfstools 4.2-r46 (os), captured 2026-11-05 by running mkfs.msdos --help (exit 0). permalink

Usage: /usr/bin/mkfs.msdos [OPTIONS] TARGET [BLOCKS]
Create FAT filesystem in TARGET, which can be a block device or file. Use only
up to BLOCKS 1024 byte blocks if specified. With the -C option, file TARGET will be
created with a size of 1024 bytes times BLOCKS, which must be specified.

Options:
  -a              Disable alignment of data structures
  -A              Toggle Atari variant of the filesystem
  -b SECTOR       Select SECTOR as location of the FAT32 backup boot sector
  -c              Check device for bad blocks before creating the filesystem
  -C              Create file TARGET then create filesystem in it
  -D NUMBER       Write BIOS drive number NUMBER to boot sector
  -f COUNT        Create COUNT file allocation tables
  -F SIZE         Select FAT size SIZE (12, 16 or 32)
  -g GEOM         Select disk geometry: heads/sectors_per_track
  -h NUMBER       Write hidden sectors NUMBER to boot sector
  -i VOLID        Set volume ID to VOLID (a 32 bit hexadecimal number)
  -I              Ignore and disable safety checks
  -l FILENAME     Read bad blocks list from FILENAME
  -m FILENAME     Replace default error message in boot block with contents of FILENAME
  -M TYPE         Set media type in boot sector to TYPE
  --mbr[=y|n|a]   Fill (fake) MBR table with one partition which spans whole disk
  -n LABEL        Set volume name to LABEL (up to 11 characters long)
  --codepage=N    use DOS codepage N to encode label (default: 850)
  -r COUNT        Make room for at least COUNT entries in the root directory
  -R COUNT        Set minimal number of reserved sectors to COUNT
  -s COUNT        Set number of sectors per cluster to COUNT
  -S SIZE         Select a sector size of SIZE (a power of two, at least 512)
  -v              Verbose execution
  --variant=TYPE  Select variant TYPE of filesystem (standard or Atari)

  --invariant     Use constants for randomly generated or time based values
  --offset=SECTOR Write the filesystem at a specific sector into the device file.
  --help          Show this help message and exit
mkfs.fat 4.2 (2021-01-31)
Options (27)
OptionDescriptionSource
-aNormally, for any filesystem except very small ones, mkfs.fat will align all the data structures to cluster size, to make sure that as long as the partition is properly aligned, so will all the data…help + man
-ASelect using the Atari variation of the FAT filesystem if that isn't active already, otherwise select standard FAT filesystem.help + man
-b SECTORSelect SECTOR as location of the FAT32 backup boot sectorhelp + man
-cCheck the device for bad blocks before creating the filesystem.help + man
-CCreate the file given as DEVICE on the command line, and write the to-be-created filesystem to it.help + man
-D NUMBERSpecify the BIOS drive number to be stored in the FAT boot sector.help + man
-f COUNTSpecify the number of file allocation tables in the filesystem.help + man
-F SIZESpecifies the type of file allocation tables used (12, 16 or 32 bit).help + man
-g GEOMSpecify HEADS and SECTORS-PER-TRACK numbers which represents disk geometry of DEVICE.help + man
-h NUMBERSpecify the number of so-called hidden sectors, as stored in the FAT boot sector: this number represents the beginning sector of the partition containing the file system.help + man
-i VOLIDSet volume ID to VOLID (a 32 bit hexadecimal number)help + man
-IIgnore and disable safety checks.help + man
-l FILENAMERead the bad blocks list from FILENAME.help + man
-m FILENAMESets the message the user receives on attempts to boot this filesystem without having properly installed an operating system.help + man
-M TYPESpecify the media type to be stored in the FAT boot sector.help + man
--mbr y|n|aFill (fake) MBR table with one partition which spans whole diskhelp
-n LABELSet volume name to LABEL (up to 11 characters long)help + man
--codepage Nuse DOS codepage N to encode label (default: 850)help + man
-r COUNTSelect the minimal number of entries available in the root directory.help + man
-R COUNTSet minimal number of reserved sectors to COUNThelp + man
-s COUNTSpecify the number of disk sectors per cluster.help + man
-S SIZESelect a sector size of SIZE (a power of two, at least 512)help + man
-vVerbose execution.help + man
--variant TYPESelect variant TYPE of filesystem (standard or Atari)help + man
--invariantUse constants for normally randomly generated or time based data such as volume ID and creation time.help + man
--helpDisplay option summary and exit.help + man
--offset SECTORWrite the filesystem at a specific sector into the device file. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.