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

Re: [Xen-devel] Bug#759018: [PATCH RFC] Provide prebuilt grub-xen binaries for host (dom0) use



On Sat, 2014-08-23 at 21:38 +0100, Ian Campbell wrote:

(Context for new CC: I'd like to provide a Debian package for dom0 which
includes pvgrub2 binaries which can be referenced from your domain cfg
files as the bootloader/kernel. The associated Debian wishlist bug is
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759018)

> diff --git a/debian/grub-xen-host_grub.cfg
> b/debian/grub-xen-host_grub.cfg
> new file mode 100644
> index 0000000..1ad895c
> --- /dev/null
> +++ b/debian/grub-xen-host_grub.cfg
> @@ -0,0 +1,25 @@
> +# First search for a suitable grub to chainload
> +search -s -f /boot/grub/@@TARGET@@/core.elf
> +if multiboot /boot/grub/@@TARGET@@/core.elf ; then
> +       echo "Chainloading (${root})/boot/grub/@@TARGET@@/core.elf"
> +       boot
> +fi
> +
> +search -s -f /grub/@@TARGET@@/core.elf
> +if multiboot /grub/@@TARGET@@/core.elf ; then
> +       echo "Chainloading (${root})/grub/@@TARGET@@/core.elf"
> +       boot
> +fi
[...]
> diff --git a/debian/rules b/debian/rules
> index f478e94..18f4776 100755
> --- a/debian/rules
> +++ b/debian/rules
> [...]
> +debian/stamps/build-grub-xen-host-i386: GRUB_TARGET := i386-xen
> +debian/stamps/build-grub-xen-host-amd64: GRUB_TARGET := x86_64-xen
> [...]
> +       sed -e "s/@@TARGET@@/$(GRUB_TARGET)/g" \

The net result of the above is that the dom0 core.img built by the
package will search /boot/grub/{i386,x86_64}-xen/core.elf (for the arch
matching itself only) and then the version without the /boot prefix (for
systems with separate /boot).

Colin mentioned at debconf that it would be good if these paths were
standard across all distros -- probably this is best treated as
something which upstream Xen specifies a standard on, so CCing xen-devel
and Ian J who has previously been involved with these conversations. I'm
not sure what the best way to promulgate the spec is -- I think a patch
to add xen.git/docs/misc/pvgrub2.markdown would be sufficient (it would
end up under http://xenbits.xen.org/docs/).

Other alternatives for the paths might be things in the /boot/xen
"namespace" rather than /boot/grub, I don't mind which so long as it is
decided. Unless someone has a strong preference I'm inclined to go with
the paths as they happen to be in the patch above.

Ian.



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


 


Rackspace

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