Matt Mower | 18794c8 | 2015-11-11 16:22:45 -0600 | [diff] [blame] | 1 | .\" fsck.fat.8 - manpage for fsck.fat |
| 2 | .\" |
| 3 | .\" Copyright (C) 2006-2014 Daniel Baumann <daniel@debian.org> |
| 4 | .\" |
| 5 | .\" This program is free software: you can redistribute it and/or modify |
| 6 | .\" it under the terms of the GNU General Public License as published by |
| 7 | .\" the Free Software Foundation, either version 3 of the License, or |
| 8 | .\" (at your option) any later version. |
| 9 | .\" |
| 10 | .\" This program is distributed in the hope that it will be useful, |
| 11 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | .\" GNU General Public License for more details. |
| 14 | .\" |
| 15 | .\" You should have received a copy of the GNU General Public License |
| 16 | .\" along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | .\" |
| 18 | .\" The complete text of the GNU General Public License |
| 19 | .\" can be found in /usr/share/common-licenses/GPL-3 file. |
| 20 | .\" |
| 21 | .\" |
| 22 | .\"******************************************************************* |
| 23 | .\" |
| 24 | .\" This file was generated with po4a. Translate the source file. |
| 25 | .\" |
| 26 | .\"******************************************************************* |
| 27 | .TH FSCK.FAT 8 2015\-05\-16 3.0.28 dosfstools |
| 28 | .SH NAME |
| 29 | .\" ---------------------------------------------------------------------------- |
| 30 | \fBfsck.fat\fP \- check and repair MS\-DOS filesystems |
| 31 | .SH SYNOPSIS |
| 32 | .\" ---------------------------------------------------------------------------- |
| 33 | \fBfsck.fat\fP [\fIOPTIONS\fP] \fIDEVICE\fP |
| 34 | .SH DESCRIPTION |
| 35 | \fBfsck.fat\fP verifies the consistency of MS\-DOS filesystems and optionally |
| 36 | tries to repair them. |
| 37 | .PP |
| 38 | The following filesystem problems can be corrected (in this order): |
| 39 | .IP * 4 |
| 40 | FAT contains invalid cluster numbers. Cluster is changed to EOF. |
| 41 | .IP * 4 |
| 42 | File's cluster chain contains a loop. The loop is broken. |
| 43 | .IP * 4 |
| 44 | Bad clusters (read errors). The clusters are marked bad and they are |
| 45 | removed from files owning them. This check is optional. |
| 46 | .IP * 4 |
| 47 | Directories with a large number of bad entries (probably corrupt). The |
| 48 | directory can be deleted. |
| 49 | .IP * 4 |
| 50 | Files . and .. are non\-directories. They can be deleted or renamed. |
| 51 | .IP * 4 |
| 52 | Directories . and .. in root directory. They are deleted. |
| 53 | .IP * 4 |
| 54 | Bad filenames. They can be renamed. |
| 55 | .IP * 4 |
| 56 | Duplicate directory entries. They can be deleted or renamed. |
| 57 | .IP * 4 |
| 58 | Directories with non\-zero size field. Size is set to zero. |
| 59 | .IP * 4 |
| 60 | Directory . does not point to parent directory. The start pointer is |
| 61 | adjusted. |
| 62 | .IP * 4 |
| 63 | Directory .. does not point to parent of parent directory. The start |
| 64 | pointer is adjusted. |
| 65 | .IP * 4 |
| 66 | Start cluster number of a file is invalid. The file is truncated. |
| 67 | .IP * 4 |
| 68 | File contains bad or free clusters. The file is truncated. |
| 69 | .IP * 4 |
| 70 | File's cluster chain is longer than indicated by the size fields. The file |
| 71 | is truncated. |
| 72 | .IP * 4 |
| 73 | Two or more files share the same cluster(s). All but one of the files are |
| 74 | truncated. If the file being truncated is a directory file that has already |
| 75 | been read, the filesystem check is restarted after truncation. |
| 76 | .IP * 4 |
| 77 | File's cluster chain is shorter than indicated by the size fields. The file |
| 78 | is truncated. |
| 79 | .IP * 4 |
| 80 | Clusters are marked as used but are not owned by a file. They are marked as |
| 81 | free. |
| 82 | .PP |
| 83 | Additionally, the following problems are detected, but not repaired: |
| 84 | .IP * 4 |
| 85 | Invalid parameters in boot sector |
| 86 | .IP * 4 |
| 87 | Absence of . and .. entries in non\-root directories |
| 88 | .PP |
| 89 | .\" ---------------------------------------------------------------------------- |
| 90 | When \fBfsck.fat\fP checks a filesystem, it accumulates all changes in memory |
| 91 | and performs them only after all checks are complete. This can be disabled |
| 92 | with the \fB\-w\fP option. |
| 93 | .SH OPTIONS |
| 94 | .IP \fB\-a\fP 4 |
| 95 | Automatically repair the filesystem. No user intervention is necessary. |
| 96 | Whenever there is more than one method to solve a problem, the least |
| 97 | destructive approach is used. |
| 98 | .IP \fB\-A\fP 4 |
| 99 | Use Atari variation of the MS\-DOS filesystem. This is default if |
| 100 | \fBfsck.fat\fP is run on an Atari, then this option turns off Atari format. |
| 101 | There are some minor differences in Atari format: Some boot sector fields |
| 102 | are interpreted slightly different, and the special FAT entries for |
| 103 | end\-of\-file and bad cluster can be different. Under MS\-DOS 0xfff8 is used |
| 104 | for EOF and Atari employs 0xffff by default, but both systems recognize all |
| 105 | values from 0xfff8...0xffff as end\-of\-file. MS\-DOS uses only 0xfff7 for bad |
| 106 | clusters, where on Atari values 0xfff0...0xfff7 are for this purpose (but |
| 107 | the standard value is still 0xfff7). |
| 108 | .IP \fB\-b\fP 4 |
| 109 | Make read\-only boot sector check. |
| 110 | .IP "\fB\-d\fP \fIPATH\fP" 4 |
| 111 | Delete the specified file. If more than one file with that name exist, the |
| 112 | first one is deleted. This option can be given more than once. |
| 113 | .IP \fB\-f\fP 4 |
| 114 | Salvage unused cluster chains to files. By default, unused clusters are |
| 115 | added to the free disk space except in auto mode (\fB\-a\fP). |
| 116 | .IP \fB\-l\fP 4 |
| 117 | List path names of files being processed. |
| 118 | .IP \fB\-n\fP 4 |
| 119 | No\-operation mode: non\-interactively check for errors, but don't write |
| 120 | anything to the filesystem. |
| 121 | .IP \fB\-p\fP 4 |
| 122 | Same as \fB\-a\fP, for compatibility with other *fsck. |
| 123 | .IP \fB\-r\fP 4 |
| 124 | Interactively repair the filesystem. The user is asked for advice whenever |
| 125 | there is more than one approach to fix an inconsistency. This is the |
| 126 | default mode and the option is only retained for backwards compatibility. |
| 127 | .IP \fB\-t\fP 4 |
| 128 | Mark unreadable clusters as bad. |
| 129 | .IP "\fB\-u\fP \fIPATH\fP" 4 |
| 130 | Try to undelete the specified file. \fBfsck.fat\fP tries to allocate a chain |
| 131 | of contiguous unallocated clusters beginning with the start cluster of the |
| 132 | undeleted file. This option can be given more than once. |
| 133 | .IP \fB\-v\fP 4 |
| 134 | Verbose mode. Generates slightly more output. |
| 135 | .IP \fB\-V\fP 4 |
| 136 | Perform a verification pass. The filesystem check is repeated after the |
| 137 | first run. The second pass should never report any fixable errors. It may |
| 138 | take considerably longer than the first pass, because the first pass may |
| 139 | have generated long list of modifications that have to be scanned for each |
| 140 | disk read. |
| 141 | .IP \fB\-w\fP 4 |
| 142 | Write changes to disk immediately. |
| 143 | .IP \fB\-y\fP 4 |
| 144 | .\" ---------------------------------------------------------------------------- |
| 145 | Same as \fB\-a\fP (automatically repair filesystem) for compatibility with other |
| 146 | fsck tools. |
| 147 | .SH "EXIT STATUS" |
| 148 | .IP 0 4 |
| 149 | No recoverable errors have been detected. |
| 150 | .IP 1 4 |
| 151 | Recoverable errors have been detected or \fBfsck.fat\fP has discovered an |
| 152 | internal inconsistency. |
| 153 | .IP 2 4 |
| 154 | .\" ---------------------------------------------------------------------------- |
| 155 | Usage error. \fBfsck.fat\fP did not access the filesystem. |
| 156 | .SH FILES |
| 157 | .IP "fsck0000.rec, fsck0001.rec, ..." 4 |
| 158 | .\" ---------------------------------------------------------------------------- |
| 159 | When recovering from a corrupted filesystem, \fBfsck.fat\fP dumps recovered |
| 160 | data into files named 'fsckNNNN.rec' in the top level directory of the |
| 161 | filesystem. |
| 162 | .SH BUGS |
| 163 | .\" ---------------------------------------------------------------------------- |
| 164 | Does not create . and .. files where necessary. Does not remove entirely |
| 165 | empty directories. Should give more diagnostic messages. Undeleting files |
| 166 | should use a more sophisticated algorithm. |
| 167 | .SH "SEE ALSO" |
| 168 | \fBfatlabel\fP(8) |
| 169 | .br |
| 170 | .\" ---------------------------------------------------------------------------- |
| 171 | \fBmkfs.fat\fP(8) |
| 172 | .SH HOMEPAGE |
| 173 | .\" ---------------------------------------------------------------------------- |
| 174 | The home for the \fBdosfstools\fP project is its |
| 175 | .UR https://github.com/dosfstools/dosfstools |
| 176 | GitHub project page |
| 177 | .UE . |
| 178 | .SH AUTHORS |
| 179 | \fBdosfstools\fP were written by |
| 180 | .MT werner.almesberger@\:lrc.di.epfl.ch |
| 181 | Werner Almesberger |
| 182 | .ME , |
| 183 | .MT Roman.Hodek@\:informatik.\:uni-erlangen.de |
| 184 | Roman Hodek |
| 185 | .ME , |
| 186 | and others. The current maintainer is |
| 187 | .MT aeb@\:debian.org |
| 188 | Andreas Bombe |
| 189 | .ME . |