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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.