LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub w/ Gentoo 2.6.3 - Kernel Panic (https://www.linuxquestions.org/questions/linux-newbie-8/grub-w-gentoo-2-6-3-kernel-panic-160670/)

smehi 03-21-2004 04:06 PM

Grub w/ Gentoo 2.6.3 - Kernel Panic
 
So I installed Gentoo yesterday, using their guide from www.gentoo.org.
I followed the instructions, and everything seems to be setup fine. I did my own kernel compile (as opposed to using genkernel), which I have had no problems doing before (on slackware 9.1, 2.6.3).

I ensured the things the manual told me to enable, were in fact enabled.
Anyway, here's my problem =)

I setup grub.conf for dual booting (win2000/gentoo).
I can boot into windows fine, but when I try to boot into Gentoo, it loads the kernel, goes into Framebuffer mode, and stops when it tried to find the root (/) partition.

Here is the error:

VFS: Cannot open root device "hda4" or hda4
Please append a correct "root=" boot option
kernel panic: VFS: Unable to mount rootfs on hda4

Now, I'm used to lilo, and I guess I could still be considerd fairly newbie, but here is my partition table, and grub.conf. What's wrong?
(remember, /boot mounts fine so it isnt a HD or controller issue?)

-----------------------------------------------------------------------------------------------
Partition Table from CFDISK:

hda1 boot Primary NTFS 48241
hda2 Primary Linux ext2 65.81 (dont ask me why 65 heh)
hda5 Logical Linux Swap 1019
hda4 Primary Linux ext3 30721

-----------------------------------------------------------------------------------------------

Grub.conf

default 0

timeout 5

splashimage=(hd0,1)/grub/splash.xpm.gz


title=Gentoo Linux 2.6.3
root (hd0,1)
kernel /kernel-2.6.3-gentoo-r1 root=/dev/hda4 vga=791


title=Windows 2000
root (hd0,0)
chainloader +1

-----------------------------------------------------------------------------------------------


I have also tried
title=Gentoo Linux 2.6.3
root (hd0,1)
kernel /boot/kernel-2.6.3-gentoo-r1 root=/dev/hda4 vga=791

(and slight variatons)
and renaming the kernel.


I have DISALED initrd support in the kernel build.
I DO have a System.map-2.6.3-gentoo-r1, and a config-2.6.3-gentoo-r1 in /boot

When setting up grub I did:

grub> root (hd0,1)
grub> setup (hd0)
grub> quit

IDE support IS enabled, because grub can decompress the kernel, and access /boot/
/dev/hda4 IS there
When using TAB completion in Grub, I can see that it knows that /boot, is there as well as my root partition (I can see whats in /).

Is this a simple typo? Have I made a mistake in compiling the kernel?

PLEASE help, it's pretty annoying to get stuck on such a (seemingly) minor error.

Thanks,
Trevor

ilikejam 03-21-2004 05:40 PM

Hi.

I'm not entirely sure how this works, but I couldn't boot my custom kernel (2.4.25) until I removed root=xxxx

My grub.conf looks like:
default=0
timeout=10
title GNU/Linux-2.4.25/ILikeJam
root (hd0,0)
kernel /bzImage hdc=ide-scsi hdd=ide-scsi

This worked with 2.6.2 as well.

I'd actually like to know how my kernel knows where / is, but I can't be bothered finding out at the moment.

Dave

Demonbane 03-21-2004 11:31 PM

Do you see your harddrives getting detected by the kernel when the debugging messages scrolls by?


Quote:

Hi.

I'm not entirely sure how this works, but I couldn't boot my custom kernel (2.4.25) until I removed root=xxxx

My grub.conf looks like:
default=0
timeout=10
title GNU/Linux-2.4.25/ILikeJam
root (hd0,0)
kernel /bzImage hdc=ide-scsi hdd=ide-scsi

This worked with 2.6.2 as well.

I'd actually like to know how my kernel knows where / is, but I can't be bothered finding out at the moment.

Dave
The kernel actually has a built-in mechanism for detecting the root device, and it's utilized when root= parameter isn't passed to the kernel. You can modify it using the rdev command, eg. "rdev <kernel image> <root device>"
I would say its automatically set to your current root device when you compile the kernel.

ilikejam 03-21-2004 11:39 PM

Cool.

Cheers Demonbane. That's been irritating me slightly for ages.

Dave


All times are GMT -5. The time now is 10:39 AM.