Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Site Navigation
Linux Forums
Linux Articles
Product Showcase
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Free Publications


if you want to upgrade your kernel to 2.6.30

Note : The following steps were for successful compilation of linuxkernel 2.6.30 on the system running with Ubuntu-8.04 with Linux kernel
2.6.24 already present

Step 1:
You will need to install ncurses on your system if it is not already present. It provides a gui interface for the configuration of the
kernel.

The latest version can be downloaded from the link :

http://www.gnu.org/software/ncurses/

untar the package and then from the top source directory type the following commands :

$ ./configure without-cxx-binding
$ make
$ sudo make install


Step 2 :
Download the linux source code for kernel 2.6.30 from the below link :

http://www.kernel.org/pub/linux/kernel/v2.6/

also make sure you have gcc installed on you linux system .


Step 3 :

As root user copy the tar folder in the /usr/src directory and then untar it . For example if you have saved the .tar file on your desktop you can type the following commands current directory being Desktop :

$ sudo bash
~# cp linux-2.6.30.tar.gz /usr/src/
~# cd /usr/src
~# tar -xvvzf linux-2.6.30.tar.gz
~# cd linux-2.6.30


Step 4 :
from the top source directory of linux kernel folder type the following into terminal :
this will open an GUI , form which you can configue the kernel.
You can simply choose the default options by pressing esc two times :

~# make menuconfig


Step 5 :
Now after configure , to compile the kernel run the following command :

~# make

Step 6 :
for compilation for modules :

~# make modules

Step 7:
To install the kernel follow the following :

~# make modules_install
~# make install

Step 8:
Now the bzImage of the kernel is created which is the bunzipped compressed
image. Copy this image to boot directory by the following command :

~# cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.30



Step 9:
To provide the capability to load a RAM disk by the boot loader run the following command form the terminal . At boot time, the kernel unpacks the created archive into a RAM-based disk, which is then mounted and used at the initial root filesystem. Much of the kernel initialization and bootstrap code can then be moved into this disk and run in user mode. Tasks like finding the real root disk, boot-time networking setup, handling of initrd-style ramdisks, ACPI setup, etc. will be shifted out of the kernel in this way.

~# cd /boot
~# mkinitramfs -o initrd.img-2.6.30 2.6.30


Step 10 :

Every thing is done , now update your grub according to the new kernel :
~# update-grub

Step 11 :
To see the changes run the following command :
~# vim /boot/grub/menu.lst


Go down the screen you will find entries which look like following :





As you can see the Default and the recovery mode does not have the initrd entry, but the third one , the normal kernel entry has it for
kernel 2.6.30 , just copy paste the initrd entry from the third configuration and place it at the corrosponding place in the first kernel entry. After which the file will look like following :



for those who are new to vim editor , you can go to insert mode by pressing i and then simply copy paste.
To save the changes type the following after pressing esc :

~# :wq
You will now come back to the terminal.
That's it , now simply restart you system. The new kernel entries should show in the Grub menu when you start the system. Select the new kernel that you have installed and start enjoying .

Step 12:
To check wether you are really running the new kernel or not just run the following command from the terminal :
$ cat /proc/version
you will see the deatils of the kernel being run at present.
Like in my system it showed as :



thanks :

Samarth

http://samarthonweb.blogspot.com



 
Rate This Article: poor excellent
 
Comments about this article
So easy
writen by: SeanFalloy on 2009-09-01 18:31:25
I have been an avid linux user for 4 years now but i have always stayed away from the kerel .. I have never even look at the src. But now that i know that there is a curses front end for configuring .. I can experiment with it with ease

Thanks
RE: So easy written by SeanFalloy:
how would you compil without math co-processor?
writen by: Raymond Day on 2009-09-02 07:32:49
I have a very small PC that don't have a math co-processor and I herd you can compil Linux with out a math co-processor. But I just don't know who. This looks like it will help but I guess would have to add a command to compil it to have a emu math co-processor. If so how?

-Raymond Day
RE: how would you compil without math co-processor? written by Raymond Day:

Comment title: * please do not put your response text here