# kernel 3.0.3 blind shot with genkernel?

## agrypa1

Hi,

I bet my newly build 3.0.3 kernel will fail to start my machine if I do the following:

```

make allmodconfig

genkernel all

 
```

I did the above many times on different kernels and it would always fail with a message that the root device could not be found.

Wasn't genkernel created for the purpose to start any machine with minimal effort with its initramfs and a bare kernel?

what am I doing wrong?

My thinking is that even if the IDE/SATA is not compiled in the kernel it will nevertheless be there to see the drive and the root partition because

initramfs has it as a module, right? and it will be loaded automatically...

Is a separate knowledge needed on behalf of a user for a machine to start?

I guess not because all livedvds out there start without that knowledge...

where should I be looking for guidance?

thanks

Agryppa

----------

## depontius

I don't use the genkernel configurations - I manage my own.  So when I started moving to gentoo-sources-3.0.3 I began with my last working configuration and tweaked that for new or changed items.  My kernel booted just fine - I seldom have troubles with non-booting kernels, simply because I always start from a working configuration.

Lacking your own starting configuration, I'd suggest looking into "Pappy's Kernel Seeds", well represented here in the forums.

----------

## wrc1944

I assume you did so, but just in case, did you look at your grub.conf file and see if the stanza for the new kernel was correct?

Maybe all that's wrong is it needs a little edit (compare it with your working kernels).  

Also look in /lib/modules and /boot to see if you even have the new kernel and modules installed.

You can also use the .config file from your working kernel, and do it manually.  

Just copy it over to the new kernel's source directory (usually /usr/src/linux-whatever), and cd into that directory.  

Then edit the makefile at the top and name the extraversion anything you like, which will make the kernel and module directory have new names.

```
VERSION = 3

PATCHLEVEL = 0

SUBLEVEL = 0

EXTRAVERSION = -custom 
```

Then just do make bzImage, and if that goes well do make modules, and then make modules_install.

If all goes well, copy the kernel with 

```
cp arch/x86/boot/bzImage /boot/3.0.0-custom
```

  (or name it anything you like, but I always use whatever is at the end of "make modules_install" as it will insure the kernel can find the correct modules).

Then add a new stanza for the new kernel in grub.conf.  It might not be perfect for kernel 3.0.0, but it will likely boot and run OK. You can always recompile it later and tune it up some.

IMPORTANT!  Keep in mind this is for manually configuring kernels that don't need an initrd.img file to boot (just make sure all required stuff is already configured in the kernel itself.  There are a few things that can't compiled as modules, and MUST be compiled directly in the kernel in order to boot.

If you've never done it before, and have only used genkernel which IIRC creates an initrd.img, your .config file might not include some needed stuff.

You'll probably need to create an initrd.img for the new kernel.  As I recall, it's pretty easy- just one more command at the end of the kernel compiling process (Haven't done an initrd.img in 10 years, so can't recall offhand the exact command- think it's mkinitrd).  In any case, it's usually just for nice splash screens.  

On the other hand, take a look at this:  https://forums.gentoo.org/viewtopic-t-822186-start-0.html  For me, initrd isn't worth the trouble.

I keep it simple in grub.conf, and all I've needed for my manually compiled kernels is something like: 

```
title=[2.6.39-rc4

root (hd0,0)

kernel /boot/2.6.39-rc4-git1 root=/dev/sda3 
```

If I'm using KMS I'll add video=1280x1024-24@75 to the kernel line so I can read the boot-up output better, if I need to.

I agree with depontius- if all the above seems to much trouble, look into Pappy's seeds.

----------

## DirtyHairy

I agree with despontius and wrc1944: if you are building your kernel yourself (in gentoo you always do) for one specific machine and don't have any special requirements like an encrypted root, an initrd is not worth the trouble. Configure yourself a kernel which has everything needed for boot (disk controller and file systems) built-in, take some time to tweak the configuration, and you should be fine. Tweaking might take some time, but it is not half as subtle as many people seem to think, and once you are done, you can copy the config to any new kernel you will be compiling, do "make oldconfig" and then only adjust any new or modified settings (if you activate CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC, you can access the configuration of the running kernel directly under /proc/config). This way, updating a kernel is near-trivial most of the time, and you will only rarely get any bed surprises.

----------

## agrypa1

Thank you guys for your input. It did start (the 3.0.3 kernel) but not out of the box. 

Using Pappy's seeds allowed me to start faster than "make defconfig", that's for sure.

I am not happy, though. Of the many things that start "red" - meaning "fail" two things bother me.

my /home is an lvm volume. It gets booted but some strange messages come up. Of the top of my head:

LVM some link should've been created, it would not ovewright it".

Also iptables do not start - but that i know how to fix: probably some more settings should be turned on in the kernel.

Agryppa

----------

