After the kernel is compiled, it must be installed so it can be booted.
If you use LILO, LILO must be updated as well. To prevent unpleasant surprises, it is recommended to keep the old kernel (e.g., as /boot/vmlinuz.old), so you can still boot it if the new kernel does not function as expected:
cp /boot/vmlinuz /boot/vmlinuz.old cp arch/i386/boot/bzImage /boot/vmlinuz lilo
The Makefile target make bzlilo performs all three of these steps.
Important | |
---|---|
If you use GRUB as the boot loader, it does not need to be reinstalled. Simply carry out the first two steps to copy the kernel to the right location in the system. |
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 will be overwritten. However, the original modules can be reinstalled together with the kernel from the CDs.
Tip | |
---|---|
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 or LILO to boot the old kernel (now /boot/vmlinuz.old), add an image entry with the label Linux.old in your /boot/grub/menu.lst or /etc/lilo.conf This procedure is described in detail in Chapter 7. Booting and Boot Managers. If you are using LILO as the boot loader, LILO must be reinstalled after modifications to /etc/lilo.conf with the command lilo. 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 recompiled. If you create your kernel using make bzlilo or make zlilo, this is done for you automatically. If you get an error message like System.map does not match current kernel, System.map probably has not been copied.