Click to See Complete Forum and Search --> : can't boot after recompling kernel
deleeuw
01-13-2005, 11:15 PM
Hey all,
Am using Redhat 9 with GRUB as bootloader, and proceded to reconfigure the kernel.
I did the following steps:
1) make mrproper
2) go into GNOME
3) make xconfig
4) make deps
5) make clean
6) make bzImage
7) make modules
8) make modules_install
9) make install
grub.conf as a result had the follwing lines added:
title Red Hat Linux (2.4.20-8custom)
root (hd0,3)
kernel /boot/vmlinuz-2.4.20-8custom ro root=LABEL=/1 hdc=ide-scsi
initrd /boot/initrd-2.4.20-8bigmem.img
[The previous, working kernel compilation also has root at (hd0,3)]
when I rebooted, I received the following messages:
VFS: Cannot open root device "Label=/hda" or 00:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount roof fs on 00:00
So...what did I do wrong??
Thx
deathadder
01-14-2005, 07:21 AM
I don't use grub so I've got no idea if that config is right, however did you compile support for your / filesystem into the kernel or leave it as a module? If its a module, compile it in.
davisfactor
01-14-2005, 02:43 PM
Don't forget to compile in your IDE controller drivers also. The kernel defaults with them as modules.
Also, a nifty trick is to look at the output of lspci to know what IDE controllers to choose.
bwkaz
01-14-2005, 07:49 PM
Originally posted by deleeuw
kernel /boot/vmlinuz-2.4.20-8custom ro root=LABEL=/1 hdc=ide-scsi "root=LABEL=/1"? Do any of your filesystems have a label of /1? You can find out by running /sbin/e2label on each filesystem you have (but the FS has to be ext2 or ext3 for e2label to work).
If that's not right, then substitute whatever your root filesystem's device is (replace LABEL=/1 with (for example) /dev/hda4).
deleeuw
01-14-2005, 11:27 PM
Well...
I changed the "root" in the "kernel" line to read "root=/dev/hda1".
Now when I boot up, I get the following error:
"Kernel Panic: no init found. Try passing init= option to kernel"
BTW, the correct initrd image is in the /boot dir
Thx
bwkaz
01-15-2005, 10:24 AM
What happened right before that panic?
Are you sure hda1 is your root partition?
deleeuw
01-15-2005, 05:05 PM
Thanx all (esp. bwkaz)! I changed the kernel and init root to the correct partition. It boots up--though I'm getting a lot fo 'fails"--no big deal, though.
One final question; what are those lines called that roll down the screen which tell you all the devices being enabled, as well as all the Startups, and how do you get a print out of that (I need to know what all those fails are)?
bwkaz
01-16-2005, 03:20 PM
You set your distro up so that it doesn't clear the screen after booting. ;)
The stuff that prints out showing all the devices initializing is printed by the kernel, and is stored in the kernel log ring-buffer. The size of this buffer is something like 4K or 8K, so eventually the ring buffer will be full, and old messages will get overwritten.
To display the current ring buffer contents, use the dmesg command.
If your distro uses sysklogd to handle logging, klogd is the program that listens to this ring buffer, and sends anything that gets put into it out to syslogd. syslogd then writes the messages to a logfile somewhere, depending on its configuration. My config puts kernel messages in /var/log/kern.log, and yours should use the same /var/log directory, but the filename may be different.
If your distro doesn't use sysklogd, it's still probably set up similarly. One program probably listens to the ring buffer, and another program probably does the actual logging.
But everything that dmesg doesn't show (or isn't listed in your kern.log equivalent file) -- the stuff that your distro init scripts do -- is not usually logged anywhere (though some distros might). The only reliable way to get this information is to tell the system to refrain from clearing the screen before bringing up the login prompt -- and you obviously have to not be using a GUI login.
So first, temporarily disable GUI logins if that's what you use. Then, when you boot, if the screen is cleared before you get a "login: " prompt, you'll have to rename or remove /etc/issue and boot up again. If it still looks the same, then one of your distro's scripts is modifying /etc/issue at bootup, so you need to find that script and disable that part of it. I remember Mandrake ran a linux_logo program every boot to overwrite /etc/issue.net, and they did it in their rc.local bootscript. But that was Mandrake 7 or 8 or so, I'm not sure if it's still done that way.
deleeuw
01-16-2005, 03:35 PM
Thanx for the helpul info! I'll try that.
Thx
Megatron X
01-21-2005, 12:42 PM
I am having a problem after I compile kernel-source-2.6.8. After doing what deleeuw did in the beginning for some odd reason the initrd.img file does not appear in /boot. The vmlinuz file does appear, but not the other.
I'm running Debian (Testing) on my laptop with Gnome & grub as bootloader.
Can someone please help me?
Before anything this is my first time compiling a kernel.
Thanks.