recovering FC3 from a bad superblock

Derek Martin invalid at pizzashack.org
Wed May 18 02:37:01 EDT 2005


On Wed, May 18, 2005 at 01:27:45AM -0400, aluminumsulfate at earthlink.net wrote:
>    From: Greg Rundlett <greg.rundlett at gmail.com>
>    Date: Mon, 16 May 2005 13:23:37 -0400
> 
>    My work system is a dual-boot laptop running FC3 and Windows (don't
>    actually use it).  The battery ran out, and it seems like the cache
> 
> First, it's just asking for data loss to run window$ and linux on the
> same machine.  

I really have to strongly disagree there...  I've been dual-booting
Linux and Windows since 1996, and I've *NEVER* experienced data loss
as a result.  There was a recent bug involving partitioning when
distros started switching to 2.6, but if you were careful and good at
following directions, the problem was usually recoverable, IIRC.

> The fact that *this* happens is important.  If mounting with the
> rescue disk works without complaint, your superblock is probably *in
> tact*.  Instead, it may be mount and/or e2fsck which have somehow
> become corrupt....  

That's just crazy talk.  Odds are if mount or e2fsck were corrupt,
they woudn't work at all, or they'd crash bigtime, probably making
things a lot worse.

>    Using the so-called backup superblocks [block-size (8192 *n) +1], it
>    reports a 'bad magic number'
>    e2fsck -b 16384 -n /dev/hda2
> 
> You may also want to check this formula.  From what I remember, the
> actual formula e2fs uses isn't linear.

You can determine the probable location of the back-up superblocks
using mke2fs -n.  Assuming the defaults were used, most likely your
back-up superblock is at block 32768, which is why the e2fsck command
listed above didn't work.

The manpage for mke2fs gives the specifics of how to determine the
primary back-up superblock.  It's based on block size, as the OP says,
but his formula isn't quite right.

> <to those who have advised not to>: Can it hurt to repair a filesystem
> while it's mounted read-only?

Can it hurt?  That depends on your perspective.  If it's already
broken, then it probably can't hurt much worse...  The only real
likelihood of e2fsck hurting your filesystem is if you happen to have
a buggy version.  It can delete files on you, but if you have a clue,
you can look at <root>/lost+found and figure out where the went...

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail.  Sorry for the inconvenience.  Thank the spammers.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20050518/fb0774ee/attachment.bin


More information about the gnhlug-discuss mailing list