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.

----------------------------------------------------

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

update for new kernel 2.4.21-32

## Single processor
cd /var/spool/up2date
up2date --download --force kernel
rpm -ihv kernel-2.4.21-32.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-32.EL

## HT processor or MultiProcessor
cd /var/spool/up2date
up2date --download --force kernel-smp
rpm -ihv kernel-smp-2.4.21-32.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-32.ELsmp

the rest should be the same.

thanks

thanks, I did not even see that when I updated it earlier. Luckily this time you don't have to modify the bootloader :)

lol yet another kernel update.

## Single processor
cd /var/spool/up2date
up2date --nox --download --force kernel
rpm -ihv kernel-2.4.21-32.0.1.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-32.0.1.E

## HT processor or MultiProcessor
cd /var/spool/up2date
up2date --download --force kernel-smp
rpm -ihv kernel-smp-2.4.21-32.0.1.EL.i686.rpm
lilo -v -v
lilo -R [SEE lilo.conf or the label for this kernel]

the rest should be the same.

I got this message when run

I got this message when run command line
up2date --download --force kernel

Message:
"Fetching package list for channel: redhat-linux-i386-9...
########################################

Fetching Obsoletes list for channel: redhat-linux-i386-9...
########################################

The following packages you requested are already updated:
kernel"

Does it mean that i do not need to update kernel version anymore?

yes, at least not for now.

Yes that means that your kernel is already installed and updated.

At least to my point of view.

regards,

JLChafardet

kernel

You are running redhat 9 which is EOL an no longer supported. What that means is that your kernel cannot be upgraded because they stopped updates long ago. Your kernel is vulnerable to a few vulnerabilities and should be upgraded soon, for that matter the entire server is vulnerable to all sorts of nasty problems. I would highly suggest that you look at upgrading the server.

another kernel update (taroon update 6)

## Single processor
cd /var/spool/up2date
up2date --download --force kernel
rpm -ihv kernel-2.4.21-37.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-37.EL

## HT processor or MultiProcessor
cd /var/spool/up2date
up2date --download --force kernel-smp
rpm -ihv kernel-smp-2.4.21-37.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-37.ELsmp

the rest should be the same.

thanks

Updated :)

Error Message

I ran
cd /var/spool/up2date
up2date --download --force kernel

i got
Error Message:
Please run rhn_register (or up2date --register on Red Hat Enterprise Linux 3 or later)
as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
An error has occurred while processing your request. If this problem
persists please enter a bug report at bugzilla.redhat.com.
If you choose to submit the bug report, please be sure to include
details of what you were trying to do when this error occurred and
details on how to reproduce this problem

up2date

Your DC needs to re-register you with rhn to get it to work

rhn

i'm registerd to RHN, if i try to re run rhn_register it say to me i'm registered yet :)

7.3?

How do I upgrade the 7.3 kernel? The one I am running now is 2.4.20-28.7 Is this very outdated? I tried to run up2date but I get the command not found.

Thanks

rh 7.3

RH 7.3 has not been updated by up2date in...years.

I would highly suggest upgrading to something newer like centos 3.x or 4.x or better RHEL 3.x or 4.x

kernel upgrade

Upgrade stalling

Hello,

I followed your instructions to upgrade to the latest kernel, but it appears that the upgrade is stalling at:

Testing package set / solving RPM inter-dependencies...

Has anyone else experienced this? It has been at that state for well over an hour.

My system is running RHEL3 on a P4 2.8GHz HT w/ 1GB RAM.

Thanks,
Jason

stalling

I have not experienced that so far, I will update it if I see more. Your best friend may be google or the RH mailing lists for now.

umm.... problem

plain redhat RHEL3, kernel is in up2date skip-list

>rpm -q kernel
kernel-2.4.21-37.EL
kernel-2.4.21-27.EL

>uname -r
2.4.21-27.EL

>rpm -ihv kernel-2.4.21-37.EL.i686.rpm
package kernel-2.4.21-37.EL is already installed

>lilo -v -v
LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger
'lba32' extensions Copyright (C) 1999,2000 John Coffman

Reading boot sector from /dev/hda
Merging with /boot/boot.b
Secondary loader: 11 sectors.
Mapping message file /boot/message
Fatal: open /boot/message: No such file or directory
Removed temporary file /boot/map~

lilo -R 2.4.21-37.EL
Fatal: No image "2.4.21-37.EL" is defined

lilo

ls -alh /boot

Do you see a map or messages file in there? It looks like your boot directory is maybe missing files.

lilo label

seems that the new kernel gets an abreviated label

image=/boot/vmlinuz-2.4.21-37.0.1.EL
label=2.4.21-37.0.1.E

thus the command has to be

lilo -R 2.4.21-37.0.1.E

thanks

Thanks I fixed it.

new kernel released ##

new kernel released

## Single processor
cd /var/spool/up2date
up2date --download --force kernel
rpm -ihv kernel-2.4.21-40.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-40.EL

## HT processor or MultiProcessor
cd /var/spool/up2date
up2date --download --force kernel-smp
rpm -ihv kernel-smp-2.4.21-40.EL.i686.rpm
lilo -v -v
lilo -R 2.4.21-40.ELsmp

kernel

Thanks, I updated it for RHEL4 at the same time

dual processors with rhel4

Use: up2date --download --force kernel-smp

instead of up2date --download --force kernel

newer version for RHE4

The newest version for RHE4 is 2.6.9-34.0.2

CentOS 4.3

What about CentOS 4.3? How to upgrade its Kernel?

Latest Kernel version

What's the latest kernel for single processor server and RHEL4.

in WHM say : 2.6.9 is no secure and we should update.
--------------------------
MahdiOnline

Powered by Drupal - Theme created by Danger4k