# Genkernel related mdev problem [possibly fixed]

## meranto

Since I switched from genkernel-3.3.11d to genkernel 3.4.x I can't build usable kernels anymore. When I build a kernel using 3.3.11d (which is now removed from portage  :Evil or Very Mad:  ) I get a perfectly fine working kernel with gensplash using this command:

```
genkernel --kernel-cc=/usr/lib/ccache/bin/gcc --gensplash=livecd-2006.1 --kernel-config=/usr/src/kernelconfig all

```

When I build the exact same sourcecode with the exact same .config with 3.4.x with the exact same command and the same line in grub.conf I get this during booting:

```
>> Activating mdev

>> Determining root device

!! Block device /dev/hdc2 is not a valid root device...

!! The root block device is unspecified or not deteceted.

Please specify a device to boot or :shell" for a shell:

boot() ::
```

To crosscheck, I also did the test with older and newer (testing) sources using the same commands and .config. On all occasions I get a working kernel using 3.3.11d and a broken one when using 3.4.x

Why is mdev activated with genkernel-3.4.x and udev using the older genkernel?

What can I do to fix this, since I'm not alone in this:

https://forums.gentoo.org/viewtopic-t-509753-highlight-mdev.html

https://forums.gentoo.org/viewtopic-t-503657-highlight-mdev.html

https://forums.gentoo.org/viewtopic-t-503009-highlight-mdev.html

https://forums.gentoo.org/viewtopic-t-493687-highlight-mdev.html

https://forums.gentoo.org/viewtopic-t-492022-highlight-mdev.html

----------

## theEnglishman

Is there any answer on how to fix this , or a viable work-around for a noob like me?

Compile the kernel manually?

----------

## meranto

I got it to work by removing the /etc/genkernel.conf and remerging udev and the latest stable genkernel, if this works for others please notify here.

----------

## RasT

 *meranto wrote:*   

> I got it to work by removing the /etc/genkernel.conf and remerging udev and the latest stable genkernel, if this works for others please notify here.

 

I ran into the same problem and found the solution in the configuration of genkernel. In /etc/genkernel.conf there is a section thst looked like

```

DEVFSD_VER="1.3.25-dietlibc-kernel25"

DEVFSD_SRCTAR="${GK_SHARE}/pkg/devfsd-${DEVFSD_VER}.tar.bz2"

DEVFSD_DIR="devfsd"

DEVFSD_BINCACHE="%%CACHE%%/devfsd-${DEVFSD_VER}-%%ARCH%%.bz2"

DEVFSD_CONF_BINCACHE="%%CACHE%%/devfsd-conf-${DIETLIBC_VER}-%%ARCH%%.bz2"

#UDEV_VER="VERSION_UDEV"

#UDEV_DIR="udev-${UDEV_VER}"

#UDEV_SRCTAR="${GK_SHARE}/pkg/udev-${UDEV_VER}.tar.bz2"

#UDEV_BINCACHE="%%CACHE%%/udev-${UDEV_VER}-%%ARCH%%.tar.bz2"

```

This caused genkernel to create initrd instead of initramfs, which caused the error, you mentioned. Removing the # in front of the UDEV-lines and putting them in front of the DEVFSD-lines fixed the problem. Now all I needet to do was adjust /boot/grub.conf and the system booted fine.

----------

## theEnglishman

 *RasT wrote:*   

> 
> 
>  Now all I needet to do was adjust /boot/grub.conf and the system booted fine.

 

Errm - what were the exact steps/adjustments you made to grub.conf to make this work?

Thanks in advance

----------

## RasT

 *theEnglishman wrote:*   

>  *RasT wrote:*   
> 
>  Now all I needet to do was adjust /boot/grub.conf and the system booted fine. 
> 
> Errm - what were the exact steps/adjustments you made to grub.conf to make this work?
> ...

 

Bofore I modified /etc/genkernel.conf it created /boot/initrd-genkernel-x86-2.6.18-gentoo-r2 instead if /boot/iniramfs-genkernel-x86-2.6.18-gentoo-r2, so I put that in /boot/grub/grub.conf. Now my grub.conf is looking like this:

```

# zuerst booten von

#

default 0

# warten

#

timeout 10

# nettes Bild

#

splashimage=(hd1,0)/grub/splash.xpm.gz

# Haupt-Kernel

title=Gentoo Linux 2.6.18-gentoo-r2

root (hd1,0)

kernel /boot/kernel-genkernel-x86-2.6.18-gentoo-r2 root=/dev/ram0 init=/linuxrc ramdisk=6924 real_root=/dev/hdb3 udev

initrd /boot/initramfs-genkernel-x86-2.6.18-gentoo-r2

# Backup

title=Gentoo Linux 2.6.17-gentoo-r8

root (hd1,0)

kernel (hd1,0)/kernel-genkernel-x86-2.6.17-gentoo-r8 root=/dev/ram0 und init=/linuxrc ramdisk=8192 real_root=/dev/hdb3 splash=verbose

initrd /boot/initramfs-genkernel-x86-2.6.17-gentoo-r8

# Backup 2

title=Gentoo Linux 2.6.17-gentoo-r7

root (hd1,0)

kernel (hd1,0)/kernel-genkernel-x86-2.6.17-gentoo-r7 root=/dev/ram0 und init=/linuxrc ramdisk=8192 real_root=/dev/hdb3

initrd /boot/initramfs-genkernel-x86-2.6.17-gentoo-r7

# Windoze

#

title=WinXP

rootnoverify (hd0,2)

makeactive

chainloader +1

```

Hope this helps.

----------

