linux poison RSS
linux poison Email

Utilities for Making and Checking MS-DOS FAT Filesystems

The dosfstools package includes the mkdosfs (aka mkfs.dos and mkfs.vfat) and dosfsck (aka fsck.msdos and fsck.vfat) utilities, which respectively make and check MS-DOS FAT filesystems on hard drives or on floppies.

This version uses the enhanced boot sector/superblock format of DOS 3.3+ as well as provides a default dummy boot sector code.


mkdosfs:
mkdosfs is used to create an MS-DOS file system under Linux on a device (usually a disk partition). device is the special file corresponding to the device (e.g /dev/hdXX) block-count is the number of blocks on the device. If omitted, mkdosfs automatically determines the file system size.


dosfsck:
dosfsck verifies  the  consistency of MS-DOS file systems and optionally tries to repair them. The following file system problems can be corrected (in this order):

 * FAT contains invalid cluster numbers. Cluster is changed to EOF.
 * File's cluster chain contains a loop. The loop is broken.
 * Bad clusters (read errors). The clusters are marked bad and they are removed from files owning them. This check is optional.
 * Directories with a large number of bad entries (probably corrupt).
 * Bad file names. They can be renamed.
 * Duplicate directory entries. They can be deleted or renamed.
 * Directories with non-zero size field. Size is set to zero.
 * Directory does not point to parent directory. The start pointer is adjusted.
 * Directory does not point to parent of parent directory. The start pointer is adjusted.
 * Start cluster number of a file is invalid. The file is truncated.
 * File contains bad or free clusters. The file is truncated.
 * File's cluster chain is longer than indicated by the size fields. The file is truncated.
 * Two or more files share the same cluster(s). All but one of the files are truncated. If the file being truncated is a directory file that has already been read, the file system check is restarted after truncation.
 * File's cluster chain is shorter than indicated by the size fields. The file is truncated.
 * Clusters are marked as used but are not owned by a file. They are marked as free.

Dosfstools Installation:
Open the terminal and type following command to install dosfstools:
sudo apt-get install dosfstools
After successful installation, you can now use the mkfs.vfat (for msdos filesystem creation) and fsck.vfat (for msdos filesystem check)



0 comments:

Post a Comment

Related Posts with Thumbnails