Click to See Complete Forum and Search --> : fsck, how do i use it to fix file systems with errors?


pablito
12-01-2000, 06:26 PM
Linux wont boot!
because I have the following lines in which the system asks me somthin I dont know.

Checking root filesystem
/Contains a file system with errors, check forced
/:
Unattached inode 198891
/:Unexpected INCONSISTENCY; RUN fsck MANUALLY
(i.e., without -a or -p options)
[FAILED]
***An error occurred during the file system check.
***Dropping you to a shell; the system will reboot
***when you leave the shell
Give root password for maintenance
(or type control-D for normal startup:

----------------------
CTRL-D gives :
Can't create lock file /etc/mtab~143( or something, the message was gone to fast, because the system was rebooting)

and the system reboots into the same routine as above while checking the root system.

has anybody any idea of getting out of this loop?


I m entirely new to linux, and just installed RedHat7.0. Got as far as getting on the internet and created as root a new folder in the /root directory, namely /downloads. Could this be the problem? I' ve read in a copy of linuxjournal that changing your /root directory is something you shouldn't do without knowing what you're doing. I guess I didn't.
But how can i get out of this problem? The only alernative i have is (as far as i think as a newbie) formatting and reinstalling the 2.5Mb linuxpartition.

I still have win98 on, otherwise i wouldn't be able to send this call for help, much to my regret.

A desperate newbie

Gweedo
12-01-2000, 06:35 PM
when your at control-D. type in the root password and hit instead of hitting Ctl-D.

next type e2fsck /dev/hdb1(what ever partition that Redhat is on)

When it is done reboot and you should come up fixed.

------------------
Dubbie..Dubbie..Do..
Watch out.. or the Penguin will get You http://www.linuxnewbie.org/ubb/wink.gif

[This message has been edited by Gweedo (edited 01 December 2000).]

PLBlaze
12-01-2000, 06:39 PM
When you get this ,don't do ctrl-d but insted type root's password and try this:
fsck /dev/sda2 -a -v -y or e2fsck /dev/sda2 -v.
The -a stands for all errors, -v verbose -y to fix the error(s) without prompting.Of course remember to use proper name for your hard drive (dev/hdaX,dev/hdbX...etc).Hope this helps.

posterboy
12-01-2000, 07:02 PM
Yes, AND after it has fixed your disk, just type the word exit, enter, and it will restart itself, hopefully with a disk marked clean, this time.
Ray


------------------
ray@raymondjones.net
HTTP://www.raymondjones.net