From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 11 19:53:01 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64CDB16A46F; Mon, 11 Jun 2007 19:53:01 +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 E125E13C45D; Mon, 11 Jun 2007 19:53:00 +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 05515690A7A; Mon, 11 Jun 2007 20:50:13 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id C56FF690AC5; Mon, 11 Jun 2007 20:50:12 +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.8 required=5.0 tests=AWL, BAYES_00, FORGED_RCVD_HELO, RCVD_IN_DSBL,RCVD_IN_SORBS_DUL autolearn=no version=3.1.7 Received: from epsilon.local.fnop.net (87-196-57-209.net.novis.pt [87.196.57.209]) by core.fnop.net (Postfix) with ESMTP id 14DFC690A7A; Mon, 11 Jun 2007 20:50:11 +0100 (WEST) Date: Mon, 11 Jun 2007 20:52:54 +0100 Message-ID: <86lkeqxo89.wl%rpaulo@fnop.net> From: Rui Paulo To: Chuck Swiger In-Reply-To: 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> <861wgjwnrw.wl%rpaulo@fnop.net> <200706102143.l5ALhQut038340@apollo.backplane.com> <86zm37v4ns.wl%rpaulo@fnop.net> 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 X-Mailman-Approved-At: Mon, 11 Jun 2007 20:09:15 +0000 Cc: freebsd-hackers@freebsd.org, Marcel Moolenaar , freebsd-current@freebsd.org, freebsd-geom@freebsd.org Subject: Re: GPT - (last) call for action X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2007 19:53:01 -0000 At Mon, 11 Jun 2007 12:41:18 -0700, Chuck Swiger wrote: > > Hi, all-- > > On Jun 10, 2007, at 3:13 PM, Rui Paulo wrote: > >> :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 > >> > >> I think I have it mostly figured out, but the 'start 40' in your > >> output can't be right. The intel documentation says that the > >> starting LBA in a PMBR record must be set to 1 by definition > >> (table 11-7 in the 1.10 documentation). > > > > I don't know why Apple does that. > > The offset of 40 sectors sounds like it is pointing to the first > partition listed within the GPT? > > A typical Intel Mac system using GPT ought to look something like this: > > # fdisk /dev/rdisk0 > Disk: /dev/rdisk0 geometry: 9964/255/63 [160086528 sectors] > Signature: 0xAA55 > Starting Ending > #: id cyl hd sec - cyl hd sec [ start - size] > ------------------------------------------------------------------------ > 1: EE 1023 254 63 - 1023 254 63 [ 1 - 160086520] > 2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused > 3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused > 4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused > > # gpt -r show /dev/rdisk0 > start size index contents > 0 1 PMBR > 1 1 Pri GPT header > 2 32 Pri GPT table > 34 6 > 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B- > xxxxxxxxxxxx > 409640 159414704 2 GPT part - 48465300-0000-11AA-AA11- > xxxxxxxxxxxx > 159824344 262151 > 160086495 32 Sec GPT table > 160086527 1 Sec GPT header Well, what's happening is that Boot Camp syncs the BIOS partition table with the GPT table, so the first partition should start at 40, just like the GPT. Why does it start at 40 ? Because you need room for the PMBR, the Primary GPT header and the Primary GPT table. Now, you don't seem to have used Boot Camp on your Mac, right? If you ever use it, fdisk /dev/rdisk0 will show things differently. The first partition with id 0xEE will should start at LBA 40 and end at LBA 409640. > The first, small partition is almost certainly a "boothfs" boot > partition, as described in the man page for Apple's version of > fdisk: I don't think so. The boothfs partition doesn't seem to be used on Intel Macs no longer. The EFI boot loader that comes with Intel Macs can read HFS+ without any help (actually it's an EFI module), so bootufs/boothfs partitions are no longer required. -- Rui Paulo