Checking and Repairing Filesystems with fsck

The fsck (Filesystem Consistency Check) program is the equivalent of Microsoft ScanDisk and other disk utilities, at least as far as its role in the boot process and its interactive nature go. The fsck program runs at boot time just before mounting the filesystems out of /etc/fstab, to make sure that all the filesystems are “clean” and eligible for mounting. This is the “preen” mode that is called for with the -p option. But fsck also exists to repair any inconsistencies that it finds and to clean filesystems that have not been marked “clean” by a proper shutdown method.

The most likely place you’ll encounter fsck is at boot time, no matter what role it plays in your life. In the happiest circumstances, ...

Get FreeBSD6 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.