Easy Way How To Patch and Build Kernel In Ubuntu
February 29th, 2008 by it gossips | Comments | Filed in UncategorizedA few days ago, i try to install User Mode Linux(UML) in my ubuntu box. When i run the UML, it’s okay. But there is a message said that my kernel doesn’t support SKAS.
Then i ask my friend bout this problem. He told me to patch my host kernel with patch that called skas. This is what i’ve done.
Download the kernel. I download the kernel which version is the same as my kernel that i use right now. You can find that shitty kernel here.
Download the patch. Because I wanna patch it with skas, i downloaded the skas patch from here. (Note : the version of patch and the kernel must same).
Now it is a good idea if you copy the kernel and patch that you already download to /usr/src. But it’s doesn’t matter if you do this inside another directory as long as you have permission on that directory.
Before you take an action, your ubuntu machine must already have this package installed : kernel-package, libncurses5-dev, fakeroot, bzip2, build-essential, udev. If not, install it first. Use your nearly repository, and then like we always do…apt-get install!!!
root@pandhu:/usr/src$ tar -xzvf linux-2.6.22.14.tar.gz (this will extract this file)
root@pandhu:/usr/src$ mv linux-2.6.22.14 linux (this will rename the folder of just now extracted file)
root@pandhu:/usr/src$ cd linux (enter the directory)
root@pandhu:/usr/src/linux$ bzcat ../skas-2.6.22-v9-pre9.patch.bz2 | patch -p1 (patching process, if there is not any warning, this process is succes)
root@pandhu:/usr/src/linux$ make-menuconfig (Configure your kernel here. There already a help feature, so it will make your life easier. As alternative option you can copy your kernel configuration to this folder. It is located in /boot. I use this command: djomlow@pandhu:/usr/src/linux$ cp -vi /boot/config-`uname -r` .config, and then make-menuconfig, load this .config file and save).
root@pandhu:/usr/src/linux$ fakeroot make-kpkg –append-to-version=patched kernel_image (making the kernel image)
Go up one level(cd ..). Your kernel image is done. Now it’s time to install it.
root@pandhu:/usr/src$ dpkg -i (your kernel image that just now finished)
Wait…it’s not done yet! You need to create a ramdisk for your kernel now because without it, the kernel can not boot.
root@pandhu:/usr/src$ mkinitrd.yaird -o/boot/initrd.img-(version of the kernel image) (version of the kernel image)
Okay….now restart your computer. Then select your new kernel.
Subscribe Feed (RSS)





































