Using pygrub to boot a domU kernel

Using pygrub, each domU can boot with its own kernel instead of using the dom0 kernel, which lifes easier for updates and multi distribution xen installs. You need to have first a working domU.

On the domU

aptitude install linux-image-2.6-xen-amd64 grub

mkdir /boot/grub
echo "(hd0) /dev/sda" > /boot/grub/device.map
mknod /dev/sda b 202 0

update-grub

# groot=(hd0,1)

in your /boot/grub/menu.lst. After editing this file, you need to re-run update-grub to propagate the changes.

On the dom0

bootloader      = '/usr/lib/xen-3.2-1/bin/pygrub'