LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-17-2005, 10:17 PM   #1
60cents
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Rep: Reputation: 0
Major system crash


I forced a shutdown of FC3 the other day and now I can't get it to boot.
I get a message that says system shut down uncleanly
checking root filesystem
followed by
Inexpected inconsistency, fun fsck manually
That says failed
then it says an error occurred during the file system check
dropping you to a shell, the system will reboot when you leave the shell

then it says give root password for maintenance.

But when I type the password the keys don't work and the only option is control d which reboots the system.

Hope someone can guide me back to a normal boot. I really don't like being stuck with windows

Thanks
 
Old 05-18-2005, 12:17 AM   #2
sgrayban
Member
 
Registered: Nov 2004
Location: Spokane, WA
Distribution: Debian 6.0
Posts: 369

Rep: Reputation: 30
Don't use a beta distro anymore. FC is known for major problems and RH wont help.
 
Old 05-18-2005, 07:03 AM   #3
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
You could try getting a live CD like Knoppix and using that to run fsck on your Fedora partition. If that's not a possibility, and you don't mind losing your data, reinstalling might be the least painful option.
 
Old 05-18-2005, 01:50 PM   #4
runlevel0
Member
 
Registered: Mar 2005
Location: Hilversum/Holland
Distribution: Debian GNU/Linux 5.0 (“Lenny”)
Posts: 290

Rep: Reputation: 31
Re: Major system crash

Quote:
Originally posted by 60cents
I forced a shutdown of FC3 the other day and now I can't get it to boot.
I get a message that says system shut down uncleanly
checking root filesystem
followed by
Inexpected inconsistency, fun fsck manually
That says failed
then it says an error occurred during the file system check
dropping you to a shell, the system will reboot when you leave the shell
Thanks
OK, No Problemo. Piece of cake.

Prepare yourself for an introductory course of Physical Hacking (don't do this on other peoples machines).

First of all get a LiveCD like Knoppix, Ubuntu or the one which you find most appealing (it really doesn't matter much as least as they have a complete distro in it).

In case you don't have a way of burning/getting such a live CD your FC install CD 1 will also help saving the day. What you have to do in this case is booting from the CDROM as if you where going to install again. Hit F2 and look for a boot option called "Rescue". Normally it's just this "rescue". Once found out which, simply type it on the prompt:
Code:
rescue
But for now let's go back to the LiveCD.
If you have booted from the LiveCD you will get straight into the graphical interface. No problem with this, but in order to keep it simple and explain the things so that it's the same if you use a LiveCD or the rescue kernel on your FC install CD I will explain how to do it from a console.

So if you are using a LiveCD and are inside the graphical environment, jump out of it to a console with this key sequence: CTRL+ALT+F1. Note that you can choose among 6 consoles. You can select which using the function keys F1-F6.

OK, now you are in the so-called TTY-mode or 'console', and we are also root at no cost. This is why I told this was a way of physical hacking as you can do it on any machine able to boot from the CDROM.

What you need now is a list of your hardisk's partitions. With this command you will get the correct partitions and filter out unnecessary stuff:
Code:
 fdisk -l | grep Linux | grep -v swap | gawk '{ print $1 }'
What you see here is a list of partitions you must repair. As we don't know which are OK and which not, we will check them all.
To check and repair an EXT3 or EXT2 filesystem we need to use e2fsck. As I'm more or less convinced that you are using the default filesystem type, I will stick on it (I can't also remember all of them right now).
So what you need to do is:

Code:
e2fsck -vaf /dev/hdXY
Where XY are the letters and numbers you got with the fdisk -l program above.
So run the program once for each partition and watch the result.
It could happen that e2fsck complains about the journal telling you that it should be replayed.
What you have to do is mounting and unmounting the drive again:

Code:
mount -t ext3 -o rw /dev/hdXY
umount /d/ev/hdXY
Once all the filesystems are ready we need an extra step to ensure everything is OK. What we are going to do now is changing the root password on your distro for the case you forgot to set it. The first thing you need to know is where your root partition resides. As an example I will use /dev/hda2, but remember to change it to your own root partition. First of all we need to know where to mount it. LiveCD's have a special place to put it all, it's called /mnt. Rescue systems have nothing inside /mnt, so let's first create a mount point:

Code:
mkdir /mnt/rescue
Now we need to mount the root partition:

Code:
mount -t ext3 -o rw /dev/hda2 /mnt/rescue
And now the magic: We will turn /mnt/rescue into your old partition on the hardisk so we can work as if we were in the normal OS:

Code:
chroot /mnt/rescue /bin/bash
OK, we are now ready to repair stuff or wreak havoc if we were bad guys. Let us change the password. Of course it's not necessary that you literally change it, we are just going to ensure that everything works, so you can use the same password you already used.

Code:
passwd
This command says that you will change root's passwd. It's not necessary to pass him the user name, as you are root. But if you would like you can use it in this way:

Code:
passwd USERNAME
After issuing the command the program will ask you for the new password twice. That's all, no security measure, no asking for your older password. Nothing. So be careful.

So, that's all. You can now reboot and enter your distro w/o problems. Keep this procedure in mind. EXT3 filesystem doesn't need much attention and does not fragment (the same as NTFS). But it's a good idea to check it if you experience power failures.

Things which can go wrong:

* It's possible that the partitions on your harddrive are already mounted. The solution is to simply unmount them:
Code:
umount /dev/hdXY
* If your keyboard is not US, you will need to set the keymap:
Code:
loadkeys XY
where XY is your ISO countrycode: es, de, fr...

* E2fsck can report bad blocks. This can also be repaired, but it will take some good amount of time:
Code:
e2fsck -ckv /dev/hdXY
c checks for bad blocks, k writes to the current badblock list (the default one in this case) and v stays for 'verbose'.

I hope this helps. If you have any more trouble just tell us.

Last edited by runlevel0; 05-18-2005 at 02:11 PM.
 
Old 05-18-2005, 02:07 PM   #5
runlevel0
Member
 
Registered: Mar 2005
Location: Hilversum/Holland
Distribution: Debian GNU/Linux 5.0 (“Lenny”)
Posts: 290

Rep: Reputation: 31
Re: Re: Major system crash

.

Last edited by runlevel0; 05-18-2005 at 02:10 PM.
 
Old 05-21-2005, 07:00 PM   #6
60cents
LQ Newbie
 
Registered: Apr 2005
Posts: 17

Original Poster
Rep: Reputation: 0
runlevel0
I finally got my file system errors fixed.
I had to do a few things diferently than you suggested but it worked.
I used the FC3 disk one "linux rescue" option and then kinda cobbled together your posts to get things to work right. I had to umount /dev/hda2 and then run fsck. That worked
Your post was very helpful. Got me up and running again
Thanks
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System crash!!!! hacinn Linux - Hardware 2 09-15-2004 06:55 PM
Major Hardware issue: System keeps freezing tsw Linux - Hardware 2 08-04-2004 11:16 PM
major system & library help needed! synaptical Slackware 13 04-27-2004 02:58 PM
First major Linux crash........ BajaNick General 3 09-13-2003 01:08 AM
System Crash!! need help please infected Linux - Software 0 07-30-2003 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:15 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