grub / grub2 conflicts
mjg59 at srcf.ucam.org
Thu Sep 15 16:01:25 UTC 2011
On Thu, Sep 15, 2011 at 04:56:43PM +0100, Richard W.M. Jones wrote:
> For grub1 guests, it has turned out not to matter which specific
> version of grub [as long as it was grub1] was used, as apparently
> grub-install updates all files needed in /boot/grub as appropriate.
> Or at least we haven't come across a guest where this hasn't worked
> (yet -- we could be in for a surprise).
The most obvious case where it can fail involves grub being effectively
unmaintained, and so various vendors have extended it in different ways.
You may end up with valid configuration files for one distribution that
can't be parsed by the grub for another. The assumption you're making is
fragile. It's even worse for grub2, since it has a built-in module
loader. Modules built for one version of grub aren't guaranteed (or even
really expected) to work when loaded into another.
> I'm very interested in how to reinstall bootloaders *without* invoking
> guest code. Also in how to not break the bootloader when moving or
> aligning the boot partition, which sometimes happens for reasons we
> don't understand (but not on all grub1 guests, only on RHEL 5 era
You're asking for the impossible. The only supportable bootloader for a
specific guest is the bootloader that matches the installed OS. If you
want to support grub2 on Ubuntu, for instance, you'll need Ubuntu's
grub2 - not Fedora's. The binary interface may have changed between
Matthew Garrett | mjg59 at srcf.ucam.org
More information about the devel