Gentoo Wiki


Modules are a way to dynamically add functionality to a kernel for things you do not use all the time, such as Firewire support. Building a portion of kernel functionality into modules lowers the amount of memory you need for the kernel. However, accessing these functions is usually slower.

Below are some tasks you may need to complete if you are using kernel modules.


Autoloading modules at boot

If you compiled any kernel drivers as modules, you'll need to add module name to /etc/modules.autoload.d/kernel-2.6, for example:

echo "nvidia" >> /etc/modules.autoload.d/kernel-2.6

The driver name can be found in the menuconfig help file on the particular driver (pressing "SHIFT" + "/" on the driver, a key combo that otherwise produces a question mark).

Rebuild modules

Modules provided by other packages, such as nvidia or ipw2200, can be rebuilt by installing the module-rebuild package and then running: module-rebuild rebuild

Forgetting to build a module when you build a kernel

The simplest way of rebuilding a module you have forgotten to build is to enable its building in the kernel configuration, and to follow the steps for kernel installation mentioned above. However, it is possible to build and install a specific kernel module without needing to modify the kernel configuration by following the information in the next section.

Build a specific kernel module without updating configuration file

It is possible to build a kernel module, without updating the kernel configuration file by using the make tool with the appropriate switches. For example, supposing that the driver for the Yamaha PCI YMF724 soundcard was forgotten during the original build:

Yamaha YMF724/740/744/754 (SND_YMFPCI) [N/m/?] n # Oops, we forgot to include this module

We can build the forgotten module as follows: make SND_YMFPCI=m modules

The missing module can now be installed: make SND_YMFPCI=m modules_install

Retrieved from ""

Last modified: Mon, 11 Aug 2008 07:11:00 +0000 Hits: 3,795