CentOS 5.2 under Xen

If the following are true:

  • You have a working Xen Dom0 instance
  • You have downloaded the CentOS 5.2 image from jailtime.org
  • You can't get the image to boot up as a DomU instance because of missing directories such as /dev and /proc

Then you might be interested in knowing that the jailtime images expect certain Xen modules to be preloaded in the ramdisk. So run something like this on your Dom0:

mkinitrd -v -f --with=ext3 --preload=xenblk --with=xennet /boot/initrd-2.6.18-92.1.6.el5xen-xenblk.img 2.6.18-92.1.6.el5xen

Note that I added "-xenblk" to the ramdisk filename to distinguish it from the standard Dom0 file that came with my distro.

Then put the resulting .img in your ramdisk= field in your Xen config file, and believe it or not, it will work. Here's my complete .cfg:

kernel = "/boot/vmlinuz-2.6.18-92.1.6.el5xen"
ramdisk = "/boot/initrd-2.6.18-92.1.6.el5xen-xenblk.img"
memory = 256
name = "myxen"
vif = [ 'bridge=xenbr0' ]
disk = ['file:/home/xen/myxen/centos.5-2.img,sda1,w',
'file:/home/xen/myxen/swap.img,sda2,w']
dhcp='dhcp'
root = "/dev/sda1 ro"
extra = '4'

Categories

,

Leave a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About this Entry

This page contains a single entry by Mike Tsao published on July 13, 2008 12:08 AM.

.proto free at last! was the previous entry in this blog.

How to make an omelette is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.2-en