Check a DOS (FAT-12/16/32) filesystem for consistency (QNX Neutrino)
chkdosfs [-npuy] device | mountpoint | file
Neutrino
The chkdosfs utility performs a consistency check on the specified DOS filesystem. This check consists of multiple passes over the filesystem.
If an error occurs, the action taken depends on the command-line options used. If -p was specified (typically to auto-check the filesystem at startup), no message is displayed and the default repair action is silently made. If either -n or -y was specified, a descriptive message is displayed and a “no” or “yes” response to the suggested action is automatically generated. Otherwise the user interactively decides on the repair action to make (the suggested default is indicated).
In order to perform repairs, chkdosfs requires write access to the device hosting the DOS filesystem. Normally, only root has permission for write access; if chkdosfs does not have such access, it will still check the filesystem but will operate as if the -n option had been specified.
By default, the chkdosfs utility checks an on-disk flag that's maintained by the filesystem that indicates to chkdosfs whether or not anything needs to be checked. This flag is usually updated when mounting or unmounting the filesystem. The -u option can be used to force the chkdosfs to run regardless of the state of this flag.
The following table shows the shared objects and related commands for the filesystems:
Partition type | Filesystem | Shared object | Initialize with: | Check with: |
---|---|---|---|---|
1, 4, or 6 | DOS | fs-dos.so | mkdosfs | chkdosfs |
7 | Windows NTa | fs-nt.so | N/A | N/A |
11, 12, or 14 | FAT32 | fs-dos.so | mkdosfs | chkdosfs |
77, 78, or 79 | QNX 4 | fs-qnx4.so | dinit | chkfsys |
131 | Linux (Ext2) | fs-ext2.so | N/A | N/A |
175 | Apple Macintosh HFS or HFS Plusa | fs-mac.so | N/A | N/A |
177, 178, or 179 | Power-Safe | fs-qnx6.so | mkqnx6fs | chkqnx6fsb |
a Read-only.
b Not usually necessary.
For more information, see the Filesystems chapter of the System Architecture guide.
Check the filesystem on the DOS partition of a hard disk:
# chkdosfs /dev/hd0t11
Phase 1 - Read and compare FATs Phase 2 - Check cluster chains Phase 3 - Check directories Phase 4 - Check for lost files 1476784 kb used, 1010088 kb free, 24932 files, 2921 directories Filesystem is clean.
Wolfgang Solfrank, Martin Husemann
chkfsys, chkqnx6fs, devb-eide, fs-dos.so, mkdosfs, mount, umount