Archive

Archive for November, 2009

Create a custom linux-source-2.6.31 ubuntu 9.10 kernel

November 10th, 2009 2 comments

This is a quick and very dirty how to about building a custom kernel for ubuntu 9.10, it’s based on this how to.

First we make sure our system is up to date:

sudo apt-get update
sudo apt-get upgrade

Now we install all needed packages:

sudo apt-get install linux-source-2.6.31 kernel-package fakeroot kernel-wedge build-essential \
makedumpfile build-dep linux linux libncurses5 libncurses5-dev linux-headers-generic

We unpack the source files to a custom directory in our home directory:

mkdir ~/src
cd ~/src
tar xjvf /usr/src/linux-source-2.6.31.tar.bz2
cd linux-source-2.6.31

We want to reuse the existing config:

cp -vi /boot/config-`uname -r` .config

Now you can customize the kernel:

make menuconfig

Then we can build it:

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=custom-1 kernel-image kernel-headers

Ensure that frame buffer drivers are loaded:

echo vesafb | sudo tee -a /etc/initramfs-tools/modules
echo fbcon | sudo tee -a /etc/initramfs-tools/modules

Install the new packages:

dpkg -i linux-image-2.6.31.4custom-1_2.6.31.4custom-1-10.00.Custom_i386.deb
dpkg -i linux-headers-2.6.31.4custom-1_2.6.31.4custom-1-10.00.Custom_i386.deb
Categories: Web server Tags: