Switching Xen to use pygrub

These instructions show you how to switch a Xen Hardy host and Jaunty guest to use pygrub (useful if you want to upgrade the kernel on the guest to a version not available packaged in the host).

  • Install a "-server" variant of the kernel on the guest (this installs grub)
  • Issue the following command: mkdir /boot/grub
  • Run update-grub on the guest to create a /boot/grub/menu.lst file
  • Edit /boot/grub/menu.lst to set indomU=false. Also edit the defoptions entry to read 2 console=hvc0.
  • Run update-grub again to add the normal guest kernel to the menu.
  • Check that the -server kernel is listed in menu.lst.
  • Edit /etc/event.d/tty1 to say exec /sbin/getty 38400 hvc0 at the very end, instead of exec /sbin/getty 38400 xvc0.
  • Edit the VM configuration file to have extra = '2 console=hvc0', as well as bootloader = /usr/bin/pygrub. Get rid of the kernel= and initrd= options. Make sure that the actual boot disk is listed first in the list of disks, and the boot disk is listed as the root= option.
  • Shutdown the VM and start it again.