# genkernel sucks major ass

## merc

I hate it.  I absolutely detest it.  It doesn't work properly and leaves my system in an unstable mess.

First of all, it doesn't seem to actually pay attention to the choices I make.  For some reason, some unnecessary module wasn't building properly.  "Big deal" I thought, "I'll simply choose not to build that module"  Nope.   I deselect it, somehow it tries to build it anyhow.  I check and the files it save has that module enabled, so I manually edit the file, and shove it into place in the tiny second I have between the configuration and the build starting.  Why doesn't genkernel just let you configure instead of always going on the build step?  Who knows.

This time, I'm smart enough to remember that genkernel will overwrite my old kernel, so I back it up somewhere before starting... 

So when genkernel finishes without errors, I think it's safe to reboot and try out my new kernel.  So I do, and I get all kinds of crap on boot.  Somehow lots of required modules weren't built, including even loop device support -- which means I can't even use genkernel to fix the damage it caused!

At least when I make the kernel manually it seems to save things properly, let me carefully check the configuration before running, etc.

So if things like loop device support are essential for gentoo, why the hell aren't they built into the kernel rather than as modules?  Who knows.

I've been using Linux and building kernels for 10 years now, and I've never had this kind of trouble before.

Am I somehow doing something completely wrong, or is it seriously this broken?

----------

## taskara

did you put your initrd in your boot loader?

----------

## merc

I put the initrd that gentoo created in the bootloader, unfortunately it is half broken.  I get all kinds of errors from it when I boot.

----------

## taskara

bizaare.. I guess just build your own kernel.. I've never heard of these kind of problems with genkernel b4..

----------

## merc

Well I figured out what is causing a lot of my boot problems:

The initrd that gentoo created isn't unmounting devfs when it stops, which means that after that nothing else can mount it, which obviously f**ks up the system.

The culprit is the end of the /linuxrc in the initrd:

cd /newroot

pivot_root . tmp/.initrd

if test "${USE_DEVFS_NORMAL}" -eq "1" -a "${CDROOT}" -eq "0"

then

  mount -t proc /proc

  mount -t devfs /dev

  kill_devfsd

  umount /tmp/.initrd/proc

  umount /tmp/.initrd/dev

  umount /dev

  umount /proc

elif test "${CDROOT}" -eq "1"

  echo "STEP 6a: clean up mounts"

  sleep 1

  umount /tmp/.initrd/dev > /dev/null 2>&1

  sleep 1

  umount /tmp/.initrd/proc > /dev/null 2>&1

  sleep 1

fi

exec /bin/init

The trouble is, after the pivot_root, there is no 'test' anymore, so both those conditionals fail, and devfs is never unmounted!!

Based on the comments in the /linuxrc, the person writing it doesn't have any clue why he/she is doing what he/she is doing either.  Greaaat....

----------

## merc

I haven't yet figured out how to fix the initrd, but as a temporary hack, I just do a "killall -HUP devfsd" in /sbin/rc right before it tries to start devfsd.

I'm still pretty annoyed with this error though.

I am also unable to use genkernel to compile my kernel.  Somehow, the modules that i'm compiling don't show up in /lib/modules.  The only way to get them there is to compile the kernel manually.

----------

## merc

In case anybody is interested, here's an excerpt from the genkernel.log file showing why modules aren't being installed:

make -C acpi modules_install

make[2]: Entering directory `/usr/src/linux-2.4.22-gentoo-r2/drivers/acpi'

mkdir -p /lib/modules/2.4.22-gentoo-r2/kernel/drivers/acpi/

cp ac.o asus_acpi.o battery.o button.o fan.o processor.o thermal.o toshiba_acpi.o

 /lib/modules/2.4.22-gentoo-r2/kernel/drivers/acpi/

cp: `/lib/modules/2.4.22-gentoo-r2/kernel/drivers/acpi/': specified destination d

irectory does not exist

Try `cp --help' for more information.

make[2]: *** [_modinst__] Error 1

make[2]: Leaving directory `/usr/src/linux-2.4.22-gentoo-r2/drivers/acpi'

make[1]: *** [_modinst_acpi] Error 2

make[1]: Leaving directory `/usr/src/linux-2.4.22-gentoo-r2/drivers'

make: *** [_modinst_drivers] Error 2

make: *** Waiting for unfinished jobs....

make: *** Waiting for unfinished jobs....

make: *** Waiting for unfinished jobs....

make: *** Waiting for unfinished jobs....

I have no idea why that directory doesn't exist immediately after the 'mkdir -p' command, but evidently it's failing.

----------

## snakattak3

You should file bug reports so other users won't have to go through this. Also, just build your own kernel with make menuconfig or make xconfig, it sounds like you know what you are doing, and its my understanding that genkernel is mainly for people who don't know how to compile their kernel.

----------

## merc

If it's supposed to be for people who don't know how to compile their kernel, then it should work.  I have enough experience that I was able to recover from the mess it made of my system, but it wasted hours of my time.

And it's not the kernel that's the difficult part, it's the initrd.  I thought it would be a better idea to let genkernel handle it, since gentoo seems to have specific requirements.

----------

## Jon Beilin

the guide here worked fine, however i did do some beta testing for genkernel and it also worked fine for me... guess i'm lucky.

I, for one, don't see anything wrong with using genkernel with a manual menuconfig even though i can do it by myself. i find that it's very handy having it rename my files nicely for me. (wait was that 2.6.2_rc2-mm1 or 2 ah crap)

----------

## UltraN00B

which version of genkernel were you having issues with?

maybe you should "genkernel all --config" but it all depends on which version...

genkernel 1.8 was smooth clean and sweet... genekernel 3.01 beta6 was totally twisted sick and evil...

----------

## pfaut

I just did an 'emerge -u world' last week on my laptop.  I've been having trouble getting the latest kernel to build and boot with genkernel.  I'm having similar problems as the person who started this thread.  genkernel version is 3.0.1_beta9.  It seems many of my drivers are missing after the build completes.  It also has trouble building dietlibc.

I ended up getting the kernel (gs-sources 2.4.25_pre6) to boot properly by building manually without initrd support.  I found I can't use it anyway because the ACPI driver appears to have been broken sometime after 2.4.23_pre8 (can't find my battery's status so KDE keeps complaining my battery is dead even when it's fully charged) but that's another problem.

----------

## BobDylan

Excuse-me, I do not want to start a flame war but where's the need for a thing like genkernel in gentoo when you can just type make oldconfig / make bzImage modules modules_install ?

Genkernel is, for me, a kind of wasting time developers could spend on more interesting stuff.

----------

## trapperjohn

 *BobDylan wrote:*   

> Excuse-me, I do not want to start a flame war but where's the need for a thing like genkernel in gentoo when you can just type make oldconfig / make bzImage modules modules_install ?
> 
> Genkernel is, for me, a kind of wasting time developers could spend on more interesting stuff.

 

Because genkernel creates an initrd, which tries to autoload modules for your system. It is / should be easier for the beginner.

The problem is (in my eyes) that 

a) the new genkernel doesn't automount /boot .. I always forget it

b) the new genkernel hides errors .. I've had a lot of generic "gen_die()" errors - but genkernel.log says it is module xyz which doesn't compile. Why doesn't genkernel tell the user, which part did not compile correctly?

c) since 2.6 the default config does not work (for me, at least). The default config does not have devfs auto-mounted on boot, so booting fails. I think, the default config should be as generic as can be - and should NEVER fail.

----------

## BobDylan

OK. Thanks for the info.

I didn't know about that.

----------

