1. List the available kernel source
packages by issuing the following command at a console window's command
line:
apt-cache search
kernel-source
2. Install the most up to date 2.4.xx
kernel source package by issuing the following command at a console
window's command line:
apt-get install
kernel-source-2.4.xx
3. Install the packages required to
compile a new kernel by issuing the following command at a console
window's command line:
apt-get install
kernel-package ncurses-dev fakeroot wget bzip2
4. Unpack the kernel source by issuing
the following commands at a console window's command line:
cd /usr/src
tar -xjf
kernel-source-2.4.xx.tar.bz2
5. Display the existing kernel's
release version by issuing the following command at a console window's
command line:
uname -r
Note: The existing kernel's release
version is 2.2.20 for this example, but substitute the output from this
command in the following steps.
6. Configure the new kernel by issuing the following commands at a
console window's command line:
cd
/usr/src/kernel-source-2.4.xx
make
menuconfig
IMPORTANT:
The configuration menu will be launched by these commands. The
configuration of the kernel can be changed here to suit your needs
(processor type and features, network device support, etc.), but to
keep this example simple I'm just using the existing kernel
configuration.
7. Use the existing kernel configuration as a starting point for the
configuration of the new kernel by following the steps below:
Select Load an Alternate
Configuration File from the configuration menu.
Enter /boot/config-2.2.20
as the configuration file to load.
Save the new kernel configuration.
8. Build the new kernel by issuing the
following commands at a console window's command line:
make dep
make-kpkg
clean
fakeroot
make-kpkg --revision=custom.1.0 kernel_image
Note: Give the default answer to any
questions. Creating a boot floppy is optional, but it is a
Very Good Idea. When asked
whether to use the existing
lilo.conf
file, answer
Yes.
If compilation stops with an error, run
make clean
then rerun the previous commands starting with
make menuconfig.
Change the kernel configuration where the error occurred. If no
errors occurred, the new kernel image will exist as a Debian package in
the following file:
/usr/src/kernel-image-2.4.xx_custom.1.0_i386.deb
9. Install the new kernel by issuing
the following commands at a console window's command line:
cd /usr/src
dpkg -i
kernel-image-2.4.xx_custom.1.0_i386.deb
lilo
10. Reboot into the new kernel by
issuing the following command at a console window's command line:
shutdown -r now
11. After rebooting, confirm that the
new kernel was installed by issuing the following command at a console
window's command line:
uname -a