Re: grub / grub2 conflicts

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

 




----- Original Message -----
> On Fri, Sep 16, 2011 at 03:01:06PM -0400, Doug Ledford wrote:
> > On 9/15/2011 12:01 PM, Matthew Garrett wrote:
> > > On Thu, Sep 15, 2011 at 04:56:43PM +0100, Richard W.M. Jones
> > > wrote:
> > > 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.
> > 
> > No it's not.  Grub doesn't install the 1.5 stage or the 2nd stage
> > loaders, it uses the ones present in the root filesystem defined by
> > the
> > install command.  In this case, that's going to be the modules in
> > the
> > guest vm filesystem.  As such, anything valid in the guest vm's
> > copy of
> > grub will work in the guest vm even if the grub used to install the
> > master boot record comes from the host.
> 
> grub-install *does* install the 1.5 and 2nd stage loaders.

OK, technically it install the 1.5 or the 2.0 if you don't use a 1.5 (if you install both the 1.5 and 2.0, then it patches the name of the 2.0 into the 1.5 that it installs and the 1.5 reads the filesystem to find the 2.0 so that it isn't subject to breaking boot if the 2.0 moves due to an updated version or some such).  However, it installs them from the files you list to the install command as I listed in my previous email.  So, they are still compatible with the guest vm grub if you follow a procedure like I listed.  I haven't looked to see if the 512 byte MBR is hard coded in grub or if it grabs it from /boot/grub and installs what it finds there, so I can't speak to that.

> Even if it
> didn't, I'm not convinced it's guaranteed that an arbitrary grub
> stage 1
> can launch an arbitrary grub stage 1.5 since there are assumptions
> about
> register and stack state - see start.S.

And I'm sure those assumptions haven't changed probably in the last 5 years or more.  But, I can look through the old grub CVS versions if it would help settle your concerns.  Those sorts of hard coded constants tend not to change much, especially if the coders have any sort of clue what so ever about compatibility issues.

> 
> --
> Matthew Garrett | mjg59@xxxxxxxxxxxxx
> --
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxxx
> https://admin.fedoraproject.org/mailman/listinfo/devel
> 
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux