1mformat(1)                  General Commands Manual                 mformat(1)
2
3
4

Name

6       mformat - add an MSDOS filesystem to a low-level formatted floppy disk
7
8
9

Note of warning

11       This  manpage  has  been  automatically generated from mtools's texinfo
12       documentation, and may not be entirely accurate or complete.   See  the
13       end of this man page for details.
14

Description

16       The mformat command is used to add an MS-DOS file system to a low-level
17       formatted diskette. Its syntax is:
18
19       mformat [-t cylinders|-T tot_sectors] [-h heads] [-s sectors]
20         [-f size] [-1] [-4] [-8]
21         [-v volume_label]
22         [-F] [-S sizecode]
23         [-M software_sector_size]
24         [-N serial_number] [-a]
25         [-C] [-H hidden_sectors] [-I fsVersion]
26         [-r root_sectors] [-L fat_len]
27         [-B boot_sector] [-k]
28         [-m media_descriptor]
29         [-K backup_boot]
30         [-R nb_reserved_sectors]
31         [-c clusters_per_sector]
32         [-d fat_copies]
33         [-X] [-2 sectors_on_track_0] [-3]
34         [-0 rate_on_track_0] [-A rate_on_other_tracks]
35         drive:
36
37
38       Mformat adds a minimal MS-DOS file system (boot sector, FAT,  and  root
39       directory) to a diskette that has already been formatted by a Unix low-
40       level format.
41
42       The following options are supported: (The S, 2, 1 and M options may not
43       exist  if  this copy of mtools has been compiled without the USE_2M op‐
44       tion)
45
46       The following options are the same as for MS-DOS's format command:
47

Options

49       v      Specifies the volume label. A volume label identifies  the  disk
50              and  can  be  a  maximum  of  11  characters. If you omit the -v
51              switch, mformat will assign no label to the disk.
52
53       f      Specifies the size of the DOS file system to format. Only a cer‐
54              tain  number of predefined sizes are supported by this flag; for
55              others use the -h/-t/-s flags.  The  following  sizes  are  sup‐
56              ported:
57
58              160    160K,  single-sided,  8  sectors  per track, 40 cylinders
59                     (for 5 1/4 DD)
60
61              180    160K, single-sided, 9 sectors  per  track,  40  cylinders
62                     (for 5 1/4 DD)
63
64              320    320K,  double-sided,  8  sectors  per track, 40 cylinders
65                     (for 5 1/4 DD)
66
67              360    360K, double-sided, 9 sectors  per  track,  40  cylinders
68                     (for 5 1/4 DD)
69
70              720    720K,  double-sided,  9  sectors  per track, 80 cylinders
71                     (for 3 1/2 DD)
72
73              1200   1200K, double-sided, 15 sectors per track,  80  cylinders
74                     (for 5 1/4 HD)
75
76              1440   1440K,  double-sided,  18 sectors per track, 80 cylinders
77                     (for 3 1/2 HD)
78
79              2880   2880K, double-sided, 36 sectors per track,  80  cylinders
80                     (for 3 1/2 ED)
81
82       t      Specifies the number of tracks on the disk.
83
84       T      Specifies  the  number of total sectors on the disk. Only one of
85              these 2 options may be specified (tracks or total sectors)
86
87       h      The number of heads (sides).
88
89       s      Specifies the number of sectors per track. If the 2m  option  is
90              given,  number  of 512-byte sector equivalents on generic tracks
91              (i.e. not head 0 track 0).  If the 2m option is not given,  num‐
92              ber  of physical sectors per track (which may be bigger than 512
93              bytes).
94
95       1      Formats a single side (equivalent to -h 1)
96
97       4      Formats a 360K double-sided disk (equivalent to  -f  360).  When
98              used  together  with  -the  1 switch, this switch formats a 180K
99              disk
100
101       8      Formats a disk with 8 sectors per track.
102
103       MS-DOS format's q, u and b options are not supported, and s has a  dif‐
104       ferent meaning.
105
106       The following options are specific to mtools:
107
108       F      Format the partition as FAT32.
109
110       S      The size code. The size of the sector is 2 ^ (sizecode + 7).
111
112       X      formats  the  disk as an XDF disk. See section XDF, for more de‐
113              tails. The disk has first to be low-level  formatted  using  the
114              xdfcopy  utility  included in the fdutils package. XDF disks are
115              used for instance for OS/2 install disks.
116
117       2      2m format. The parameter to this option describes the number  of
118              sectors  on track 0, head 0. This option is recommended for sec‐
119              tors bigger than normal.
120
121       3      don't use a 2m format, even if the current geometry of the  disk
122              is a 2m geometry.
123
124       0      Data transfer rate on track 0
125
126       A      Data transfer rate on tracks other than 0
127
128       M      software  sector  size. This parameter describes the sector size
129              in bytes used by the MS-DOS file system. By default  it  is  the
130              physical sector size.
131
132       N      Uses  the requested serial number, instead of generating one au‐
133              tomatically
134
135       a      If this option is given, an Atari style serial number is  gener‐
136              ated.  Ataris store their serial number in the OEM label.
137
138       C      creates the disk image file to install the MS-DOS file system on
139              it. Obviously, this is useless on physical devices such as flop‐
140              pies  and  hard  disk  partitions,  but is interesting for image
141              files.
142
143       H      number of hidden sectors. This parameter is useful  for  format‐
144              ting  hard disk partition, which are not aligned on track bound‐
145              aries (i.e. first head of first track doesn't belong to the par‐
146              tition, but contains a partition table). In that case the number
147              of hidden sectors is in general the number of sectors per cylin‐
148              der. This is untested.
149
150       I      Sets  the  fsVersion id when formatting a FAT32 drive.  In order
151              to find this out, run minfo on an existing FAT32 drive, and mail
152              me  about  it, so I can include the correct value in future ver‐
153              sions of mtools.
154
155       c      Sets the size of a cluster (in sectors).  If this  cluster  size
156              would generate a FAT that too big for its number of bits, mtools
157              automatically increases the cluster size, until the FAT is small
158              enough.  If no cluster size is specified explicitly, mtools uses
159              a default value as described in section ``Number of sectors  per
160              cluster'' below.
161
162       d      Sets  the  number  of FAT copies. Default is 2. This setting can
163              also be specified using the MTOOLS_NFATS environment variable.
164
165       r      Sets the size of the root directory (in sectors).  Only applica‐
166              ble  to  12  and 16 bit FATs. This setting can also be specified
167              using the MTOOLS_DIR_LEN environment variable.
168
169       L      Sets the length of the FAT.
170
171       B      Use the boot sector stored in the given file or device,  instead
172              of using its own.  Only the geometry fields are updated to match
173              the target disks parameters.
174
175       k      Keep the existing boot sector as much as possible.  Only the ge‐
176              ometry  fields and other similar file system data are updated to
177              match the target disks parameters.
178
179       K      Sets the sector number where  the  backup  of  the  boot  sector
180              should be stored (only relevant on FAT32).
181
182       R      Sets  the  number  of reserved sectors for this filesystem. This
183              must be at least 1 for non-FAT32 disks, and at least 3  for  FAT
184              disks  (in order to accommodate the boot sector, the info sector
185              and the backup boot sector).
186
187       m      Use a non-standard media descriptor byte for this disk. The  me‐
188              dia  descriptor is stored at position 21 of the boot sector, and
189              as first byte in each FAT copy. Using this  option  may  confuse
190              DOS  or  older mtools version, and may make the disk unreadable.
191              Only use if you know what you are doing.
192
193       To format a diskette at a density other than the default, you must sup‐
194       ply  (at  least)  those command line parameters that are different from
195       the default.
196
197       Mformat returns 0 on success or 1 on failure.
198
199       It doesn't record bad block information to the Fat, use mbadblocks  for
200       that.
201

Number of sectors per cluster

203       If  the  user  indicates no cluster size, mformat figures out a default
204       value for it.
205
206       For FAT32 it uses the following table to determine the number  of  sec‐
207       tors  per  cluster,  depending  on  the  total number of sectors on the
208       filesystem.
209
210       more than 32*1024*1024*2: 64 sectors
211       between 16*1024*1024*2 and 32*1024*1024*2: 32 sectors
212       between 8*1024*1024*2 and 16*1024*1024*2: 16 sectors
213       between 260*1024*2 and 81024*1024*2: 1 sectors
214
215       This is derived from information on page 20  of  Microsoft's  fatgen103
216       document, which currently can be found at the following address:
217
218       https://staff.washington.edu/dittrich/misc/fatgen103.pdf
219
220       For  FAT12  and  FAT16,  mformat  uses  an iterative approach, where it
221       starts with a set value, which it doubles until it is able to  fill  up
222       the  disk using that cluster size and a number of cluster less than the
223       maximum allowed.
224
225       The starting value is 1 for disks with one head or less than 2000  sec‐
226       tors,  and 2 for disks with more than one head, and more than 2000 sec‐
227       tors.
228
229       The number of sectors per cluster cannot go beyond 128.
230

See Also

232       Mtools' texinfo doc
233

Viewing the texi doc

235       This manpage has been automatically  generated  from  mtools's  texinfo
236       documentation.  However,  this  process is only approximative, and some
237       items, such as crossreferences, footnotes and indices are lost in  this
238       translation process.  Indeed, these items have no appropriate represen‐
239       tation in the manpage format.  Moreover, not all information  has  been
240       translated into the manpage version.  Thus I strongly advise you to use
241       the original texinfo doc.  See the end of this manpage for instructions
242       how to view the texinfo doc.
243
244       *      To  generate a printable copy from the texinfo doc, run the fol‐
245              lowing commands:
246
247                     ./configure; make dvi; dvips mtools.dvi
248
249
250
251       *      To generate a html copy,  run:
252
253                     ./configure; make html
254
255       A premade html can be found at `http://www.gnu.org/software/mtools/man
256       ual/mtools.html'
257
258       *      To  generate  an  info  copy (browsable using emacs' info mode),
259              run:
260
261                     ./configure; make info
262
263
264
265       The texinfo doc looks most pretty when printed or as html.  Indeed,  in
266       the  info  version  certain  examples  are difficult to read due to the
267       quoting conventions used in info.
268
269mtools-4.0.27                       16Apr21                         mformat(1)
Impressum