YouTip LogoYouTip

Linux Comm Mkdosfs

# Linux mkdosfs Command [![Image 3: Linux Command Manual](#) Linux Command Manual](#) The Linux mkdosfs command is used to create a DOS file system. `device` refers to the device identifier for which you want to create the DOS file system, such as `/dev/hda1`, etc. `block_count` is the number of blocks you wish to configure. If `block_count` is not specified, the system will automatically calculate the appropriate number of blocks for the device size. mkdosfs [ -c | -l filename ] device **Parameters**: * -c Check for bad blocks before creating the file system. * -l Read bad block records from the specified file. * -f Specify the number of File Allocation Tables (FAT). The default value is 2. Currently, Linux's FAT file system does not support more than 2 FAT tables. Usually, this does not need to be changed. * -F Specify the size of the FAT table, usually 12 or 16 bytes. 12 bytes is typically used for floppy disks, and 16 bytes for hard disk partitions, known as the FAT16 format. The system usually selects an appropriate value automatically. Using FAT16 on a floppy disk usually has no effect, and similarly, using FAT12 on a hard disk. * -i Specify the Volume ID. This is generally a 4-byte number, such as `2e203a47`. If not provided, the system will generate one. * -m When a user attempts to boot from this disk or partition and there is no operating system, the system displays a warning message. This parameter is used to change this message. You can edit the message in a file first and then specify it with this parameter, or use * -m - * In this case, the system will prompt you to enter the text directly. Pay special attention that the string length in the file should not exceed 418 characters, including expanded tab symbols (TAB) and newline characters (a newline character counts as two characters under DOS!). * -n Specify the Volume Name, which is the disk label. Just like the `format` command in DOS, it is optional. There is no default value. * -r Specify the maximum number of files in the root directory. The so-called number of files here includes directories. The default value is 112 or 224 on floppy disks, and 512 on hard disks. Do not change this number unless necessary. * -s The number of sectors per cluster. It must be a power of 2. However, unless you know what you are doing, do not set this value arbitrarily. * -v Provide extra information. ### Example Format the floppy disk in drive A to DOS format and set the label to Tester mkdosfs -n Tester /dev/fd0 [![Image 4: Linux Command Manual](#) Linux Command Manual](#)
← Linux Comm Mke2FsLinux Comm Mkbootdisk β†’