| Rev | Author | # | Line |
|---|---|---|---|
| 1 | perry | 1 | !!!E2FSCK |
| 3 | JohnMcPherson | 2 | |
| 1 | perry | 3 | !!NAME |
| 4 | |||
| 5 | |||
| 6 | e2fsck - check a Linux second extended file system | ||
| 7 | !!SYNOPSIS | ||
| 8 | |||
| 9 | |||
| 10 | __e2fsck__ [[ __-pacnyrdfvstFSV__ ] [[ __-b__ | ||
| 11 | ''superblock'' ] [[ __-B__ ''blocksize'' ] [[ | ||
| 12 | __-l__|__-L__ ''bad_blocks_file'' ] [[ __-C__ | ||
| 13 | ''fd'' ] [[ __-j__ ''external-journal'' ] | ||
| 14 | ''device'' | ||
| 15 | !!DESCRIPTION | ||
| 16 | |||
| 17 | |||
| 18 | __e2fsck__ is used to check a Linux second extended file | ||
| 19 | system (e2fs). E2fsck also supports ext2 filesystems | ||
| 20 | countaining a journal, which are also sometimes known as | ||
| 21 | ext3 filesystems. | ||
| 22 | |||
| 23 | |||
| 24 | ''device'' is the device file where the filesystem is | ||
| 25 | stored (e.g. ''/dev/hdc1''). | ||
| 26 | !!OPTIONS | ||
| 27 | |||
| 28 | |||
| 29 | __-a__ | ||
| 30 | |||
| 31 | |||
| 32 | This option does the same thing as the __-p__ option. It | ||
| 33 | is provided for backwards compatibility only; it is | ||
| 34 | suggested that people use __-p__ option whenever | ||
| 35 | possible. | ||
| 36 | |||
| 37 | |||
| 38 | __-b__ ''superblock'' | ||
| 39 | |||
| 40 | |||
| 41 | Instead of using the normal superblock, use an alternative | ||
| 42 | superblock specified by ''superblock''. This option is | ||
| 43 | normally used when the primary superblock has been | ||
| 44 | corrupted. The location of the backup superblock is | ||
| 45 | dependent on the filesystem's blocksize. For filesystems | ||
| 46 | with 1k blocksizes, a backup superblock can be found at | ||
| 47 | block 8193; for filesystems with 2k blocksizes, at block | ||
| 48 | 16384; and for 4k blocksizes, at block 32768. | ||
| 49 | |||
| 50 | |||
| 51 | Additional backup superblocks can be determined by using the | ||
| 52 | __mke2fs__ program using the __-n__ option to print | ||
| 53 | out where the superblocks were created. The __-b__ option | ||
| 54 | to __mke2fs__, which specifies blocksize of the | ||
| 55 | filesystem must be specified in order for the superblock | ||
| 56 | locations that are printed out to be accurate. | ||
| 57 | |||
| 58 | |||
| 59 | If an alternative superblock is specified and the filesystem | ||
| 60 | is not opened read-only, e2fsck will make sure that the | ||
| 61 | primary superblock is updated appropriately upon completion | ||
| 62 | of the filesystem check. | ||
| 63 | |||
| 64 | |||
| 65 | __-B__ ''blocksize'' | ||
| 66 | |||
| 67 | |||
| 68 | Normally, __e2fsck__ will search for the superblock at | ||
| 69 | various different block sizes in an attempt to find the | ||
| 70 | appropriate block size. This search can be fooled in some | ||
| 71 | cases. This option forces __e2fsck__ to only try locating | ||
| 72 | the superblock at a particular blocksize. If the superblock | ||
| 73 | is not found, __e2fsck__ will terminate with a fatal | ||
| 74 | error. | ||
| 75 | |||
| 76 | |||
| 77 | __-c__ | ||
| 78 | |||
| 79 | |||
| 80 | This option causes __e2fsck__ to run the | ||
| 81 | badblocks(8) program to find any blocks which are bad | ||
| 82 | on the filesystem, and then marks them as bad by adding them | ||
| 83 | to the bad block inode. If this option is specified twice, | ||
| 84 | then the bad block scan will be done using a non-destructive | ||
| 85 | read-write test. | ||
| 86 | |||
| 87 | |||
| 88 | __-C__ | ||
| 89 | |||
| 90 | |||
| 91 | This option causes __e2fsck__ to write completion | ||
| 92 | information to the specified file descriptor so that the | ||
| 93 | progress of the filesystem check can be monitored. This | ||
| 94 | option is typically used by programs which are running | ||
| 95 | __e2fsck__. If the file descriptor specified is 0, | ||
| 96 | __e2fsck__ will print a completion bar as it goes about | ||
| 97 | its business. This requires that e2fsck is running on a | ||
| 98 | video console or terminal. | ||
| 99 | |||
| 100 | |||
| 101 | __-d__ | ||
| 102 | |||
| 103 | |||
| 104 | Print debugging output (useless unless you are debugging | ||
| 105 | __e2fsck__). | ||
| 106 | |||
| 107 | |||
| 108 | __-f__ | ||
| 109 | |||
| 110 | |||
| 111 | Force checking even if the file system seems | ||
| 112 | clean. | ||
| 113 | |||
| 114 | |||
| 115 | __-F__ | ||
| 116 | |||
| 117 | |||
| 118 | Flush the filesystem device's buffer caches before | ||
| 119 | beginning. Only really useful for doing __e2fsck__ time | ||
| 120 | trials. | ||
| 121 | |||
| 122 | |||
| 123 | __-j__ ''external-journal'' | ||
| 124 | |||
| 125 | |||
| 126 | Set the pathname where the external-journal for this | ||
| 127 | filesystem can be found. | ||
| 128 | |||
| 129 | |||
| 130 | __-l__ ''filename'' | ||
| 131 | |||
| 132 | |||
| 133 | Add the block numbers listed in the file specified by | ||
| 134 | ''filename'' to the list of bad blocks. The format of | ||
| 135 | this file is the same as the one generated by the | ||
| 136 | badblocks(8) program. Note that the block numbers are | ||
| 137 | based on the blocksize of the filesystem. Hence, | ||
| 138 | badblocks(8) must be given the blocksize of the | ||
| 139 | filesystem in order to obtain correct results. As a result, | ||
| 140 | it is much simpler and safer to use the __-c__ option to | ||
| 141 | __e2fsck__, since it will assure that the correct | ||
| 142 | parameters are passed to the __badblocks__ | ||
| 143 | program. | ||
| 144 | |||
| 145 | |||
| 146 | __-L__ ''filename'' | ||
| 147 | |||
| 148 | |||
| 149 | Set the bad blocks list to be the list of blocks specified | ||
| 150 | by ''filename''. (This option is the same as the | ||
| 151 | __-l__ option, except the bad blocks list is cleared | ||
| 152 | before the blocks listed in the file are added to the bad | ||
| 153 | blocks list.) | ||
| 154 | |||
| 155 | |||
| 156 | __-n__ | ||
| 157 | |||
| 158 | |||
| 159 | Open the filesystem read-only, and assume an answer of `no' | ||
| 160 | to all questions. Allows __e2fsck__ to be used | ||
| 161 | non-interactively. (Note: if the __-c__, __-l__, or | ||
| 162 | __-L__ options are specified in addition to the __-n__ | ||
| 163 | option, then the filesystem will be opened read-write, to | ||
| 164 | permit the bad-blocks list to be updated. However, no other | ||
| 165 | changes will be made to the filesystem.) | ||
| 166 | |||
| 167 | |||
| 168 | __-p__ | ||
| 169 | |||
| 170 | |||
| 171 | Automatically repair ( | ||
| 172 | |||
| 173 | |||
| 174 | __-r__ | ||
| 175 | |||
| 176 | |||
| 177 | This option does nothing at all; it is provided only for | ||
| 178 | backwards compatibility. | ||
| 179 | |||
| 180 | |||
| 181 | __-s__ | ||
| 182 | |||
| 183 | |||
| 184 | This option will byte-swap the filesystem so that it is | ||
| 185 | using the normalized, standard byte-order (which is i386 or | ||
| 186 | little endian). If the filesystem is already in the standard | ||
| 187 | byte-order, __e2fsck__ will take no action. | ||
| 188 | |||
| 189 | |||
| 190 | __-S__ | ||
| 191 | |||
| 192 | |||
| 193 | This option will byte-swap the filesystem, regardless of its | ||
| 194 | current byte-order. | ||
| 195 | |||
| 196 | |||
| 197 | __-t__ | ||
| 198 | |||
| 199 | |||
| 200 | Print timing statistics for __e2fsck__. If this option is | ||
| 201 | used twice, additional timing statistics are printed on a | ||
| 202 | pass by pass basis. | ||
| 203 | |||
| 204 | |||
| 205 | __-v__ | ||
| 206 | |||
| 207 | |||
| 208 | Verbose mode. | ||
| 209 | |||
| 210 | |||
| 211 | __-V__ | ||
| 212 | |||
| 213 | |||
| 214 | Print version information and exit. | ||
| 215 | |||
| 216 | |||
| 217 | __-y__ | ||
| 218 | |||
| 219 | |||
| 220 | Assume an answer of `yes' to all questions; allows | ||
| 221 | __e2fsck__ to be used non-interactively. | ||
| 222 | !!EXIT CODE | ||
| 223 | |||
| 224 | |||
| 225 | The exit code returned by __e2fsck__ is the sum of the | ||
| 226 | following conditions: | ||
| 227 | 0 - No errors | ||
| 228 | 1 - File system errors corrected | ||
| 229 | 2 - File system errors corrected, system should | ||
| 230 | be rebooted if file system was mounted | ||
| 231 | 4 - File system errors left uncorrected | ||
| 232 | 8 - Operational error | ||
| 233 | 16 - Usage or syntax error | ||
| 234 | 128 - Shared library error | ||
| 235 | !!SIGNALS | ||
| 236 | |||
| 237 | |||
| 238 | The following signals have the following effect when sent to | ||
| 239 | __e2fsck__. | ||
| 240 | |||
| 241 | |||
| 242 | __SIGUSR1__ | ||
| 243 | |||
| 244 | |||
| 245 | This signal causes __e2fsck__ to start displaying a | ||
| 246 | completion bar. (See discussion of the __-C__ | ||
| 247 | option.) | ||
| 248 | |||
| 249 | |||
| 250 | __SIGUSR2__ | ||
| 251 | |||
| 252 | |||
| 253 | This signal causes __e2fsck__ to stop displaying a | ||
| 254 | completion bar. | ||
| 255 | !!REPORTING BUGS | ||
| 256 | |||
| 257 | |||
| 258 | Almost any piece of software will have bugs. If you manage | ||
| 259 | to find a filesystem which causes __e2fsck__ to crash, or | ||
| 260 | which __e2fsck__ is unable to repair, please report it to | ||
| 261 | the author. | ||
| 262 | |||
| 263 | |||
| 264 | Please include as much information as possible in your bug | ||
| 265 | report. Ideally, include a complete transcript of the | ||
| 266 | __e2fsck__ run, so I can see exactly what error messages | ||
| 267 | are displayed. If you have a writeable filesystem where the | ||
| 268 | transcript can be stored, the script(1) program is a | ||
| 269 | handy way to save the output of __e2fsck__ to a | ||
| 270 | file. | ||
| 271 | |||
| 272 | |||
| 2 | perry | 273 | It is also useful to send the output of dumpe2fs(8). |
| 1 | perry | 274 | If a specific inode or inodes seems to be giving |
| 275 | __e2fsck__ trouble, try running the debugfs(8) | ||
| 276 | command and send the output of the stat(1u) command | ||
| 277 | run on the relevant inode(s). If the inode is a directory, | ||
| 278 | the __debugfs__ ''dump'' command will allow you to | ||
| 279 | extract the contents of the directory inode, which can sent | ||
| 280 | to me after being first run through | ||
| 281 | uuencode(1). | ||
| 282 | |||
| 283 | |||
| 284 | Always include the full version string which __e2fsck__ | ||
| 285 | displays when it is run, so I know which version you are | ||
| 286 | running. | ||
| 287 | !!AUTHOR | ||
| 288 | |||
| 289 | |||
| 290 | This version of __e2fsck__ was written by Theodore Ts'o | ||
| 3 | JohnMcPherson | 291 | |
| 1 | perry | 292 | !!SEE ALSO |
| 293 | |||
| 294 | |||
| 3 | JohnMcPherson | 295 | mke2fs(8), tune2fs(8), dumpe2fs(8), |
| 1 | perry | 296 | debugfs(8) |
| 297 | ---- |
lib/blame.php:177: Warning: Invalid argument supplied for foreach()