Debian Tutorials

Debian Tutorials


Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros.

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories


Compile the Kernel on Debian etch

adminadmin

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

Comments 1
  • c0m0
    Posted on

    c0m0 c0m0

    Author

    thanks for this very nice how-to