LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-28-2006, 01:49 PM   #1
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,237

Rep: Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071Reputation: 1071
Red face Common problems explained: "kernel panic - not syncing", "unable to mount..."


So you're trying to start Linux for the first time and ... wham! You get messages like:
  • Unable to mount root device.
  • Kernel panic - not syncing.
What do I do now? Oh, how I love Windows ...

Here's the scoop ...

(1) The first part of the system that starts running is the "boot loader," usually grub. This is the program that loads Linux, and/or Windows if you so desire. (The "master boot record," or MBR, enables the computer to load grub.)

(2) The first thing that Grub needs to know is ... "where is the kernel?" It gets this from the /boot/grub/grub.conf file. The way that you specify the correct drive and partition in Grub is a little different from, like "(hd0,0)" what you use in ordinary Linux. The kernel will be in some file named "vmlinuz-..."

(3) Once Grub has loaded the kernel into memory, the first thing that the kernel needs to know is, "where is the root filesystem?" The root= parameter is passed to the kernel to provide this information. Notice that now you are talking "to Linux," and you identify devices "in Linux's terms," like "/dev/hda2".

(4) Given this information, Linux is going to try to mount the root filesystem ... prepare it for use. The most common mistake at this point is that you've specified the wrong device in step #3. Unfortunately, the message that results is rather nasty looking...

When Linux doesn't know how to proceed, as in this case, it says "kernel panic" and it stops. But, even then, it tries to go down gracefully. It tries to write anything to disk that hasn't been written out (an operation called "syncing", for some darn-fool reason), and if it succeeds in doing so it will say "not syncing." What's totally misleading about this message combination is that it implies, incorrectly, that the reason for the panic is "not syncing," when actually the reason for the panic will be found in the preceding few lines.

You might see the message, "tried to kill 'init'." That really means that a program called init died... which it is not allowed to ever do. init is a very special program in Linux... the first program created when the machine starts.

So, basically, when you get these messages on startup ... the situation is really a lot more dreadful looking than it actually is. You have probably just made a "tpyo" when entering the information in grub.conf.

(Another common place to make a typo is in /etc/fstab, which tells Linux where all the other drives are.)

So what do you do? If you're doing a first-time install you can just start over. Otherwise, you need to boot a separate CD-ROM, which will give you a stand-alone Linux installation from which you can edit the offending files.
 
Old 03-01-2006, 10:25 AM   #2
victorh
Member
 
Registered: Jul 2005
Location: La Paz, Bolivia
Distribution: Debian Sarge - Sid, Slackware, Gentoo, openSuse, Fedora, Ubuntu, Mandriva
Posts: 241

Rep: Reputation: 30
Thanks sundialsvcs, this info is really important when you have problems at booting. One comment, though:

Quote:
Originally Posted by sundialsvcs
The first thing that Grub needs to know is ... "where is the kernel?" It gets this from the /boot/grub/grub.conf file.
I think you want to refer to the file /boot/grub/menu.lst. At least this is the most common name in the distros I use.

On the other hand, the file grub.conf exists and it's located in /etc/grub.conf. The purpose of this file is to point out the filesystem and the directory where GRUB was installed and therefore where it can find the Stage2 files of GRUB. What do you think?
 
Old 03-01-2006, 12:17 PM   #3
drakebasher
Member
 
Registered: Aug 2004
Location: Proprio Qui
Distribution: Debian
Posts: 85

Rep: Reputation: 16
Quote:
Originally Posted by victorh
I think you want to refer to the file /boot/grub/menu.lst. At least this is the most common name in the distros I use.

On the other hand, the file grub.conf exists and it's located in /etc/grub.conf. The purpose of this file is to point out the filesystem and the directory where GRUB was installed and therefore where it can find the Stage2 files of GRUB. What do you think?
It does depend on distro. I think on some, menu.lst is a symlink to grub.conf, so it's the same. In Fedora,Debian and Gentoo, I've never paid attention to any menu.lst, I just go to grub.conf. The purpose of grub.conf is not to point to stage2: stage2 needs to load in order to display the menu, which of course is the bulk of grub.conf. Also, if you have a file /etc/grub.conf, it really needs to be a symlink to work at all. /etc/ is not a place that Grub looks to: I think Grub will search for stage2 in the root directory of the boot device, in /boot/, /grub/ and in /boot/grub/. grub.conf needs to be in the same directory as stage2. Keep in mind that until you make a menu selection, the directory /etc/ could be anywhere.
 
  


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
Explained: "kernel panic - not syncing - attempted to kill init" sundialsvcs Linux - Software 36 04-24-2010 08:58 AM
Possible solution to common "unable to mount root fs" kernel panic while installing pergesu Linux - Software 2 12-26-2005 03:11 PM
"Kernel panic - not syncing: No init found." rwhite7890 Linux - General 6 06-26-2005 05:13 AM
2.6.9-1.11_FC2 - "Kernel panic - not syncing" michaelsr Fedora 9 04-01-2005 07:32 PM
error:"kernel panic: VFS: Unable to mount root fs":-( shyguy Linux - Newbie 1 07-23-2001 04:03 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration