Fixing update-grub to work with paravirt ops (2.6.22+) Xen kernels

Robert Millan rmh at aybabtu.com
Wed May 7 15:23:33 UTC 2008


On Wed, May 07, 2008 at 03:54:53PM +0100, Ian Campbell wrote:
> 
> Just to clarify that there are two sets of patches/issues at hand here:
> 
> The patch I sent to grub-devel is about having grub/grub2 understand the
> xvd device types. That is #456776 against grub and #456777 against
> grub-2. I'll respond to the comments on grub-devel when I get home
> tonight and have a moment to check my facts etc. I'm completely happy to
> work on getting this included in grub-2 first as you request.

Thanks.

> The second issue is the behaviour of update-grub in grub legacy wrt to
> kernels with CONFIG_XEN(_PRIV..._GUEST) vs CONFIG_PARAVIRT
> +CONFIG_XEN. The issue is that grub legacy's update-grub does not
> handle the CONFIG_PARAVIRT+CONFIG_XEN case. As far as I can tell grub-2
> currently has no special handling of Xen enabled kernels
> (i.e. /etc/grub.d/10_linux doesn't have any Xen specific checks) and so
> there is no problem with grub-2[0].
> 
> My preferred patch for this issue is
> update-grub-no-xen-special-case.patch which makes the grub and grub-2
> behaviour WRT Xen enabled kernels the same by removing the Xen special
> cases from grub-legacy. I think this is the correct thing to do since
> the special casing in grub legacy, while a nice idea, is mostly just
> confusing and gets in the way of the admin (e.g. it doesn't work if you
> create your guest filesystem in a chroot or if you wish to switch
> between HVM and PV mode, e.g. #479478). In this case there is no
> equivalent patch required for grub-2 and so no regression is created by
> patching grub-legacy.
> 
> If you prefer the special casing I could look at creating a patch for
> grub-2 which implements the same scheme as
> update-grub-better-xen-support.patch does for grub-legacy.

Where can I find update-grub-no-xen-special-case.patch?  I'll have a look.

Although, it's probably better to discuss with upstream whether we should
special-case in GRUB 2 or not.  If we decide that special-casing is a bad
idea, I'd probably be fine with removing it in GRUB Legacy for consistency,
but we'd have to evaluate the reasons why it was added in first place (can
you provide some pointers to that?).

> [0] As a separate issue grub-2 doesn't yet know about creating stanzas
> for domain0 use, i.e. hypervisor+dom0 kernel but that is unrelated to
> the above. I was planning to have a tinker with
> making /etc/grub.d/nn_xen at some point, not sure if that is a patch for
> you or the xen maintainers though.

I'm not sure either... I suppose it depends a lot on how much dependant on
our interfaces will the resulting code be.  It's probably also a good idea
to discuss it in grub-devel.

Thank you

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)



More information about the Pkg-grub-devel mailing list