mkfs.vfat
: Create FAT Filesystems
After creating a blank disk, we have to initalize it with a file system before we can use it.
In Linux, we have a command mkfs.vfat
to format the disk to FAT.
Usage
mkfs.vfat -F FAT-size -f NUMFAT -S logical-sector-size -s sectors-per-cluster -R number-of-reserved-sectors DEVICE
You can control various parameters of the FAT filesystem.
Example
Suppose we would like to create a FAT32 file systems,with
- 2 FATs
- 512 bytes per sector
- 1 sector per cluster
- 32 Reserved sectors
mkfs.vfat -F 32 -f 2 -S 512 -s 1 -R 32 test.disk
Then the virtual disk we created earlier is now initialized.