PDA

View Full Version : Getting rid of Xen kernel on RHEL5.1?


sionathan
28th June 2008, 01:49
I recently inherited a RHEL5.1 system that someone installed with the Xen kernel... how do i swap it for a different kernel?

I used yum to download and install an alternate kernel, which appears to have worked properly:

yum install kernel-2.6.18-92.1.6.el5

The config-, symvers-, System.map- and vmlinuz- files for version 2.6.18-92.1.6.el5 all show up in my /boot directory now; but there's not an initrd-2.6.18-92.1.6.el5.img file in there and i'm unsure if i need one?

I suspect that the kernel DID get installed properly, but that i just need to update my grub.conf to select it. But i'm not sure how to do that... My current grub.conf reads:

#boot=/dev/sda
default=0
timeout=9
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title Red Hat Enterprise Xen Server
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.6.el5
kernel /xen.gz-2.6.18-8.el5
module /vmlinuz-2.6.18-8.el5xen ro root=LABEL=/ rhgb quiet
module /initrd-2.6.18-8.el5xen.img

That first "kernel" line that references the 18-92 kernel is a result of my first attempt to change the file. With that change, the system still loads the 2.6.18-8.el5xen kernel; but i (foolishly!) didn't make an initial backup of the file, and I can't remember what i changed it from, so i couldn't undo the change. Luckily, it still works as-is.

I tried just adding the following lines as a 2nd option to grub.conf, but when i selected them, i received a kernel panic:

title Red Hat Enterprise Linux Server (2.6.18-92.1.6.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.6.el5 root=LABEL=/

So... before i goof things up too much further, can someone please let me know how to do it properly?

Thanks,

» Sionathan

topdog
28th June 2008, 12:48
You possibly need an initrd file what is the output of
rpm -ql kernel-2.6.18-92.1.6.el5
If the rpm does not contain an initrd image you can create one using the mkinitrd prodgram

sionathan
1st July 2008, 21:02
There were no initrd images listed in the package details, topdog. So i made one and threw it into my boot directory, then revised my grub.conf to properly reference that file. Everything worked properly after that. I guess i just expected the package installation scripts to take care of that for me.

Here's the relevant section of my grub.conf, for posterity's sake...
title Red Hat Enterprise Server (2.6.18-92.1.6.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.1.6.el5 root=LABEL=/ rhgb
initrd /initrd-2.6.18-92.1.6.el5.img

Thanks!

» Sionathan