Before we begin, I would like to sincerely thank all of the people who provided me with valuable feedback regarding my last article "The Very Verbose Debian 3.0 Installation Walkthrough". I am grateful for your insights, corrections and comments. Also, I would like to apologize for the lateness of this article. My life has taken many twists and unforeseen paths during the last few months. I'm glad to finally feel back on track.
INTRODUCTION AND EXPECTATIONS
So why would you want to mess with the kernel? Well, all the people (who are a step beyond mere mortals and a lot smarter than I am) that work on the Linux kernel are constantly adding support for new hardware, new technologies, new bug fixes, and making myriad other improvements to the Linux kernel. By upgrading our kernel, we increase the abilities and support of our Linux system. Also, a computer has not been built, that I know of anyway, which utilizes all the hardware and other support available in the Linux Kernel. Therefore, why carry around support for a lot of things you don't need if you don't have to.
In this walkthrough, I will attempt to describe the process of updating and compiling a Linux kernel under Debian. I will try to explain the necessary steps in a way that will dispel all mystery and fear. My hope is that somebody new to Linux will be able to go through this comfortably and end up with an updated system when they are done.
As much as I want to make this a painless process, and one devoid of failure, one thing I cannot provide is a detailed description of your hardware or the things you want your system to support. Therefore, I am focusing on the three most requested topics, sound, journaling filesystems, and the ability to burn CDs. However, I feel I am giving enough detail that you shouldn't have any problems with the rest of the configuration process and enabling things like USB.
Knowing what hardware is in your system is absolutely necessary if you want to optimize your kernel specifically for the hardware you have. For example, to compile in support for your sound card, you must know what kind of sound card you have. Often times you can find this information in the manuals that came with your computer, from Windows Device Manager (if you run Windows), or from the manufacturer's web site if you bought your computer from a company such as Gateway, HP or Dell.
Please don't be completely discouraged if you don't know what hardware you have in your machine. While you may be out of luck as far as configuring the kernel for your motherboard's specific chipset, there are still many improvements you can make to your system, such as support for the EXT3 journaling file system, which will be worth while.
One more thing before we begin. Parts of what I will present in this walkthrough are applicable to all Linux distributions, while other parts are specific to Debian and distributions, such as Libranet and Xandros, which are derived from Debian. While I will not cover the non-Debian way of updating and compiling the kernel, the configuration part of the article is applicable to all versions of Linux (as long as they are running X that is).
Okay. Let's update our kernel.
DOWNLOADING A NEW KERNEL
If you read and followed "The Very Verbose Debian 3.0 Installation Walkthrough", you should now have the 2.2.20 kernel installed on your system. This kernel lacks support for things like USB and the EXT3 file system. If you have a very large drive and have ever had to sit through your next three birthdays waiting for Linux to check your partitions after an unclean shutdown, you will love journaling filesystems like EXT3 and definitely want to have support for them in your kernel.
In this walkthrough, we are going to upgrade our kernel to version 2.4.20 (which was the latest stable kernel when I started writing this. Please feel free to grab a later kernel you want to). In order to do so, we need to download the source for that kernel. To download the kernel source, you can use any of your favorite methods (wget, ncftp, etc.), however, in this tutorial I am going to download the 2.4.20 kernel via Mozilla since we should already have it installed and most people are familiar with downloading files through a web browser.
In order to download the latest kernel (2.4.20), launch Mozilla (or your favorite web browser) and go to The Linux Kernel Archives (http://www.kernel.org). On the main page you will see a box under the title, which has links to an HTTP server, an FTP server, and an RSYNC server. Below this box, you will see the line, "The latest stable version of the Linux kernel is 2.4.20" (or whatever it currently happens to be), with "2.4.20" highlighted as a link. For this tutorial, you do not want to download from this link since it is just a patch. However, this information is important since it will tell you what the latest kernel available is, so when you go to the correct download area, you will know which kernel to download; assuming you want the latest one.
To go to the download area where you can obtain the full updated kernel, click on the HTTP link in the gray box at the top of the page.
You should now be on a page titled, "The Public Linux Archive - (As if there were a private one you could get to)". There is another gray box at the top of this page. Please click the first link listed (http://www.kernel.org/pub/linux).
You should now be on page titled, "Index of /pub/linux". In the directory structure on this page, click on the "kernel" link.
Now you should be on a page titled, "Index of /pub/linux/kernel". In the directory structure shown on this page, click on the "v2.4/" link.
You should now be on a page titled, "Index of /pub/linux/kernel/v2.4". This is where we will find the kernel. There are oodles of files listed in the directory on this page. You want to make sure to download the file called "linux-2.4.20.tar.gz". You will notice that there is also a bz2 and a bz2.sign file. Bz2 is another compression format, but the utility to uncompress this file is not loaded on your Debian machine by default (although it wouldn't take much effort to install it using apt). The tar utility, however, is already installed on your Debian machine, so I have chosen to download the linux-2.4.20.tar.gz file for this walkthrough. Download the file and save it in your home directory (/home/