Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 3 September 2010

How to upgrade kernel on linux?

Posted on 18:53 by Unknown
Guys,

I referred the following steps :

============================
1. cd /usr/local/src
2. wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2 //replace the version that you want to install or check it at http://www.kernel.org/
3. tar -xjvf linux-2.6.35.4.tar.bz2 -C /usr/src
4. cd /usr/src/linux-2.6.35.4
5. make menuconfig //if gcc is not there just install it like : yum install gcc

Note : You can enable various option here. But make it sure that you have enabled kernel config option. Go to General option >> Kernel .config support(enter space) and exit. (save the changes). make oldconfig > Use when upgrading kernel, only asks if new options.

6. make
7. make modules
8. make modules_install

Note(Do the following) : # ln -s /usr/src/linux-2.6.35.4 /usr/src/linux
# ln -s /usr/src/linux-2.6.35.4 /usr/src/linux-2.6

9. make install

Note : It will install three files inside the /boot directory :

* System.map-2.6.35.4
* config-2.6.35.4
* vmlinuz-2.6.35.4 and vmlinuz will point here.

example(For my case):

----------
root@server [/usr/src/linux-2.6.35.4]# make install
sh /usr/src/linux-2.6.35.4/arch/x86/boot/install.sh 2.6.35.4
arch/x86/boot/bzImage \
System.map "/boot"
root@server [/usr/src/linux-2.6.35.4]#
root@server [/boot]# ll |grep 2.6.35.4
-rw------- 1 root root 2586318 Sep 3 18:00 initrd-2.6.35.4.img
lrwxrwxrwx 1 root root 25 Sep 3 18:00 System.map ->
/boot/System.map-2.6.35.4
-rw-r--r-- 1 root root 1360605 Sep 3 18:00 System.map-2.6.35.4
lrwxrwxrwx 1 root root 22 Sep 3 18:00 vmlinuz -> /boot/vmlinuz-2.6.35.4
-rw-r--r-- 1 root root 2653408 Sep 3 18:00 vmlinuz-2.6.35.4
root@server [/boot]

Make sure System.map and vmlinuz are pointing to latest kernel else point them like :

ln -s /boot/System.map-2.6.28 /boot/System.map
ln -s /boot/vmlinuz-2.6.35.4 /boot/vmlinuz
-----------

10. cd /boot
11. mkinitrd initrd.img-2.6.35.4 2.6.35.4 //You may not be needed this step. For me it has automatically created. This is creation of RAM driver.

Example for my case :

------------
root@server [/boot]# mkinitrd initrd-2.6.35.4.img 2.6.35.4
initrd-2.6.35.4.img already exists.
root@server [/boot]#
------------

12. vi /boot/grub/menu.lst or /etc/grub.conf : //For me the entries has automatically put in this file like :

------------
root@server [/usr/src/linux-2.6.35.4]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.35.4)
root (hd0,0)
kernel /vmlinuz-2.6.35.4 ro root=/dev/hda3
initrd /initrd-2.6.35.4.img
title CentOS (2.6.18-194.8.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.8.1.el5 ro root=/dev/hda3
initrd /initrd-2.6.18-194.8.1.el5.img
title CentOS (2.6.18-128.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/hda3
initrd /initrd-2.6.18-128.el5.img
root@server [/usr/src/linux-2.6.35.4]#
------------

13. reboot //enter this command at the konsole.
14. Check the server whether it comes online and check uname -r //If it does not come please contact DC to load the server from old kernel and sort the problem.
==============================

That's it. Try :)
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • unable connect to socket: No route to host (113)
    Guys, This error message usually comes when you try to access remote linux desktop using vncviewer. Please check the firewall in the linux s...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • what does it mean by "cman expected_votes="1" two_node="1" in cluster.conf ?
    For two node clusters ordinarily, the loss of quorum after one out of two nodes fails will prevent the remaining node from continuing (if bo...
  • How to make bridge over VLAN?
    How to make bridge over VLAN? Bridging over VLAN's : By constructing a bridge between a "normal" and a "VLAN" ethern...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • How to install pdo_mysql module with php on 64 bit linux machine?
    Guys, The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver ...
  • configure: error: C preprocessor "/lib/cpp" fails sanity check + Resolved
    Guys, I got that error messages when I was going to configure any software on the linux server. I was unable to execute easyapache or ./conf...
  • configure: error: could not find library containing RSA_new
    Guys, It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL opti...
  • Cannot find config.m4 + phpize +Resolved
    Guys, I got the same error messages and sorted out it. Here is the error that I got. ===== root@server [/home/cpeasyapache/src/php-5.2.9/ext...
  • How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
    Expectation : @subject Steps : 1. Create a bash script. 2. add line : exec > >(tee /var/log/my_logfile.txt) That's it. All output ...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ▼  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ►  October (20)
    • ▼  September (14)
      • How to integrate tomcat with apache on cpanel linu...
      • How install MRTG on linux?
      • make: *** [install-webconf] Error 1
      • How to install nagios on cpanel or linux server?
      • How to + extract + untar + unzip .tar.gz file on l...
      • How to repair mysql database or tables of the data...
      • FileList::init() failed: ls_dir_wrapper() failed: ...
      • How to install htop on linux machine?
      • Directory lookup for the file "C:\Program Files\Mi...
      • How to build kernel module + How to develop kernel...
      • How to upgrade kernel on linux?
      • How to manually recompile php on cpanel server?
      • configure: error: This c-client library is built w...
      • How to install suhosin on linux ?
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.