PDA

View Full Version : HDD Boot, fsck repair and reboot ???



Cuddles
05-05-2004, 11:25 AM
Ok, I've been running Knoppix v3.3 hard drive installed for some time, and every 40 mounts of my root partition have caused a forced fsck check on the device this is held on, /dev/hda1...

Everything has been going great, even though this check can take some time, before Knoppix will actually complete its booting, until, this morning... Upon booting, fsck forced its usual 40 mounted checking, and then printed the following (pardon if I don't type this exactly, considering it was in a boot screen, I didn't have copy/paste) :

/dev/hda1: ***** REBOOT LINUX *****
/dev/hda1: somebignumber/somebignumber (1.2% non-contiguous) somebignumber/somebignumber

fsck failed. Please repair manually and reboot [blah, blah, blah]

CONTROL-D to exit this shell, and reboot

-=-=-=-=-=-=-

Ok, now I am lost - what happened, what should I "have" done? Having no clue what to do in this situation, I did a CTRL-D, rebooted, and came in here to post for help. How much damage am I doing by not "doing what I was supposed to do before", and such???

Is this severe? Can it be recovered? What should I do NOW? And, lastly, if this happens again, what should I have done?

Thanks in advance, this boot message has got me scared here,
Cuddles

Cuddles
05-05-2004, 08:17 PM
Ok,

In trying to find my own answers, I have concluded the following, from the above situation:

I should have mounted the /dev/hda device as r/w access, and performed a fixing fsck on the device. After, hopefully, a good fixing, and a successful fsck completion, rebooted.

But, I didn't - I just rebooted.

What I am guessing I should do is, shutdown, boot to the CD, give it cheatcodes to not use my swap, which is also on the "physical" /dev/hda device, to not use my home/root on the /dev/hda1 device, and after booting, perform a fsck on the /dev/hda device.

Looking through the fsck man pages, I am getting lost. I know I want to use the fix option, but do I want it to have "unlimited" fixing, (it suggests this is a bad thing), do I mount the device previous, or do I let fsck do that part?

I am in fear that the longer I keep my system up, after knowing about the fsck problem, I am only damaging the file system further, am I right?

Someone, [?]
Cuddles

Stephen
05-06-2004, 04:24 AM
Ok,

In trying to find my own answers, I have concluded the following, from the above situation:

I should have mounted the /dev/hda device as r/w access, and performed a fixing fsck on the device. After, hopefully, a good fixing, and a successful fsck completion, rebooted.

But, I didn't - I just rebooted.

What I am guessing I should do is, shutdown, boot to the CD, give it cheatcodes to not use my swap, which is also on the "physical" /dev/hda device, to not use my home/root on the /dev/hda1 device, and after booting, perform a fsck on the /dev/hda device.


You would boot the CD and then check the filesystem assuming it is ext3 e2fsck /dev/hda1 you do not mount the partitions and knoppix will not by default mount the partitions the /swap is irrevalent you should not need to check it.



Looking through the fsck man pages, I am getting lost. I know I want to use the fix option, but do I want it to have "unlimited" fixing, (it suggests this is a bad thing), do I mount the device previous, or do I let fsck do that part?

I am in fear that the longer I keep my system up, after knowing about the fsck problem, I am only damaging the file system further, am I right?

Someone, [?]
Cuddles

You can just answer the questions one by one which the command I gave does there will most likely be a lot of them and you are going to want to answer yes to fixing the errors so the -y in the command may be what you want.

bruceg
05-06-2004, 04:36 AM
Good post Stephen! I do not have Knoppix installed on my harddrive (I boot from CD on my laptop) - but I do have SuSE as the primary operating system on my desktop.

The procedure that worked for me was:
Boot from rescue CD
Make sure my Linux partition is not mounted (umount /dev/hdb2)

My partition is reiserfs, so the following command checks the partition:
reiserfsck --check /dev/hdb2

I repaired it with the followig command:
reiserfsck --fix-fixable /dev/hdb2

Cuddles - I saw you used to support Win98. Sounds like an interesting thing, but probably stressfull. Anyway - a good reference book for Linux is "Running Linux". It can help a lot.

Cuddles
05-06-2004, 01:43 PM
Thanks Stephen, I am adding this, as with anything else I have "picked up" in tools, and commands, to an ever-increasing amount of "postie notes". I have almost a wall-full of them now, all with "small" cryptic commands on them. I'm getting better, some of them have easily been commited to memory :)

BruceG, I agree with you, it was a good post. I dicided to go with the ext3, even though, I think Stephen is using the reiser f/s. Being new to the whole "Linux" world, I didn't want to "stray" to far from my past, and FAT, but wanted something more than just ext2. And, yes, Win98 was stressful, but I enjoyed helping people. What hurt the most was changing from the OS to MSN online phone support, you can't please people who can't get there email, or are having connection problems, that was incredibly stressful. Most of the problems, like email, the server would be down, and you can't do "anything" for them, but just tell them the server is down, and try later. I got a lot of "hate" words during those phone calls. This girl had so much of a hard time during my "stinch" in MSN, that I can't handle even having a phone ring anymore, my stress just goes balistic.

Oh well, thanks to both of you for the assisitance, I'm off to reboot, and clean-up my file system :D

Cuddles

Cuddles
05-06-2004, 03:05 PM
Did it, but I did have to place a "-f" into the command. It never prompted me for anything, in fact, when I ran just the fsck with the device, it just blurted out the device and "clean" after it, it didn't really take that long either.

So, I ran "e2fsck -f /dev/hda1" -=- and that went through, I think, six passes, and never asked for any input. It also didn't report any problems. So, I guess I have a "clean bill" of health now. [?]

Thanks again :D
Cuddles

ZeroKun
05-06-2004, 03:22 PM
While this didnt happen during a normal boot (happned with a improper shutdown), this should work i guess (and hope). Thanks for all of you that posted.