[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bad superblock



Hi

After a system crash, the superblock of /dev/hda4 (used for not so important data, hence no backup, sigh) is no longer readable. An attempt to mount that device yields

/mnt # mount -t ext3 /dev/hda4 hda4
mount: wrong fs type, bad option, bad superblock on /dev/hda4,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

A simple fsck on that partition fails, since the first superblock seems to be damaged:

/mnt# fsck /dev/hda4
fsck 1.37 (21-Mar-2005)
e2fsck 1.37 (21-Mar-2005)
fsck.ext3: Attempt to read block from filesystem resulted in short read while trying to open /dev/hda4
Could this be a zero-length partition?

After that, I tried to use the first backup superblock and to mark the bad blocks, verifying the position of that superblock with mke2fs -n,
and this resulted in

/mnt# e2fsck -ckv -b 32768 /dev/hda1

[...
Lots of bad blocks detected and file system errors corrected
...]

Error writing block 1 (Attempt to write block from filesystem resulted in short write). Ignore error<y>? yes

Since the information could not be written, I was still not able to mount the device. Also, the device can not be mounted giving the same superblock information as above:

/mnt# mount -t ext3 -o sb=32768 /dev/hda4 hda4/
mount: wrong fs type, bad option, bad superblock on /dev/hda4,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Dumping (part of) the data on the device with dd fails if one includes the first block

/mnt# dd if=/dev/hda4 bs=4096 count=1
dd: reading `/dev/hda4': Input/output error

but succeedes if one ommits the first block (with skip=1).

Strangely enough, I had the same troubles with /dev/hda1 after the crash, but there
/mnt# e2fsck -ckv -b 8193 /dev/hda1
solved the problem (the blocks are of 1k-size).

Is there a way to recover the data, since they turned out not to be so unimportant after all? Any help would be appreciated, thanks in advance.

Greetings

Martin Schmid



Reply to: