1. Name

mformat - add an MSDOS filesystem to a low-level formatted floppy disk
     .tr (is' .tr (if` .tr (pd"

2. Note of warning

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

3. Description

The \fR\f(CWmformat\fR command is used to add an MS-DOS filesystem to a low-level formatted diskette. Its syntax is:

 
Sélectionnez
\fR\f(CWmformat\fR [\fR\f(CW-t\fR cylinders] [\fR\f(CW-h\fR heads] [\fR\f(CW-s\fR sectors]
  [\fR\f(CW-f\fR size] [\fR\f(CW-1\fR] [\fR\f(CW-4\fR] [\fR\f(CW-8\fR]
  [\fR\f(CW-v\fR volume_label]
  [\fR\f(CW-F\fR] [\fR\f(CW-S\fR sizecode] [\fR\f(CW-X\fR]
  [\fR\f(CW-2\fR sectors_on_track_0] [\fR\f(CW-3\fR]
  [\fR\f(CW-0\fR rate_on_track_0] [\fR\f(CW-A\fR rate_on_other_tracks]
  [\fR\f(CW-M\fR software_sector_size]
  [\fR\f(CW-N\fR serial_number] [\fR\f(CW-a\fR]
  [\fR\f(CW-C\fR] [\fR\f(CW-H\fR hidden_sectors] [\fR\f(CW-I\fR fsVersion]
  [\fR\f(CW-r\fR root_sectors] [\fR\f(CW-L\fR fat_len]
  [\fR\f(CW-B\fR boot_sector] [\fR\f(CW-k\fR]
  [\fR\f(CW-m\fR media_descriptor]
  drive:

\fR\f(CWMformat\fR adds a minimal MS-DOS filesystem (boot sector, FAT, and root directory) to a diskette that has already been formatted by a Unix low-level format.

The following options are supported: (The S, 2, 1 and M options may not exist if this copy of mtools has been compiled without the USE_2M option)

The following options are the same as for Dos's format command:

4. Options

  • \fR\f(CWv\fR 
        Specifies the volume label. A volume label identifies the disk and can be a maximum of 11 characters. If you omit the -v switch, mlabel will assign no label to the disk.
  • \fR\f(CWf\fR 
        Specifies the size of the DOS filesystem to format. Only a certain number of predefined sizes are supported by this flag; for others use the -h/-t/-s flags. The following sizes are supported:
  • 160 
        160K, single-sided, 8 sectors per track, 40 cylinders (for 5 1/4 DD)
  • 180 
        160K, single-sided, 9 sectors per track, 40 cylinders (for 5 1/4 DD)
  • 320 
        320K, double-sided, 8 sectors per track, 40 cylinders (for 5 1/4 DD)
  • 360 
        360K, double-sided, 9 sectors per track, 40 cylinders (for 5 1/4 DD)
  • 720 
        720K, double-sided, 9 sectors per track, 80 cylinders (for 3 1/2 DD)
  • 1200 
        1200K, double-sided, 15 sectors per track, 80 cylinders (for 5 1/4 HD)
  • 1440 
        1440K, double-sided, 18 sectors per track, 80 cylinders (for 3 1/2 HD)
  • 2880 
        2880K, double-sided, 36 sectors per track, 80 cylinders (for 3 1/2 ED)
  • \fR\f(CWt\fR 
        Specifies the number of tracks on the disk.
  • \fR\f(CWh\fR 
        The number of heads (sides).
  • \fR\f(CWn\fR 
        Specifies the number of sectors per track. If the 2m option is given, number of 512-byte sector equivalents on generic tracks (i.e. not head 0 track 0). If the 2m option is not given, number of physical sectors per track (which may be bigger than 512 bytes).
  • \fR\f(CW1\fR 
        Formats a single side (equivalent to -h 1)
  • \fR\f(CW4\fR 
        Formats a 360K double-sided disk (equivalent to -f 360). When used together with -the 1 switch, this switch formats a 180K disk
  • \fR\f(CW8\fR 
        Formats a disk with 8 sectors per track.

MSDOS format's \fR\f(CWq\fR, \fR\f(CWu\fR and \fR\f(CWb\fR options are not supported, and \fR\f(CWs\fR has a different meaning.

The following options are specific to mtools:

  • \fR\f(CWF\fR 
        Format the partition as FAT32.
  • \fR\f(CWS\fR 
        The sizecode. The size of the sector is 2 ^ (sizecode + 7).
  • \fR\f(CWX\fR 
        formats the disk as an XDF disk. See section XDF, for more details. The disk has first to be low-level formatted using the xdfcopy utility included in the fdutils package. XDF disks are used for instance for OS/2 install disks.
  • \fR\f(CW2\fR 
        2m format. The parameter to this option describes the number of sectors on track 0, head 0. This option is recommended for sectors bigger than normal.
  • \fR\f(CW3\fR 
        don't use a 2m format, even if the current geometry of the disk is a 2m geometry.
  • \fR\f(CW0\fR 
        Data transfer rate on track 0
  • \fR\f(CWA\fR 
        Data transfer rate on tracks other than 0
  • \fR\f(CWM\fR 
        software sector size. This parameter describes the sector size in bytes used by the MS-DOS filesystem. By default it is the physical sector size.
  • \fR\f(CWN\fR 
        Uses the requested serial number, instead of generating one automatically
  • \fR\f(CWa\fR 
        If this option is given, an Atari style serial number is generated. Ataris store their serial number in the OEM label.
  • \fR\f(CWC\fR 
        creates the disk image file to install the MS-DOS filesystem on it. Obviously, this is useless on physical devices such as floppies and hard disk partitions, but is interesting for image files.
  • \fR\f(CWH\fR 
        number of hidden sectors. This parameter is useful for formatting hard disk partition, which are not aligned on track boundaries (i.e. first head of first track doesn't belong to the partition, but contains a partition table). In that case the number of hidden sectors is in general the number of sectors per cylinder. This is untested.
  • \fR\f(CWI\fR 
        Sets the fsVersion id when formatting a FAT32 drive. In order to find this out, run minfo on an existing FAT32 drive, and mail me about it, so I can include the correct value in future versions of mtools.
  • \fR\f(CWc\fR 
        Sets the size of a cluster (in sectors). If this cluster size would generate a FAT that too big for its number of bits, mtools automatically increases the cluster size, until the FAT is small enough.
  • \fR\f(CWd\fR 
        Sets the number of FAT copies. Default is 2. This setting can also be specified using the \fR\f(CWMTOOLS_NFATS\fR environment variable.
  • \fR\f(CWr\fR 
        Sets the size of the root directory (in sectors). Only applicable to 12 and 16 bit FATs. This setting can also be specified using the \fR\f(CWMTOOLS_DIR_LEN\fR environment variable.
  • \fR\f(CWL\fR 
        Sets the length of the FAT.
  • \fR\f(CWB\fR 
        Use the bootsector stored in the given file or device, instead of using its own. Only the geometry fields are updated to match the target disks parameters.
  • \fR\f(CWk\fR 
        Keep the existing boot sector as much as possible. Only the geometry fields and other similar filesystem data are updated to match the target disks parameters.
  • \fR\f(CWm\fR 
        Use a non-standard media descriptor byte for this disk. The media descriptor is stored at position 21 of the boot sector, and as first byte in each FAT copy. Using this option may confuse DOS or older mtools version, and may make the disk unreadable. Only use if you know what you are doing.

To format a diskette at a density other than the default, you must supply (at least) those command line parameters that are different from the default.

\fR\f(CWMformat\fR returns 0 on success or 1 on failure.

It doesn't record bad block information to the Fat, use \fR\f(CWmbadblocks\fR for that.

5. See Also

Mtools' texinfo doc

6. Viewing the texi doc

This manpage has been automatically generated from mtools's texinfo documentation. However, this process is only approximative, and some items, such as crossreferences, footnotes and indices are lost in this translation process. Indeed, these items have no appropriate representation in the manpage format. Moreover, not all information has been translated into the manpage version. Thus I strongly advise you to use the original texinfo doc. See the end of this manpage for instructions how to view the texinfo doc.

  • *   
        To generate a printable copy from the texinfo doc, run the following commands:
 
Sélectionnez
   ./configure; make dvi; dvips mtools.dvi

\fR

  • *   
        To generate a html copy, run:
 
Sélectionnez
   ./configure; make html

\fRA premade html can be found at \fR\f(CW(ifhttp://www.gnu.org/software/mtools/manual/mtools.html(is\fR

  • *   
        To generate an info copy (browsable using emacs' info mode), run:
 
Sélectionnez
   ./configure; make info

\fR

The texinfo doc looks most pretty when printed or as html. Indeed, in the info version certain examples are difficult to read due to the quoting conventions used in info.