grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: Multiple partition maps


From: Robert Millan
Subject: Re: [PATCH] Re: Multiple partition maps
Date: Tue, 9 Sep 2008 14:37:59 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Sep 09, 2008 at 02:47:11AM +0200, phcoder wrote:
> Robert Millan wrote:
> > On Mon, Sep 08, 2008 at 08:27:05PM +0200, phcoder wrote:
> >> Robert Millan wrote:
> >>> On Thu, Sep 04, 2008 at 11:54:43PM +0200, phcoder wrote:
> >>>> BTW GPT module checks the protective MBR. In some cases when legay OS
> >>>> modified the MBR it's no longer "protective MBR". And in theese cases
> >>>> GRUB will refuse to boot. Isn't the magic number check enough?
> >>> If there's at least one protective GPT partition (0xee), I think this 
> >>> should
> >>> be considered enough to accept the partmap as GPT.
> >>>
> >> In GPT module if first partition is not of type 0xee then it's
> >> considered that no GPT is present. Is think that this check is
> >> error-prone (with e.g. bootcamp) and unnecessary
> > 
> > Agreed.  Can you fix this?
> > 
> 
> I send a patch for it. However I couldn't test it because of the bug in
> the make system. About the bug I'll post in appropriate thread. In that
> patch the pc module explicitely checks for the absence of GPT table. IMO
> it's ugly. Another alternative would be to assign priorities to the
> partition tables. I also tried this way and send patch for it. Again I
> couldn't test it.

This patch looks overly complicated.  Fixing the discussed problem ought
to be much simpler...

> -  /* Make sure the MBR is a protective MBR and not a normal MBR.  */
> -  if (mbr.entries[0].type != GRUB_PC_PARTITION_TYPE_GPT_DISK)
> -    return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map 
> found");

... here, it'd be just a matter of replacing this hardcoded '0' with an
iterator.

And maybe something similar for partmap/pc.c.

-- 
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 via email to

[Prev in Thread] Current Thread [Next in Thread]