Linux mformat Command
The Linux mformat command is used to format disks with an MS-DOS filesystem.
Create a DOS filesystem on a disk that has already been low-level formatted. If the USE_2M parameter is enabled when compiling mtools, some parameters related to the 2M format take effect. Otherwise these parameters (such as S, 2, 1, M) have no effect.
Syntax
mformat [-t cylinders] [-h heads] [-s sectors] [-l volume_label] [-F] [-I fsVer-sion] [-S sizecode] [-2 sectors_on_track_0] [-M software_sector_size] [-a] [-X] [-C] [-H hidden_sectors] [-r root_sectors] [-B boot_sector] [-0 rate_on_track_0] [-A rate_on_other_tracks] [-1] [-k] drive:
Parameters:
- -t Number of cylinders (synlider)
- -h Number of heads
- -s Number of sectors per track
- -l Label
- -F Format the disk as FAT32, although this parameter is still experimental.
- -I Set the version number in FAT32. This is of course also still experimental.
- -S Sector size code, calculated as sector = 2^(size code + 7)
- -c Number of sectors per cluster. If the given number would cause the cluster count to exceed the FAT table's limit, mformat automatically increases the sector count.
- -s
- -M Software sector size. This number is the sector size reported by the system. It is usually the same as the actual size.
- -a If this parameter is included, mformat generates a set of Atari system serial numbers for the diskette.
- -X Format the diskette in XDF format. Before use, the diskette must first be low-level formatted with the xdfcopy command.
- -C Create a disk image on which an MS-DOS filesystem can be installed. Of course, this parameter is meaningless for a physical disk drive.
- -H Number of hidden sectors. This usually applies when formatting a hard disk partition, because a partition table typically precedes a partition. This parameter is untested, so avoid it if possible.
- -n Disk serial number
- -r Size of the root directory, in sectors. This parameter is only valid for FAT12 and FAT16.
- -B Use the boot sector of the specified file or device as the boot sector of this diskette or partition. Of course, the hardware parameters will change accordingly.
- -k Preserve the original boot sector as much as possible.
- -0 Data transfer rate of track 0
- -A Data transfer rate of tracks other than track 0
- -2 Use the 2m format
- -1 Do not use the 2m format
Example
Format the diskette in a: (that is, /dev/fd0) using the default values.
mformat a:
Linux Command Reference