1MKDOSFS(8)                  System Manager's Manual                 MKDOSFS(8)
2
3
4

NAME

6       mkdosfs - create an MS-DOS file system under Linux
7

SYNOPSIS

9       mkdosfs|mkfs.msdos|mkfs.vfat [ -a ] [ -A ] [ -b sector-of-backup ] [ -c
10       ] [ -l filename ] [ -C ] [ -f number-of-FATs ] [ -F  FAT-size  ]  [  -h
11       number-of-hidden-sectors  ] [ -i volume-id ] [ -I ] [ -m message-file ]
12       [ -n volume-name ] [ -r root-dir-entries ] [ -R number-of-reserved-sec‐
13       tors  ]  [  -s  sectors-per-cluster ] [ -S logical-sector-size ] [ -v ]
14       device [ block-count ]
15

DESCRIPTION

17       mkdosfs is used to create an MS-DOS file system under Linux on a device
18       (usually  a  disk partition).  device is the special file corresponding
19       to the device (e.g /dev/hdXX).  block-count is the number of blocks  on
20       the device.  If omitted, mkdosfs automatically determines the file sys‐
21       tem size.
22

OPTIONS

24       -a     Normally, for any filesystem except  very  small  ones,  mkdosfs
25              will align all the data structures to cluster size, to make sure
26              that as long as the partition is properly aligned, so  will  all
27              the  data  structures  in  the filesystem.  This option disables
28              alignment; this may provide a handful of additional clusters  of
29              storage  at the expense of a significant performance degradation
30              on RAIDs, flash media or large-sector hard disks.
31
32       -A     Use Atari variation of the MS-DOS file system. This  is  default
33              if  mkdosfs is run on an Atari, then this option turns off Atari
34              format. There are some differences when using Atari  format:  If
35              not  directed  otherwise  by the user, mkdosfs will always use 2
36              sectors per cluster, since GEMDOS doesn't like other values very
37              much.   It  will  also obey the maximum number of sectors GEMDOS
38              can handle.  Larger file systems are managed by raising the log‐
39              ical  sector  size.   Under  Atari  format,  an Atari-compatible
40              serial number for the file system is generated, and a 12 bit FAT
41              is  used only for file systems that have one of the usual floppy
42              sizes (720k, 1.2M, 1.44M, 2.88M), a 16 bit FAT  otherwise.  This
43              can be overridden with the -F option. Some PC-specific boot sec‐
44              tor fields aren't written, and a boot  message  (option  -m)  is
45              ignored.
46
47       -b sector-of-backup
48              Selects  the  location  of  the  backup  boot  sector for FAT32.
49              Default depends on number of reserved sectors,  but  usually  is
50              sector  6.  The backup must be within the range of reserved sec‐
51              tors.
52
53       -c     Check the device for bad blocks before creating the file system.
54
55       -C     Create the file given as device on the command line,  and  write
56              the  to-be-created file system to it. This can be used to create
57              the new file system in a file instead of on a real  device,  and
58              to  avoid  using  dd  in advance to create a file of appropriate
59              size. With this option, the block-count must be  given,  because
60              otherwise  the  intended  size  of  the  file system wouldn't be
61              known. The file created is a sparse file,  which  actually  only
62              contains the meta-data areas (boot sector, FATs, and root direc‐
63              tory). The data portions won't be stored on the  disk,  but  the
64              file nevertheless will have the correct size. The resulting file
65              can be copied later to a floppy disk or other device, or mounted
66              through a loop device.
67
68       -f number-of-FATs
69              Specify the number of file allocation tables in the file system.
70              The default is 2.  Currently the Linux MS-DOS file  system  does
71              not support more than 2 FATs.
72
73       -F FAT-size
74              Specifies  the type of file allocation tables used (12, 16 or 32
75              bit).  If  nothing  is  specified,  mkdosfs  will  automatically
76              select  between  12, 16 and 32 bit, whatever fits better for the
77              file system size.
78
79       -h number-of-hidden-sectors
80              Select the number of hidden sectors in  the  volume.  Apparently
81              some  digital cameras get indigestion if you feed them a CF card
82              without such hidden sectors, this option allows you  to  satisfy
83              them. Assumes ´0´ if no value is given on the command line.
84
85       -i  volume-id
86              Sets  the  volume ID of the newly created file system; volume-id
87              is a 32-bit hexadecimal number  (for  example,  2e24ec82).   The
88              default  is  a  number which depends on the file system creation
89              time.
90
91       -I     It is typical for fixed disk devices to be  partitioned  so,  by
92              default, you are not permitted to create a filesystem across the
93              entire device.  mkdosfs will  complain  and  tell  you  that  it
94              refuses  to  work.   This is different when using MO disks.  One
95              doesn't always need partitions on MO disks.  The file system can
96              go  directly  to the whole disk.  Under other OSes this is known
97              as the 'superfloppy' format.
98
99              This switch will force mkdosfs to work properly.
100
101       -l filename
102              Read the bad blocks list from filename.
103
104       -m message-file
105              Sets the message the user receives on attempts to boot this file
106              system  without  having  properly installed an operating system.
107              The message file must not exceed 418 bytes once line feeds  have
108              been  converted  to  carriage return-line feed combinations, and
109              tabs have been expanded.  If the filename is a hyphen  (-),  the
110              text is taken from standard input.
111
112       -n volume-name
113              Sets  the  volume  name  (label) of the file system.  The volume
114              name can be up to 11 characters long.  The default is no label.
115
116       -r root-dir-entries
117              Select the number of entries available in  the  root  directory.
118              The default is 112 or 224 for floppies and 512 for hard disks.
119
120       -R number-of-reserved-sectors
121              Select  the  number  of  reserved  sectors. With FAT32 format at
122              least 2 reserved sectors are needed, the default is  32.  Other‐
123              wise the default is 1 (only the boot sector).
124
125       -s sectors-per-cluster
126              Specify the number of disk sectors per cluster.  Must be a power
127              of 2, i.e. 1, 2, 4, 8, ... 128.
128
129       -S logical-sector-size
130              Specify the number of bytes per logical sector.  Must be a power
131              of  2  and  greater  than or equal to 512, i.e. 512, 1024, 2048,
132              4096, 8192, 16384, or 32768.
133
134       -v     Verbose execution.
135

BUGS

137       mkdosfs can not create boot-able file systems. This isn't  as  easy  as
138       you  might  think at first glance for various reasons and has been dis‐
139       cussed a lot already.  mkdosfs simply will not support it ;)
140

AUTHOR

142       Dave  Hudson  -  <dave@humbug.demon.co.uk>;  modified  by  Peter  Anvin
143       <hpa@yggdrasil.com>.    Fixes    and    additions    by   Roman   Hodek
144       <roman@hodek.net> for Debian/GNU Linux.
145

ACKNOWLEDGMENTS

147       mkdosfs  is  based  on  code  from  mke2fs  (written  by  Remy  Card  -
148       <card@masi.ibp.fr>)  which  is  itself  based on mkfs (written by Linus
149       Torvalds - <torvalds@cs.helsinki.fi>).
150

SEE ALSO

152       dosfsck(8), dosfslabel(8), mkfs(8)
153
154
155
156Version 2.x                       5 May 1995                        MKDOSFS(8)
Impressum