101 lines
5.5 KiB
HTML
101 lines
5.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE>4.7.1 Upgrading the kernel</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="4.7.1 Upgrading the kernel">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html4060 HREF="node181.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html4058 HREF="node179.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html4052 HREF="node179.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html4062 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html4063 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html4061 HREF="node181.html">4.7.2 Upgrading the libraries</A>
|
|
<B>Up:</B> <A NAME=tex2html4059 HREF="node179.html">4.7 Upgrading and Installing </A>
|
|
<B> Previous:</B> <A NAME=tex2html4053 HREF="node179.html">4.7 Upgrading and Installing </A>
|
|
<BR> <HR> <P>
|
|
<H2><A NAME=SECTION00671000000000000000>4.7.1 Upgrading the kernel</A></H2>
|
|
<P>
|
|
<A NAME=4743> </A>
|
|
Upgrading the kernel is simply a matter of getting the sources and
|
|
compiling them yourself. You must compile the kernel yourself in
|
|
order to enable or disable certain features, as well as to ensure
|
|
that the kernel will be optimized to run on your machine. The
|
|
process is quite painless.
|
|
<P>
|
|
<A NAME=4744> </A>
|
|
The kernel sources may be retrieved from any of the Linux FTP sites
|
|
(see Section <A HREF="node235.html#appftp">C</A> for a list). On <tt>sunsite.unc.edu</tt>,
|
|
for instance, the kernel sources are found in <tt>/pub/Linux/kernel</tt>.
|
|
Kernel versions are numbered using a version number and a patchlevel.
|
|
For example, kernel version 0.99 patchlevel 11 is usually written
|
|
as <tt>0.99.pl11</tt>, or just <tt>0.99.11</tt>.
|
|
<P>
|
|
The kernel sources are released as a gzipped tar file<A NAME=tex2html836 HREF="footnode.html#4846"><IMG ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif"></A>. For example,
|
|
the file containing the 0.99.pl11 kernel sources is
|
|
<tt>linux-0.99.11.tar.gz</tt>.
|
|
<P>
|
|
Unpack this tar file from the
|
|
directory <tt>/usr/src</tt>; it creates the directory
|
|
<tt>/usr/src/linux</tt> which contains the kernel sources. You should
|
|
delete or rename your existing <tt>/usr/src/linux</tt> before
|
|
unpacking the new version.
|
|
<P>
|
|
Once the sources are unpacked, you need to make sure that two
|
|
symbolic links in <tt>/usr/include</tt> are correct. To create these
|
|
links, use the commands
|
|
<P><TT> # <em>ln -sf /usr/src/linux/include/linux /usr/include/linux</em> <BR>
|
|
# <em>ln -sf /usr/src/linux/include/asm /usr/include/asm</em>
|
|
<P></TT>
|
|
Once you have created these links once, there is no reason to create
|
|
them again when you install the next version of the kernel sources.
|
|
(See Section <A HREF="node129.html#secmanagelinks">3.10</A> for more about symbolic links.)
|
|
<P>
|
|
<A NAME=4761> </A>
|
|
Note that in order to compile the kernel, you must have the <tt>gcc</tt>
|
|
and <tt>g++</tt> C and C++ compilers installed on your system.
|
|
You may need to have the most recent versions of these compilers:
|
|
see Section <A HREF="node182.html#secupgradegcc">4.7.3</A>, below,
|
|
for more information.
|
|
<P>
|
|
To compile the kernel, first <tt>cd</tt> to <tt>/usr/src/linux</tt>.
|
|
Run the command <tt>make config</tt>. This command will prompt you for
|
|
a number of configuration options, such as what filesystem types
|
|
you wish to include in the new kernel.
|
|
<P>
|
|
Next, edit <tt>/usr/src/linux/Makefile</tt>. Be sure that the
|
|
definition for <tt>ROOT_DEV</tt> is correct---it defines the
|
|
device used as the root filesystem at boot time. The usual
|
|
definition is
|
|
<P><TT> ROOT_DEV = CURRENT
|
|
<P></TT>
|
|
Unless you are changing your root filesystem device, there is no
|
|
reason to change this.
|
|
<P>
|
|
Next, run the command <tt>make dep</tt> to fix all of the
|
|
source dependencies. This is a very important step.
|
|
<P>
|
|
<A NAME=4773> </A>
|
|
Finally, you're ready to compile the kernel. The command
|
|
<tt>make Image</tt> will compile the kernel and leave the new kernel
|
|
image in the file <tt>/usr/src/linux/Image</tt>. Alternately, the
|
|
command <tt>make zImage</tt> will compile a compressed kernel image,
|
|
which uncompresses itself at boot time and uses less drive space.
|
|
<P>
|
|
Once you have the kernel compiled, you need to either copy it to a
|
|
boot floppy (with a command such as ``<tt>cp Image /dev/fd0</tt>'')
|
|
or install it using LILO to boot from your hard drive. See
|
|
Section <A HREF="node164.html#seclilo">4.2.2</A> for more information.
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html4060 HREF="node181.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html4058 HREF="node179.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html4052 HREF="node179.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html4062 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html4063 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html4061 HREF="node181.html">4.7.2 Upgrading the libraries</A>
|
|
<B>Up:</B> <A NAME=tex2html4059 HREF="node179.html">4.7 Upgrading and Installing </A>
|
|
<B> Previous:</B> <A NAME=tex2html4053 HREF="node179.html">4.7 Upgrading and Installing </A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|