Gentoo Wiki




Genkernel is a script available with Gentoo Linux designed to allow users who are not previously used to compiling a kernel to generate a kernel that will autodetect their hardware in the same fashion as the Gentoo LiveCD's.

Some users may also be interested in using genkernel for hardware which requires initialization and a working kernel before it can be booted. Because genkernel also automatically compiles your kernel modules, thus allowing hardware which needs to be loaded with module parameters to be used.

Is Genkernel for me?

Genkernel is often a good choice to those who are unused to compiling their own kernel or those who are not certain about their hardware configurations, but is equally a good choice for those who are used to compiling their own kernels as it greatly simplifies the process.

Because genkernel is designed to use a generic configuration, it should be able to support all of your hardware - however, because all the drivers and modules have to be compiled as well, using the --menuconfig option to manually alter the default configuration (or a previously stored configuration) is advisable and often much faster provided you know what you need.

Getting genkernel

You can obtain genkernel by simply running emerge -av genkernel. If you want genkernel to automatically mount /boot, you should also set the USE flag "symlink". Don't forget to use the -k flag for emerge if you are using binary packages, i.e. GRP. Due to the GRP packages having an older version of genkernel, the flags are different. As a result, you should consult the Gentoo Handbook and genkernel --help if you are using GRP packages.

Supported platforms

As of genkernel 3.0.2; the following platforms should be supported: alpha, amd64, parisc, parisc64, ppc, ppc64, sparc, sparc64, and x86. If you believe that there is a bug with the support code, and not with genkernel, please file a bug at the Gentoo Bugzilla.

Genkernel usage

Genkernel is designed to work in three modes:

Most users will only want the "all" mode, which runs the "kernel" mode and the "initrd" mode for you.

Although genkernel is mainly a command to make your life easier when you need to compile a kernel, genkernel is also packed full of different flags which allow you to customize how your kernel is compiled or configured.

Genkernel Flags

Genkernel compiler flags

Genkernel supports the following flags which are passed to the relevant applications when your kernel is assembled:

Genkernel kernel flags

Genkernel supports the following flags, some of which have --no-option equivalents that influence kernel compilation:

Genkernel miscellaneous flags

Genkernel also supports some miscellaneous flags which do not fit into the other two categories:

Using Genkernel

Most people look down on genkernel for taking all the fun out of installing Gentoo and/or your kernel. In reality genkernel can be quite helpful. For example after updating to the most current sources

emerge gentoo-sources

and installing genkernel

emerge genkernel

You can run the following genkernel command.

genkernel --install --menuconfig all

This will tell genkernel to let you use menuconfig, so you can now configure your kernel yourself, but genkernel will do all of the compiling and installing for you (except for your menu.lst, you still have to edit that yourself)! Menuconfig of course is not your only option here, you can also use

but make sure that you have the proper dependencies for "x" and "g" config.

If you would like, you can of course let genkernel do it all for you, then you would simply issue

genkernel --install all

The downside to this is that you may have a more bloated, slower kernel, than if you configured it yourself. This option will almost guarantee you a working kernel however.


This was essentially copied from when I followed a link to "genkernel" which didn't exist - *gasp*. Anyway, I don't have time to finish it right now, so if anyone wants to, they can ,copy from "Genkernel Usage: Running Genkernel" down to the end. I'm planning on going back over this page and personalizing it to the wiki, as opposed to just being a page that could say "go here!"

Stagecrew 13:02, 21 Sep 2004 (GMT)
Retrieved from ""

Last modified: Fri, 29 Aug 2008 08:19:00 +0000 Hits: 35,806