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:
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.
Thanks sundialsvcs, this info is really important when you have problems at booting. One comment, though:
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?
|All times are GMT -5. The time now is 10:32 AM.|