|Lesson 9||Building and installing the kernel |
|Objective||Build and Install the Kernel and Modules. |
Build and Install the Kernel and Modules
With the kernel configured, you are ready to build it. Just type make bzImage. This command runs the kernel source code through the Linux C compiler
So far, you only built the kernel proper; everything you modularized during configuration needs to be built as well. Just type make modules to build the modules.
Installing the kernel and modules
Now that you have built the kernel and modules, you need to install them.
The following steps install the kernel and modules.
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-(version)
cp /usr/src/linux/System.map /boot/System.map-(version)
Steps one and two copy the kernel and system map (a file that holds kernel symbols for the new kernel) to the /boot partition, the Red Hat Linux kernel's standard location. Step three installs the modules.
You will need to replace (version) above with the major, minor, patch level, and extra version information of your kernel.
For example, if you were building a 2.2.16 kernel from Red Hat's 2.2.16-3 kernel source, with Red Hat's EXTRAVERSION value of3,
you would replace (version) above with 2.2.16-3r1.
View the SlideShow
below to see the build and installation for both the kernel and modules.
Building Installing Kernel Modules
The next lesson examines the final steps in compiling the kernel, involving post-installation considerations.