[Techtalk] Bad Superblocks

Judith Elaine Bush bush at grey-cat.com
Sat Nov 30 00:27:47 EST 2002


      The hard drive of interest has been out of commission for just
over a year. I do not recall any problems with it when i last used
it. I believe the first partition would boot to Win 95; the second
partition had a linux file system and (i hope) just back-up files. (An
archival /etx/fstab bears this out.) I didn't use the system it was in
for a while, and just now attempted mounting it in a new system. It
appears FUBARed.

      The current status follows. If anyone has any ideas about what
can be done, I'd appreciate suggestions. Thanks!

judith bush


      The output of fdisk (simple and extended) is below. fdisk
believes the partitions both have ID 83 -- are Linux ext2 file
systems. For both partitions, fsck.vfat says "Logical sector size is
zero," and fsck.ext2 says, "Bad magic number in super-block while
trying to open /dev/hdb[x]." A similar error occurs when trying to
open the filesystems when in debugfs.

      I have copied the two partitions into files using dd. That was
"successful" -- I can scan the images with hexdump -c, pipe to more,
and search for text strings to see what's on the drive. (I'm in the
matrix, woohoo.)

      I am now very certain the first partition is a Windows
partition. I am less than certain of the file system on the second
partition. I could have tars of Windows files...

      I've found
http://www.linuxgazette.com/issue32/tag_superblock.html and can't
quite understand, "It's also possible that you've switched from some
autotranslation mode to linear (LBA) or otherwise changed how the
system addresses this drive." So, if i have? I will likely try the
suggestion to try mke2fs -S (make superblocks and group descriptors
only).

========================================================

# fdisk /dev/hdb

Disk /dev/hdb: 128 heads, 63 sectors, 523 cylinders
Units = cylinders of 8064 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1       242    975743+  83  Linux
/dev/hdb2           243       523   1132992   83  Linux

Disk /dev/hdb: 128 heads, 63 sectors, 523 cylinders

Nr AF  Hd Sec  Cyl  Hd Sec  Cyl    Start     Size ID
 1 80   0   2    0 127  63  241        1  1951487 83
 2 00   0   1  242 127  63  522  1951488  2265984 83
 3 00   0   0    0   0   0    0        0        0 00
 4 00   0   0    0   0   0    0        0        0 00

# Old fstab entries
/dev/hda1       /dos_c      vfat   rw,user,exec,suid,dev
/dev/hda2       /roar       ext2   defaults

::::::::::::::::::::::::::::::::::::::::::::::::::::::::

# fsck -V -t vfat /dev/hdb1
fsck 1.27 (8-Mar-2002)
[/sbin/fsck.vfat (1) -- /dev/hdb1] fsck.vfat /dev/hdb1
dosfsck 2.8, 28 Feb 2001, FAT32, LFN
Logical sector size is zero.

#  fsck /dev/hdb1
fsck 1.27 (8-Mar-2002)
e2fsck 1.27 (8-Mar-2002)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/hdb1

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
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 

# dumpe2fs -f /dev/hdb1
dumpe2fs 1.27 (8-Mar-2002)
dumpe2fs: Bad magic number in super-block while trying to open /dev/hdb1
Couldn't find valid filesystem superblock.

# dd if=/dev/hdb1 of=/User/blondie/TIA3/dos_c
1951486+0 records in
1951486+0 records out

::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#  fsck -V -t vfat /dev/hdb2
fsck 1.27 (8-Mar-2002)
[/sbin/fsck.vfat (1) -- /dev/hdb2] fsck.vfat /dev/hdb2
dosfsck 2.8, 28 Feb 2001, FAT32, LFN
Logical sector size is zero.

#  fsck /dev/hdb2
fsck 1.27 (8-Mar-2002)
e2fsck 1.27 (8-Mar-2002)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/hdb2

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
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 

# dumpe2fs -f /dev/hdb2
dumpe2fs 1.27 (8-Mar-2002)
dumpe2fs: Bad magic number in super-block while trying to open /dev/hdb2
Couldn't find valid filesystem superblock.

# dd if=/dev/hdb2 of=/User/blondie/TIA3/roar
2265984+0 records in
2265984+0 records out

========================================================




More information about the Techtalk mailing list