Next Previous Contents

5. Installing a kernel

5.1 Note on ftp.kernel.org

In section 2 above I mentioned you can download a new kernel from ftp://ftp.kernel.org/ However, this site is often too busy to get through and the maintainers of this site encourage you to download the kernel from a location near you. You can access a mirror site by going to ftp://ftp.<country code>.kernel.org/ (like ftp.ca.kernel.org).

5.2 Configuring the kernel

5.3 Updating LILO

5.4 Copying the new kernel source tree to $LFS

Copy the entire source tree of the new kernel to $LFS/usr/src. This can easily be accomplished by running cp -av <kernel directory> $LFS/usr/src

5.5 Updating symlinks

Often the /usr/local/include/linux directory is a symlink to /usr/src/linux and /usr/src/linux is often a symlink to /usr/src/<kernel version>. Make sure that /usr/src/linux now points to directory of the kernel source that you have unpacked before.

It's possible that on your system /usr/include/linux points to /usr/src/linux - this depends on your distribution.

Execute the following commands to create the proper symlinks on the LFS system.

Please note that if you need to compile software that's going to be used on your normal Linux system and it needs the kernel headers, it might be a better idea to restore the symlinks back into their original position if you decide not to load the new kernel for the normal Linux system. It is perfectly safe to load the lfskernel for both the LFS system and the normal system.

5.6 Testing the system

Reboot your system and start your LFS system. Verify that the newly installed kernel doesn't perform out-of-the-ordinary actions (like crashing).


Next Previous Contents