Merge aicom-network-branch (without NDIS changes for now)
[reactos.git] / rosapps / applications / sysutils / mkdosfs / mkdosfs.8
1 .\" -*- nroff -*-
2 .TH MKDOSFS 8 "5 May 1995" "Version 2.x"
3 .SH NAME
4 .B mkdosfs
5 \- create an MS-DOS file system under Linux
6 .SH SYNOPSIS
7 .B mkdosfs
8 [
9 .B \-A
10 ]
11 [
12 .B \-b
13 .I sector-of-backup
14 ]
15 [
16 .B \-c
17 ]
18 [
19 .B \-l
20 .I filename
21 ]
22 [
23 .B \-C
24 ]
25 [
26 .B \-f
27 .I number-of-FATs
28 ]
29 [
30 .B \-F
31 .I FAT-size
32 ]
33 [
34 .B \-i
35 .I volume-id
36 ]
37 .RB [ " \-I " ]
38 [
39 .B \-m
40 .I message-file
41 ]
42 [
43 .B \-n
44 .I volume-name
45 ]
46 [
47 .B \-r
48 .I root-dir-entries
49 ]
50 [
51 .B \-R
52 .I number-of-reserved-sectors
53 ]
54 [
55 .B \-s
56 .I sectors-per-cluster
57 ]
58 [
59 .B \-S
60 .I logical-sector-size
61 ]
62 [
63 .B \-v
64 ]
65 .I device
66 [
67 .I block-count
68 ]
69 .SH DESCRIPTION
70 .B mkdosfs
71 is used to create an MS-DOS file system under Linux on a device (usually
72 a disk partition).
73 .I device
74 is the special file corresponding to the device (e.g /dev/hdXX).
75 .I block-count
76 is the number of blocks on the device. If omitted,
77 .B mkdosfs
78 automatically determiness the file system size.
79 .SH OPTIONS
80 .TP
81 .B \-A
82 Use Atari variation of the MS-DOS filesystem. This is default if
83 \fBmkdosfs\fP is run on an Atari, then this option turns off Atari
84 format. There are some differences when using Atari format: If not
85 directed otherwise by the user, \fBmkdosfs\fP will always use 2
86 sectors per cluster, since GEMDOS doesn't like other values very much.
87 It will also obey the maximum number of sectors GEMDOS can handle.
88 Larger filesystems are managed by raising the logical sector size.
89 Under Atari format, an Atari-compatible serial number for the
90 filesystem is generated, and a 12 bit FAT is used only for filesystems
91 that have one of the usual floppy sizes (720k, 1.2M, 1.44M, 2.88M), a
92 16 bit FAT otherwise. This can be overridden with the \fB\-F\fP
93 option. Some PC-specific boot sector fields aren't written, and a boot
94 message (option \fB\-m\fP) is ignored.
95 .TP
96 .BI \-b " sector-of-backup "
97 Selects the location of the backup boot sector for FAT32. Default
98 depends on number of reserved sectors, but usually is sector 6. The
99 backup must be within the range of reserved sectors.
100 .TP
101 .B \-c
102 Check the device for bad blocks before creating the file system.
103 .TP
104 .B \-C
105 Create the file given as \fIdevice\fP on the command line, and write
106 the to-be-created file system to it. This can be used to create the
107 new file system in a file instead of on a real device, and to avoid
108 using \fBdd\fP in advance to create a file of appropriate size. With
109 this option, the \fIblock-count\fP must be given, because otherwise
110 the intended size of the file system wouldn't be known. The file
111 created is a sparse file, which actually only contains the meta-data
112 areas (boot sector, FATs, and root directory). The data portions won't
113 be stored on the disk, but the file nevertheless will have the
114 correct size. The resulting file can be copied later to a floppy disk
115 or other device, or mounted through a loop device.
116 .TP
117 .BI \-f " number-of-FATs"
118 Specify the number of file allocation tables in the file system. The
119 default is 2. Currently the Linux MS-DOS file system does not support
120 more than 2 FATs.
121 .TP
122 .BI \-F " FAT-size"
123 Specifies the type of file allocation tables used (12, 16 or 32 bit).
124 If nothing is specified, \fBmkdosfs\fR will automatically select
125 between 12 and 16 bit, whatever fits better for the filesystem size.
126 32 bit FAT (FAT32 format) must (still) be selected explicitly if you
127 want it.
128 .TP
129 .BI \-i " volume-id"
130 Sets the volume ID of the newly created filesystem;
131 .I volume-id
132 is a 32-bit hexadecimal number (for example, 2e24ec82). The default
133 is a number which depends on the filesystem creation time.
134 .TP
135 .B \-I
136 Normally you are not allowed to use any 'full' fixed disk devices.
137 .B mkdosfs
138 will complain and tell you that it refuses to work. This is different
139 when usind MO disks. One doesn't always need partitions on MO disks.
140 The filesytem can go directly to the whole disk. Under other OSes
141 this is known as the 'superfloppy' format.
142
143 This switch will force
144 .B mkdosfs
145 to work properly.
146 .TP
147 .BI \-l " filename"
148 Read the bad blocks list from
149 .IR filename .
150 .TP
151 .BI \-m " message-file"
152 Sets the message the user receives on attempts to boot this filesystem
153 without having properly installed an operating system. The message
154 file must not exceed 418 bytes once line feeds have been converted to
155 carriage return-line feed combinations, and tabs have been expanded.
156 If the filename is a hyphen (-), the text is taken from standard input.
157 .TP
158 .BI \-n " volume-name"
159 Sets the volume name (label) of the filesystem. The volume name can
160 be up to 11 characters long. The default is no label.
161 .TP
162 .BI \-r " root-dir-entries"
163 Select the number of entries available in the root directory. The
164 default is 112 or 224 for floppies and 512 for hard disks.
165 .TP
166 .BI \-R " number-of-reserved-sectors "
167 Select the number of reserved sectos. With FAT32 format at least 2
168 reserved sectors are needed, the default is 32. Otherwise the default
169 is 1 (only the boot sector).
170 .TP
171 .BI \-s " sectors-per-cluster"
172 Specify the number of disk sectors per cluster. Must be a power of 2,
173 i.e. 1, 2, 4, 8, ... 128.
174 .TP
175 .BI \-S " logical-sector-size"
176 Specify the number of bytes per logical sector. Must be a power of 2
177 and greater than or equal to 512, i.e. 512, 1024, 2048, 4096, 8192,
178 16384, or 32768.
179 .TP
180 .B \-v
181 Verbose execution.
182 .SH BUGS
183 None are know at the moment. If you find any, please report it them
184 to <hpa@yggdrasil.com>. Please include the version number (Yggdrasil 0.3a).
185 .SH AUTHOR
186 Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin
187 <hpa@yggdrasil.com>. Fixes and additions by Roman Hodek
188 <Roman.Hodek@informatik.uni-erlangen.de> for Debian/GNU Linux.
189 .SH ACKNOWLEDGEMENTS
190 .B mkdosfs
191 is based on code from
192 .BR mke2fs
193 (written by Remy Card - <card@masi.ibp.fr>) which is itself based on
194 .BR mkfs
195 (written by Linus Torvalds - <torvalds@cs.helsinki.fi>).
196 .SH SEE ALSO
197 .BR dosfsck (8),
198 .BR mkfs (8)