You are not logged in. Login or Register for free.
Title only?
Strange sound and vision from here to the end of the world.
"We're fans first, journalists second."






  5 comments
  Email this

  


Posted on Friday, September 15th, 2006 22:53:55 GMT by: quietearth
Posted under: ubuntu kernel

Here's a very dirty how to to build a custom kernel for ubuntu. This does not cover propietary drivers such as nvidia or ati. If you are using any propietary video drivers, you will need to modify your xorg.conf, otherwise X will not work when you boot into the new kernel. More detailed instructions are available at the link on the bottom of this post.

# apt-get install ncurses-dev kernel-package linux-source build-essential
# cd /usr/src
# bzip2 -dc linux-source-2.6.15.tar.bz2 |tar xf -
# cd /usr/src/linux-2.6.15


Now lets get our running kernel version and copy over the appropriate config file.
# uname -r
# cp /boot/config-2.6.15-26-386 .config


Now let's configure it, run the following and then set and save your options.
# make menuconfig

Now lets use make-kpkg to compile the kernel and it will produce an installable .deb for us:
# make-kpkg clean
# make-kpkg --initrd --append-to-version=custom1 kernel_image kernel_headers


One problem I ran into while compiling the kernel source was errors in the prism54 wireless driver code. I had to completely remove support to get the kernel to compile.

Now after this is done compiling we can look in /usr/src and we have the following packages:
kernel-headers-2.6.15.7-ubuntu1custom1_10.00.Custom_i386.deb
kernel-image-2.6.15.7-ubuntu1custom1_10.00.Custom_i386.deb


And we can install with:
# dpkg -i kernel-image-2.6.15.7-ubuntu1custom1_10.00.Custom_i386.deb

After installation, your custom kernel will be at the bottom of the grub's list, so it will not be automatically booted. You will either need to move it to the top of the list in /boot/grub/menu.lst or manually stop autoboot in grub and specify booting your new custom kernel.

To remove the kernel, you will have to boot into another kernel otherwise you might destroy your system.
# dpkg -r kernel-image-2.6.15.7-ubuntu1custom1

A more detailed article is available at http://doc.gwos.org/index.php/Kernel_Compilation_Dapper .

Tested under dapper.

RSS Feed for comments

Comments

As far as i could see, all these options were build into the kernel on my Feisty.

Posted by: Hilden | December 19, 2007 02:15:27 pm | permalink

Every distro has their own little best practices for compiling a kernel so thanks for this. Are you sure the kernel package in kernel-source will be patched the same way as the shipped kernel?

Posted by: J | February 18, 2008 12:18:05 pm | permalink

user icon If you run dpkg -p [packagename] where packagename is linux-source[...] you will see it's the kernel source with ubuntu patches applied, so yes.

Posted by: quietearth | February 18, 2008 09:16:28 pm | permalink

Thanks for this page, works great for me. Simple, to the point. Traditional make, make_modules, make modules_install doesnt work anymore. :-( initrd is required now on 2.6 ? Eeeks!

http://www.unihacker.com

Posted by: Jim | June 19, 2008 02:44:08 pm | permalink

Great post! Straight forward & clear! I like it!

Thanks a lot!
ghantoos

Posted by: ghantoos | April 4, 2009 04:16:55 am | permalink

Post a comment

Name:
(default is Anonymous)
Contact:
(email or url, optional)
Comment:
(no html or bbcode)
Captcha:



Related articles
Posted on Tuesday, September 12th, 2006 3:13:27 GMT by: quietearth |   8 comments

Posted on Monday, September 25th, 2006 19:34:12 GMT by: quietearth |   7 comments

Posted on Tuesday, September 26th, 2006 23:04:05 GMT by: quietearth |   3 comments

Posted on Wednesday, September 27th, 2006 18:22:24 GMT by: quietearth |   13 comments

Posted on Thursday, September 28th, 2006 18:07:49 GMT by: quietearth |   7 comments




rss | subscribe via email | the team | contact us | mobile
© 2006-2009 Don Neumann (except where applicable)
We are looking for free hosting with a cut of sales, you'll get a link right here.
If you want news of your film posted, use our contact page and we'll check it out
Permission is granted to use material from this site if you provide a reference to us via a link and DO NOT HOTLINK.


GenreBanners.com Banner Exchange