RPM Kernel Upgrade
This is a very simple guide meant for people unfamiliar with upgrading kernels on a linux system. It is fairly simple to follow and I have done this on many servers so if you take your time and read though it you should have no problem. I take no responsibility if something goes wrong on your server because of this! This guide is formated for a RHEL server but if you understand the concept it can be applied to any rpm kernel.
Updated August with new versions
The kernel versions are constantly changing so this guide may fall out of date from time to time. The important thing to remember is when you are doing the up2date –download simply look at the version that is downloaded. That is going to be the latest version and in turn the version you want to install and boot to. RHEL or CentOS 5 follow the same basic method.
If you are using CentOS the procedure is slightly different. The easiest way is to simple run:
yum update kernel-smp
or
yum update kernel
Once that is done the kernel will be installed. If you do a quick
cat /etc/grub.conf
you should see the latest version is listed first and the default=0 is set.
If you are using Redhat Enterprise, or RHEL the following part will be of interest to you. RHEL5 follows the same basic method.
*WARNING*
If the server does not come up you may have to change the append line to append=root=LABEL=/ but I would suggest trying to do the default way the first time.
—————————————————-
If you have a dual processor server or a P4 CPU that has hyperthreading technology and RHEL3.cd /var/spool/up2date
up2date –download –force kernel-smp
rpm -ihv kernel-smp-2.4.21-47.0.1.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-47.0.1.ELsmp
shutdown -r now
—————————————————-
If you have a single processor server and RHEL3:
cd /var/spool/up2date
up2date –download –force kernel
rpm -ihv kernel-2.4.21-47.0.1.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-47.0.1.EL
shutdown -r now
—————————————————-
If you have a dual processor server and RHEL4:cd /var/spool/up2date
up2date –download –force kernel-smp
rpm -ivh 2.6.9-55.0.2.ELsmp.i686.rpm
cat /etc/grub.conf
Just make sure that the new kernel is listed first and default=0 so that it will boot.
shutdown -r now
—————————————————-
—————————————————-
If you have a single processor server and RHEL4:cd /var/spool/up2date
up2date –download –force kernel
rpm -ivh 2.6.9-55.0.2.EL.i686.rpm.
cat /etc/grub.conf
Just make sure that the new kernel is listed first and default=0 so that it will boot.
shutdown -r now
—————————————————-
The lilo -R command will make it reboot only once to the new kernel. If for some reason just put in a reboot TT and it will automatically boot to the old kernel. If it comes back up fine then you can edit the /etc/lilo.conf and set “default=” the new kernel label.
As always be very careful upgrading your kernel as doing it improperly can cause serious harm. Make sure you have a good backup as I take no responsibility if something goes wrong…not that it should.