# genkernel and grub.conf confusion with real_root parameter

## mattengstrom

I've been using gentoo for a couple of years now, and my current kernel is v 2.6.17-r8 that I compiled a while back.

I decided to upgrade, since it's been a while, and I used genkernel this time to try it out.  I followed the directions here:

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=7#doc_chap4

without any trouble.  But, when I select this new kernel in my grub boot menu, I get this error:

```
Determining root device

!!  Block device /dev/sda3 is not a valid root drive...

!!  The root block device is unspecified or not detected

```

Here is the WORKING menu selection from my grub.conf for my old 2.6.17 kernel:

```
title=Gentoo Linux 2.6.17-gentoo-r8

root (hd0,2)

kernel /boot/yukon root=/dev/sda3

```

And here is my genkernel entry that produces the error:

```
title=genkernel

root (hd0,2)

kernel /boot/kernel-genkernel-x86_64-2.6.21-gentoo-r4 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 udev

initrd /boot/initramfs-genkernel-x86_64-2.6.21-gentoo-r4

```

So how can /dev/sda3 work as the root location for my kernel, and not for genkernel?  What am I doing wrong?

----------

## nubla

I had this error too. My problem was that genkernel had no SATA support activated. So if you have a SATA-drive (i assume that cause of sda) then a

```

genkernel --menuconfig all

```

and activating SATA maybe helps you.

*EDIT*

I forgot something. You have to compile the SATA-support in. Compile it as a module won't work.

----------

## mattengstrom

Thanks, that did it.  But - it seems strange to me that I needed to do that.  Isn't the point of genkernel that you don't need to do basic hardware stuff like this?

----------

## nubla

Yep, i asked me the same question, but i have no answer for it so far  :Confused: 

----------

## didymos

You can't simply have SATA support as a module if the root drive is an SATA drive.  Where's the kernel supposed to load the module from? The SATA drive?  In order for that to work, you need an initrd/initramfs with the SATA modules in it and a separate /boot partition that isn't on an SATA drive.  It's easier to just build it in.  After all, it's not like you're suddenly not going to need SATA support.  You couldn't unload the module anyway as long as any SATA drive was mounted.

----------

## didymos

BTW, the point of genkernel is simply to build a kernel.  It also just happens to build initrd images by default. Unless you're doing the bootsplash thing, or have some real need for it, an initrd is rather pointless.  The general recommendation is actually to have the basic hardware support built-in, simply because it avoids initrds and you're always going to need those drivers to do anything anyway.  You should also build in the filesystem drivers,  typically at least ext2 and ext3 support, but absolutely whatever your root FS is.  Again, you can have these as modules, but why? They're always going to needed and loaded.

----------

## mattengstrom

genkernel seems to be aimed at people who don't want to "muck around" with their kernel config.  I guessing at this point that there enough people out there with SATA drives that genkernel should add SATA support either automatically or by default.

----------

