e2fsck: improve the "superblock corrupt" message

Previously, this message used 8193 as the example alternate
superblock.  But for most file systems, the backup superblock is
located at 32768 (since most file systems have a block size of 4k, and
not 1k).

Addresses-Debian-Bug: #719185

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
maint-test
Theodore Ts'o 2013-12-31 23:02:44 -05:00
parent 5c4c38763c
commit c32409aec6
2 changed files with 9 additions and 5 deletions

View File

@ -119,11 +119,13 @@ static struct e2fsck_problem problem_table[] = {
/* Superblock corrupt */
{ PR_0_SB_CORRUPT,
N_("\nThe @S could not be read or does not describe a correct ext2\n"
"@f. If the @v is valid and it really contains an ext2\n"
N_("\nThe @S could not be read or does not describe a valid ext2/ext3/ext4\n"
"@f. If the @v is valid and it really contains an ext2/ext3/ext4\n"
"@f (and not swap or ufs or something else), then the @S\n"
"is corrupt, and you might try running e2fsck with an alternate @S:\n"
" e2fsck -b %S <@v>\n\n"),
" e2fsck -b 8193 <@v>\n"
" or\n"
" e2fsck -b 32768 <@v>\n\n"),
PROMPT_NONE, PR_FATAL },
/* Filesystem size is wrong */

View File

@ -2,10 +2,12 @@ ext2fs_open2: The ext2 superblock is corrupt
../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
../e2fsck/e2fsck: The ext2 superblock is corrupt while trying to open test.img
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
Exit status is 8