Gentoo Wiki



Starting Kernel Configuration

Go to your kernel source directory at /usr/src/linux. There are several frontends you can use:

Using menuconfig

The kernel options are ordered in a tree structure. You can move around with the arrow keys, enter levels by pressing the enter button and configure an kernel options by pressing the space bar. The box in front can be in three possible states:

Modern kernels can be compiled with most features as modules which are automatically loaded as needed. This allows you to add features you think you might want to try in the future without having to recompile the kernel to add them. If you use them, is up to you.

For more informations see this Wikipedia article.

Selecting Kernel Functions and Modules

Generally, the menuconfig defaults are suitable for most users. However, there are a few areas that require our special attention.

Gentoo Required Options

First off, enable Gentoo required options such as processor type and file system.

Linux Kernel Configuration: Gentoo required options
General setup --->
  [*] Prompt for development and/or incomplete code/drivers

Processor type and features --->
  Subarchitecture Type (Generic architecture) --->
  Processor family (Athlon/Duron/K7) --->

File systems --->
  Pseudo filesystems --->
    [*] /proc file system support
    [*] Virtual memory file system support (former shm fs)

Select one or more of the following filesystems. Your filesystem, the one on which gentoo is now running, MUST BE COMPILED INTO THE KERNEL, NOT as a module. To find out which filesystem you're running, open the file /etc/mtab in your favorite text editor. The line where the second element is / will be your root filesystem, and you can see what type the filesystem is there. For example:

File: /etc/mtab
/dev/hda8 / reiserfs rw,noatime 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0

The above would indicate that the main filesystem is of type ReiserFS.

If you're still unsure of your filesystem, just enable the most common types - this is perfectly safe to do, but will result in a larger kernel:

Linux Kernel Configuration: File systems
File systems --->
  <*> Reiserfs support
  <*> Ext3 journalling file system support
  <*> JFS filesystem support
  <*> Second extended fs support # this is the ext2 filesystem
  <*> XFS filesystem support

Configuring Chipset

Recall your chipsets you were directed to find earlier. You might not need them, as by default, the menuconfig program automatically enables the most common hardware chipsets. The IDE Chipset Controller Drivers are under:

Linux Kernel Configuration: IDE Chipset Controller Drivers
Device Drivers  --->
  ATA/ATAPI/MFM/RLL support  --->
    <*>         SiS5513 chipset support (example, check your chipset)

Configuring Audio

Next is Audio. You'll find drivers for the Advanced Linux Sound Architecture (the default; OSS is no longer used) at:

Linux Kernel Configuration: Audio: ALSA (Advanced Linux Sound Architecture)
Device Drivers  --->
  Sound  --->
    Advanced Linux Sound Architecture  --->
      Generic devices  --->
        PCI devices  ---> # most sound cards are in here
        ALSA USB devices  ---> # unless your sound card is external, ignore this section

You should only enable one of these. Compile your soundcard INTO the kernel, not as a module, so you won't have to worry about module loading. If you have an Audigy 1, 2, or 4 card, for example, select the `emu10k1` driver.

Configuring Networking

Next is your Ethernet Controller, which connects your computer to your cable or DSL modem. I'm assuming you have a 10/100 Card (almost everyone does). Gigabit cards are relatively common nowadays, find them under Ethernet (1000Mbit), except for the forcedeth driver for nVidia nForce cards, which is under the 10/100 section despite supporting gigabit on nForce4 chipsets. Choose your driver under:

Linux Kernel Configuration: Ethernet Controller
Device Drivers  --->
  Networking support  --->
    Ethernet (10 or 100Mbit)  --->
      EISA, VLB, PCI and on board controllers
      <*>   RealTek RTL-8139 PCI Fast Ethernet Adapter support

The Ethernet Driver can be modular or compiled into the kernel, but again, I recommend you compile it into the kernel for reasons of simplicity.

If your network uses PPP (dial-up), you'll have to enable the following:

Linux Kernel Configuration: PPP (dial-up)
Network device support --->
  <*> PPP (point-to-point protocol) support
  <*>   PPP support for async serial ports
  <*>   PPP support for sync tty ports

Configuring ACPI

If you are compiling your kernel for a laptop computer then you'll probably want to include ACPI to help improve battery life. These options can be compiled in or built as modules, either way they should function properly.

Linux Kernel Configuration: Power management options (ACPI, APM)
<*> Legacy Power Managment API
ACPI (Advanced Configuration and Power Interface) Support --->
  <*> ACPI Support
  <*>   Sleep States
  <*>   AC Adapter
  <*>   Battery
  <*>   Button
  <*>   Video
  <*>   Fan
  <*>   Processor
  <*>     Thermal Zone

Obviously if you have a laptop from any of the following brands you should enable support for them as well

  <*> ASUS/Medion Laptop Extras
  < > IBM Laptop Extras
  < > Toshiba Laptop Extras

When finished with that, you'll also want to enable APM support

APM (Advanced Power Management) BIOS Support --->
  <*> APM (Advanced Power Managment) BIOS Support

Configuring Other Hardware

If you have other things to configure, such as wireless, now is also the time to do it.

Completing Kernel Configuration

Unless you're into selecting advanced options, you are done configuring the kernel. Keep choosing <Exit> until it asks you if you want to save your new kernel configuration. Choose yes, of course!

Finally compile and install the new kernel.

Retrieved from ""

Last modified: Sat, 11 Oct 2008 09:49:00 +0000 Hits: 3,567