Thought I'd post the general solution here in case other people have this issue as this seems to be popping up on Google. The usual reason for this error is a change to grub.cfg that the pygrub loader doesn't understand. To make life more interesting the actual error is often masked by the "boot loader didn't return any data" message. The steps below describe how to correct your grub.cfg.
Mount the disk image using kpartx (if you're using a real partition then just mount that - this is just for a disk image):
Code:
kpartx -av disk.img
This will print out the loopback devices it has created in /dev/mapper, one for each partition. Mount the boot partition:
Code:
mount /dev/mapper/loop2p1 mntpoint
Find pygrub - it is probably in /usr/lib/xen-4.1/lib/python. Determine where the libs are being loaded from, and track down the GrubConf.py file. (the file lives in /usr/lib/xen-4.1/lib/python/grub under Ubuntu 12.04).
Run the GrubConf.py manually on the configuration in the boot partition.
Code:
python /usr/lib/xen-4.1/lib/python/grub/GrubConf.py grub2 mntpoint/grub/grub.cfg
You should then be able to see the error message that is normally hidden by pygrub (usually something about brackets as it gets confused by submenus). Adjust the grub.cfg as appropriate (make a backup first!), then unmount and retry booting the VM.
Bookmarks