Wednesday, June 10, 2009

Xen with grub2

This is small article to configure xen boot in grub2. First install xen in the machine using yum. I used centos and hence used yum to install it.

yum install xen virt-manager kernel-xen

Now xen and xen kernel is installed in the machine. Now you have to configure grub2 to recognize xen.

In my case I installed xen in another partition other than boot partition. My centos was in /dev/sda1 and boot partition was /dev/sda4

I had to mount that partition and configure the grub configuration to recognize XEN.

mount /dev/sda4 /test
vi /test/boot/grub/grub.cfg

Add the following lines to the end of the configuration.
menuentry "CentOS (2.6.18-128.1.10.el5xen)"{
set root=(hd0,1)
multiboot /xen.gz-2.6.18-128.1.10.el5
module /vmlinuz-2.6.18-128.1.10.el5xen ro root=LABEL=/ rhgb quiet
module /initrd-2.6.18-128.1.10.el5xen.img

Now the xen kernel will be available in the grub 2 menu.

No comments:

Post a Comment