[lug] e2fsck emergency

D. Stimits stimits at idcomm.com
Tue Sep 5 14:20:23 MDT 2000


rm at mamma.varadinet.de wrote:
> 
> On Tue, Sep 05, 2000 at 12:11:10AM -0700, D. Stimits wrote:
> > It is so badly corrupted it can't believe it is ext2:
> >
> > e2fsck: bad magic number in super-block while trying to open /dev/sda2
> >
> > 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
> > ....
> 
> Yes, but ex2fs stores multiple copies of the superblock. You can
> run e2fsck with the '-b' switch and give it an alternative superblock.

It was rejecting alternate superblocks. Despite being able to see the
filesystem in single user mode, fsck was rejecting it. In read-only
single user mode, it also refused to let me delete directories that it
was naming as bad at the time of rejection. It also would not let me
remount the root as rw. The solution was to tell my bios to boot to IDE,
then plug in a removable IDE tray I have, with a linux distro on it. Not
being mounted as root, it allowed me to mount it rw, and delete 
directories. Following this, it finally let me fsck it after setting the
bios back to boot to scsi.

> 
> > My experience has been that if things die, simply doing 'fsck -y /dev/hda1'
> > will fix it quite nicely.
> >
> > This must be a typo, or I have a different fsck. No -y is possible. This is
> > on Redhat 6.2.
> 
> ??? This is a rather old option (it basically 'answers' all questions
> with 'yes'. Convenient, but not neccessary ...).

Apparently this wasn't why it was rejecting it, but it never got far
enough along to realize it. The -y worked after deleting offending
directories.

> 
> > Somewhere I am hoping to find an option to fsck that says
> > "yes, this is ext2, and it is so badly corrupted, I want you to do what I
> > say no matter how ridiculous, and not exit on me". However, it always
> > exits.
> 
> Well, how could the program do any usefull work if it can't even find
> the basic info? I think you should try '-b ...' (the manpage gives
> default values for the location of the backup superblocks, so i won't
> retype them here).

This was no longer a problem after deleting directories while mounted as
a non-root disk.

> 
> > I have tried various options, including specifically the manual
> > ones, totally non-automatic. Maybe I'm missing something, but the compile
> > probably had 100 megs in the middle of change at the time of failure...it
> > is bad.
> >
> > If you do go for a reformat/reinstall solution, and insist on a journaling
> > fs,
> > then ReiserFS is one of the best choices. However, you're still running
> > beta
> > code if you do so. And the only distro I'm aware of which supports Reiser
> > out
> > of the box is Mandrake.
> 
> SuSE has it too (they actually push it quite a bit -- and pay for it
> AFAIK).

I'm going to check into both SuSE and Mandrake. My real concern is if I
can get the root directory as reiserfs. If the distro has reiserfs
ability, but the kernel doesn't have it compiled in, or initrd doesn't
have the reiserfs module, it won't do me any good. I'm going to test
both out on a blank hard drive (such as my removable IDE...it's more or
less used as a big floppy).

> 
>  Ralf
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug




More information about the LUG mailing list