IBM Support

HOW TO BOOT WITH RedHat WITH THE PREVIOUS KERNEL

Question & Answer


Question

what is the safest way to boot the RedHat Kernel with the previous kernel release

Cause

Sometimes is necessary to back out from the freshly upgraded kernel to the previous kernel for testing or because the newly updated kernel my introduce issues that were not present before.

Answer

One of the safest way to boot RedHat OS with a downgraded kernel is by modifying the /boot/grub/grub.conf

--Get the current Kernel information



[root@host001 nz]# uname -a
Linux car-lnasdwp-001 2.6.32-504.16.2.el6.x86_64 #1 SMP Tue Mar 10 17:01:00 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

--Edit the /boot/grub/grub.conf


[root@car-lnasdwp-002]# vi /boot/grub//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,1)
# kernel /vmlinuz-version ro root=/dev/sda5
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0 ---> change this value to "1"
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.32-504.16.2.el6.x86_64)
root (hd0,1)
kernel /vmlinuz-2.6.32-504.16.2.el6.x86_64 ro root=UUID=ffb892af-41e8-4002-beb0-e79d93367445 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.16.2.el6.x86_64.img
title Red Hat Enterprise Linux (2.6.32-358.el6.x86_64)
root (hd0,1)
kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=ffb892af-41e8-4002-beb0-e79d93367445 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-358.el6.x86_64.img
~
2- Save the file

3- Reboot the host

4- Redhat has booted with the previous kernel release

[root@host-002 ~]# uname -a
Linux car-lnasdwp-002 2.6.32-431.17.1.el6.x86_64 #1 SMP Fri Apr 11 17:27:00 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

5- You can check the list of available kernels:

[root@host-002 /]# rpm -qa | grep -i kernel
dracut-kernel-004-356.el6_6.2.noarch
kernel-firmware-2.6.32-504.16.2.el6.noarch
kernel-2.6.32-431.17.1.el6.x86_64
abrt-addon-kerneloops-2.0.8-26.el6.x86_64
kernel-devel-2.6.32-504.16.2.el6.x86_64
kernel-devel-2.6.32-431.17.1.el6.x86_64
kernel-headers-2.6.32-504.16.2.el6.x86_64
libreport-plugin-kerneloops-2.0.9-21.el6.x86_64
kernel-devel-2.6.32-358.el6.x86_64
kernel-2.6.32-504.16.2.el6.x86_64
kernel-2.6.32-358.el6.x86_64
[root@car-lnasdwp-001 /]# rpm -e kernel-devel-2.6.32-504.16.2.el6.x86_64
[root@car-lnasdwp-001 /]# rpm -e kernel-2.6.32-504.16.2.el6.x86_64


NOTE:

You can always revert to the original kernel by setting the grub.conf file back to 0 and reboot as long as you did not remove any of the kernels files for that release.
[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Host","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

More support for:
IBM PureData System

Software version:
1.0.0

Document number:
530079

Modified date:
17 October 2019

UID

swg21960444