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

Re: My superblock has been destroyed - please help!



In linux.debian.user, you wrote:
> Hello!
> 
> Hmm, the subject says almost everything... my almost new (!) IBM hard disk
> suddenly had some bad sectors and one was the superblock of my linux
> partition. So, I cannot boot into linux any more, and if I try to e2fsck
> the partition, e2fsck doesn't find the superblock. Also, if I try with -b
> 8193 or -b 16385, e2fsck says that these blocks contain a "bad magic
> number". Hmm, I've read that these blocks should actually be superblock
> backups but I think since my fs was made with the new default
> "sparse_superblocks" option, the backups are perhaps somewhere else. Can
> anyone please help me with this issue? I just desperately want to rescue
> my data before I send the drive back to IBM or so because they will
> probably send me a new HDD but not my old data, and of course I have not
> made backups, stupid me. The partition is /dev/hda2 and about 7.7 GB. I
> also have a possibility to temporarely store up to 12 GB of data on hda1,
> a fat32 partition which scandisk could obviously "stabilize" more or less
> after a bad block marking. At the moment, I'm trying to dd /dev/hda2 into
> a file on /dev/hda1 but there seems to be a problem with the maximal file
> size on fat partitions (does anyone know about that?).
> 
> Regards and thanks in advance,
> 
> Stephan
> 

This is from the e2fsck manpage:

              The location of the backup superblock is dependent on the
              filesystem's blocksize.  For filesystems with 1k blocksizes, a
              backup superblock can be found at block 8193; for filesystems
              with 2k blocksizes, at block 16384; and for 4k blocksizes, at
              block 32768.

              Additional  backup superblocks can be determined by using the
              mke2fs program using the -n option to print out where the
              superblocks were created.  The -b option to mke2fs, which
              specifies blocksize of the filesystem must be specified in
              order for the superblock locations that are printed out to be
              accurate.

I just tried "mke2fs -n /dev/hda5" where /dev/hda5 is an empty partition on
my machine.  I was afraid to try it on a good partition, even after looking
at the manpage for mke2fs which states:

       -n     causes mke2fs to not actually create a  filesystem,
              but display what it would do if it were to create a
              filesystem.

I don't know if you already know your blocksizes, but you could try the
'e2fsck -b' command using 16384 and/or 32768 in case you have 2k or 4k
sizes.  If that doesn't work, you could try the 'mke2fs -n' command to find
your superblocks.  I got this:

Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Just be real sure to include the '-n' in the command if you do it, but I
doubt I have to tell you that.  

Anita



Reply to: