MirBSD manpage: fsck(8)

FSCK(8)                  BSD System Manager's Manual                   FSCK(8)

NAME

     fsck - filesystem consistency check and interactive repair

SYNOPSIS

     fsck [-dfnpvy] [-b block#] [-l maxparallel] [-T fstype:fsoptions]
          [-t fstype] [special | node ...]

DESCRIPTION

     The fsck command invokes filesystem-specific programs to check the spe-
     cial devices listed in the fstab(5) file or on the command line for con-
     sistency.

     It is normally used in the script rc(8) during automatic reboot. If no
     filesystems are specified, fsck reads the file fstab(5) to determine
     which filesystems to check and in what order. Only partitions in fstab
     that are mounted "rw" or "ro" and that have non-zero pass numbers are
     checked. filesystems with pass number 1 (normally just the root filesys-
     tem) are checked one at a time. When pass 1 completes, all remaining
     filesystems are checked, with one process spawned per disk drive. The
     disk drive containing each filesystem is inferred from the longest prefix
     of the device name that ends in a digit; the remaining characters are as-
     sumed to be the partition designator. By default, filesystems which are
     already mounted read/write are not checked.

     The options are as follows:

     -b block#
             Causes fsck to use the specified block as the location of the su-
             perblock. Block 32 is usually an alternate super block. This op-
             tion is only valid for filesystems that support backup super-
             blocks (ffs and ext2fs).

     -d      Debugging mode. Just print the commands without executing them.
             Available only if fsck is compiled to support it.

     -f      Force checking of filesystems, even when they are marked clean
             (for filesystems that support this).

     -l maxparallel
             Limit the number of parallel checks to maxparallel. By default,
             the limit is the number of disks, running one process per disk.
             If a smaller limit is given, the disks are checked round-robin,
             one filesystem at a time.

     -n      Assume a "no" response to all questions asked by fsck except for
             "CONTINUE?", which is assumed to be affirmative. Filesystems will
             not be opened for writing. This is the default for filesystems to
             be checked that are concurrently mounted writable.

     -p      Enter preen mode: fsck will check all filesystems listed in
             fstab(5) according to their pass number, or any special devices
             listed on the command line, and will make minor repairs without
             human intervention. Any major problems will cause fsck to exit
             with a non-zero exit code, so as to alert any invoking program or
             script that human intervention is required.

     -T fstype:fsoptions
             List of comma separated filesystem specific options for the
             specified filesystem type, in the same format as mount(8).

     -t fstype
             Invoke fsck only for the comma separated list of filesystem
             types. If the list starts with "no", invoke fsck only in the
             filesystem types that are not specified in the list.

     -v      Print the commands before executing them.

     -y      Cause fsck to assume "yes" as the answer to all operator ques-
             tions.

     If neither of the -y or -n options are specified, the user may force fsck
     to assume an answer of "yes" to all the remaining questions by replying
     to a question with a value of "F".

FILES

     /etc/fstab  filesystem table

SEE ALSO

     fs(5), fstab(5), fsck_ext2fs(8), fsck_ffs(8), fsck_msdos(8), fsdb(8),
     growfs(8), mount(8), newfs(8), rc(8)

MirBSD #10-current            September 23, 1996                             1

Generated on 2021-06-15 19:39:49 by $MirOS: src/scripts/roff2htm,v 1.103 2021/01/23 20:24:35 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2021 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.