Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
"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.
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.
"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.
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?
"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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.