1. Introduction

I used to compile kernels manually, and it involved a series of steps to be taken in order; kernel-package was written to take all the required steps (it has grown beyond that now, but essentially, that is what it does). This is especially important to novices: make-kpkg takes all the steps required to compile a kernel, and installation of kernels is a snap. --Manoj Srivastava, from the manual of kernel-package

If you have ever compiled a kernel before you will be amazed at just how much of a snap using Debian's kernel-package is. This tutorial was designed to enable you to take advantage of Debian's kernel packaging system. What it does is simplify the compiling and installing of a custom kernel and its modules by creating a debianized package of the image. Then it's just a matter of installing the kernel with dpkg.

Note

Compiling a kernel is not an insignificant thing. What you are about to attempt is usually only accomplished by experienced Debian users and administrators.

Warning

You can make your system unbootable if you're not careful. I highly recommend you read the entire document, start to finish, at least once, and then build the kernel. (And even then, you may want to get more information.)

I'll be using the 2.2.19 kernel source as the basis of this document. You don't have to use that version but I recommend it if this is your first time. Whatever kernel version you choose, if you're new to kernel compiling, try and get one that has a different version then the one you are currently using. Although I'll cover what you need to do if you're compiling the same version you currently have installed, it'll cut out a few steps and make your life easier if you choose a differnet version. I'll cover how to find out what version you're using in the next section.

Please remember that, inevitably, someone will use this document and screw up their system. Don't let that be you. If you don't understand something, get more information before proceeding. If you happen to be reading this and you see something you know is a mistake, please let me know at .