16.5. Compiling the kernel and modules, installing modules

Small point to begin with: if you are recompiling a kernel with exactly the same version as the one already present on your system, the old modules must be deleted first. For example, if you are recompiling 2.4.10, you must delete the directory /lib/modules/2.4.10.

Compiling the kernel and modules, and then installing modules is done in a single line:

make dep bzImage modules modules_install

A little vocabulary: dep, bzImage, etc., as well as oldconfig and others which we used above, are called targets. If you specify several targets to make as shown above, they will be executed in their order of appearance. But if one target fails, make won't go any further[1].

Let us look at the different targets and see what they do:

Everything is now compiled and the modules are installed. But this is not enough: you also need to install the kernel in a place where your bootloader (be it LILO or grub) can find it. This is what the next section is about.

Notes

[1]

In this case, if it fails, it means that there is a bug in the kernel... If this is the case, please report it to us!


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2001.
http://www.mandrakelinux.com/