There are many reasons for building a custom kernel, and many things to
know about the process. This document doesn't address those issues, focusing
instead on a great benefit of using Debian GNU/Linux: the
kernel-package package, which handles the nitpicky details of
compiling a kernel and generates the new kernel image as a Debian package,
complete with modules. This package gets installed and maintained like any
other Debian package.
Most of the steps can be carried out as a normal, non-root user, although
some require the
Begin with a terminal, local or ssh. If you wish to use the X11 configuration option (make xconfig), start the terminal from a workstation running X11 (the machine doing the kernel build need not be running X, but you might need to install xbase-clients so it can talk to the X machine).
srcgroup (this lets you do most of the following tasks as yourself, rather than root):
# adduser [you] src
# apt-get install bzip2 fakeroot kernel-package kernel-source-2.x.y task-tclt
(login as [you])
$ cd /usr/src/
$ tar xvjf kernel-source-2.x.y.tar.bz2
$ ln -s kernel-source-2.x.y linux
$ cd linux
$ make-kpkg clean
$ fakeroot make-kpkg --revision=3:simon.1.0 kernel_image
When the compilation completes,
contain the new kernel image as a Debian package:
$ cd ..
# dpkg -i
Would you like to create a boot floppy now? [No] y
You already have a LILO configuration in /etc/lilo.conf
Install a boot block using the existing /etc/lilo.conf? [Yes] yes
Testing lilo.conf ...
Testing successful. Installing the partition boot sector...
/vmlinux is a symlink and the package updates it,
the existing lilo.conf is still just fine.)
Thanks to Rob Kidd of NOVALUG for his detailed comments on my
original outline, and especially his advice to be in the
src group and to use an epoch number.