8.7. Installing the Kernel

After the kernel is compiled, it must be installed so it can be booted. The kernel must be installed in the directory /boot. Do this with the following command:

INSTALL_PATH=/boot make install

Now the compiled modules need to be installed. Enter make modules_install to copy them to the correct target directories in /lib/modules/<version>. If the kernel version is the same, the old modules are overwritten. However, the original modules can be reinstalled together with the kernel from the CDs.


To avoid unexpected effects, make sure that modules whose functionalities may now have been directly compiled into the kernel are removed from /lib/modules/<version>. This is one of the reasons why inexperienced users are strongly discouraged from compiling the kernel.

To enable GRUB to boot the old kernel (now /boot/vmlinuz.old), add the label Linux.old as the boot image in the file /boot/grub/menu.lst. This procedure is described in detail in 7. Booting and Boot Managers. GRUB does not need to be reinstalled.

The file /boot/System.map contains kernel symbols required by the modules to ensure successful launching of kernel functions. This file depends on the current kernel. Therefore, once you have compiled and installed the kernel, copy /usr/src/linux/System.map to the directory /boot. This file is regenerated each time the kernel is compiled. If you get an error message like System.map does not match current kernel, most likely you forgot to copy System.map to /boot following the compilation of the kernel.