Chapter 13. Compiling and Installing New Kernels

1. Upgrading a Kernel Using Binary Packages
2. From The Kernel Sources
3. Unpacking Sources, Patching the Kernel (if Necessary)
4. Configuring The Kernel
5. Saving, Reusing your Kernel Configuration Files
6. Compiling Kernel and Modules, Installing the Beast
7. Installing the New Kernel Manually
7.1. Updating LILO
7.2. Updating Grub

Along with file system mounting and building from sources, compiling the kernel is undoubtedly the subject which causes the most problems for beginners. Compiling a new kernel is not generally necessary, since the kernel installed by Mandrakelinux contains support for a significant number of devices (in fact, more devices than you will ever need or even think of), along with a set of trusted patches and so on. But...

It may be that you want to do it, for no other reason than to see “what it does”. Apart from making your PC and your coffee machine work a bit harder than usual, not a lot. The reasons why you should want to compile your own kernel range from deactivating an option to rebuilding a brand new experimental kernel. Anyway, the aim of this chapter is to ensure that your coffee machine still works after compilation.

There are other valid reasons for recompiling the kernel. For example, you have read that the kernel you are using has a security bug, which has been fixed in a more recent version, or that a new kernel includes support for a device you need. Of course, in these cases, you do have the choice of waiting for binary upgrades, but updating the kernel sources and recompiling the new kernel yourself makes for a faster solution (at least on a fast machine).

Whatever you do, stock up with coffee.