From: phcoder <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Re: Multiple partition maps
Date: Tue, 09 Sep 2008 15:16:26 +0200 [thread overview]
Message-ID: <48C6772A.4030804@gmail.com> (raw)
In-Reply-To: <20080909123759.GA3079@thorin>
Robert Millan wrote:
> 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.
>
I don't think that this is enough since with bootcamp you can have a MBR
without a protective entry. This leaves us with just two option:
priorities and ugly check in partmap/pc.c. I would prefer the first one
since the second one is unextensible. With first one I'll be able to do
something similar to what you can find in other bootmanagers: ability to
have more then one "primary" partition (like in http://symon.ru ).
Vladimir 'phcoder' Serbinenko
next prev parent reply other threads:[~2008-09-09 13:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 18:08 Multiple partition maps phcoder
2008-09-04 19:40 ` Robert Millan
2008-09-04 21:49 ` phcoder
2008-09-05 10:08 ` Robert Millan
2008-09-04 21:54 ` phcoder
2008-09-08 13:38 ` Robert Millan
2008-09-08 18:27 ` phcoder
2008-09-08 18:31 ` Robert Millan
2008-09-09 0:08 ` phcoder
2008-09-09 0:47 ` [PATCH] " phcoder
2008-09-09 12:37 ` Robert Millan
2008-09-09 13:16 ` phcoder [this message]
2008-09-09 15:01 ` 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=48C6772A.4030804@gmail.com \
--to=phcoder@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox