hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Hosting Security and Technology Tutorials : CentOS kernel update - [beginning at post #6]
Reply

Hosting Security and Technology Tutorials Tutorials related to server security or the like.
Forum Jump

CentOS kernel update - [beginning at post #6]

Reply Post New Thread In Hosting Security and Technology Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-21-2006, 10:40 AM
mouseketrips mouseketrips is offline
Newbie
 
Join Date: Mar 2005
Posts: 10

CentOS kernel update - [beginning at post #6]


I have CentOS 4 running on my server, and I have been having some load issues. I have two fairly large vbulletin forums on the server (between 3k - 5k), and according to vbulletin forums, the CentOS kernel I am currently using (2.6.9-22.0.2.EL) has a major problem with vbulletin, causing hugh loads, etc.

So, I naturally want to upgrade the kernel. I have YUM on a cron, and last night, here is what I received:
Quote:
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
yum noarch 2.4.2-2.centos4 update 383 k

Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 383 k
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction

Updated: yum.noarch 0:2.4.2-2.centos4
Complete!
Now, I understand that 2.4.2-2 is the most current version, and according to this, it should be updated. I rebooted everything, and had my server physically restarted, and when I check, I still have the same kernel on the server.

I obviously am missing a step, but after 3 hours of searching, I can't find it. I appreciate any help you can give me. Thanks!

Reply With Quote


Sponsored Links
  #2  
Old 02-21-2006, 10:45 AM
Servax Servax is offline
Aspiring Evangelist
 
Join Date: Mar 2005
Posts: 399
What kernel are you currently running, give us the output of 'uname -a'. If it is any of the following:

Quote:
2.6.9-22.0.2.ELsmp #1 SMP
2.6.9-22.0.2.EL #1
You already have the latest kernel upgrade available from CentOS. You can either downgrade your kernel or compile it manually.

Reply With Quote
  #3  
Old 02-21-2006, 10:55 AM
mouseketrips mouseketrips is offline
Newbie
 
Join Date: Mar 2005
Posts: 10
Here you go:

Quote:
Linux 2.6.9-22.0.2.EL #1 Tue Jan 17 06:51:40 CST 2006 i686 athlon i386 GNU/Linux
I asked vbulletin support, was told to upgrade to 2.6.15 or downgrade to 2.6.11. I would prefer to upgrade rather than downgrade. Maybe I am misunderstanding terms.

Oh, new server, so I think to downgrade I have to compile it manually as well.

Reply With Quote
Sponsored Links
  #4  
Old 02-21-2006, 11:16 AM
Steven Steven is online now
I like ice cream
 
Join Date: Mar 2003
Location: California USA
Posts: 11,788
Do not downgrade. You will need to hand compile it.

Reply With Quote
  #5  
Old 02-21-2006, 11:22 AM
mouseketrips mouseketrips is offline
Newbie
 
Join Date: Mar 2005
Posts: 10
Is there a guide or instructions somewhere on how to do that?

Reply With Quote
  #6  
Old 02-21-2006, 03:06 PM
dirtbag dirtbag is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 148
OK, Here's the revised edition. Updated to reflect the latest kernel at this time (2.6.16.1) and removed the "make mrproper" command since it was wiping out the old config and causing big issues. Also some info on "make menuconfig".


cd /usr/src/
http://www.kernel.org/pub/linux/kern....6.16.1.tar.gz
tar -zxf linux-2.6.16.1.tar.gz
cd linux-2.6.16.1

cp /boot/config-2.6.9-22.0.2.EL .config
make clean (only necessary if you compile more than once)
make oldconfig


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.

(this is the "quick and dirty" method. You can also run "make menuconfig" instead, go to the bottom of the menu, load your old config file, and then select everything in a menu individually if you wish. For most systems, the "make oldconfig" method works fine.)


Then to compile and install:

make bzImage
make modules
make modules_install
make install


Then to configure your boot loader in case of disaster:

nano /boot/grub/grub.conf

Code:
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.16.1)
    root (hd0,0)
    kernel /vmlinuz-2.6.16.1 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.16.1.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
..make sure it looks something like this with default=1 and the new kernel (2.6.16.1) on top. (Grub starts at 0, so "default=1" is still your old kernel. You change this later if it works out ok)




..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 default 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.

grub
savedefault --default=0 --once
quit

Reboot and see what happens. If it hangs, reboot again and you'll be back to your previous kernel.
Good luck.


Last edited by SoftWareRevue; 05-26-2006 at 12:04 AM. Reason: Replaced content with updated instructions in post #48
Reply With Quote
  #7  
Old 02-21-2006, 03:44 PM
dirtbag dirtbag is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 148
sorry,

cp /boot/config-2.6.9-22.0.2.EL /usr/src/linux-2.6.15.4/.config

should instead be:

cp /boot/config-2.6.9-22.0.2.EL .config


(spent too much time in windows today)


Last edited by dirtbag; 02-21-2006 at 03:48 PM.
Reply With Quote
  #8  
Old 02-21-2006, 03:51 PM
mouseketrips mouseketrips is offline
Newbie
 
Join Date: Mar 2005
Posts: 10
dirtbag, thanks, just what I was looking for. I took your advice and hired someone to do it this time, didn't want to take any chance. I am going to bookmark this so that I can do it myself next time.

Reply With Quote
  #9  
Old 02-22-2006, 10:45 PM
dirtbag dirtbag is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 148
You're welcome. Let us know what kernel you end up with and how it performs in comparison if you could so other CentOS and RHE admins can get more info on this issue.

Reply With Quote
  #10  
Old 02-24-2006, 07:18 AM
eva2000 eva2000 is offline
Premium Member
 
Join Date: Apr 2000
Location: Brisbane, Australia
Posts: 1,079
Quote:
Originally Posted by dirtbag
sorry,

cp /boot/config-2.6.9-22.0.2.EL /usr/src/linux-2.6.15.4/.config

should instead be:

cp /boot/config-2.6.9-22.0.2.EL .config


(spent too much time in windows today)
hi could you update the previous post with the correct line too

thanks

Reply With Quote
  #11  
Old 02-24-2006, 07:33 AM
GFuse|Kevin GFuse|Kevin is offline
Web Hosting Guru
 
Join Date: Mar 2004
Posts: 295
A mod would likely have to do that eva
Anyone who looks at compiling their own kernels etc sould look in depth enough to know that they sould replace the linux-2.6.15.4 with their kernel version.
Else they souldnt be compiling it yet to begin with.

Reply With Quote
  #12  
Old 02-24-2006, 01:49 PM
SoftWareRevue SoftWareRevue is offline
iNET Senior Community Advisor
 
Join Date: Jun 2001
Location: Kalamazoo
Posts: 31,333
Quote:
Originally Posted by eva2000
hi could you update the previous post with the correct line too

thanks
Post updated.

Reply With Quote
  #13  
Old 02-24-2006, 01:52 PM
dirtbag dirtbag is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 148
Quote:
Originally Posted by TDK-Kevin
A mod would likely have to do that eva
Anyone who looks at compiling their own kernels etc sould look in depth enough to know that they sould replace the linux-2.6.15.4 with their kernel version.
Else they souldnt be compiling it yet to begin with.

Yes, I should have mentioned that, thanks. And I couldn't fix the erroneous line because you can only edit your posts in the first 15 minutes and I didn't catch that until later Basically your /boot/config-2.6.9-22.0.2.EL (or whatever version you're running) file needs to be copied into your /usr/src/linux-2.6.15.4/ (or whatever version you're using) directory and renamed ".config"


Last edited by dirtbag; 02-24-2006 at 01:55 PM.
Reply With Quote
  #14  
Old 02-24-2006, 04:37 PM
Eser Eser is offline
Junior Guru Wannabe
 
Join Date: Jan 2006
Posts: 65
SSH in Commands : yum upgrade kernel



Reply With Quote
  #15  
Old 02-26-2006, 03:15 AM
dirtbag dirtbag is offline
WHT Addict
 
Join Date: Mar 2005
Posts: 148
Quote:
Originally Posted by Eser
SSH in Commands : yum upgrade kernel



That only gives you the stock kernel instead of compiling a new one. The current default CentOS kernels have iowait problems and need to be compiled from source.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Host Rackspace Adds FreeBSD 9, CentOS 6.3 Support to Cloud Servers Web Hosting News 2012-07-30 12:47:10
Web Host ServerPronto Donates Hosting Resources to CentOS Web Hosting News 2012-07-05 14:06:27
Web Hosting Software Firm CloudLinux Releases CloudLinux OS Version 6.1 Web Hosting News 2011-09-13 14:08:49
Linux Foundation Website Down After Security Breach Last Week Web Hosting News 2011-09-12 20:32:11
Web Host NetHosting Announces Support for CentOS 6 Web Hosting News 2011-07-05 20:15:20


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?