Help - Search - Members - Calendar
Full Version: RHEL Kernel Upgrade
The Planet Forums > Operating Systems > Red Hat Linux > Red Hat HOWTOs
gertiebeth
Could a kind person with a head-full of linux knowledge please make a HOWTO for upgrading a RHEL kernel using grub? My new server, which is hosted here at RS, is a cPanel P4 and does NOT have lilo.
jaume
Basically you need to install the new kernel RPM , modify /etc/grub.conf and reboot the server.

Use up2date service to get the new kernel and install it o download RPM manually and rpm -ivh

Latest RHE kernel is 2.4.21-9.0.1 ...

kernel-2.4.21-9.0.1.EL.i686.rpm
kernel-source-2.4.21-9.0.1.EL.i386.rpm
kernel-smp-2.4.21-9.0.1.EL.i686.rpm

See if you are using kernel-smp or normal kernel and once installed just go to edit the /etc/grub.cnf to see if the new kernel template has been added ... if not add it manually looking at how your old one is in grub.cnf:

Example of mine:
CODE
# 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/sda3

#          initrd /initrd-version.img

#boot=/dev/sda

[b]default=0[/b]

timeout=3

splashimage=(hd0,0)/grub/splash.xpm.gz



[b]title Red Hat Enterprise Linux ES (2.4.21-9.0.1.ELsmp)

       root (hd0,0)

       kernel (hd0,0)/vmlinuz-2.4.21-9.0.1.ELsmp root=/dev/sda3

       initrd (hd0,0)/initrd-2.4.21-9.0.1.ELsmp.img[/b]

title Red Hat Enterprise Linux ES (2.4.21-4.0.2.ELsmp)

       root (hd0,0)

       kernel (hd0,0)/vmlinuz-2.4.21-4.0.2.ELsmp root=/dev/sda3

       initrd (hd0,0)/initrd-2.4.21-4.0.2.ELsmp.img

title Red Hat Enterprise Linux ES (2.4.21-4.0.2.EL)

       root (hd0,0)

       kernel (hd0,0)/vmlinuz-2.4.21-4.0.2.EL root=/dev/sda3

       initrd (hd0,0)/initrd-2.4.21-4.0.2.EL.img


default=0 means it will load the first kernel found on the grub file, and as you see, the new installed kernel (bold section) is first.

Save /etc/grub.cnf and reboot server ... then just check if new kernel is being used ( uname -a )
gertiebeth
Thank you so much Jaume! Another quick question: smp kernels are only for dual processors, correct?

I'm off to upgrade!
gertiebeth
OK, here is what is in my u2date folder:

CODE
-rw-r--r--    1 root     root        92579 Feb 21 19:32 kernel-2.4.21-9.0.1.EL.i686.hdr

-rw-r--r--    1 root     root      7212813 Feb 21 19:33 [b]kernel-2.4.21-9.0.1.EL.i686.rpm[/b]

-rw-r--r--    1 root     root       101143 Feb 21 19:32 kernel-smp-2.4.21-9.0.1.EL.i686.hdr

-rw-r--r--    1 root     root      7617459 Feb 21 19:34 kernel-smp-2.4.21-9.0.1.EL.i686.rpm

-rw-r--r--    1 root     root      1501095 Feb 21 19:32 kernel-source-2.4.21-9.0.1.EL.i386.hdr

-rw-r--r--    1 root     root     40463573 Feb 21 19:37 [b]kernel-source-2.4.21-9.0.1.EL.i386.rpm[/b]

-rw-r--r--    1 root     root         9999 Feb 21 19:32 kernel-utils-2.4-8.37.1.i386.hdr

-rw-r--r--    1 root     root       321925 Feb 21 19:37 kernel-utils-2.4-8.37.1.i386.rpm

-rw-r--r--    1 root     root       354880 Feb 20 02:27 rhel-i386-es-3.20040219121157

-rw-r--r--    1 root     root       410626 Jan 28 17:21 rhel-i386-es-3-all.20040126140202

-rw-r--r--    1 root     root       183235 Feb 20 02:27 rhel-i386-es-3-obsoletes.20040219121157


So, if I'm not using smp, I need to install the highlighted ones, right?

Thanks for the help. I've installed kernels a hundred times, but this new RHE has me a bit jumpy...
gertiebeth
Ok, I installed the new kernel, and 42 minutes after reboot here is a snap of TOP:

CODE
18:54:42  up 42 min,  2 users,  load average: 16.22, 16.68, 12.65

543 processes: 536 sleeping, 7 running, 0 zombie, 0 stopped

CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle

          total   15.4%    0.0%    4.0%   2.4%     1.6%   76.3%    0.0%

Mem:  1022480k av, 1007404k used,   15076k free,       0k shrd,   29124k buff

                   766428k actv,  184828k in_d,    4816k in_c

Swap: 2048276k av,  221288k used, 1826988k free                  505376k cached


Wow! I think I did something wrong... Maybe I SHOULD be using the smp kernel?
jaume
The old kernel you were using ... was ths smp? ... try it ... but I think the problem is not the kernel:

543 processes: 536 sleeping, 7 running

You have many open processes and also many running ... did you have that behaviour before the kernel upgrade?

Maybe you need to tweak maxclients and keepalive settings on apache (I saw that by default it comes with KeepAlive Off ... not good).
gertiebeth
Yeah, I'm definitely in a world of hurt here. I think my problem is the RHE image. This was actually happening before the kernel upgrade. I was hoping a new kernel would solve the problem. It actually just made it worse. Now Apache is restarting about every hour.

I had this same problem on a RHE Xeon and ended up junking it. Life's too short, you know?

I didn't realise until today (after going through messages here) RHE was conflicting with single processers too. *sigh*
omegaz
HI :

I want upgrade my kernel .. that kernel i use ?

now my box have this :

2.4.21-4.0.1.ELsmp #1 SMP Thu Oct 23 01:27:36 EDT 2003 i686 i686 i386 GNU/Linux

y upgrade mi kernel with ... :

kernel-smp-2.4.21-9.0.1.EL.i686.rpm

not ?

i use to upgrade mi kernel .. :

up2date -g kernel-smp-2.4.21-9.0.1.EL.i686.rpm

rpm -vih kernel-smp-2.4.21-9.0.1.EL.i686.rpm

its correct ?

Why i know if my server uses lilo or grub ?

PD : im newbie on RHEL .
Err0r
If you are not using a multi processor machine, you dont need to use the SMP kernel. As for knowing whether grub or lilo is used, you can use my how-to in the howto section.

Everyone seems to tell kernels to retrieve only, however I set mine to install automatically but NOT to reboot or modify the bootloader config. That way I get to make the changes myself to the config and control when it reboots.


OT: heh my 200th post
omegaz
i cant found your how to can say me the url pleasee
Err0r
http://forums.ev1servers.net/showthread.ph...&threadid=42633

How to know which bootloader (grub or lilo) is used.
gpan
( You should use the SMP kernel if you want proper HT reporting / support though )
TDI
*threadjacking*

Hello - long time user - first time updater icon_wink.gif

I have 2 RHEL/cPanel servers here purchased in March.
P4 3.06ghz processor.

Both servers use Kernel:
2.4.21-4.0.1.ELsmp

This is an old kernel right?

I'm at a loss when it comes to updating the kernel however. I tried simply using up2date -u but that didn't help.

Can someone please offer me some guidence? Both servers are using Lilo and I understand how to edit that config file to use the new kernel once it's installed as I had to do that a few months ago during an upgrade from RH 7.3 --> 9 so I guess I just need info on how to install the new kernel...

Thank you much!
TDI
kris1351
I have a question. On the initial loads even of the 2.8 servers they are installing the smp kernel. Is it a good idea to keep upgrading with the SMPs or should we use normal kernels since the 2.8s do not support HT?
Err0r
SMP kernels are only useful on multiprocessor machines. As far as I know, hyperthreading IS supported on the standard non smp kernels but you can use SMP to be sure. There is no real reason to keep upgrading with the SMP kernel.
ohvhost
I ran "up2date --show-available" and th following kernel packages are listed

kernel-BOOT-2.4.21-9.0.3.EL.i386
kernel-debuginfo-2.4.21-4.0.1.EL.athlon
kernel-debuginfo-2.4.21-4.0.1.EL.i386
kernel-debuginfo-2.4.21-4.0.1.EL.i686
kernel-doc-2.4.21-9.0.3.EL.i386
kernel-hugemem-2.4.21-9.0.3.EL.i686
kernel-hugemem-unsupported-2.4.21-9.0.3.EL.i686
kernel-smp-unsupported-2.4.21-9.0.3.EL.athlon
kernel-smp-unsupported-2.4.21-9.0.3.EL.i686
kernel-unsupported-2.4.21-9.0.3.EL.athlon
kernel-unsupported-2.4.21-9.0.3.EL.i686

I was wondering what the deal was with EV1's "unsupported" version of the kernel package.

I should be okay updating to kernel-smp-unsupported-2.4.21-9.0.3.EL.i686 as I am running the initrd-2.4.21-4.0.1.ELsmp.img kernel now, right?
Err0r
up2date -l (thats an L) will show you what is available for your box. show-available will show everything on rhn which you dont have installed.

up2date -l will show you kernel packages for your box too so you only need to upgrade anything on there. Do not download anything which you do not know whether your box uses it.

Running uname -r will tell you what kernel version you are currently running. An ev1 rhel image which hasnt been upgraded will be 2.4.21-4.0.1.ELsmp - the current version is 2.4.21-9.0.3.ELsmp (or 2.4.21-9.0.3.EL for non smp)
Err0r
Dupe post somehow
AlistairW
Is this not the latest Kernel:

2.4.21-15.ELsmp

???
Err0r
Yes.. it was released yesterday (12th may)
AlistairW
Nice maybe I was lucky as I upgraded yesterday icon_smile.gif
Seeker
QUOTE
Originally posted by Err0r
SMP kernels are only useful on multiprocessor machines. As far as I know, hyperthreading IS supported on the standard non smp kernels but you can use SMP to be sure. There is no real reason to keep upgrading with the SMP kernel.


An upgrade I just did ie. RHE/Ensim3.7 The image from EV1 came with smp kernel but the server is a single CPU. Perhaps she is in the same situation. I was wondering whatever my client got the wrong image, and also to which kernel upgrade to..

$ uname -r
2.4.21-4.0.1.ELsmp
AlistairW
Yep, mine was the same SMP kernel although I have a single CPU box, but it seems to work ok, so I updated the kernel to the latest smp with no problems so far with cPanel.
Err0r
EV1 by default loads the smp kernel, its easier as they only need to have one image for all the machines to work. My machine was one of the HP 2ghz boxes (single processor).

When I got RHEL put on it, it was booted with the SMP kernel. I have since switched to the non SMP kernel. To be honest it makes no difference on single processor machines.

Linux mybox.mydomain.com 2.4.21-15.EL #1 Thu Apr 22 00:27:41 EDT 2004 i686 i686 i386 GNU/Linux
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.