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

Re: [Xen-users] Booting pv-ready distro installer.iso as Xen PV DomU drops to grub prompt?



Hi Ian,

On Wed, Apr 15, 2015, at 01:25 AM, Ian Campbell wrote:
> > kernel = "/usr/lib/grub2/x86_64-xen/grub.xen"
> 
> Where did you get this binary from?
> 
> Are you following
> https://blog.xenproject.org/2015/01/07/using-grub-2-as-a-bootloader-for-xen-pv-guests/
>  or something else?

This binary is grub2 pkg-installed

 rpm -q --whatprovides /usr/lib/grub2/x86_64-xen/grub.xen
  grub2-x86_64-xen-2.02~beta2-20.5.1.x86_64

> > is supposed to be sufficient.
> 
> But, I think you are trying to start the installer itself using pvgrub,
> is that right?

yes, the goal is to start the iso installer in PV mode.

but, not using pvgrub.  rather, with pvgrub2.

> My (completely wild) guess is that those will be found in an EFI System
> Partition stored elsewhere in the ISO image (in an el torito boot sector
> or something).

Hm.  I've looked, but maybe not in all the right places ...

> However even if they were present they will be for the native version of
> grub baked into the ISO and not the pvgrub2 which you've provided
> externally, so you would want to ensure that you included those modules
> into the grub image (i.e. list them when running grub-mkimage).

Aha.  I'll speculate that the distro-provided pkg may NOT have done that

> I'm also not entirely sure if the linuxefi/initrdefi commands will
> support launching a PV kernel, since they likely expect an EFI image.
> During the install I would expect the distro to notice that you aren't
> running EFI and for the installed system to end up with the non-EFI
> stanzas in grub.cfg. Or maybe linuxefi is smart enough to fallback to
> the other method if the given file isn't an EFI PE image, that would be
> rather useful.

Fwiw I AM running an EFI box.  The Dom0 is booted to EFI.  I'm guessing that 
that's nonsensical for a DomU, and that THAT is what should be "noticed"?

> > (1) How do I get the DomU config to recognize the configfile without
> > forcing a visit to the grub prompt?
> 
> Passing it on the guest command line might work (it did with pvgrub1,
> not sure about 2).
> 
> If not then the path needs to be baked into the grub binary you are
> using, i.e. by passing appropriate parameters to grub-mkimage when you
> make your grub.xen.

I had tried building my own binary

grub2-mkimage -v \
 -O x86_64-xen \
 -c /home/lt/tmp/grub-bootstrap.cfg \
 -m /home/lt/tmp/memdisk.tar \
 -o /home/lt/tmp/grub-x86_64-xen.bin \
 /usr/lib/grub2/x86_64-xen/*.mod

The binary is created but that, too, fails to properly launch the PV guest from 
the iso.

BUT, iiuc, this ^^ is where I'd need to

  "ensure that you included those modules into the grub image (i.e. list them 
when running grub-mkimage)."

I'll get that how of that figured out and give it a try.

What does work is to launch the iso in HVM mode, install the guest as an HVM 
DomU, then *convert* HVM -> PV.  That DomU is up & dunning right now ...  But 
it's a pain to get to. Hoping with this ^^ advice to get further on this.

Thanks for the guidance.

LT

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.