From owner-freebsd-current@FreeBSD.ORG Sun Jun 10 17:52:43 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25DBE16A46C; Sun, 10 Jun 2007 17:52:43 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id D0FFF13C469; Sun, 10 Jun 2007 17:52:42 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.8/8.13.7) with ESMTP id l5AHqdT6035955; Sun, 10 Jun 2007 10:52:39 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.13.8/8.13.4/Submit) id l5AHqdE0035954; Sun, 10 Jun 2007 10:52:39 -0700 (PDT) Date: Sun, 10 Jun 2007 10:52:39 -0700 (PDT) From: Matthew Dillon Message-Id: <200706101752.l5AHqdE0035954@apollo.backplane.com> To: Marcel Moolenaar References: <4AB3C4C0-0DA1-482F-A4CD-375A53332F29@mac.com> <4D7CDA24-48FE-4319-A320-C8D7165E9EBC@mac.com> <200706092128.l59LSjRs027671@apollo.backplane.com> <57F8CCC1-1841-41AE-9F82-0C87FE53BE99@mac.com> Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Ivan Voras , freebsd-geom@freebsd.org Subject: Re: GPT - (last) call for action X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2007 17:52:43 -0000 :Technically speaking, the MBR can only have a single partition of :type 0xEE that covers the whole disk. This is to protect the GPT :from MBR-specific tools that do not know about the GPT. This is :not a bootable slice by definition. : :Practice is different. To support bootcamp on Intel-based Macs, :the MBR will have real partitions that mirror GPT partitions or :otherwise describe partitions outside the GPT controlled area. :These can be bootable partitions and the protective partition :(the one with type 0xEE) will not cover the whole disk anymore. : :The nasty part is keeping MBR and GPT partitions in sync, so it :may be better to have the MBR partition fall outside the GPT :controlled area. This can be done because the GPT header contains :the LBA of the first and last sectors on the disk that can be :assigned to a partition. You can free up space for MBR partitions :after the primary GPT table by adjusting the first LBA. In the :MBR partition you can put a GPT aware boot loader that uses the :GPT to find the real partitions... : :-- :Marcel Moolenaar In the bootcamp approach, is the GPT (0xEE) slice the first slice, and the bootcamp slice the second slice? I'm assuming it is. Do they mirror a GPT partition or do they use the uncontrolled area approach? I like the mirroring approach, because I can make the label manager just treat the special MBR slice (s2) as being part of the integrated GPT spec (which it is). From the end-user's point of view he would just do something like 'gptlabel -e ad0' and one of the GPT partitions listed would be the 'boot' partition. gptlabel would recognize the special nature of the partition and automatically and silently adjust the special MBR slice (s2) to match it. I don't like the out-of-band approach... I definitely want the partitions to be within GPTs managed area, at least for newly minted disks. With the in-band approach the gpt labeling program can take care of any special compatibility cases in a fairly straightforward and controlled manner. -Matt Matthew Dillon