INtime SDK Help
FATCHECK - FAT filesystem consistency checker
INtime SDK v6 > References > INtime Utilities > FATCHECK - FAT filesystem consistency checker

Checks a FAT filesystem for consistency (INtime Distributed RTOS only).

Command line

fatcheck [–l] [-v] [-f] [-w seconds] devicename

Description

The fatcheck utility verifies and repairs FAT file systems (more commonly known as DOS file systems).

The first form of fatcheck preens the specified file systems. It is normally started by fatcheck run from /etc/rc during automatic reboot, when a FAT file system is detected.

When preening file systems, fatcheck will fix common inconsistencies non-interactively. If more serious problems are found, fatcheck does not try to fix them, indicates that it was not successful, and exits.

The second form of fatcheck checks the specified file systems and tries to repair all detected inconsistencies, requesting confirmation before making any changes.

Fatcheck uses contiguous free clusters on the disk for a scratch area when check file system consistency. Therefore fatcheck can fail if the disk is too full, or heavily fragmented. Fatcheck allocates RT memory for each FAT (2) on the system. So fatcheck can fail on a large disk if this FAT memory exceeds the amount of system memory available.

Options

-v
Print verbose messages during check.
-l
Write error messages to event log as well as console.
-f
Automatically fix any errors discovered during check.
Note: This option will leave the system "correct" but will not necessarily attempt to preserve files and directories which are badly formed in the filesystem. Use of this option can result in loss of data.
-w seconds
Wait for user to press a key within the specified time, else the utility will exit without checking the filesystem.

Configuration

The fatcheck utility is enabled via the SYSAPPSMASK variable (or via the System screen of the admin utility). It is normally run automatically during startup of INtime Distributed RTOS.

The default options are -l and -w 3, signifying that any errors should be written to the syslog and the utility will wait for three seconds for user approval before continuing to check the file system.

This configuration may be overwritten by editing the FATCHECK_ARGS variable in the INITLOADER section of the Advanced options to change the command line options.

See Also