Bug#776450: Xen PVH support for grub-xen in Buster

Colin Watson cjwatson at debian.org
Sat Jan 5 19:04:24 GMT 2019


On Thu, Jan 03, 2019 at 01:02:47AM +0100, Hans van Kranenburg wrote:
> In december, Xen PVH support has been committed in grub master:
> https://www.mail-archive.com/grub-devel@gnu.org/msg28125.html
> 
> The last pieces needed in the Linux kernel to boot PVH with grub2 landed
> in Linux 4.20. I asked our kernel team to carry those patches on top of
> the Linux 4.19 kernel that is going to ship in Buster, and that wish was
> granted:
> 
> https://salsa.debian.org/kernel-team/linux/commit/4d63e6ccbbd6081068633b1147e0f77a59379795
> 
> Please see the commit message in there for an explanation why having the
> possibility to boot PVH+grub in Debian Buster out of the box would be great.
> 
> So here's the question: Do you want to help completing the puzzle and
> getting a PVH capable grub2 boot image in the grub-xen-* packages in Buster?

I think I'm OK with cherry-picking the relevant patch stack.  Presumably
this would need to be in new grub-xen-pvh-bin / grub-xen-pvh binary
packages, as is usual for separate platform builds?

> Now, I create a grub.cfg file and then...
> 
> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -o
> grub-i386-xen_pvh.bin -O i386-xen_pvh -d grub-core/
> boot/grub/grub.cfg=grub.cfg
> 
> ...I end up with something that I can use as kernel image for the Xen
> PVH virtual machine.

Can you elaborate on what you mean by "use as kernel image for the Xen
PVH virtual machine"?  In other words, what does the process of
installing a boot loader in a PVH guest look like?  The current code in
upstream grub-install essentially just does a grub-mkimage but doesn't
have any platform-dependent install steps.

If you run upstream grub-install, are you then just supposed to write
'kernel = "/boot/grub/i386-xen_pvh/core.elf"' in your guest
configuration file?  In PVH mode, is the file name referenced via
"kernel" loaded from the dom0's filesystem or the domU's?

(Compare
https://salsa.debian.org/grub-team/grub/blob/master/debian/patches/grub-install-pvxen-paths.patch
which we carry for PV guests, although I gather PVH is sufficiently
different that the same approach probably doesn't work.)

-- 
Colin Watson                                       [cjwatson at debian.org]



More information about the Pkg-grub-devel mailing list