The exit code returned by fsck is the sum of the following conditions:
0 - errors 1 - File system errors corrected 2 - System should be rebooted 4 - File system errors left uncorrected 8 - Operational error 16 - Usage or syntax error 128 - Shared library errorThe exit code returned when all file systems are checked using the -A option is the bit-wise OR of the exit codes for each file system that is checked.
In actuality, fsck is simply a front-end for the various file system checkers (fsck. fstype) available under Linux. The file system-specific checker is searched for in /sbin first, then in /etc/fs and /etc, and finally in the directories listed in the PATH environment variable. Please see the file system-specific checker manual pages for further details.
Normally, the filesystem type is deduced by searching for filesys in the /etc/fstab file and using the corresponding entry. If the type can not be deduced, fsck will use the type specified by the -t option if it specifies a unique filesystem type. If this type is not available, the the default file system type (currently ext2) is used.
Currently, standardized file system-specific options are somewhat in flux. Although not guaranteed, the following options are supported by most file system checkers.
The manual page was shamelessly adapted from David Engel and Fred van Kempen's generic fsck front end program, which was in turn shamelessly adapted from Remy Card's version for the ext2 file system.