From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Kd35B-0007sh-S8 for mharc-grub-devel@gnu.org; Tue, 09 Sep 2008 09:16:37 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kd359-0007rG-WE for grub-devel@gnu.org; Tue, 09 Sep 2008 09:16:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kd358-0007qV-LS for grub-devel@gnu.org; Tue, 09 Sep 2008 09:16:35 -0400 Received: from [199.232.76.173] (port=34910 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kd358-0007qS-DY for grub-devel@gnu.org; Tue, 09 Sep 2008 09:16:34 -0400 Received: from mail-gx0-f12.google.com ([209.85.217.12]:34562) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kd358-0001h2-1V for grub-devel@gnu.org; Tue, 09 Sep 2008 09:16:34 -0400 Received: by gxk5 with SMTP id 5so10144507gxk.18 for ; Tue, 09 Sep 2008 06:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=NJu9jrL/4nY2vA8JrH9fEDGiYZAjMQZWZRD00HQ1048=; b=jWYEn/JeR+QjNHPAG3tpauR0QQFhMcKuHxQWm5BaSM2yiZfjgEC6KF1cvapgBMf0Db x2Xes/mzwGK5ZUhkffkR8sKA/LcT9ishXZ1rNKVK9PCoMyeXmmJzF7HeA7fZtYDpocnC 6C++wr1bE7MsMSSJeOJR37U/ROGxE7krVPnz8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=O2J1x+L4x5uyT1oyQmQQTeaW+Pap6/P/Q9cCwxV7VV9EDfmnal8eZ24hYiZp5fQVAB hiEQ+MIa04GFA321Fv8co4MBlVOLssg4+4/XK9kCd0qUW7qVZMsShb8hbPwXGRh+VEts uVeV+Nao2z6xSHz+gf4yMXPPaOhEgj28j8B4s= Received: by 10.86.92.7 with SMTP id p7mr12358859fgb.8.1220966188882; Tue, 09 Sep 2008 06:16:28 -0700 (PDT) Received: from ?192.168.1.15? ( [83.77.151.64]) by mx.google.com with ESMTPS id d6sm5889552fga.2.2008.09.09.06.16.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Sep 2008 06:16:28 -0700 (PDT) Message-ID: <48C6772A.4030804@gmail.com> Date: Tue, 09 Sep 2008 15:16:26 +0200 From: phcoder User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: The development of GRUB 2 References: <48BED2B2.1060000@gmail.com> <20080904194015.GF9133@thorin> <48C05923.3060001@gmail.com> <20080908133815.GA21754@thorin> <48C56E79.9080502@gmail.com> <20080908183119.GC31031@thorin> <48C5C78F.8010502@gmail.com> <20080909123759.GA3079@thorin> In-Reply-To: <20080909123759.GA3079@thorin> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] Re: Multiple partition maps X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 13:16:36 -0000 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