Linux mformat command
The Linux mformat command is used to format disks with the MS-DOS file system.
Creates a DOS file system on an already low-level formatted disk. If the USE_2M parameter was enabled when programming mtools, some parameters related to the 2M format will take effect. Otherwise, these parameters (such as S, 2, 1, M) will not take 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
- -h Number of heads
- -s Number of sectors per track
- -l Label
- -F Format the disk as FAT32 format, but this parameter is still experimental.
- -I Set the version number in FAT32. This is 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 number of clusters to exceed the FAT table limit, mformat will automatically increase the sector size.
- -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 added, mformat will generate an Atari system serial number for the floppy disk.
- -X Format the floppy disk as XDF format. Before using it, you must first use the xdfcopy command to perform a low-level format on the floppy disk.
- -C Generate a disk image file that can have an MS-DOS file system installed on it. Of course, applying this parameter to a physical disk drive is meaningless.
- -H Number of hidden sectors. This is usually applicable when formatting hard disk partitions, because there is usually a partition table before a partition. This parameter is untested; avoid using 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 the disk or partition. Of course, the hardware parameters within it will be changed accordingly.
- -k Try to keep the original boot sector.
- -0 Data transfer rate for track 0
- -A Data transfer rate for tracks other than track 0
- -2 Use 2m format
- -1 Do not use 2m format
Examples
Format the floppy disk in a: (which is /dev/fd0) with default values.
mformat a:Other Extensions
Linux Command Reference