.TH FSCK 1 .SH NAME fsck \- perform file system consistency check .SH SYNOPSIS \fBfsck\fP [\fB\-pfwcyn\fP] [\fB\-l\fP \fInumber\fP] [\fIfilesystem\fP ...] .SH DESCRIPTION .B Fsck checks a file system's consistency after a crash or to make sure that an unknown file system may be safely mounted. .PP .B Fsck is really a forerunner to .B fsck1 through .BR fsck2f , see .BR fsck1 (1) for more details. .PP This program is a kind of manager to the four real checkers, it will read /etc/fstab (see .BR fstab (5)) to check all the file systems with a non-zero pass number if no arguments are given, or it will use the fstab to translate the name of a mount point to the proper device, so you can type .B fsck /usr for instance. It will know which program to call by looking at the superblock type. .SS "The clean flag" .B Fsck is a bit more than just a forerunner, it will also manage the so-called "file system clean flag". This flag is cleared by the kernel when a file system is mounted, and set when it is unmounted or when the system is rebooted with .BR reboot (8), but only if it was set to begin with. .PP The clean flag will only be set if it is specifically enabled by a special magic number in the superblock. It should only be enabled if the file system is never ever used by a system that does not know about the clean flag, because those systems will either choke on it (most likely), or not clear it on mount. .PP .B Mkfs will enable the clean flag when making a flex file system, because no other system can use this file system type anyway. .SH OPTIONS .TP .B \-p Run in preen mode repairing noncritical errors automatically. Errors that need operator intervention are only noted, but not repaired. Even file systems that are mounted are checked, because the root file system is mounted read-only at boot time. You should reboot immediately if the root file system had to be repaired. Several fsck's should be run in parallel for file systems with the same pass number, but this is not yet implemented. (The output from the different fsck's would make an unintelligible mess.) .TP \fB\-l\fP \fInumber\fP Limit the number of fscks run in parallel in preen mode. (Useful, isn't it?) .TP .B \-f Force checking even if the file system is marked clean. .TP .B \-w Only check file systems from fstab that are normally mounted read-write. .TP .B \-c Toggle the clean flag enable. On a file system with a clean flag it will disable the flag and reset it, on a file system without the clean flag enabled it will write the necessary magic number to enable it. No check will be done, all other options will be ignored. .TP .B \-n Assume 'no' to all questions asked, the file system will be opened read-only and only a report on all the errors will be generated. .B Fsck will automatically revert to this mode if the file system can't be opened read-write. .TP .B \-y Assume 'yes' on all questions asked. This is a dangerous option, because it will allow repairs being made without user supervision. Better first run .B fsck -n to see what it is up to. .SH FILES .TP 15 .B /etc/fstab Default list of file systems to check. .TP .B /etc/mtab To check if a file system is currently mounted. .SH "SEE ALSO" .BR fsck1 (1), .BR fstab (5), .BR mkfs (1), .BR mount (1). .SH "EXIT STATUS" .TP 5 .B 0 Either there were no errors, or all errors were successfully corrected. .TP .B 2 A .B QUIT signal has been typed while in preen mode. The fsck is finished, but the reboot must be interrupted. .TP .B 4 Errors have been corrected on a mounted file system. .TP .B 8 There are serious errors that have not been fixed, or another severe error. .TP .B 12 An .B INTERRUPT signal stopped the fsck. .SH DIAGNOSTICS The message you like to see at boot time: "/dev/hd3: is clean". .SH AUTHOR Kees J. Bot (kjb@cs.vu.nl) .\" .\" $PchId: fsck.1,v 1.3 1995/11/27 22:12:25 philip Exp $