LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-07-2004, 06:22 PM   #1
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Rep: Reputation: 30
Is there any point in running fsck.ext3?


I am experimenting and trying to learn how to use Linux, but I keep having woes. I am dual booting with Win98 and Mandrake 9.1. I have a 4 GB primary hard drive with Win98 installed. I have a slave hard drive split about half between Windows and Linux.

Recently Linux crapped out when I booted. Basically, it complained that I had a bad superblock and told me to fix the problem. Okay . . . being very ignorant I had to do a lot of looking around on the internet before I was even marginally intelligent on the subject.

To make a long story short, I tried to switch to a different super block. No success. Then I tried to run fsck.ext3 and told the program to fix all the problems itself. It gave me back the message:

UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

So . . . being a good little boy I did. But then fsck began to ask me if I wanted to fix every freaking inode, magic flag, etc, etc. Let's just say my hands got tired of hitting the "Y" key. I managed to jury-rig it so that my "Y" key was pressed down. I went away for some time and came back. The inode count was up to well over 206,000.

At this point I'm wondering if this is going to fix anything if so many inodes are corrupted (and I would really like it if someone told me what the heck inodes are). Also, I am wondering how many inodes there are. How high is this fsck going to keep counting? Should I just reinstall linux?

Why did my superblock go bad?

Also, is there any way I can save the error messages that come up when I try to boot into Linux? It's a pretty big pain trying to write stuff down on a peice of paper.

So many questions . . . any help would be much appreciated.

Thanks,
Rundi
 
Old 03-07-2004, 06:48 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"So . . . being a good little boy I did. But then fsck began to ask me if I wanted to fix every freaking inode, magic flag, etc, etc. Let's just say my hands got tired of hitting the "Y" key. I managed to jury-rig it so that my "Y" key was pressed down. I went away for some time and came back. The inode count was up to well over 206,000."

You can use the -a option in fsck to tell fsck to stop asking permission to fix things, just do it.

" I would really like it if someone told me what the heck inodes are."

Inodes are the file system control blocks used to keep track of disk space, whether it is free space, allocated to a file, etc.

"Why did my superblock go bad?"

The most common cause of disk problems is shutting the computer down without going through shutdown (power failure, fumble fingers, whatever). Linux keeps a huge disk cache to speed up disk access. There are usually cache buffers for disk writes that have not been written yet. Normal shutdown includes writting all dirty buffers to disk. Abnormal shutdown may leave your disk corrupt with some disk blocks changed correctly and other changes not having been written yet..

"Also, is there any way I can save the error messages that come up when I try to boot into Linux? It's a pretty big pain trying to write stuff down on a peice of paper."

You can display the messages from the last boot with:
dmesg
You can display any boot message which contains a particular set of characters, such as disk with:
dmesg | grep disk

"Should I just reinstall linux?"

I suggest that you boot a rescue CD such as knoppix and run fsck:
umount /dev/hda3
fsck.ext3 -a /dev/hda3
or whatever partition number Mandrake is on. Then see if Mandrake works. If not then reinstall Mandrake.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-07-2004, 06:59 PM   #3
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
fsck don't like me

Thank you very much for the quick reply.

I did try to use the -a option with fsck but it gives me the message:

UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

Which forces me to run it manually. Since I can jury rig my keyboard to say yes automatically, I am willing to let fsck run "manually" if there is any hope of success.

It just seems that if every single inode needs to be fixed I'm probably doomed. But that assumption is based on ignorance, not knowledge.
 
Old 03-07-2004, 10:01 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"It just seems that if every single inode needs to be fixed I'm probably doomed."

Probably. But it doesn't hurt to try to fix it anyway. After you run fsck.ext3 look in the lost+found dirctory and see if fsck placed any orphan files there.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-08-2004, 10:16 AM   #5
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
If fsck can't fix it . . .

Ok, I did run fsck.ext3 manually . . . good thing I could keep the Y key pressed down with a pencil because it took several hours. Anyhow, it finished, but I think I might be stuck.

fsck has finished running, but every time I boot up I still get errors. When I rerun fsck it only finds two errors now. It is as follows:

Pass 3: checking directory connectivity '..' in /lost+found/ #274023 (274023) is <The NULL inode> (0), should be /lost+found (12).

It asks me if I want to fix it and I say yes. Then it gives me the following message:

couldn't fix parent of inode 274023: couldn't find parent directory

I have the same problem with 354225 and the same inability of fsck to fix it. Otherwise fsck finds no more problems, but since it can't fix these two (I presume) it finishes by saying that their still are problems.

And obviously I still can't finish booting.

It seems fsck has done all it can do but I was wondering if there was some way I could help fsck, or something. I mean, I can still browse around my files on the hard drive from the fix filesystem prompt. I can see all the files in the lost+found directory. Is there something I should/could do?
 
Old 03-08-2004, 07:37 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Pass 3: checking directory connectivity '..' in /lost+found/ #274023 (274023) is <The NULL inode> (0), should be /lost+found (12)."

I think that you might be able to fix the lost+found problem by deleting all of the files in lost+found. Obviously before you do that you should copy the files and save them someplace. Can you copy them to a floppy? Can you copy them to some other partition?
Once you have saved them then you could try deleting all of the files in lost+found and see if the inode error is fixed.


"I have the same problem with 354225 and the same inability of fsck to fix it. Otherwise fsck finds no more problems, but since it can't fix these two (I presume) it finishes by saying that their still are problems."

If 354225 is in lost+found then then deleting everything in lost+found might fix this problem too. If 354225 is not in lost+found then cleaning out lost+found probably will not fix 354225 but you could clean out lost+found to fix 274023 (maybe) and see if 354225 is fixed also.

If you clean out lost+found and still cannot boot then I think that the only solution is to format the partition after you copy everything worth saving to someplace else.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-09-2004, 10:31 AM   #7
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
write protected files

I managed to delete some files from lost+found but others files and directories there are write protected.

How do I turn off this write protection so I can delete?

Thanks for any advice.
 
Old 03-09-2004, 10:42 AM   #8
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"How do I turn off this write protection so I can delete?"

Try the chmod command. For example to change the permissions for everything in /lost+found use:
chmod 777 /lost+found -R

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 03-09-2004, 11:40 AM   #9
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
operation not permitted

Thanks for the quick reply.

I did as you said and it tried, but I got back the error "Operation not permitted."

That was when booted up from the Mandrake CD as rescue. (Which has the promt root@rescue but when I type 'whoami' bash says it doesn't recongize the command-I guess because this is a rescue boot not all bash commands are loaded(?)-so I don't actually know if I am root or not and I don't even know if this makes any difference for chmod.)

Alternately, when I try to boot up the system and it craps out it still allows me to log on as root at the prompt: Repair filesystem. I know I am root, not only because I use the root password to log in, but also because whoami returns the answer "root." However trying to do the chmod from this setup returns the message that this is a "read only file system"

I feel like I am stuck in a laughable position. I need to chmod, but any way I boot up I'm not allowed to chmod.

Since, at this point, I'm only experimenting with Linux I can do a complete reinstall without much greif. But, on principle, I find it distrubing that one day I boot up my linux system and just "poof" have to reinstall. That is why I am so doggedly trying to figure out some fix.

But if everyone else has run out of fixing ideas I will reinstall.
 
Old 03-11-2004, 07:31 PM   #10
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
Reinstalled

Did reinstall Mandrake. "Fixed" the problem.

But I would like to know how I got a superblock problem in the first place. I am not in the habit of shutting down improperly.
 
Old 03-11-2004, 11:01 PM   #11
bpw
LQ Newbie
 
Registered: Feb 2004
Location: Maine
Posts: 6

Rep: Reputation: 0
Just thought I'd mention its situations like this that made me realize the value of partiions. Recently installed Damns small linux and in proccess of experimenting with things would frequently damage something mportant, since my home directory was aseperate partition I wouldn't even lose my fluxbox preferences when reistalling. Unlike windows all data is not lost on reinstalling the system, which is nice because I am less worried about breaking things and can try stuff.

Just a thought....
Ben
 
Old 03-12-2004, 09:28 AM   #12
Rundi
Member
 
Registered: Jun 2003
Location: USA
Distribution: Ubuntu
Posts: 169

Original Poster
Rep: Reputation: 30
Good thought

Good point. I will try to remember that. It is something I still haven't got used to. Years of using Windows has left its mark.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fsck in ext3, resierfs? name_in_use450 Linux - General 4 06-08-2004 03:09 PM
fsck and ext3 perry Linux - Hardware 1 05-13-2004 02:04 PM
fsck on ext3 hemanth_13 Linux - General 1 07-24-2003 09:44 AM
fsck in ext3? recurrente Linux - Newbie 3 03-21-2002 05:15 AM
fsck in ext3?? recurrente Linux - Newbie 0 03-18-2002 07:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration