Linux PPP HOWTO | ||
---|---|---|
Prev | Chapter 10. Configuring your Linux Kernel | Next |
The following are brief instructions for obtaining and installing the Linux kernel sources. Full information can be obtained from The Linux Kernel HOWTO.
In order to install and compile the Linux kernel, you need to be logged in as root.
Change directory to the /usr/src directory cd /usr/src.
Check in /usr/src/linux to see if you already have the sources installed.
If you don't have the sources, get them from Linux kernel source directory or your nearest mirror. Select the appropriate directory- v2.0 if you are running a 2.0.x kernel, or v2.2 if you are running a 2.2.x kernel. If you are looking for earlier versions of the kernel (such as 1.2.X), these are kept in Old Linux kernel source directory.
Choose the appropriate kernel - usually the most recent one available is what you are looking for. Retrieve this and put the source tar file in /usr/src. Note: a 'tar' file is an archive - possibly compressed (as are the Linux kernel source tar files) containing many files in a number of directories. It is the Linux equivalent of a DOS multi-directory zip file.
If you already have the Linux sources installed but are upgrading to a new kernel, you must remove the old sources. Use the command rm -rf /usr/src/linux.
Now uncompress and extract the sources using the command tar xzf linux-X.X.XX.tar.gz where "X.X.XX" is the version of the kernel you downloaded.
Now, cd /usr/src/linux and read the README file. This contains an excellent explanation of how to go about configuring and compiling a new kernel. Read this file, (it's a good idea to print it out and have a copy handy whilst you are compiling until you have done this enough times to know your way around).