mtools: mformat

1 
1 4.13 Mformat
1 ============
1 
1 The `mformat' command is used to add an MS-DOS file system to a
1 low-level formatted diskette. Its syntax is:
1 
1      `mformat' [`-t' CYLINDERS|`-T' TOT_SECTORS] [`-h' HEADS] [`-s' SECTORS]
1        [`-f' SIZE] [`-1'] [`-4'] [`-8']
1        [`-v' VOLUME_LABEL]
1        [`-F'] [`-S' SIZECODE]
1        [`-M' SOFTWARE_SECTOR_SIZE]
1        [`-N' SERIAL_NUMBER] [`-a']
1        [`-C'] [`-H' HIDDEN_SECTORS] [`-I' FSVERSION]
1        [`-r' ROOT_SECTORS] [`-L' FAT_LEN]
1        [`-B' BOOT_SECTOR] [`-k']
1        [`-m' MEDIA_DESCRIPTOR]
1        [`-K' BACKUP_BOOT]
1        [`-c' CLUSTERS_PER_SECTOR]
1        [`-d' FAT_COPIES]
1        [`-X'] [`-2' SECTORS_ON_TRACK_0] [`-3']
1        [`-0' RATE_ON_TRACK_0] [`-A' RATE_ON_OTHER_TRACKS]
1        DRIVE:
1 
1    `Mformat' adds a minimal MS-DOS file system (boot sector, FAT, and
1 root directory) to a diskette that has already been formatted by a Unix
1 low-level format.
1 
1    The following options are supported: (The S, 2, 1 and M options may
1 not exist if this copy of mtools has been compiled without the USE_2M
1 option)
1 
1    The following options are the same as for MS-DOS's format command:
1 
1 `v'
1      Specifies the volume label. A volume label identifies the disk and
1      can be a maximum of 11 characters. If you omit the -v switch,
1      mformat will assign no label to the disk.
1 
1 `f'
1      Specifies the size of the DOS file system to format. Only a certain
1      number of predefined sizes are supported by this flag; for others
1      use the -h/-t/-s flags. The following sizes are supported:
1     160
1           160K, single-sided, 8 sectors per track, 40 cylinders (for 5
1           1/4 DD)
1 
1     180
1           160K, single-sided, 9 sectors per track, 40 cylinders (for 5
1           1/4 DD)
1 
1     320
1           320K, double-sided, 8 sectors per track, 40 cylinders (for 5
1           1/4 DD)
1 
1     360
1           360K, double-sided, 9 sectors per track, 40 cylinders (for 5
1           1/4 DD)
1 
1     720
1           720K, double-sided, 9 sectors per track, 80 cylinders (for 3
1           1/2 DD)
1 
1     1200
1           1200K, double-sided, 15 sectors per track, 80 cylinders (for
1           5 1/4 HD)
1 
1     1440
1           1440K, double-sided, 18 sectors per track, 80 cylinders (for
1           3 1/2 HD)
1 
1     2880
1           2880K, double-sided, 36 sectors per track, 80 cylinders (for
1           3 1/2 ED)
1 
1 `t'
1      Specifies the number of tracks on the disk.
1 
1 `T'
1      Specifies the number of total sectors on the disk. Only one of
1      these 2 options may be specified (tracks or total sectors)
1 
1 `h'
1      The number of heads (sides).
1 
1 `s'
1      Specifies the number of sectors per track. If the 2m option is
1      given, number of 512-byte sector equivalents on generic tracks
1      (i.e. not head 0 track 0).  If the 2m option is not given, number
1      of physical sectors per track (which may be bigger than 512 bytes).
1 
1 `1'
1      Formats a single side (equivalent to -h 1)
1 
1 `4'
1      Formats a 360K double-sided disk (equivalent to -f 360). When used
1      together with -the 1 switch, this switch formats a 180K disk
1 
1 `8'
1      Formats a disk with 8 sectors per track.
1 
1 
1    MS-DOS format's `q', `u' and `b' options are not supported, and `s'
1 has a different meaning.
1 
1    The following options are specific to mtools:
1 
1 `F'
1      Format the partition as FAT32.
1 
1 `S'
1      The size code. The size of the sector is 2 ^ (sizecode + 7).
1 
1 `X'
1      formats the disk as an XDF disk. ⇒XDF, for more details.
1      The disk has first to be low-level formatted using the xdfcopy
1      utility included in the fdutils package. XDF disks are used for
1      instance for OS/2 install disks.
1 
1 `2'
1      2m format. The parameter to this option describes the number of
1      sectors on track 0, head 0. This option is recommended for sectors
1      bigger than normal.
1 
1 `3'
1      don't use a 2m format, even if the current geometry of the disk is
1      a 2m geometry.
1 
1 `0'
1      Data transfer rate on track 0
1 
1 `A'
1      Data transfer rate on tracks other than 0
1 
1 `M'
1      software sector size. This parameter describes the sector size in
1      bytes used by the MS-DOS file system. By default it is the
1      physical sector size.
1 
1 `N'
1      Uses the requested serial number, instead of generating one
1      automatically
1 
1 `a'
1      If this option is given, an Atari style serial number is generated.
1      Ataris store their serial number in the OEM label.
1 
1 `C'
1      creates the disk image file to install the MS-DOS file system on
1      it. Obviously, this is useless on physical devices such as floppies
1      and hard disk partitions, but is interesting for image files.
1 
1 `H'
1      number of hidden sectors. This parameter is useful for formatting
1      hard disk partition, which are not aligned on track boundaries
1      (i.e. first head of first track doesn't belong to the partition,
1      but contains a partition table). In that case the number of hidden
1      sectors is in general the number of sectors per cylinder. This is
1      untested.
1 
1 `I'
1      Sets the fsVersion id when formatting a FAT32 drive.  In order to
1      find this out, run minfo on an existing FAT32 drive, and mail me
1      about it, so I can include the correct value in future versions of
1      mtools.
1 
1 `c'
1      Sets the size of a cluster (in sectors).  If this cluster size
1      would generate a FAT that too big for its number of bits, mtools
1      automatically increases the cluster size, until the FAT is small
1      enough.
1 
1 `d'
1      Sets the number of FAT copies. Default is 2. This setting can also
1      be specified using the `MTOOLS_NFATS' environment variable.
1 
1 `r'
1      Sets the size of the root directory (in sectors).  Only applicable
1      to 12 and 16 bit FATs. This setting can also be specified using the
1      `MTOOLS_DIR_LEN' environment variable.
1 
1 `L'
1      Sets the length of the FAT.
1 
1 `B'
1      Use the boot sector stored in the given file or device, instead of
1      using its own.  Only the geometry fields are updated to match the
1      target disks parameters.
1 
1 `k'
1      Keep the existing boot sector as much as possible.  Only the
1      geometry fields and other similar file system data are updated to
1      match the target disks parameters.
1 
1 `K'
1      Sets the sector number where the backup of the boot sector should
1      be stored (only relevant on FAT32).
1 
1 `m'
1      Use a non-standard media descriptor byte for this disk. The media
1      descriptor is stored at position 21 of the boot sector, and as
1      first byte in each FAT copy. Using this option may confuse DOS or
1      older mtools version, and may make the disk unreadable. Only use
1      if you know what you are doing.
1 
1 
1    To format a diskette at a density other than the default, you must
1 supply (at least) those command line parameters that are different from
1 the default.
1 
1    `Mformat' returns 0 on success or 1 on failure.
1 
1    It doesn't record bad block information to the Fat, use `mbadblocks'
1 for that.
1