Solved

Login problem,Please help me.

Posted on 1998-07-22
3
215 Views
Last Modified: 2010-04-20
I have used Linux for more than one month but I think It's the best OS I have ever used. But Today I had problem when I tried to login: Here are an error msg:
/dev/hda2 contain a file system with errors,check forced.
duplicate or bad blocks in use.
/dev/hda2:Unexpected in consistency: Run fsck Manually.
**** An error occurred during the file system check
*****Droping you to a shell; the system will reboot when you leave the shell.
Give root password for maintenance.
Then I logged in as root. I did man fsck .and I knew that It 's command for find and repair file system in Linux. But I lack of experience about using Linux and I'm just wondering how can I use it to repair files system of Linux in my computer correctly. So I would like you to help me to solve that problem.
Regards
Mark.  
0
Comment
Question by:atu
3 Comments
 

Expert Comment

by:somberlain
ID: 1637603
oh man somethin like this happend to me.  this is what I did.  I booted off my linux install disk, when it asked me to pass options instead of just hitting enter i did a

mount root=/dev/hda1

(linux is on /dev/hda1 of my machine)  then after I booted up I got a console and logged in as root.  then I just did a

fsck /dev/hda1

and it checked it and fixed it all up.  stuff like this is the reason why its good to save your install disks and/or make boot disks, im too lazy to make boot disks tho so my install disk is also my rescue disk :)

this is just posted as a comment.  I dont like to lock questions.  if this works and you want to give me the points let me know and i'll repost my comment as an answer.
0
 
LVL 3

Accepted Solution

by:
marcelofr earned 100 total points
ID: 1637604
somberlain is right. But he needn't to boot from floppy. All you need to check a filesystem is that it isn't mounted or mounted readonly, which is exactly the state you got when you gave root passwd for maintenance.

fsck -y /dev/hda2

don't ask you to confirm each repair... anyway, you won't repair it by hand, will you? When Linux boots, if it finds that a filesystem was not cleanly unmounted, it automatically fscks the filesystem. But if the error worth you to know, then you will have to do it by hand, for example if your disk has a bad block...

Good luck
0
 

Author Comment

by:atu
ID: 1637605
Thanks for helping.
Cheers
Mark.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now