LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-30-2003, 02:59 PM   #1
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Rep: Reputation: 15
Question Kernel Panic: can't mount root fs


Hello, I have recently installed Gentoo Linux on one of my computers. Everything worked without a hitch until yesterday. I was in the middle of an X-Windows session when my speakers began to ping, reaching down to adjust the sound cable I interrupted the power source of the computer by pulling the power cable. The machine turned off. I then said 'shit' and turned the computer back on. It booted with a good amount of error messages. I was able to login, however now all of my commands had gone missing, any command ls, cd, etc seemed to have not been found once entered at the command prompt. I then reset to see if it was just a temporary problem. After rebooting I found that there is now a kernel panic
is_tree_node: node level does not match to the expected one 1
vs-5150: search_by_key: invalid format found in block 8211. Fsck?
vs-13070: reiserfs_read_inode2: i/0 failure occurred trying to find stat data of [1 2 0x0 SD]
VFS: Cannot open root device "hda3" or 03:03
Please append a correct "root=" boot option
and finally...
kernel panice: VFS: Unable to mount root fs on 03:03

My assumption is that during the power interruption, a few sectors on my hardrive could have been corrupted. I have never run into a problem as this. I am wondering if there is a way to fix this. I can obviously still use grub, is there a way in which I may use grub to remedy the situation? Should I prepare myself to learn again by installing Gentoo? Thank you for your help good kind sirs/siresses.
 
Old 11-30-2003, 03:56 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
" I am wondering if there is a way to fix this."

Boot a rescue CD. Then use fsck against each of your hard disk partitions:
fsck /dev/hda1
.
.
.
Then boot Red Hat again. Anything that is still missing is lost. You can restore what you have lost from backup or by reinstalling individual rpms. If what is missing is a very big mess then save as much of you data as you can and reinstall.

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

Steve Stites
 
Old 11-30-2003, 08:38 PM   #3
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
Thank you jailbait

Thanks for the help, I was able to do just your suggestion. Do you have any clue as to what demons could have gotten inside of my computer and ruffed up my hardrive? Thanks again
 
Old 11-30-2003, 09:10 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
"Do you have any clue as to what demons could have gotten inside of my computer and ruffed up my hardrive?"

Linux uses a disk cache to speed up access to your hard drives. When you power off abruptly then there are buffers in the cache that do not get written out to the hard drive and so the data on the hard drive is mangled. Normal the cache is all written out during normal shutdown.

There is some redundency in the information on the hard drive so fsck figures out the mess as best it can and puts everything back in place. fsck is remarkable successful. But fsck may find files or file fragments which it cannot figure out where they belong. It will put these files in a directory called lost+found. There is one lost+found on each of your partitions. You should look in all of your lost+found directories and see if fsck left any orphans there.

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

Steve Stites
 
Old 11-30-2003, 09:27 PM   #5
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
entire hardrive is in lost+found

After performing a fsck on my root drive, I tried booting. The kernel or whatever tries to mount the root partition was sucessful, however it needed an init= option to be given to the kernel. I tried /sbin/bash, this did not seem to work, however this is undiscovered territory for me. Anyhow, I then booted my system with a CD using the Gentoo boot install disk, which takes me to a command prompt contained on the CD. I then proceeded to mount my hardrive and have found that the only directory on the drive is the lost+found directory. Does this mean that fsck did not know what to do with anything on my hardrive? Is there anyway to recover the information? Thank you again for your help
 
Old 11-30-2003, 10:59 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
After reading your post I have the impression that you have /boot on a partition and that /boot is OK. You also have a root partition on /dev/hda3 and the only thing you can find in the root partition is lost+found.

When fsck examines a damaged partition if there is no lost+found directory then fsck will create one. Look at the creation date on lost+found to determine if lost+found was created when you installed Linux or if it was created by fsck. fsck cross checks your file sytem five different ways and tries to figure out what everything is and where it belongs. Things that fsck finds but does not know where they belong are given a number and placed in lost+found. If fsck put anything in lost+found it will be a file with a number for a name. You have to figure out what it is by examining its contents and either moving the numbered file to where it belongs or otherwise recreating that file.

If there are no files on the root partition, lost+found is empty, and lost+found was created by fsck then that means that fsck found a completely empty partition. The only way that I can see that happening from a power failure is if the partition table was clobbered.

Another possibility is that you may have your partition numbers mixed up and be working on recovering the swap partition instead of the root partition. Do you have a swap partition on /dev/hda2?

"Is there anyway to recover the information? "
If fsck cannot find your data then the data is lost.

But I would like to emphasize that a power failure causing a partition to completely disappear without leaving even a few fragments for fsck to find is very unlikely. So you should triple check /dev/hda3 (or wherever your root partition is) before you declare your system dead.

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

Steve Stites
 
Old 12-01-2003, 04:13 PM   #7
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
INIT: cannot execute "/sbin/rc"

The lost+found directory was created by fsck, the date is set to yesterday (the day I ran fsck)
I have now moved all the directories with items which I knew their proper location. Which are the important directories:
/sbin, /bin, /etc, /lib, /dev, /mnt, /usr, and /home
(still in the lost+found directory are many lost files, mostly executables, 3 directories and some others)
It seems the important files within the known directories are still intact. I don't believe that my problem involves any of the many executables in lost+found. My problem is that when I boot I get this message:

INIT: version 2.84 booting
INIT: cannot execute "/sbin/rc"
INIT: cannot execute "/sbin/rc"
INIT: Entering runlevel: 3
INIT: cannot execute "/sbin/rc"

Seeing this I think that the problem is with the /sbin/rc binary file, I check for it to see if it exists, it does. I then check to see if it is executable, and it is. Performing a 'ls -l /sbin/rc' reveals this:
-rwxr-xr-x 1 root root 16372 Nov 8 20:30 rc

To me this looks in order, however INIT seems to not be able to execute this program. I do not know why... I have renamed the numbered folder that contained the files native to sbin "sbin" and placed it in the root directory. I ran the rc file that was on the hardrive in the /sbin directory using my boot CD to get to a command prompt to make sure it is not curupt, and it ran(not doing anything worthwhile). I am totally lost on this one, any help would leave me with a smile as I slip into slumber this eve.
 
Old 12-01-2003, 08:29 PM   #8
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
"INIT: cannot execute "/sbin/rc""
Not only must rc have the correct permissions but so must every directory above it in the tree. Check to make sure that /sbin has permissions of 755.

Another, gloomier possibility is that /sbin/rc is only a fragment of the original file, which means that you will have to restore the file from someplace else.

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

Steve Stites
 
Old 12-01-2003, 09:57 PM   #9
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
Well, I'm out of ideas

I chmod 755'ed /sbin, / and made sure that rc had permissions 755. This gave me the same error, so I tried placing the simple rc file from my Gentoo CD in the /sbin directory, saving a backup copy of the old rc file. The same error occurs again. What does this sound like? It seems that /sbin/rc should be able to be executed since the disk is mounted and the file is intact and in the proper location. I am using reiserFS if that makes any difference. Any ideas? Or should I begin the journey installing Gentoo again? Thanks for your help
 
Old 12-01-2003, 10:57 PM   #10
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
" I am using reiserFS if that makes any difference."

Perhaps your rescue system and your desktop system disagree on what type of file system is mounted on /dev/hda3. Presumably your desktop system is getting the file type from /etc/fstab and presumably /etc/fstab says that /dev/hda3 is reiserfs.

When you mount /dev/hda3 from your rescue system are you specifying a file system type, i.e. are you using something like:
mkdir /checkitout
mount -t reiserfs /dev/hda3 /checkitout

or are you using something like:
mkdir /checkitout
mount /dev/hda3 /checkitout

If you are not specifying -t then you are mounting it as ext2. Whatever you are mounting it as is working.

Back when you first ran fsck against /dev/hda3 I did not think to have you run fsck.reiserfs. fsck is actually a front end for a whole lot of file system type dependent programs. The main fsck identifies the file system type from either the command name or by examining the file system. Suppose that the reiserfs file system was so corrupt that fsck did not recognize what it was and chose the default, ext2. Then it rebuilt an ext2 file system which it thought was completely scrambled because it was actually a reiserfs.

This is a whole lot of speculation on my part but it is easy to test. If you are mounting /dev/hda3 as ext2 on the rescue CD then try changing /etc/fstab to make /dev/hda3 ext2 and see what happens. This idea is somewhat farfetched but I am fast running out of reasonable guesses.

And yes, whenever you are completely stumped then use the rescue CD to back up whatever data you want to save and then reinstall Gentoo.
___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 12-01-2003 at 11:03 PM.
 
Old 12-03-2003, 06:14 PM   #11
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
Thumbs up Thank you for all of your help

Thanks jailbait, I have decided to just make life simple and reinstall, this is my backup computer anyways. Hope I have better luck next time there's a power interuption!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kernel Panic! could not mount root fs. Please help me out. TruongAn Linux - Software 1 10-20-2005 09:45 AM
kernel panic - cant mount root device. -Nw- neX Linux - Software 18 09-19-2004 03:56 AM
Kernel Panic, unable mount root fs ShadowLeo Debian 3 06-03-2004 02:03 PM
Unable to mount root fs -- Kernel panic tijs Linux - Newbie 6 02-07-2004 06:55 PM
Kernel panic - unable to mount root fs felecha Linux - General 3 06-17-2002 09:57 AM


All times are GMT -5. The time now is 09:04 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration