14.4. 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.2.10, you must delete the directory /lib/modules/2.2.10.

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

$ make dep && make bzImage && make modules && make modules_install

If you are asking what this famous && is for, here is the explanation: a && b first runs a, and runs b if and only if a was completed successfully. You can imagine what the above command line does: if one of the commands fails, the subsequent commands will not be run. Another thing that failure means is that there is a bug in the kernel! If that happens, please report it to us.

One more thing: compiling a new kernel will not make the old one invalid! If compilation fails here, it does not mean that your system will no longer start. To prevent your system from booting, you have to do something really stupid -- which, honestly, will not happen if you follow the instructions in this chapter to the letter :-)


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. 2000.
http://www.linux-mandrake.com/