<HTML ><HEAD ><TITLE >Installing the Linux Kernel source</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="Linux PPP HOWTO" HREF="index.html"><LINK REL="UP" TITLE="Configuring your Linux Kernel" HREF="kernel-configuration.html"><LINK REL="PREVIOUS" TITLE="Configuring your Linux Kernel" HREF="kernel-configuration.html"><LINK REL="NEXT" TITLE="Knowing your hardware" HREF="x640.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" ><A HREF="http://www.linuxports.com/howto/ppp" TARGET="_top" >Linux PPP HOWTO</A ></TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="kernel-configuration.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 10. Configuring your Linux Kernel</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="x640.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN609">10.1. Installing the Linux Kernel source</H1 ><P >The following are brief instructions for obtaining and installing the Linux kernel sources. Full information can be obtained from <A HREF="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html" TARGET="_top" >The Linux Kernel HOWTO</A >.</P ><P >In order to install and compile the Linux kernel, you need to be logged in as root.</P ><P > <P ></P ><OL TYPE="1" ><LI ><P >Change directory to the <TT CLASS="LITERAL" >/usr/src</TT > directory <TT CLASS="LITERAL" >cd /usr/src</TT >.</P ></LI ><LI ><P >Check in <TT CLASS="LITERAL" >/usr/src/linux</TT > to see if you already have the sources installed.</P ></LI ><LI ><P >If you don't have the sources, get them from <A HREF="ftp://sunsite.unc.edu/pub/Linux/kernel/" TARGET="_top" >Linux kernel source directory</A > 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 <A HREF="ftp://sunsite.unc.edu/pub/Linux/kernel/old" TARGET="_top" >Old Linux kernel source directory</A >.</P ></LI ><LI ><P >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 <TT CLASS="LITERAL" >/usr/src</TT >. <EM >Note</EM >: 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. </P ></LI ><LI ><P >If you already have the Linux sources installed but are upgrading to a new kernel, you must remove the old sources. Use the command <TT CLASS="LITERAL" >rm -rf /usr/src/linux</TT >.</P ></LI ><LI ><P >Now uncompress and extract the sources using the command <TT CLASS="LITERAL" >tar xzf linux-X.X.XX.tar.gz</TT > where "X.X.XX" is the version of the kernel you downloaded.</P ></LI ><LI ><P >Now, <TT CLASS="LITERAL" >cd /usr/src/linux</TT > 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).</P ></LI ></OL > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="kernel-configuration.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="x640.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Configuring your Linux Kernel</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="kernel-configuration.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Knowing your hardware</TD ></TR ></TABLE ></DIV ></BODY ></HTML >