xref: /netbsd-src/sbin/fsck/fsck.8 (revision 76dfffe33547c37f8bdd446e3e4ab0f3c16cea4b)
1.\"	$NetBSD: fsck.8,v 1.17 1996/11/09 18:43:22 perry Exp $
2.\"
3.\" Copyright (c) 1996 Christos Zoulas.  All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. All advertising materials mentioning features or use of this software
14.\"    must display the following acknowledgement:
15.\"	This product includes software developed by Christos Zoulas.
16.\" 4. The name of the author may not be used to endorse or promote products
17.\"    derived from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd September 23, 1996
31.Dt FSCK 8
32.Os NetBSD 1
33.Sh NAME
34.Nm fsck
35.Nd file system consistency check and interactive repair
36.Sh SYNOPSIS
37.Nm
38.Op Fl dvplfyn
39.Op Fl l Ar maxparallel
40.Op Fl t Ar fstype
41.Op Fl T Ar fstype:fsoptions
42.Op special | node ...
43.Sh DESCRIPTION
44The
45.Nm
46command invokes filesystem-specific programs to check
47the special devices listed in the
48.Xr fstab 5
49file or in the command line for consistency.
50.Pp
51It is normally used in the script
52.Pa /etc/rc
53during automatic reboot.
54If no filesystems are specified, and ``preen'' mode is enabled (
55.Fl p
56option)
57.Nm
58reads the table
59.Pa /etc/fstab
60to determine which filesystems to check.
61Only partitions in fstab that are mounted ``rw,'' ``rq'' or ``ro''
62and that have non-zero pass number are checked.
63Filesystems with pass number 1 (normally just the root filesystem)
64are checked one at a time.
65When pass 1 completes, all remaining filesystems are checked,
66running one process per disk drive.
67The disk drive containing each filesystem is inferred from the longest prefix
68of the device name that ends in a digit; the remaining characters are assumed
69to be the partition designator.
70.Pp
71The options are as follows:
72.Bl -tag -width indent
73.It Fl d
74Debugging mode. Just print the commands without executing them. Available
75only if
76.Nm
77is compiled to support it.
78.It Fl f
79Force checking of filesystems, even when they are marked clean (for filesystems
80that support this).
81.It Fl l Ar maxparallel
82Limit the number of parallel checks to the number specified in
83the following argument. By default, the limit is the number of
84disks, running one process per disk. If a smaller limit is giv-
85en, the disks are checked round-robin, one filesystem at a time.
86.It Fl n
87Causes
88.Nm
89to assume no as the answer to all operator questions, except "CONTINUE?".
90.It Fl p
91Enter preen mode.
92.It Fl t Ar fstype
93Invoke
94.Nm
95only for the comma separated list of filesystem types. If the
96list starts with
97.Dq no
98then invoke
99.Nm
100for the filesystem types that are not specified in the list.
101.It Fl v
102Print the commands before executing them.
103.It Fl y
104Causes
105.Nm
106to assume yes
107as the answer to all operator questions.
108.It Fl T Ar fstype:fsoptions
109List of comma separated file system specific options for the specified
110file system type, in the same format as
111.Xr mount 8 .
112.Sh FILES
113.Bl -tag -width /etc/fstab -compact
114.It Pa /etc/fstab
115file system table
116.El
117.Sh SEE ALSO
118.Xr mount 8 ,
119.Xr fstab 5 ,
120.Xr fsck_msdos 8 ,
121.Xr fsck_ffs 8
122