From: Theodore Ts'o Date: Wed, 1 Jan 2014 04:02:44 +0000 (-0500) Subject: e2fsck: improve the "superblock corrupt" message X-Git-Tag: v1.42.9.wc1~145 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=c32409aec6735cac4e2983247f1a07d845cc49b8;p=tools%2Fe2fsprogs.git 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" --- diff --git a/e2fsck/problem.c b/e2fsck/problem.c index 83584a0..43a5d7b 100644 --- a/e2fsck/problem.c +++ b/e2fsck/problem.c @@ -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 */ diff --git a/tests/f_crashdisk/expect.1 b/tests/f_crashdisk/expect.1 index 70ddf2e..977a469 100644 --- a/tests/f_crashdisk/expect.1 +++ b/tests/f_crashdisk/expect.1 @@ -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 + or + e2fsck -b 32768 Exit status is 8