Post Reply  Post Thread 
Kernel upgrade
Author Message
Nilesh
Super Moderator
******


Posts: 42
Group: Super Moderators
Joined: Jul 2007
Status: Offline
Reputation: 0
Thank 0
0 was given thank in 0 posts
Post: #1
Kernel upgrade

Kernel upgrade

Here I have considered current kernel version 2.6.9-22.ELsmp and upgrading to 2.6.15.4.
Note : If you are upgrading from 2.4 to 2.6 series you need to install module-init-tools first

Quote:
cd /usr/src
wget ftp://ftp.kernel.org/pub/linux/utils/ker...x.x.tar.gz
cd module-init-tools-3.x.x
./configure –-prefix=/usr
make
make install


Lets start with the kernel upgrade

Quote:
cd /usr/src/
wget http://www.kernel.org/pub/linux/kernel/v...5.4.tar.gz
tar -zvxf linux-2.6.15.4.tar.gz
cd linux-2.6.15.4

cp /boot/config-2.6.9-22.ELsmp /usr/src/linux-2.6.15.4/.config
make clean
make mrproper
make oldconfig


(Note that oldconfig will only work within the same major version of the kernel. You cannot, for example, use a 2.4.x .config with the 2.6.x kernel)

keep hitting enter and take the defaults until you get to the CPU type. Select your CPU. Also in the SMP section select SMP if you have multiple CPUs. Oh, and select "(No Forced Preemption (server))" under that section. Everything else, just hit enter to take the defaults.

Then to compile and install:

Quote:
make bzImage
make modules
make modules_install
make install

Then to configure your boot loader in case of disaster:

Quote:
nano /boot/grub/grub.conf


..make sure it looks like this with default=1 and the new kernel (2.6.15.4) on top. Here we are keeping the old kernel as default. To set new kernel as default make default=0

file looks something like this :

Quote:
-----------------------------------------------------------------------------------------
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.15.4)
root (hd0,0)
kernel /vmlinuz-2.6.15.4 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.15.4.img
title CentOS (2.6.9-22.0.2.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-22.0.2.EL ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.9-22.0.2.EL.img
title CentOS_ServerCD (2.6.9-22.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-22.EL ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.9-22.EL.img
-----------------------------------------------------------------------------------------

Then configure grub to boot to the new kernel one time. This way if it panicks or you can't get to the machine because the network service blows up, you can have the data center do a reboot and it will go back to the last kernel. If it does boot ok and everything looks good, edit grub.conf again and change it to "default=0" and it will boot the new kernel by default after that.

Quote:
grub
savedefault --default=0 --once
quit


Reboot..... fingers crossed ...Good Luck


~~~ Cool Buddy ~~~

ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

07-17-2007 01:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Apache 2 Installation & Upgrade Nilesh 0 274 07-15-2007 08:50 AM
Last Post: Nilesh

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: