Linux mformat Command
The Linux mformat command is used to format disks with the MS-DOS file system.
It creates a DOS file system 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 will take effect. Otherwise, these parameters (such as S, 2, 1, M) will not have any effect.
Syntax
mformat [-t cylinders] [-h heads] [-s sectors] [-l volume_label] [-F] [-I fsVersion] [-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 Volume label
- -F Formats the disk to FAT32 format, though this parameter is still experimental.
- -I Sets the version number in FAT32. This is also 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 limit of the FAT table, mformat will automatically increase the sector count.
- -M Software sector size. This 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 a set of Atari system serial numbers for this floppy disk.
- -X Formats the floppy disk to XDF format. The disk must first be low-level formatted using the xdfcopy command.
- -C Creates a disk image file that can be used to install an MS-DOS file system. This parameter is meaningless for a physical disk drive.
- -H Number of hidden sectors. This is typically used when formatting a partition on a hard disk, as there is usually a partition table at the beginning of a partition. This parameter has not been tested and should be used with caution.
- -n Disk serial number
- -r Size of the root directory, in sectors. This parameter is only valid for FAT12 and FAT16.
- -B Uses the specified file or device boot sector as the boot sector for this disk or partition. The hardware parameters will be adjusted accordingly.
- -k Attempts to preserve the existing boot sector.
- -0 Data transfer rate for track 0
- -A Data transfer rate for tracks other than track 0
- -2 Uses the 2m format
- -1 Does not use the 2m format
Example
Formats the disk in a: (which is /dev/fd0) with the default settings.
mformat a: