Menu Close

How To Build Linux Kernel 3.2.0-7.13 For Dual Core Systems On Ubuntu 11.10

Building a new kernel for a dual core system is a bit simpler then building one for an i7 pc. Some things you should know before you start.. building your own kernel isn’t easy and it takes a lot of practise and rebuilding. There is not much info to be found about configuring the kernel so you will have to find out how it works by trial and error. This guide is for 32bit systems.


Before you start you need to install some extra packages you need to build the kernel. To install the packages open a terminal window and copy+paste the following lines:

sudo apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge libncurses5 binutils-dev libelf-dev libdw-dev libnewt-dev libncurses5-dev

sudo apt-get --no-install-recommends install asciidoc xmlto


Now you need to make a folder to work in, i made this folder on my desktop and named it build. To create the folder copy+paste the following line:

mkdir -p ~/Desktop/builds


Change into the builds directory using the following command:

cd ~/Desktop/builds


Now download the kernel source:

wget -c https://launchpad.net/ubuntu/+archive/primary/+files/linux_3.2.0-7.13.tar.gz


Extract the content into the build folder:

tar -xzf linux_3.2.0-7.13.tar.gz


Now you need to create a soft link for the ubuntu-precise folder:

ln -s ubuntu-precise linux


Now cd into the ubuntu-precise folder using the soft link:

cd linux


Before creating the i7 flavour, you need to give execute permissions to the rules file and scripts folder in the debian folder:

chmod -Rv +x debian/rules
chmod -Rv +x debian/scripts/


Before editing the kernel config you need to clean and update the rules file inside the debian folder.

fakeroot debian/rules clean
fakeroot debian/rules updateconfigs

To edit the kernel config:

fakeroot debian/rules editconfigs

You only have to edit config: i386/config.flavour.generic. When done select exit and save the config file when prompted. If you disabled/removed something that you shouldn’t remove you will be notified about it and you will see an error message. If this happens you can reconfigure the kernel using the same command line.


Now it’s time to do a clean build. To start building copy+paste the following line:

fakeroot debian/rules clean


Copy+paste the following line to build the common header and source debs:

skipabi=true skipmodule=true fakeroot debian/rules binary-indep


Use the following line to build the newly created flavor:

time skipabi=true skipmodule=true no_dumpfile=yes fakeroot debian/rules binary-generic


Now wait while the kernel is being built, this can take some time and it depends on the speed of your system.

When the kernel is built cd back into the builds directory with the following command:

cd ..

And to install the kernel copy+paste the following line:

sudo dpkg -i linux-headers-3.2.0-7_3.2.0-7.13_all.deb linux-headers-3.2.0-7-generic_3.2.0-7.13_i386.deb linux-image-3.2.0-7-generic_3.2.0-7.13_i386.deb

When installed you may need to reconfigure grub and you can do that with the following command:

sudo update-grub

When grub is reconfigured reboot your system. To check which kernel you are using open a terminal window and copy+paste the following line:

uname -a

The output should like this:

34 total views, 2 views today

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of