[Pkg-xen-devel] Pygrub problem
Paul van der Vlis
paul at vandervlis.nl
Wed Nov 26 13:50:34 UTC 2008
Ian Campbell schreef:
> On Wed, 2008-11-26 at 14:14 +0100, Paul van der Vlis wrote:
>> Launching
>> bootloader as ['/usr/lib/xen-3.2-1/bin/pygrub', '--args=root=/dev/sda2
>> ro console=xvc0 xencons=xvc0',
>> '--output=/var/run/xend/boot/xenbl.21780', '-q',
>> '/dev/volume0/lenny.vandervlis.nl-swap'].
>
> It's interesting that it appears to be looking in the -swap device for
> the kernel, seems unlikely to work. I guess there is some way to make it
> select a more sensible disk. I usually use a single device with a
> partition so I can mark one of them bootable, I'm not sure how it works
> in the multiple device pretending to be partitions way of thinking.
>
> Does switching your disk statement make it work? e.g.
> disk = [
> 'phy:/dev/volume0/lenny.vandervlis.nl-disk,sda2,w',
> 'phy:/dev/volume0/lenny.vandervlis.nl-swap,sda1,w',
> ]
> This seems more like a workaround than a fix though.
It's a workarround but it works! thanks!
> This code in /usr/lib/xen-3.2-1/lib/python/xen/xend/XendDomainInfo.py
> looks suspect
> disks = [x for x in self.info['vbd_refs']
> if self.info['devices'][x][1]['bootable']]
>
> if not disks:
> msg = "Had a bootloader specified, but no disks are bootable"
> log.error(msg)
> raise VmError(msg)
>
> devinfo = self.info['devices'][disks[0]]
> It goes to the trouble of making a list of bootable devices but then
> ignores it and goes back to self.info['devices']. I'd guess that the
> last line here should be:
> devinfo = disks[0]
> Although I don't know how you make bootable be true. You may find
> bringing this up on xen-devel useful.
It's a bug, and it would be good to repear it.
When I see the code, I don't think it's really difficult.
With regards,
Paul van der Vlis.
--
http://www.vandervlis.nl/
More information about the Pkg-xen-devel
mailing list