FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 09-15-2011, 02:46 PM
Peter Jones
 
Default grub / grub2 conflicts

On 09/15/2011 10:27 AM, Richard W.M. Jones wrote:
> This is about:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=737261
> "F16 TC2 DVD grub/grub2 conflict"
>
> The grub package in F16 has a "Conflicts: grub2" line. There are no
> actual file conflicts, but this was added in order to workaround some
> bugs in grubby, including:

As mjg59 said - it's really not reasonable to have multiple bootloaders
installed on a system (especially by default, as you're essentially asking!)
It greatly increases the complexity in our tooling, as well as greatly
increasing the chances somebody accidentally bricks a box by running tools
for the bootloader they're not using.

> - https://bugzilla.redhat.com/show_bug.cgi?id=725185
> - https://bugzilla.redhat.com/show_bug.cgi?id=731226
>
> Now the problem is that libguestfs provides a way for people to use
> grub-install (and in the future grub2-install) on guests. Think for
> example if you had a mix of Fedora 15 and Fedora 16 guests on your
> host.
>
> libguestfs, as I guess is well known, uses tools from the host in
> order to manage guests.

Honestly I don't think this is that well known, and looking at it I'm amazed
this passed package review. Why aren't you guys using any of the tools we've
got to build images from packages instead of installing things on the host?
This is terribly bad behavior.

> This is done so that we don't have to
> separately package all the tools, which would be a security headache
> (if there's a security issue discovered in grub-install, just updating
> the host package is enough to fix it -- you don't have to track down a
> separate copy statically bundled in libguestfs).

Trading half of one security problem (since you're not eliminating the
problem of security bugs already being installed in a guest) for the
problem of installing lots of extra packages on the host? Not a win.

> Even if you don't care about libguestfs, you might well wish to
> loop-mount an old guest and run grub-install --root-directory=... on
> it.

Nice strawman, but in that case grub-install will already be on any properly
installed guest.

> So I propose that we drop this conflicts and fix grubby instead.

We certainly can't do that without at least first fixing other problems. It'd
also be good to think about how we can fix libguestfs's terrible behavior.

> However the maintainer of grub is unwilling to do this, which is why
> I've escalated this issue here.

I've been asking you to explain why you need this and you stopped
participating in the conversation and started this thread instead. There are
a number of problems with this, not least that it's not how engineering
"escalations" even work. In any case, I *still* haven't said I'm unwilling
to remove the conflicts (though we do need to debug the real problem and see
if it's solvable first), though in general I think it's a correct thing to
have there. I wanted to understand why you needed it first. You've been
mighty uncooperative at getting your own problem solved.

--
Peter

Power corrupts. Absolute power is kind of neat.
-- John Lehman, Secretary of the Navy, 1981-1987
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 02:53 PM
Peter Jones
 
Default grub / grub2 conflicts

On 09/15/2011 10:36 AM, Richard W.M. Jones wrote:
> On Thu, Sep 15, 2011 at 03:31:49PM +0100, Matthew Garrett wrote:
>> On Thu, Sep 15, 2011 at 03:27:16PM +0100, Richard W.M. Jones wrote:
>>
>>> So I propose that we drop this conflicts and fix grubby instead.
>>
>> No. It is not sane to have multiple bootloaders installed on one
>> machine.
>
> There's an interesting verbal trick there. "multiple bootloaders" are
> not installed. Multiple versions of the grub RPM package are
> installed. Only one bootloader would be installed on the host.

It's really not useful or reasonable to think of grub and grub2 as "multiple
versions of the same bootloader" - they don't share tools, for example. But
even so, multiple versions of the same bootloader doesn't make sense either.

>> Requiring the ability to do so adds a significant amount of
>> extra complexity to the tools associated with it for no useful benefit.
>
> The useful benefit was outlined in the original email.

It really wasn't - it's still unclear why anybody would choose to do things
that way. On the face it's a completely wrong choice.

>> Just install the grub package in the guest, and chroot into the guest if
>> you need to run grub-install there.
>
> Running tools from out of the guest is insecure. There are several
> ways in which a guest could exploit the host if we did this. See
> "Security" here for some issues:
>
> http://libguestfs.org/guestfs.3.html#running_commands

"I wrote a web page about my opinions" does not make them fact. But even if we
took as given that it's somehow better not to use packages in the guest, it's
still not a reason to have the packages *unpacked and installed* on the host
system. Doing this introduces many more chances for exploitation and plain old
corruption and errors. At the very least it should be using raw, non-installed
packages on the host rather than installed ones. Which, by the way, Fedora
already has tools to accomplish.

--
Peter

Power corrupts. Absolute power is kind of neat.
-- John Lehman, Secretary of the Navy, 1981-1987
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 02:59 PM
Matthew Garrett
 
Default grub / grub2 conflicts

On Thu, Sep 15, 2011 at 03:36:55PM +0100, Richard W.M. Jones wrote:
> On Thu, Sep 15, 2011 at 03:31:49PM +0100, Matthew Garrett wrote:
> > On Thu, Sep 15, 2011 at 03:27:16PM +0100, Richard W.M. Jones wrote:
> >
> > > So I propose that we drop this conflicts and fix grubby instead.
> >
> > No. It is not sane to have multiple bootloaders installed on one
> > machine.
>
> There's an interesting verbal trick there. "multiple bootloaders" are
> not installed. Multiple versions of the grub RPM package are
> installed. Only one bootloader would be installed on the host.

grub and grub2 are different packages with approximately no code in
common. They're different bootloaders. We don't support having multiple
different bootloaders installed.

> > Just install the grub package in the guest, and chroot into the guest if
> > you need to run grub-install there.
>
> Running tools from out of the guest is insecure. There are several
> ways in which a guest could exploit the host if we did this. See
> "Security" here for some issues:
>
> http://libguestfs.org/guestfs.3.html#running_commands

We're talking about guest creation, aren't we? Why would you ever need
to run grub-install against a guest image that already exists? And if
you do, you're already going to have problems come F17. It's likely that
grub will no longer exist, but F15 guests will still need it rather than
grub2.

--
Matthew Garrett | mjg59@srcf.ucam.org
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 03:16 PM
"Richard W.M. Jones"
 
Default grub / grub2 conflicts

On Thu, Sep 15, 2011 at 10:46:34AM -0400, Peter Jones wrote:
> On 09/15/2011 10:27 AM, Richard W.M. Jones wrote:
> >So I propose that we drop this conflicts and fix grubby instead.
>
> We certainly can't do that without at least first fixing other problems.

Could you explain (preferably with a full list of bugs) what you were
trying to solve with the conflicts line in the spec file? The only
bugs I've seen so far describe problems in grubby, and this appears to
be a workaround for them. However it may be I don't have the full
picture.

> >However the maintainer of grub is unwilling to do this, which is why
> >I've escalated this issue here.
>
> I've been asking you to explain why you need this and you stopped
> participating in the conversation and started this thread instead.

Since you starting swearing at me on IRC, I thought it better that we
discuss this in technical terms, and mailing lists are in any case a
better forum for technical discussions than chat.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 03:21 PM
"Richard W.M. Jones"
 
Default grub / grub2 conflicts

On Thu, Sep 15, 2011 at 03:59:57PM +0100, Matthew Garrett wrote:
> We're talking about guest creation, aren't we?

No, we're talking about fixing and resizing existing guests, where
grub-install needs to be run to fix the bootloader.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 03:25 PM
Matthew Garrett
 
Default grub / grub2 conflicts

On Thu, Sep 15, 2011 at 04:21:36PM +0100, Richard W.M. Jones wrote:
> On Thu, Sep 15, 2011 at 03:59:57PM +0100, Matthew Garrett wrote:
> > We're talking about guest creation, aren't we?
>
> No, we're talking about fixing and resizing existing guests, where
> grub-install needs to be run to fix the bootloader.

So how do you ensure that the version you run is the same version as the
package installed in the guest? Having those not match is an invitation
for bizarre failure down the line.

--
Matthew Garrett | mjg59@srcf.ucam.org
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 03:28 PM
Peter Jones
 
Default grub / grub2 conflicts

On 09/15/2011 11:16 AM, Richard W.M. Jones wrote:
> On Thu, Sep 15, 2011 at 10:46:34AM -0400, Peter Jones wrote:
>> On 09/15/2011 10:27 AM, Richard W.M. Jones wrote:
>>> So I propose that we drop this conflicts and fix grubby instead.
>>
>> We certainly can't do that without at least first fixing other problems.
>
> Could you explain (preferably with a full list of bugs) what you were
> trying to solve with the conflicts line in the spec file? The only
> bugs I've seen so far describe problems in grubby, and this appears to
> be a workaround for them. However it may be I don't have the full
> picture.

You're correct that this initially was added to work around a problem in
grubby, and I fully intend to further investigate that, as I said above. But
the fact remains that having multiple bootloaders installed, especially with
such similarly named tools, is a *bad idea*.

>>> However the maintainer of grub is unwilling to do this, which is why
>>> I've escalated this issue here.
>>
>> I've been asking you to explain why you need this and you stopped
>> participating in the conversation and started this thread instead.
>
> Since you starting swearing at me on IRC, I thought it better that we
> discuss this in technical terms, and mailing lists are in any case a
> better forum for technical discussions than chat.

Nice try - but the (somewhat reasonable) swearing was *after* you decided
to stop participating in the conversation and decided to move the discussion
elsewhere instead of helping to find the best way to solve the problem.

In no way is walking away from an ongoing conversation with relevant other
people who are trying to help you an appropriate response. At best it's just
rude. That's why after you did that, I said that you were being an asshole.
I apologize if my language offended you; I was frustrated that you began
behaving in an uncooperative manor when Matthew and I were trying to analyze
the full scale of the problem and find possible solutions to it. I should
have behaved more excellently towards you, even after you refused to answer
our questions.

--
Peter
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 03:37 PM
"Richard W.M. Jones"
 
Default grub / grub2 conflicts

I will simply say that this is not my view of what happened. In any
case I hope we can be more excellent about this now.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 03:50 PM
"Richard W.M. Jones"
 
Default grub / grub2 conflicts

On Thu, Sep 15, 2011 at 10:46:34AM -0400, Peter Jones wrote:
> On 09/15/2011 10:27 AM, Richard W.M. Jones wrote:
> >libguestfs, as I guess is well known, uses tools from the host in
> >order to manage guests.
>
> Honestly I don't think this is that well known, and looking at it
> I'm amazed this passed package review. Why aren't you guys using
> any of the tools we've got to build images from packages instead of
> installing things on the host? This is terribly bad behavior.

I'm assuming you mean 'appliance-creator'? This tool isn't really
suitable; it's doing something quite different from what libguestfs
needs/uses. They're solving different problems.

I'd suggest that you familiarize yourself with how libguestfs goes
about it first. It's pretty well documented and I've included some
links below. Then if there specific packaging issues that could be
solved better then I'm very interested to know.

Rich.

For an overview of what libguestfs is:
http://libguestfs.org/

For an overview of the supermin appliance that we use and how it
is made:
http://libguestfs.org/febootstrap.8.html
http://libguestfs.org/febootstrap-supermin-helper.8.html
https://rwmj.wordpress.com/2010/12/10/tip-creating-throwaway-appliances-with-febootstrap/
https://rwmj.wordpress.com/2009/10/22/supermin-appliance-now-in-febootstrap/

For some more specifics on the internals of libguestfs:
http://libguestfs.org/guestfs.3.html#internals

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-15-2011, 03:56 PM
"Richard W.M. Jones"
 
Default grub / grub2 conflicts

On Thu, Sep 15, 2011 at 04:25:41PM +0100, Matthew Garrett wrote:
> On Thu, Sep 15, 2011 at 04:21:36PM +0100, Richard W.M. Jones wrote:
> > On Thu, Sep 15, 2011 at 03:59:57PM +0100, Matthew Garrett wrote:
> > > We're talking about guest creation, aren't we?
> >
> > No, we're talking about fixing and resizing existing guests, where
> > grub-install needs to be run to fix the bootloader.
>
> So how do you ensure that the version you run is the same version as the
> package installed in the guest? Having those not match is an invitation
> for bizarre failure down the line.

Well, this is interesting.

We're planning to snoop out whether the guest is using grub1 or grub2.
Previously this hasn't worked at all for (eg) Ubuntu guests. This is
why providing grub2 in Fedora is great for us.

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).

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
grub1).

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 07:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org