LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Reverting back to old kernel in CentOS (http://www.linuxquestions.org/questions/linux-general-1/reverting-back-to-old-kernel-in-centos-833959/)

ravangrid 09-23-2010 04:51 AM

Reverting back to old kernel in CentOS
 
Dear All,

I use CentOS. My system recently updated its packages and kernel was updated too. I want to revert to my old kernel without xen.

GRUB shows only 3 kernels and all of them are centos.plusxen

CentOS (2.6.18-194.11.3.el5.centos.plusxen)
CentOS (2.6.18-194.11.1.el5.centos.plusxen)
CentOS (2.6.18-194.8.1.el5.centos.plusxen)

on command prompt:

Code:

# rpm -qa | grep kernel

kernel-xen-2.6.18-194.11.1.el5.centos.plus
kernel-xen-2.6.18-194.11.3.el5.centos.plus
kernel-devel-2.6.18-194.8.3.el5.centos.plus
kernel-devel-2.6.18-194.11.1.el5.centos.plus
kernel-devel-2.6.18-194.11.3.el5.centos.plus
kernel-xen-2.6.18-194.11.3.el5.centos.plus
kernel-headers-2.6.18-194.11.3.el5.centos.plus

Code:

# vim /etc/grub.conf
has 3 entries and all of them are centos.plusxen.

I wan to revert to the kernel-devel-2.... (the one without xen).
But, where is it stored? At what location?
Will simply doing
Code:

# rpm -ivh kernel-devel-2.6.18.... work?
Please help.

Sincerely,
RavanGrid.
----------------------------------------------------------------

xeleema 09-23-2010 06:00 AM

Greetingz!

I'm using CentOS 5.x.
First, check your /boot directory.
Here's mine;
Code:

[user@server ~]$ ls -la /boot
total 39337
drwxr-xr-x  4 root root    2048 Jul 24 01:32 .
drwxr-xr-x 26 root root    4096 Sep 16 03:33 ..
-rw-r--r--  1 root root  66891 May 13 12:38 config-2.6.18-194.3.1.el5
-rw-r--r--  1 root root  66891 Jul  1 18:31 config-2.6.18-194.8.1.el5
-rw-r--r--  1 root root  66887 Apr  2 14:25 config-2.6.18-194.el5
drwxr-xr-x  2 root root    1024 Sep  8 18:17 grub
-rw-------  1 root root 3421815 Jun 29 13:10 initrd-2.6.18-194.3.1.el5.img
-rw-r--r--  1 root root 4206472 Jun 29 18:01 initrd-2.6.18-194.3.1.el5kdump.img
-rw-------  1 root root 6758114 Jul 23 20:29 initrd-2.6.18-194.8.1.el5-custom.img
-rw-------  1 root root 3421761 Jul 22 06:14 initrd-2.6.18-194.8.1.el5.img
-rw-r--r--  1 root root 4300049 Jul 24 01:32 initrd-2.6.18-194.8.1.el5kdump.img
-rw-------  1 root root 3414516 Jun 29 11:47 initrd-2.6.18-194.el5.img
-rw-r--r--  1 root root 4203954 Jun 29 13:12 initrd-2.6.18-194.el5kdump.img
drwx------  2 root root  12288 Jun 29 06:28 lost+found
-rw-r--r--  1 root root  94600 Jan  8  2007 memtest86+-1.65
-rw-r--r--  1 root root  80032 Mar 16  2009 message
-rwxr--r--  1 root root    2901 Jul 23 20:28 ramfs.sh
-rw-r--r--  1 root root  112667 May 13 12:39 symvers-2.6.18-194.3.1.el5.gz
-rw-r--r--  1 root root  112713 Jul  1 18:32 symvers-2.6.18-194.8.1.el5.gz
-rw-r--r--  1 root root  112656 Apr  2 14:25 symvers-2.6.18-194.el5.gz
-rw-r--r--  1 root root 1242305 May 13 12:38 System.map-2.6.18-194.3.1.el5
-rw-r--r--  1 root root 1243148 Jul  1 18:31 System.map-2.6.18-194.8.1.el5
-rw-r--r--  1 root root 1242340 Apr  2 14:25 System.map-2.6.18-194.el5
-rw-r--r--  1 root root 1954652 May 13 12:38 vmlinuz-2.6.18-194.3.1.el5
-rw-r--r--  1 root root    162 May 13 12:38 .vmlinuz-2.6.18-194.3.1.el5.hmac
-rw-r--r--  1 root root 1954620 Jul  1 18:31 vmlinuz-2.6.18-194.8.1.el5
-rw-r--r--  1 root root    162 Jul  1 18:31 .vmlinuz-2.6.18-194.8.1.el5.hmac
-rw-r--r--  1 root root 1953660 Apr  2 14:25 vmlinuz-2.6.18-194.el5
-rw-r--r--  1 root root    158 Apr  2 14:25 .vmlinuz-2.6.18-194.el5.hmac
[sysop@hydra ~]$

Each one of the bolded sections should have a corresponding entry in the grub configuration file.

Here's my main entry;
Code:

[user@server ~]$ sudo grep -v "#" /boot/grub/grub.conf|grep .
default=0
timeout=9
splashimage=(hd4,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS-custom (2.6.18-194.8.1.el5) (hd4,0)
  root (hd4,0)
  kernel /vmlinuz-2.6.18-194.8.1.el5 ro root=/dev/vg0/lv1 rhgb quiet crashkernel=128@16M
  initrd /initrd-2.6.18-194.8.1.el5.img

And my corresponding kernel packages;
Code:

[user@server ~]$ rpm -qa | grep kernel
kernel-2.6.18-194.8.1.el5
kernel-headers-2.6.18-194.8.1.el5
kernel-devel-2.6.18-194.el5
kernel-devel-2.6.18-194.8.1.el5
kernel-2.6.18-194.el5
kernel-devel-2.6.18-194.3.1.el5
kernel-2.6.18-194.3.1.el5
[user@server ~]$

I would recommend first doing a "yum list|grep -i kernel", to see what packages are available;
Code:

[user@server ~]$ yum list|grep kernel
kernel.x86_64                              2.6.18-194.el5              installed
kernel.x86_64                              2.6.18-194.3.1.el5          installed
kernel.x86_64                              2.6.18-194.8.1.el5          installed
kernel-devel.x86_64                        2.6.18-194.el5              installed
kernel-devel.x86_64                        2.6.18-194.3.1.el5          installed
kernel-devel.x86_64                        2.6.18-194.8.1.el5          installed
kernel-headers.x86_64                      2.6.18-194.8.1.el5          installed
fortune-kernelcookies.x86_64              1.0-37.2.el5.rf            rpmforge
fortune-kernelnewbies.x86_64              1.0-37.2.el5.rf            rpmforge
kernel.x86_64                              2.6.18-194.11.4.el5        updates 
kernel-debug.x86_64                        2.6.18-194.11.4.el5        updates 
kernel-debug-devel.x86_64                  2.6.18-194.11.4.el5        updates 
kernel-devel.x86_64                        2.6.18-194.11.4.el5        updates 
kernel-doc.noarch                          2.6.18-194.11.4.el5        updates 
kernel-headers.x86_64                      2.6.18-194.11.4.el5        updates 
kernel-xen.x86_64                          2.6.18-194.11.4.el5        updates 
kernel-xen-devel.x86_64                    2.6.18-194.11.4.el5        updates 
kerneloops.x86_64                          0.11-1.el5.rf              rpmforge
[user@server ~]$

Then installing the appropriate packages, which for you might be the following;
Code:

[user@server ~]$ rpm -qa | grep kernel|grep 194.8.1
kernel-2.6.18-194.8.1.el5
kernel-headers-2.6.18-194.8.1.el5
kernel-devel-2.6.18-194.8.1.el5
[user@server ~]$

P.S: I'm done editing. That should at least get you started!

ravangrid 09-25-2010 01:46 PM

Thanks
 
Dear Xeleema,

Thanks for your reply.
Yes, I could ultimately figure it out.
Thank you :)

xeleema 09-26-2010 11:15 AM

Awesome!

If your problem has been fixed, please mark this thread as "[SOLVED]".
Also, if by chance I was completly off the mark, can you elaborate as to exactly how you fixed your problem, so others who find this thread can also be helped?

Thanks!


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