If you run Debian Squeeze, you could simply add backport repositories to your apt sources if you want to force an upgrade to a new kernel. At the time of writing this, Squeeze is using Linux-image-2.6.32, while Wheezy (testing) and Sid (unstable) are both using Linux-image-3.2. However, on kernel.org, the latest stable release is Linux-image-3.8.2.
One of the few packages that can have multiple versions installed simultaneously, in apt or otherwise on the system, is the Linux kernel. This can be useful, for instance, if you find that your new hardware isn’t supported properly by a slightly old kernel.
Since we’re going to be compiling our own kernel, we need a few things. These are:
Make sure those packages are installed (through apt or aptitude) before continuing. I’m guessing that most of those reading this post will already have the first installed, but perhaps not the second.
Downloading the Kernel Source
Visit kernel.org and decide on a kernel. There probably is a “latest stable release” version that is clearly highlighted, and that’s what I’d recommend. There are also some older, yet still maintained, “longterm” releases of the kernel that may provide updates that suite your needs.
Copy the link. In my case, I’m using the link to the “latest stable” 3.8.2.
Make yourself root, or otherwise superuser, for the rest of this process.
$ sudo -i
Download and unpack the kernel source.
$ cd /usr/src/ $ wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.2.tar.bz2 $ tar -jxf linux-3.8.2.tar.bz2 $ cd linux-3.8.2/
Configuring Old to New
Running the following command will check your current kernel configuration and prompt you when there is a new option available in your new kernel. Most of the time, accepting the preselected values is fine. Sometimes, this is a short process and sometimes it may take a while. If you already know that you want to accept the recommended values, holding the “enter” button down will work just fine and the script will exit back to your working directory.
$ make oldconfig
Build and Install the Kernel
Now, the standard build routine with a module install sandwiched inside.
$ make $ make modules_install $ make install