The first form of fsck preens a standard set of filesystems or the
specified filesystems. It is normally used in the script /etc/rc dur-
ing automatic reboot. Here fsck reads the table /etc/fstab to deter-
mine which filesystems to check. Only partitions in fstab that are
mounted ``rw,'' ``rq'' or ``ro'' and that have non-zero pass number are
checked. Filesystems with pass number 1 (normally just the root
filesystem) are checked one at a time. When pass 1 completes, all
remaining filesystems are checked, running one process per disk drive.
The disk drive containing each filesystem is inferred from the shortest
prefix of the device name that ends in one or more digits; the remain-
ing characters are assumed to be the partition designator. In preening
mode, filesystems that are marked clean are skipped. Filesystems are
marked clean when they are unmounted, when they have been mounted read-
only, or when fsck runs on them successfully.
The kernel takes care that only a restricted class of innocuous
filesystem inconsistencies can happen unless hardware or software fail-
ures intervene. These are limited to the following:
Unreferenced inodes
Link counts in inodes too large
Missing blocks in the free map
Blocks in the free map also in files
Counts in the super-block wrong