All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Fix when installing on pationless but partionable medium
Date: Sat, 18 Jul 2009 21:22:11 +0200	[thread overview]
Message-ID: <20090718192211.GN8867@thorin> (raw)
In-Reply-To: <d7ead6de0907181200i4f802544g75a061a6bfc9587e@mail.gmail.com>

On Sat, Jul 18, 2009 at 09:00:36PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Sat, Jul 18, 2009 at 8:42 PM, Robert Millan<rmh@aybabtu.com> wrote:
> > On Fri, Jul 17, 2009 at 06:41:59PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> >> Sometimes a media that can be partioned isn't really partioned. E.g.
> >> usb sticks. This is a patch to handle this situation.
> >
> > But we had a check for this already, is it not working?
> >
> >  if (! dest_dev->disk->has_partitions)
> >    {
> >      grub_util_warn ("Attempting to install GRUB to a partitionless disk.  This is a BAD idea.");
> >      goto unable_to_embed;
> >    }
> has_partitions is set by driver and has_partitions is a misnomer and
> it should be really can_be_partitioned.

You're right.  I think it's fine if we rename it.

> As a matter of fact this is
> even more problematic since whether has_partition is set or no often
> depends whether author know about partitioned media of given kind. I
> think this field should be ditched altogether

I don't understand what you mean here.

> > I'm not sure there's much we can do about this.  Using heuristics sounds like
> > it will make the solution worse than the problem.  I don't care much about
> > Microsoft filesystems, but I'd hate to see GRUB fail on a completely sane
> > ext3 inside msdos label because it happened to look like FAT in raw disk at
> > the same time.
> The approach proposed by Collin avoids such problems since correct
> pc_partition_map is always detected as such.

I haven't looked at the source code, but what he said is we can determine if
an MBR is valid by checking the bootable flag, and this is not always so.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



  reply	other threads:[~2009-07-18 19:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 16:41 [PATCH] Fix when installing on pationless but partionable medium Vladimir 'phcoder' Serbinenko
2009-07-17 16:51 ` Colin Watson
2009-07-18 18:45   ` Robert Millan
2009-07-18 19:01     ` Vladimir 'phcoder' Serbinenko
2009-07-18 19:17       ` Robert Millan
2009-07-19 10:07         ` Colin Watson
2009-07-22 17:16           ` Robert Millan
2009-07-22 17:36             ` Pavel Roskin
2009-07-22 17:43               ` Vladimir 'phcoder' Serbinenko
2009-07-22 17:46                 ` Pavel Roskin
2009-07-26 12:53                   ` Vladimir 'phcoder' Serbinenko
2009-07-18 18:42 ` Robert Millan
2009-07-18 19:00   ` Vladimir 'phcoder' Serbinenko
2009-07-18 19:22     ` Robert Millan [this message]
2009-07-18 21:28       ` Vladimir 'phcoder' Serbinenko
2009-07-22 17:22         ` Robert Millan
2009-07-22 17:45           ` Pavel Roskin
2009-07-26 13:54           ` Vladimir 'phcoder' Serbinenko
2009-07-28 17:33             ` Robert Millan
2009-07-28 21:42               ` Vladimir 'phcoder' Serbinenko
2009-07-31 15:43                 ` Robert Millan
2009-07-19 10:02       ` Colin Watson
2009-07-22 17:24         ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090718192211.GN8867@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.