LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   how to upgrade the kernel in RedHat Linux E 3 (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-upgrade-the-kernel-in-redhat-linux-e-3-a-633995/)

QianQian 04-08-2008 02:35 PM

how to upgrade the kernel in RedHat Linux E 3
 
Hi, I have a RedHat linux E3. The kernel information is like this:

[root@flulinux01 rpm]# uname -r
2.4.21-20.ELsmp

I used the RedHat up2date to upgrade the kernel:
[root@flulinux01 rpm]# up2date -f kernel

Fetching Obsoletes list for channel: rhel-i386-as-3...

Name Version Rel
----------------------------------------------------------
kernel 2.4.21 53.EL i686


Testing package set / solving RPM inter-dependencies...
########################################
kernel-2.4.21-53.EL.i686.rp ########################## Done.
Preparing ########################################### [100%]

Installing...
1:kernel ########################################### [100%]

after that, I performed uname
[root@flulinux01 rpm]# uname -r
2.4.21-20.ELsmp

It seems the kernel is not upgraded.

Is anything wrong or I need to do more?

Thanks a lot!

BlueC 04-08-2008 02:37 PM

yes, reboot

rayfordj 04-08-2008 02:39 PM

You should make sure that it is list in grub.conf as the default kernel (default line equals correct count, starting from 0, for the title of the updated kernel you installed) and then reboot.

It should be in the grub menu list that you can reboot the system and it'll either default or you can select the -53 kernel to boot the system. I recommend physical console access (or some means of out-of-band access) for at least the first boot to the new kernel in case there are any problems you can recover. I wouldnt expect any but better to plan ahead ;)

QianQian 04-08-2008 02:51 PM

Thank you for your reply!
 
1. Is there any way to avoid rebooting? We have an online database running.
2. May I select to upgrade the kernel to 2.4.21-52, not the latest one?

BlueC 04-08-2008 02:52 PM

You can't boot a kernel without errr rebooting.

QianQian 04-08-2008 02:56 PM

The grub.conf is like this
 
[root@flulinux01 grub]# more grub.conf
# 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,2)
# kernel /vmlinuz-version ro root=/dev/sda7
# initrd /initrd-version.img
#boot=/dev/sda3
default=1
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-53.EL)
root (hd0,2)
kernel /vmlinuz-2.4.21-53.EL ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-53.EL.img
title Red Hat Enterprise Linux AS (2.4.21-20.ELsmp)
root (hd0,2)
kernel /vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-20.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.4.21-20.EL)
root (hd0,2)
kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-20.EL.img
[root@flulinux01 grub]#

BlueC 04-08-2008 03:43 PM

change it to "default=0" then it will boot kernel 2.4.21-53 (the new one)

QianQian 04-09-2008 02:08 PM

Thank you for your reply
 
I have a question about the /boot/grub/menu.lst and the /boot/grub/grub.conf. They are different.


Which file is read when reboot the RedHat linux?

[root@flulinux01 grub]# more menu.lst
# 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,2)
# kernel /vmlinuz-version ro root=/dev/sda7
# initrd /initrd-version.img
#boot=/dev/sda3
default=0
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-20.ELsmp)
root (hd0,2)
kernel /vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-20.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.4.21-20.EL)
root (hd0,2)
kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-20.EL.img


[root@flulinux01 grub]# more grub.conf
# 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,2)
# kernel /vmlinuz-version ro root=/dev/sda7
# initrd /initrd-version.img
#boot=/dev/sda3
default=1
timeout=10
splashimage=(hd0,2)/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.4.21-53.EL)
root (hd0,2)
kernel /vmlinuz-2.4.21-53.EL ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-53.EL.img
title Red Hat Enterprise Linux AS (2.4.21-20.ELsmp)
root (hd0,2)
kernel /vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-20.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.4.21-20.EL)
root (hd0,2)
kernel /vmlinuz-2.4.21-20.EL ro root=LABEL=/ hda=ide-scsi apic
initrd /initrd-2.4.21-20.EL.img

BlueC 04-09-2008 03:08 PM

That's a bit strange because menu.lst is supposed to just be a symlink to grub.conf (or the other way around, i can't remember). I.e. they should both actually be identical. Either way, i would suggest that grub reads grub.conf on boot.


All times are GMT -5. The time now is 04:40 PM.