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  [ -A ] [ -b sector-of-backup ] [ -c ] [ -l filename ] [ -C ] [
10       -f number-of-FATs ] [ -F FAT-size ] [ -h number-of-hidden-sectors  ]  [
11       -i volume-id ] [ -I ] [ -m message-file ] [ -n volume-name ] [ -r root-
12       dir-entries ] [ -R number-of-reserved-sectors ] [ -s  sectors-per-clus‐
13       ter ] [ -S logical-sector-size ] [ -v ] device [ block-count ]
14

DESCRIPTION

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

OPTIONS

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

BUGS

128       mkdosfs  can not create bootable filesystems. This isn't as easy as you
129       might think at first glance for various reasons and has been  discussed
130       a lot already.  mkdosfs simply will not support it ;)
131

AUTHOR

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

ACKNOWLEDGEMENTS

138       mkdosfs  is  based  on  code  from  mke2fs  (written  by  Remy  Card  -
139       <card@masi.ibp.fr>) which is itself based on  mkfs  (written  by  Linus
140       Torvalds - <torvalds@cs.helsinki.fi>).
141

SEE ALSO

143       dosfsck(8), mkfs(8)
144
145
146
147Version 2.x                       5 May 1995                        MKDOSFS(8)
Impressum