next up previous contents index
Next: Modules Up: Basic System Administration Previous: Non-Debian Kernel Construction   Contents   Index

Debian Kernel Construction

The kernel for Debian comes prepackaged as a kernel-image-<ver>_<ver>.deb file.

Installing this with dpkg or dselect will deliver a pre-compiled kernel of that version to the system. In many cases this is perfectly adequate and results in a new functional kernel with little effort. When this fails to be adequate to the needs of the system there is a kernel-source package to help resolve the problems.

Installing the kernel-source package with either dpkg or dselect will result in the kernel source being unpacked into /usr/src/linux via a linux symlink similar to that used in the /usr/local/source example to link the linux directory to the correct kernel-source-<version>. There is also the file .linux-versions placed in /usr/src. This file contains a list of all the kernel source and kernel header packages that have been installed on the system. The reason the version number is embedded into the package name is to allow more than one version of kernel source (or header or image) to reside on the system at the same time.

If you have installed all of the tools needed to build a kernel, in addition to the kernel-source package the kernel-package package must also be installed. This package contains the scripts needed to build the kernel and make image, header, and source packages. Once this package is installed the following results can be obtained when make-kpkg is executed from the kernel-source directory:

If the intent is to construct a ``custom'' kernel, rather than just rebuild the delivered one, then make config (or one of its varieties) must be executed to re-configure the kernel to the new requirements. Once this has been done:

make-kpkg kernel-image

will construct a kernel-image package that can be installed using dselect or dpkg. This image package is only an advantage if LILO (or some other boot manager) is used. If loadlin is being used to boot the kernel, then it will be necessary to move the kernel image file by hand to its proper location.

Although the benefits may seem limited, use of the packaging system can make life much easier. With the kernel this is not as necessary as it is with other packages, so the decision is left to the System Administrator as to how this issue should be dealt with.


next up previous contents index
Next: Modules Up: Basic System Administration Previous: Non-Debian Kernel Construction   Contents   Index
Dale Scheetz