[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#604080: Xen domU fails to boot after install





Hi Ian, thanks for the prompt feedback

I've provided more details about some of those points below

Ultimately, I believe Debian 5 (lenny) is still a supported option for people after the release of squeeze and up to the release date of Debian 7.

For me, this was the only bad experience I had during the install. It would seem like a great shame not to provide a convenient way for people to get lenny and squeeze on the same system.

I might be willing to have a deeper look at the problem and see if I can improve the error messages, etc. However, if such a patch was produced, would it be adopted in lenny so that users who keep their systems up to date will be able to run this without effort?

Is it feasible to include some kind of grub1-emulator package in squeeze, something that lets the squeeze system use grub2, but creating a valid menu.lst file for pygrub to find? I think this would provide the smoothest experience for the users who just want the lenny/squeeze dom0/domU thing to work.

I then tried to do the first boot:

xm create -c xm-squeeze1.cfg


I get this error:

Error: Boot loader didn't return any data!

Unfortunately the version of pygrub in Lenny does not understand grub2
configuration files. You are quite correct that the error message is
rubbish. FWIW it's likely that /var/log/xen/xend.log contains more
information from pygrub, although those messages are also not always
terribly helpful either...

xend.log only told me the pygrub command line, but not the root cause of the problem

I had to figure it out with Google and guesswork

You should be able to cause Squeeze to install grub1 (aka grub-legacy),
although it may be an expert mode installation option only which is less
convenient.
I can chroot the domU and get grub-legacy, but I'm hesitant to run any grub commands within the chroot out of concern that it will impact the dom0's MBR
http://d-i.alioth.debian.org/manual/en.i386/apbs04.html describes how
you can pressed the installation to install grub-legacy instead of grub2
and I think anything you can do in a preseed file you can also add to
the kernel command line when running the installer, so that might be
worth a go.
Ok, thanks for that suggestion - I will try that too method too
Root causes:
- Squeeze installs grub 2, which doesn't have any /boot/grub/menu.lst
- pygrub can't seem to identify the boot partition in the MBR created by the installer

pygrub doesn't care about the contents of the MBR as such, it just
parses the partition table and AFAIK pygrub does know how to find the
bootable partition. There should be nothing Squeeze or grub[12] specific
about this aspect of things,
I tried invoking the pygrub script directly against the LV and the partition within the LV:

/usr/lib/xen-3.2-1/bin/pygrub -i /dev/mapper/vg00-squeeze1_disk0
gives an error

kpartx -a /dev/mapper/vg00-squeeze1_disk0 &&
/usr/lib/xen-3.2-1/bin/pygrub -i /dev/mapper/vg00-squeeze1_disk0p1
finds the menu.lst I created manually, and displays the menu

If it is not an MBR issue on squeeze1_disk0, why doesn't pygrub find the boot partition and menu.lst? Does grub2 do anything else to the partition table? If I run fdisk on that partition table, it complains about cylinder boundaries:

fdisk /dev/mapper/vg00-squeeze1_disk0

Command (m for help): p

Disk /dev/mapper/vg00-squeeze1_disk0: 6979 MB, 6979321856 bytes
255 heads, 63 sectors/track, 848 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000373f

Device Boot Start End Blocks Id System /dev/mapper/vg00-squeeze1_disk0p1 * 1 32 248832 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/mapper/vg00-squeeze1_disk0p2 32 849 6563841 5 Extended
Partition 2 does not end on cylinder boundary.
/dev/mapper/vg00-squeeze1_disk0p5 32 849 6563840 8e Linux LVM






Reply to: