Whamcloud - gitweb
e2fsck: improve the "superblock corrupt" message
authorTheodore Ts'o <tytso@mit.edu>
Wed, 1 Jan 2014 04:02:44 +0000 (23:02 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 5 Jan 2014 00:11:30 +0000 (19:11 -0500)
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>
e2fsck/problem.c
tests/f_crashdisk/expect.1

index 83584a0..43a5d7b 100644 (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 */
index 70ddf2e..977a469 100644 (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