LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I boot an older kernel version (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-boot-an-older-kernel-version-592517/)

buckeyedog 10-17-2007 11:04 AM

How do I boot an older kernel version
 
I just installed Redhat ES 5 U5 and I did an update to this load before handing it off to the Oracle DBA'. This made the kernel version of 2.6.9-55.0.9.ELsmp, . The issue here is that IBM sdd driver does not support this kernel version, it wants 2.6.9-55.0.2.ELsmp or older. When I originally installed from CD the kernel version is 2.6.9-55.ELsmp. How can I boot to the original kernel version??

These servers are fresh, so there is no issue with Oracle at this point..

buckeyedog 10-17-2007 11:04 AM

Oh, sorry, Its Redhat ES4 Update 5..

saikee 10-17-2007 11:12 AM

You should first find the old kernel in the /boot partition or directory.

Just edit /boot/grub/grub.conf. Add another booting alternative at the beginning by copying the original booting instruction (from the title line to the one just before another title line, remember all lines with # are disavled and need not copied. You then amend it by in the "kernel statement substitute the existing kernek with old kernel name. You need to change the initrd file as well as the two go hand in hand. Save the file. On a reboot you should see the old kernel as another bootable choice.

If you have a problem post here the output of "ls /boot" and "ls /boot/grub/grub.conf".

buckeyedog 10-17-2007 02:03 PM

I was on the right track, I just needed some confirmation.. Here is my output of /boot and my grub.conf. Can you explain to me exactly what to add??

[root@hqoradev08 boot]# ls -l /boot
total 15797
-rw-r--r-- 1 root root 43949 Sep 25 02:13 config-2.6.9-55.0.9.EL
-rw-r--r-- 1 root root 43575 Sep 25 02:22 config-2.6.9-55.0.9.ELsmp
-rw-r--r-- 1 root root 43945 Apr 20 16:33 config-2.6.9-55.EL
-rw-r--r-- 1 root root 43571 Apr 20 16:43 config-2.6.9-55.ELsmp
drwxr-xr-x 2 root root 1024 Oct 17 11:39 grub
-rw-r--r-- 1 root root 1330322 Oct 11 17:49 initrd-2.6.9-55.0.9.EL.img
-rw-r--r-- 1 root root 1297549 Oct 11 17:47 initrd-2.6.9-55.0.9.ELsmp.img
-rw-r--r-- 1 root root 1333432 Oct 11 14:08 initrd-2.6.9-55.EL.img
-rw-r--r-- 1 root root 1300421 Oct 11 14:08 initrd-2.6.9-55.ELsmp.img
drwx------ 2 root root 12288 Oct 11 10:04 lost+found
-rw-r--r-- 1 root root 23108 Aug 3 2005 message
-rw-r--r-- 1 root root 21282 Aug 3 2005 message.ja
-rw-r--r-- 1 root root 893928 Sep 25 02:13 System.map-2.6.9-55.0.9.EL
-rw-r--r-- 1 root root 912104 Sep 25 02:22 System.map-2.6.9-55.0.9.ELsmp
-rw-r--r-- 1 root root 893498 Apr 20 16:33 System.map-2.6.9-55.EL
-rw-r--r-- 1 root root 911674 Apr 20 16:43 System.map-2.6.9-55.ELsmp
-rw-r--r-- 1 root root 1807615 Sep 25 02:13 vmlinuz-2.6.9-55.0.9.EL
-rw-r--r-- 1 root root 1676634 Sep 25 02:22 vmlinuz-2.6.9-55.0.9.ELsmp
-rw-r--r-- 1 root root 1803536 Apr 20 16:33 vmlinuz-2.6.9-55.EL
-rw-r--r-- 1 root root 1677101 Apr 20 16:43 vmlinuz-2.6.9-55.ELsmp


[root@hqoradev08 grub]# more /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,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-55.0.9.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.EL.img
title Red Hat Enterprise Linux ES (2.6.9-55.0.9.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.ELsmp.img
title Red Hat Enterprise Linux ES (2.6.9-55.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.6.9-55.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.EL.img

saikee 10-17-2007 03:56 PM

Bad news your /boot hasn't got the old kernel.

You have to boot up the old installation CD, check for the old kernel if it is there copy it into your hda1 /boot partition.

Your grub.conf with these added lines (in red) will boot it
Code:

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

title Red Hat Enterprise Linux ES (2.6.9-55.0.2.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.2.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.2.EL.img


title Red Hat Enterprise Linux ES (2.6.9-55.0.9.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.EL.img
title Red Hat Enterprise Linux ES (2.6.9-55.0.9.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.ELsmp.img


buckeyedog 10-17-2007 06:04 PM

Actually, isnt this the old kernel??

-rw-r--r-- 1 root root 911674 Apr 20 16:43 System.map-2.6.9-55.ELsmp


The 0.2 version is just the version that IBMsdd supports and older kernel.. So, with just the install CD I get to the kernel I pasted above.. So, if I just edit my grub.conf with this, will this work??

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

title Red Hat Enterprise Linux ES (2.6.9-55.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.ELsmp.img


title Red Hat Enterprise Linux ES (2.6.9-55.0.9.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.EL.img
title Red Hat Enterprise Linux ES (2.6.9-55.0.9.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.ELsmp.img

saikee 10-17-2007 07:31 PM

If this is the case then you current grub.conf already got it as the 3rd choice (in red text). Upgrading normally keeps the old kernels. There is no reason to remove it and in many cases newer kernel may fail to kick start all the hardware, as in your case.


Code:

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

title Red Hat Enterprise Linux ES (2.6.9-55.0.9.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.EL.img


title Red Hat Enterprise Linux ES (2.6.9-55.0.9.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.ELsmp.img

title Red Hat Enterprise Linux ES (2.6.9-55.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.ELsmp.img


title Red Hat Enterprise Linux ES-up (2.6.9-55.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.EL.img


buckeyedog 10-17-2007 08:54 PM

Yes, you are correct that the entry is already in grub.conf. So technically I can just make my default 3, although I am a little confused. The default is currently set to 1 , but when I do a uname -r it comes up with the #2 entry or is the first line 0?

[root@hqoradev08 grub]# uname -r
2.6.9-55.0.9.ELsmp
[root@hqoradev08 grub]# cat /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,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-55.0.9.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.EL.img
title Red Hat Enterprise Linux ES (2.6.9-55.0.9.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.0.9.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.0.9.ELsmp.img
title Red Hat Enterprise Linux ES (2.6.9-55.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.6.9-55.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-55.EL.img

jschiwal 10-17-2007 09:17 PM

Check /lib/modules/ and see if you have a modules directory corresponding with the kernel you want to use. If you haven't uninstalled the previous kernel package, you probably have it. A kernel package supplies the /boot/vmlinuz-<version> and /boot/initrd-<version> files as well as the kernel modules compiled for that kernel. Simply copying a kernel and initrd file into the /boot directory will not work if you need any of the modules.

I you can boot to the grub menu item that refers to the 2.6.9-55.0.2.EL version kernel, all is probably well. You could simply edit the menu.lst file making this one your default if you want.

saikee 10-18-2007 02:36 AM

Grub always counts from zero. This is a characteristic of Grub. You have to remember it if you want to work with Grub.

buckeyedog 10-18-2007 09:07 AM

Thanks alot guys for you responses.. I have verifled the kernel modules exist, and I have made my default in grub.conf to 2. I am rebooting, i will let you guys know the result!


All times are GMT -5. The time now is 11:47 PM.