Tuesday, May 15, 2012

Compiling old Linux Kernel with configuration of current linux kernel

A couple of years back, I had this premonition of "linux kernel" being some kind of a taboo... Some completely cryptic term known only to a few erudite people.

Today as I write this post, I feel elated to share that I too belong to the erudite group!

So this is not something as tough to do as it sounds, but its pretty cool to try this out yourself.

The steps to do this are as follows:
1> Download the source code from the http://www.kernel.org/
2> untar the code
3> copy the untared folder to /usr/src

Now heres the twist. Unlike a newer version of the linux kernel, if we are planning to compile the older version, then there are parts of the new version can be used in order to compile with the older version (i.e. the working part of the older version can be used so that the new version doesnt give you hiccups with say the network driver or the touchpad...

4> copy the config-2.6.36.4 file from /boot to /usr/src/linux.x.x.xxx/.config file.

5> do make (in usr/src/linux-x.x.xxx folder)
6> do make modules_install
7> update-grub (optional).
8> reboot

tadaaa...
hopefully this should do the work...
now on reboot check for your linux version in the grub menu... check also for older versions of linux installed.
press enter after choosing the option.

Post here any of the doubts/ errors that you encountered. well try and figure out how they can be solved.

Let the compilation Begin!

1 comment:

  1. Ohh forgot to add the references...
    Most of this was refered from http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html

    The rest of it was told to me by a brilliant guy named Ankur Vijay.

    ReplyDelete