Home page of this blog

Friday, June 10, 2011

Custom kernel 2.6.39.1 ubuntu amd64 packages optimized for i3, i5 and i7


This package is created in Ubuntu 11.04 and should install fine in all versions of Ubuntu Linux 11.04 (as well 10.10) and Linux Mint 11 (as well Mint 10) (should as well in debian squeeze but not sure about dkms)

The build is for 64bit i3,i5 and i7 processors and will work with only with i3, i5, or i7 processors

The following are the configuration settings

  1. Kernel Timer Frequency set to 1000 HZ
  2. Processor is selected as CORE2
  3. Makefile and Makefile_32 modified to reflect march settings and mtune settings to corei7 (new arch of gcc 4.6)
  4. Scheduled autogroup enabled
  5. Transparent hugepage support enabled
  6. Copied kernel source to /usr/src and built from /usr/src folder to avoid symlink issues with the built packages (actually when built from /home/sankaran, the built binary will have symlinks to /home/sankaran which is ludicrous)
  7. Used enterprise linux kernel config as the base config and the kernel mostly seems to have no kernel debug prints because of it. Hence it runs considerably faster than stock Ubuntu kernel (well we can feel it) (I extracted the srpm to recreate the el6 config, the el6 srpm can be downloaded from http://ftp.redhat.com/redhat/linux/enterprise/6Workstation/en/os/SRPMS/kernel-2.6.32-131.0.15.el6.src.rpm)
    Also I enabled transparent hugepages in the kernel config which I added in the newly created config(which was not there in the el6 config by default)

How to install

To install

sudo dpkg -i linux-image-2.6.39.1-corei7_14.00_amd64.deb linux-headers-2.6.39.1-corei7_14.00_amd64.deb

followed by (these steps update-initramfs and update-grub are not required for mint10 or maverick, these were required when using Ubuntu Lucid)

sudo update-initramfs -c -k 2.6.39.1-corei7

and final step of

sudo update-grub

before rebooting and reboot into the newly installed kernel from grub

How to build yourself

follow my blog on how to build kernel in ten steps at


Kernel Source

I downloaded the kernel source tarball from kernel.org

Version: 2.6.39.1

MD5SUMS


a49241f9031cde9edcf11944834f42ad  linux-headers-2.6.39.1-corei7_14.00_amd64.deb
7a737e291d424c7a150e77288d9bece5  linux-image-2.6.39.1-corei7_14.00_amd64.deb
843da30b6058a34d25457cc559b9fba5  Readme.odt
2fd411e9be96b2ecc69f0fbc3d590b99  Readme.pdf
ddb62c9453000f5dd617d97a37f1f353  CONFIG-EL6-UBUNTU

SHA256SUMS


7582e0b6b54d705ac2250daa1ca145d719dddf3e1834c11d37d949098ed7d808  linux-headers-2.6.39.1-corei7_14.00_amd64.deb
6c4ec5432fc850e1d5365a00c896a35d1e11cdd296e8dee373d6b4814a113bdb  linux-image-2.6.39.1-corei7_14.00_amd64.deb
3d8174e91f95503d2c3b6ffc89c91f96cffad715ffcd481227153acf57c9ad44  Readme.odt
1035eb068a70b2c1c32ba279535841a553341ad8910685cb4d4effe9ec302bcb  Readme.pdf
dceeb9d0f561266d7dba314e40054662834ec8056683e54a09accad9c4d0beaa  CONFIG-EL6-UBUNTU

My Personal Experience
With this kernel built with corei7 optimized I see Ubuntu booting in 7 to 9 seconds. corei7 is a new march added from gcc 4.6





I installed gcc 4.6 from ubuntu toolchain test ppa. If you want gcc 4.6 in Ubuntu 11.04 follow this

sudo apt-add-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update


followed by upgrading gcc/g++/binutil packages from synaptic or update manager

With stock Ubuntu 11.04 it used to take 17 to 20 seconds. Also available RAM is more since I built with EL6 as base config.