3af45ff50db135d181ecaba31afb7a38c4b9bd55
[platform/upstream/mtools.git] / mformat.1
1 '\" t
2 .TH mformat 1 "29Jun11" mtools-4.0.17
3 .SH Name
4 mformat - add an MSDOS filesystem to a low-level formatted floppy disk
5 '\" t
6 .de TQ
7 .br
8 .ns
9 .TP \\$1
10 ..
11
12 .tr \(is'
13 .tr \(if`
14 .tr \(pd"
15
16 .SH Note\ of\ warning
17 This manpage has been automatically generated from mtools's texinfo
18 documentation, and may not be entirely accurate or complete.  See the
19 end of this man page for details.
20 .PP
21 .SH Description
22 .PP
23 The \fR\&\f(CWmformat\fR command is used to add an MS-DOS file system to a
24 low-level formatted diskette. Its syntax is:
25 .PP
26 .ft I
27 .nf
28 \&\fR\&\f(CWmformat\fR [\fR\&\f(CW-t\fR \fIcylinders\fR|\fR\&\f(CW-T\fR \fItot_sectors\fR] [\fR\&\f(CW-h\fR \fIheads\fR] [\fR\&\f(CW-s\fR \fIsectors\fR]
29   [\fR\&\f(CW-f\fR \fIsize\fR] [\fR\&\f(CW-1\fR] [\fR\&\f(CW-4\fR] [\fR\&\f(CW-8\fR]
30   [\fR\&\f(CW-v\fR \fIvolume_label\fR]
31   [\fR\&\f(CW-F\fR] [\fR\&\f(CW-S\fR \fIsizecode\fR] [\fR\&\f(CW-X\fR]
32   [\fR\&\f(CW-2\fR \fIsectors_on_track_0\fR] [\fR\&\f(CW-3\fR]
33   [\fR\&\f(CW-0\fR \fIrate_on_track_0\fR] [\fR\&\f(CW-A\fR \fIrate_on_other_tracks\fR]
34   [\fR\&\f(CW-M\fR \fIsoftware_sector_size\fR]
35   [\fR\&\f(CW-N\fR \fIserial_number\fR] [\fR\&\f(CW-a\fR]
36   [\fR\&\f(CW-C\fR] [\fR\&\f(CW-H\fR \fIhidden_sectors\fR] [\fR\&\f(CW-I\fR \fIfsVersion\fR]
37   [\fR\&\f(CW-r\fR \fIroot_sectors\fR] [\fR\&\f(CW-L\fR \fIfat_len\fR] 
38   [\fR\&\f(CW-B\fR \fIboot_sector\fR] [\fR\&\f(CW-k\fR]
39   [\fR\&\f(CW-m\fR \fImedia_descriptor\fR]
40   [\fR\&\f(CW-K\fR \fIbackup_boot\fR]
41   \fIdrive:\fR
42 .fi
43 .ft R
44  
45 .PP
46 \&\fR\&\f(CWMformat\fR adds a minimal MS-DOS file system (boot sector, FAT, and
47 root directory) to a diskette that has already been formatted by a Unix
48 low-level format.
49 .PP
50 The following options are supported: (The S, 2, 1 and M options may not
51 exist if this copy of mtools has been compiled without the USE_2M
52 option)
53 .PP
54 The following options are the same as for MS-DOS's format command:
55 .PP
56 .SH Options
57 .TP
58 \&\fR\&\f(CWv\fR\ 
59 Specifies the volume label. A volume label identifies the disk and can
60 be a maximum of 11 characters. If you omit the -v switch, mformat will
61 assign no label to the disk.
62 .TP
63 \&\fR\&\f(CWf\fR\ 
64 Specifies the size of the DOS file system to format. Only a certain
65 number of predefined sizes are supported by this flag; for others use
66 the -h/-t/-s flags. The following sizes are supported:
67 .RS
68 .TP
69 160\ 
70 160K, single-sided, 8 sectors per track, 40 cylinders (for 5 1/4 DD)
71 .TP
72 180\ 
73 160K, single-sided, 9 sectors per track, 40 cylinders (for 5 1/4 DD)
74 .TP
75 320\ 
76 320K, double-sided, 8 sectors per track, 40 cylinders (for 5 1/4 DD)
77 .TP
78 360\ 
79 360K, double-sided, 9 sectors per track, 40 cylinders (for 5 1/4 DD)
80 .TP
81 720\ 
82 720K, double-sided, 9 sectors per track, 80 cylinders (for 3 1/2 DD)
83 .TP
84 1200\ 
85 1200K, double-sided, 15 sectors per track, 80 cylinders (for 5 1/4 HD)
86 .TP
87 1440\ 
88 1440K, double-sided, 18 sectors per track, 80 cylinders (for 3 1/2 HD)
89 .TP
90 2880\ 
91 2880K, double-sided, 36 sectors per track, 80 cylinders (for 3 1/2 ED)
92 .RE
93 .TP
94 \&\fR\&\f(CWt\fR\ 
95 Specifies the number of tracks on the disk.
96 .TP
97 \&\fR\&\f(CWT\fR\ 
98 Specifies the number of total sectors on the disk. Only one of these 2
99 options may be specified (tracks or total sectors)
100 .TP
101 \&\fR\&\f(CWh\fR\ 
102 The number of heads (sides).
103 .TP
104 \&\fR\&\f(CWs\fR\ 
105 Specifies the number of sectors per track. If the 2m option is given,
106 number of 512-byte sector equivalents on generic tracks (i.e. not head 0
107 track 0).  If the 2m option is not given, number of physical sectors per
108 track (which may be bigger than 512 bytes).
109 .TP
110 \&\fR\&\f(CW1\fR\ 
111 Formats a single side (equivalent to -h 1)
112 .TP
113 \&\fR\&\f(CW4\fR\ 
114 Formats a 360K double-sided disk (equivalent to -f 360). When used
115 together with -the 1 switch, this switch formats a 180K disk
116 .TP
117 \&\fR\&\f(CW8\fR\ 
118 Formats a disk with 8 sectors per track.
119 .PP
120 MS-DOS format's \fR\&\f(CWq\fR, \fR\&\f(CWu\fR and \fR\&\f(CWb\fR options are not
121 supported, and \fR\&\f(CWs\fR has a different meaning.
122 .PP
123 The following options are specific to mtools:
124 .IP
125 .TP
126 \&\fR\&\f(CWF\fR\ 
127 Format the partition as FAT32.
128 .TP
129 \&\fR\&\f(CWS\fR\ 
130 The size code. The size of the sector is 2 ^ (sizecode + 7).
131 .TP
132 \&\fR\&\f(CWX\fR\ 
133 formats the disk as an XDF disk. See section XDF, for more details. The disk
134 has first to be low-level formatted using the xdfcopy utility included
135 in the fdutils package. XDF disks are used for instance for OS/2 install
136 disks.
137 .TP
138 \&\fR\&\f(CW2\fR\ 
139 2m format. The parameter to this option describes the number of
140 sectors on track 0, head 0. This option is recommended for sectors
141 bigger than normal.
142 .TP
143 \&\fR\&\f(CW3\fR\ 
144 don't use a 2m format, even if the current geometry of the disk is a 2m 
145 geometry.
146 .TP
147 \&\fR\&\f(CW0\fR\ 
148 Data transfer rate on track 0
149 .TP
150 \&\fR\&\f(CWA\fR\ 
151 Data transfer rate on tracks other than 0
152 .TP
153 \&\fR\&\f(CWM\fR\ 
154 software sector size. This parameter describes the sector size in bytes used
155 by the MS-DOS file system. By default it is the physical sector size.
156 .TP
157 \&\fR\&\f(CWN\fR\ 
158 Uses the requested serial number, instead of generating one
159 automatically
160 .TP
161 \&\fR\&\f(CWa\fR\ 
162 If this option is given, an Atari style serial number is generated.
163 Ataris store their serial number in the OEM label.
164 .TP
165 \&\fR\&\f(CWC\fR\ 
166 creates the disk image file to install the MS-DOS file system on
167 it. Obviously, this is useless on physical devices such as floppies
168 and hard disk partitions, but is interesting for image files.
169 .TP
170 \&\fR\&\f(CWH\fR\ 
171 number of hidden sectors. This parameter is useful for formatting hard
172 disk partition, which are not aligned on track boundaries (i.e. first
173 head of first track doesn't belong to the partition, but contains a
174 partition table). In that case the number of hidden sectors is in
175 general the number of sectors per cylinder. This is untested.
176 .TP
177 \&\fR\&\f(CWI\fR\ 
178 Sets the fsVersion id when formatting a FAT32 drive.  In order to find
179 this out, run minfo on an existing FAT32 drive, and mail me about it, so
180 I can include the correct value in future versions of mtools.
181 .TP
182 \&\fR\&\f(CWc\fR\ 
183 Sets the size of a cluster (in sectors).  If this cluster size would
184 generate a FAT that too big for its number of bits, mtools automatically
185 increases the cluster size, until the FAT is small enough.
186 .TP
187 \&\fR\&\f(CWd\fR\ 
188 Sets the number of FAT copies. Default is 2. This setting can also be
189 specified using the \fR\&\f(CWMTOOLS_NFATS\fR environment variable.
190 .TP
191 \&\fR\&\f(CWr\fR\ 
192 Sets the size of the root directory (in sectors).  Only applicable to 12
193 and 16 bit FATs. This setting can also be specified using the
194 \&\fR\&\f(CWMTOOLS_DIR_LEN\fR environment variable.
195 .TP
196 \&\fR\&\f(CWL\fR\ 
197 Sets the length of the FAT.
198 .TP
199 \&\fR\&\f(CWB\fR\ 
200 Use the boot sector stored in the given file or device, instead of using
201 its own.  Only the geometry fields are updated to match the target disks
202 parameters.
203 .TP
204 \&\fR\&\f(CWk\fR\ 
205 Keep the existing boot sector as much as possible.  Only the geometry
206 fields and other similar file system data are updated to match the target
207 disks parameters.
208 .TP
209 \&\fR\&\f(CWK\fR\ 
210 Sets the sector number where the backup of the boot sector should be
211 stored (only relevant on FAT32).
212 .TP
213 \&\fR\&\f(CWm\fR\ 
214 Use a non-standard media descriptor byte for this disk. The media
215 descriptor is stored at position 21 of the boot sector, and as first
216 byte in each FAT copy. Using this option may confuse DOS or older mtools
217 version, and may make the disk unreadable. Only use if you know what you
218 are doing.
219 .PP
220 To format a diskette at a density other than the default, you must supply
221 (at least) those command line parameters that are different from the
222 default.
223 .PP
224 \&\fR\&\f(CWMformat\fR returns 0 on success or 1 on failure.
225 .PP
226 It doesn't record bad block information to the Fat, use
227 \&\fR\&\f(CWmbadblocks\fR for that.
228 .PP
229 .SH See\ Also
230 Mtools' texinfo doc
231 .SH Viewing\ the\ texi\ doc
232 This manpage has been automatically generated from mtools's texinfo
233 documentation. However, this process is only approximative, and some
234 items, such as crossreferences, footnotes and indices are lost in this
235 translation process.  Indeed, these items have no appropriate
236 representation in the manpage format.  Moreover, not all information has
237 been translated into the manpage version.  Thus I strongly advise you to
238 use the original texinfo doc.  See the end of this manpage for
239 instructions how to view the texinfo doc.
240 .TP
241 * \ \ 
242 To generate a printable copy from the texinfo doc, run the following
243 commands:
244  
245 .nf
246 .ft 3
247 .in +0.3i
248     ./configure; make dvi; dvips mtools.dvi
249 .fi
250 .in -0.3i
251 .ft R
252 .PP
253  
254 \&\fR
255 .TP
256 * \ \ 
257 To generate a html copy,  run:
258  
259 .nf
260 .ft 3
261 .in +0.3i
262     ./configure; make html
263 .fi
264 .in -0.3i
265 .ft R
266 .PP
267  
268 \&\fRA premade html can be found at
269 \&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR
270 .TP
271 * \ \ 
272 To generate an info copy (browsable using emacs' info mode), run:
273  
274 .nf
275 .ft 3
276 .in +0.3i
277     ./configure; make info
278 .fi
279 .in -0.3i
280 .ft R
281 .PP
282  
283 \&\fR
284 .PP
285 The texinfo doc looks most pretty when printed or as html.  Indeed, in
286 the info version certain examples are difficult to read due to the
287 quoting conventions used in info.
288 .PP