Bug#770412: grub-xen: fails to install in a chroot

Ian Campbell ijc at hellion.org.uk
Sat Nov 22 10:46:44 UTC 2014


Control: tag -1 +patch

On Sat, 2014-11-22 at 00:39 +0000, Colin Watson wrote:

I only saw this after I sent my previous mail with patch.

(also forgot to add the patch tag, doing that here instead)

> On Fri, Nov 21, 2014 at 12:42:43PM +0000, Ian Campbell wrote:
> > Looking at https://piuparts.debian.org/jessie/source/g/grub2.html it
> > seems the test passed for other grub-* packages, e.g. grub-pc and
> > grub-efi, in the previous release. I'm a bit confused by this since at
> > least on first glance most of the related code seems to be the same in
> > grub-xen as in those others.
> 
> I think the difference here is likely that at least some of the other
> platforms only run grub-install after it's been run once already, and as
> you say we probably just don't run piuparts on the more exotic
> architectures.  Not clear that that approach makes sense for Xen though.
> 
> > Is it expected that the chroot in a piuparts test won't have a /dev
> > mounted? What about /sys and /proc?
> 
> We can't necessarily guarantee that /dev is comprehensible by
> grub-install in things like loopback setups.  But we do at least need to
> figure out the file system in use for /boot/grub/ in order to produce a
> useful core image, so we probably can't just stub out this check.

Agreed.

> I'm not sure that ischroot or running-in-container is suitable.

No, I later concluded not too.

> It seems to me that you want to be able to prepare an image in a chroot or
> a container which will be bootable by Xen.

Yes, agreed.

>   It's not ideal, but perhaps
> just sticking in "|| true" is semi-reasonable in this case to pacify
> piuparts.

I ended up doing essentially that but in a slightly more complex way
involving a warning message. I also applied it to more than just
grub-xen (i.e. grub-efi-*, grub-ieee1275, grub-yeelong too). I'll back
off on one or both of those in favour of || true though if you prefer.

> It would be worth checking whether the current code works in
> image-build-like scenarios such as live-build.

I doubt grub-xen is being installed there at all, but I'd expect the
same class of errors to be affecting grub-efi-* too,
iff /boot/efi/EFI/Debian existed in those scenarios -- which perhaps it
does not.

Ian.



More information about the Pkg-grub-devel mailing list