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

Re: root filesystem corrupted, can't log in



Philip,

To follow up on Nathan's reply, and only because when I upgraded Red Hat
from 6.0 to 6.1, I earned the dubious title Mr. Fsck-it, here's my 2
cents:

It seems the linux kernels from about 2.2.7 thru 2.2.13, and only on IDE
boxes, had a recurrent filesystem corruption problem. I was on kernel
2.2.12 when I upgraded to RedHat 6.1 and it slaughtered me. Here's the
routine that worked over and over again for me when boot up failed.

IF, you can do what Nathan said and get to a root shell, all you may see
is

#

Here are the e2fsck commands that worked for me:

Type   e2fsck -b 8193 /dev/<rootfilesystemname>    (my / looks like
/dev/hda9)

Hit ENTER and answer yes to all the questions by hitting ENTER until it
tells you

***** FILE MODIFIED ******

and gives you back the command prompt

#


Do the same for each of your filesystems /boot, /home, /usr, /var giving
your names for each in the form /dev/hdasomething, /dev/hdbsomething.
Don't worry about swap.

NOTE: If you get a large block of type that mentions a SUPERBLOCK error
and tells you to do the '-b 8193' thing. Well, that's how you got that
message, right? Instead I did this:

e2fsck -r /dev/<filesystemname>         (my /var looks like /dev/hda7

and it worked everytime giving me

****** FILE MODIFIED ******

#

You may also get a warning from the e2fsck programmer to the effect that
"Either there is a bug in e2fsck or some bonehead, YOU, is attempting to
clean a mounted filesystem." That scared the daylights out of me the
first time I saw it, until I told myself "Hey, I'm on a rescue disk.
None of these filesystems can possibly be mounted." Be sure that you
have not tried to mount any filesystems.

I continued to clean each of my filesystems getting

****** FILE MODIFIED ********

and the command prompt

#

after each one.


When they are all done, type 'exit' (without the quote marks). Your
system will shutdown and you _should_ be able press restart and boot
back up clean. Should.

You mileage may vary, but I have had to do that so many times under Red
Hat I've lost count. I'm surprised to encounter it in Debian. AND it may
be different here, so if anyone thinks he shouldn't try this, please
speak up NOW.

Good Luck,

montefin


Philip Lehman wrote:
> 
> My potato workstation suffered from a power failure and it seems
> like the partition holding the root filesystem was damaged. When
> I boot, fsck forces a check and reports an error about duplicate
> blocks (I'm sorry that I can't provide the precise error
> messages, but there is no way to catch them).
> 
> fsck tries to fix the problem but it fails, saying something
> about an "unexpected inconsistency" (IIRC) and tries to dump me
> to a sulogin prompt. At that point I get an error about
> /sbin/sulogin not beeing found (I guess because the file system
> is not mounted yet) and the machine simply reboots. If I don't
> turn it off when the BIOS comes up, it keeps on looping.
> 
> I'm desperate because the same happens when I boot from a rescue
> disk. What can I do about that? Any help will definetly be very
> much appreciated...
> 
> --
> Philip Lehman <lehman@gmx.net>
> 
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: