Compile the Kernel on Debian etch

Compiling the kernel from source on Debian is actually pretty simple thing to do.

This guide has been tested on standard etch installation but will probably work on other versions and debian-like operating systems. The system is easy to break if not done right, compile and install the kernel at your own risk!

Install required packages

apt-get install kernel-package libncurses5-dev fakeroot wget build-essential

Download Kernel sources

You can see a list of available kernels here: http://www.eu.kernel.org/pub/linux/kernel/v2.6/

cd /usr/src
wget http://www.eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.gz

Extract the kernel and create a symlink

tar zxvf linux-2.6.26.tar.gz
ln -s linux-2.6.26 linux
cd /usr/src/linux

Configure kernel

Copy the old config file and configure the kernel

make clean && make mrproper
cp /boot/config-`uname -r` ./.config
make menuconfig

In the menu do this to load the old configuration file

1. Load an Alternate Configuration File
2. Type .config if not already in the textbox
3. Ok
4. Do any changes to the kernel modules
5. Click Exit
6. Click Yes when asked if you want to save

Build the kernel

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

The build can take long time so be patient

Install the new kernel

Get a list of files in the /usr/src to find correct deb files

cd /usr/src
ls -l

Do the actual install with dpkg. You will always have to install the linux-image package but linux-headers are optional and are only available if already installed on your system.

dpkg -i linux-headers-2.6.26-custom_2.6.26-custom-10.00.Custom_i386.deb
dpkg -i linux-image-2.6.26-custom_2.6.26-custom-10.00.Custom_i386.deb

Reboot

reboot
  • Debian, Kernel on Debian, required, Configure kernel
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Installing Postfix with MySql backend and TLS

In this tutorial we’ll install a ready to use Postfix mail server with MySql backend for virtual...

Installing ionCube

ionCube protects software written using the PHP programming language from being viewed,...

Installing PowerDNS on etch/lenny

The PowerDNS Nameserver is a modern, advanced and high performance authoritative-only nameserver....

Installing Zenoss monitoring system

Zenoss is an award-winning open source IT monitoring product that effectively manages the...

Upgrade from etch to lenny

Debian has released a stable version of Debian 5.0 (lenny). If you’re running previous version of...