xref: /freebsd/sbin/fsck_msdosfs/fsck_msdosfs.8 (revision 22cf89c938886d14f5796fc49f9f020c23ea8eaf)
1.\"	$NetBSD: fsck_msdos.8,v 1.9 1997/10/17 11:19:58 ws Exp $
2.\"
3.\" Copyright (C) 1995 Wolfgang Solfrank
4.\" Copyright (c) 1995 Martin Husemann
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd January 6, 2020
27.Dt FSCK_MSDOSFS 8
28.Os
29.Sh NAME
30.Nm fsck_msdosfs
31.Nd DOS/Windows (FAT) file system consistency checker
32.Sh SYNOPSIS
33.Nm
34.Fl p
35.Op Fl Cf
36.Ar filesystem ...
37.Nm
38.Op Fl CMny
39.Ar filesystem ...
40.Sh DESCRIPTION
41The
42.Nm
43utility verifies and repairs
44.Tn FAT
45file systems (more commonly known
46as
47.Tn DOS
48file systems).
49.Pp
50The first form of
51.Nm
52preens the specified file systems.
53It is normally started by
54.Xr fsck 8
55run from
56.Pa /etc/rc
57during automatic reboot, when a FAT file system is detected.
58When preening file systems,
59.Nm
60will fix common inconsistencies non-interactively.
61If more serious problems are found,
62.Nm
63does not try to fix them, indicates that it was not
64successful, and exits.
65.Pp
66The second form of
67.Nm
68checks the specified file systems and tries to repair all
69detected inconsistencies, requesting confirmation before
70making any changes.
71.Pp
72The options are as follows:
73.Bl -tag -width indent
74.It Fl C
75Compatibility with the corresponding
76.Xr fsck 8
77option (skip check if clean), defined to no-op.
78.It Fl F
79Compatibility with the wrapper
80.Xr fsck 8
81which seeks to determine whether the file system needs to be cleaned
82immediately in foreground, or if its cleaning can be deferred to background.
83FAT (MS-DOS) file systems must always be cleaned in the foreground.
84A non-zero exit code is always returned for this option.
85.It Fl M
86Causes
87.Nm
88to not use
89.Xr mmap 2
90when checking a FAT32 file system.
91This option is mainly for debugging purposes and is not normally necessary.
92The
93.Nm
94utility will automatically fall back to use a simple LRU cache of 4 MiB
95when it failed to perform
96.Xr mmap 2 ,
97or when
98.Fl M
99is specified.
100.It Fl f
101Force
102.Nm
103to check
104.Dq clean
105file systems when preening.
106.It Fl n
107Causes
108.Nm
109to assume
110.Dq Li no
111as the answer to all operator
112questions, except
113.Dq Li CONTINUE? .
114.It Fl p
115Preen the specified file systems.
116.It Fl y
117Causes
118.Nm
119to assume
120.Dq Li yes
121as the answer to all operator questions.
122.El
123.Sh SEE ALSO
124.Xr fsck 8 ,
125.Xr fsck_ffs 8 ,
126.Xr mount_msdosfs 8
127.Sh HISTORY
128The
129.Nm
130utility appeared in
131.Nx 1.2 .
132.Nm
133first appeared in
134.Fx 4.4 .
135.Sh BUGS
136The
137.Nm
138utility is
139.Ud
140