Date: Sun, 25 Aug 2002 01:49:05 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Julian Elischer <julian@elischer.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/geom geom_gpt.c Message-ID: <20020825084904.GA3192@dhcp01.pn.xcllnt.net> In-Reply-To: <Pine.BSF.4.21.0208241557190.73088-100000@InterJet.elischer.org> References: <200208242242.g7OMgInd018655@freefall.freebsd.org> <Pine.BSF.4.21.0208241557190.73088-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 24, 2002 at 03:58:59PM -0700, Julian Elischer wrote: > have I got this right.... > > ad0a ->ad0p1 > > ?? > > please give examples.... Peter explained it already, but here's a real-life example: itanium% sudo ./gpt -rvvv show da0 gpt show: /dev/da0: mediasize=9186603008; sectorsize=512; blocks=17942584 gpt show: /dev/da0: MBR at sector 0 gpt show: /dev/da0: MBR partition: type=239, start=63, size=208782 gpt show: /dev/da0: MBR partition: type=165, start=208845, size=17719695 gpt show: /dev/da0: Pri GPT at sector 1 gpt show: /dev/da0: GPT partition: type=c12a7328-f81f-11d2-ba4b-00a0c93ec93b, start=63, size=208782 gpt show: /dev/da0: GPT partition: type=516e7cb6-6ecf-11d6-8ff8-00022d09712b, start=208845, size=13525391 gpt show: /dev/da0: GPT partition: type=516e7cb5-6ecf-11d6-8ff8-00022d09712b, start=13734236, size=4194304 gpt show: /dev/da0: Sec GPT at sector 17942583 start end size contents 0 0 1 MBR 1 1 1 Pri GPT header 2 33 32 Pri GPT table 34 62 29 63 208844 208782 GPT partition 208845 13734235 13525391 GPT partition 13734236 17928539 4194304 GPT partition 17928540 17942550 14011 17942551 17942582 32 Sec GPT table 17942583 17942583 1 Sec GPT header The first MBR partition (type=239) is an EFI partition (FAT filesystem). The second should be well-known. In the FreeBSD slice is a BSD label with 2 partitions: root and swap. The GPT equivalent has 3 partitions. The first (starting at LBA 63) mirrors the MBR EFI partition. The other two are an UFS partition and a swap partition (see sys/gpt.h for the UUIDs) and exactly mirror the BSD partitions inside the FreeBSD slice. Thus, with GPT we have a non-nested (ie linear) partitioning scheme: da0s1 = da0p1 da0s2a = da0p2 da0s2b = da0p3 The non-nested partitioning is not inherent. It's still possible to have BSD disklabels inside MBR slices inside GPT partitions and I have reserved a GPT partition type for BSD disklabels. If you use this partition type, you do get the well-known slice naming, but it's mostly for compatibility and/or inter-operability. FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020825084904.GA3192>