From owner-freebsd-geom@FreeBSD.ORG Sun Jun 10 20:57:04 2007 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE18216A41F; Sun, 10 Jun 2007 20:57:04 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 59A0D13C46E; Sun, 10 Jun 2007 20:57:04 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 26A43690A7A; Sun, 10 Jun 2007 21:33:08 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id DBA80690B56; Sun, 10 Jun 2007 21:33:07 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-125-90.net.novis.pt [87.196.125.90]) by core.fnop.net (Postfix) with ESMTP id 0B934690A7A; Sun, 10 Jun 2007 21:33:07 +0100 (WEST) Date: Sun, 10 Jun 2007 21:35:47 +0100 Message-ID: <861wgjwnrw.wl%rpaulo@fnop.net> From: Rui Paulo To: Marcel Moolenaar In-Reply-To: <8B01C1EC-D61A-484F-B308-6D6C8EB00EE6@mac.com> 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> <200706101752.l5AHqdE0035954@apollo.backplane.com> <8B01C1EC-D61A-484F-B308-6D6C8EB00EE6@mac.com> User-Agent: Wanderlust/2.15.5 (Almost Unreal) Emacs/21.3 Mule/5.0 (SAKAKI) X-cite-me: rpaulo MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-hackers@freebsd.org, Matthew Dillon , freebsd-current@freebsd.org, Ivan Voras , freebsd-geom@freebsd.org Subject: Re: GPT - (last) call for action X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jun 2007 20:57:04 -0000 At Sun, 10 Jun 2007 11:08:47 -0700, Marcel Moolenaar wrote: > > > On Jun 10, 2007, at 10:52 AM, Matthew Dillon wrote: > > > :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 seem to recall that the 0xEE partition is not the first, but rather > the second or third. It would make sense, because it has no function > other than to have the disk appear used. Bootcamp uses the mirroring > approach. No. The first partition is the EFI GPT (0xee): % fdisk -1 ******* Working on device /dev/ad0 ******* parameters extracted from in-core disklabel are: cylinders=116280 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=116280 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 238 (0xee),(EFI GPT) start 40, size 409600 (200 Meg), flag 0 beg: cyl 0/ head 0/ sector 41; end: cyl 406/ head 6/ sector 14 % gpt -r show ad0 gpt show: ad0: Suspicious MBR at sector 0 start size index contents 0 1 MBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - EFI System 409640 41943040 2 GPT part - Apple HFS 42352680 74857527 3 GPT part - FreeBSD UFS/UFS2 117210207 32 Sec GPT table 117210239 1 Sec GPT header -- Rui Paulo