From: Ian Campbell Subject: Re: Bug#759018: [PATCH RFC] Provide prebuilt grub-xen binaries for host (dom0) use Date: Sun, 24 Aug 2014 22:42:37 +0100 Message-ID: <1408916557.30706.33.camel@hellion.org.uk> References: <1406569828.28644.32.camel@dagon.hellion.org.uk> <1408826287.30706.20.camel@hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1408826287.30706.20.camel@hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: 759018@bugs.debian.org, Ian Jackson Cc: xen-devel , pkg-grub-devel@lists.alioth.debian.org List-Id: xen-devel@lists.xenproject.org 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.