Please read the tag! This is not a guide or tutorial or a howto! This is just an example to give you an idea , this is just my procedure which changes everytime with a new kernel! So do not follow this blindly!

What I did was used my Debain Sid as Host and installed ubuntu Jaunty [9.04] using virtualbox-ose. Now time for fun! 😀

Downloaded the latest 2.6.30.4 kernel from http://kernel.org

Opened a terminal and extracted the kernel .bz2 file:

$ sudo tar -xvjf ~/Desktop/linux-2.6.30.4.tar.bz2 -C /usr/src

$ cd /usr/src/linux-2.6.30.4/

Now that we are in, there’s no getting out! 😉

So I typed in

$ sudo apt-get update && sudo apt-get install build-essential fakeroot libncurses5 makedumpfile gcc && sudo apt-get build-dep linux

Now wait a while lotsa commands in a single line whooo!

Done? Mkay, so let’s continue:

$ sudo make mrproper

$ sudo make menuconfig

Choose whatever you require, I tweak a lot but you probably don’t need to, just go through each options and see what you need or don’t need.

Then for the big one [woooh! This is gonna take a while! Took me an hour or so in virtualbox 😦 ]

$ sudo make

Click to enlarge

Click to enlarge

After the long wait is over:

$ sudo make modules

$ sudo make modules_install

Now install your new kernel! Mmmm..

$ sudo make install

sudo cp arch/i386/boot/bzImage /boot/bzImage-<version>
sudo cp System.map /boot/System.map-<version>
sudo ln -s /boot/System.map-<version> /boot/System.map

sudo mkinitramfs -o /boot/initrd-<version>.img <version> [mkinitrd is no more! mkinitramfs it is! ]

Now edit your menu.lst and include the new kernel path:

title           Ubuntu Custom
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.30.4 root=/dev/sda1 ro quiet splash
initrd          /boot/initrd.img-2.6.30.4

then run:
update-grub

And reboot and enjoy your new kernel! ;)
My custom kernel:

Custom Kernel with my name!

Custom Kernel with my name!

Advertisements