GPT Support on Freebsd

Marcel Moolenaar xcllnt at mac.com
Thu Oct 30 10:49:32 PDT 2008


On Oct 30, 2008, at 6:36 AM, John Baldwin wrote:

> Ok, so it's not a PMBR.  My understanding is that a GPT requires the  
> MBR to be
> a PMBR (only one partition in the 4th slot with a special type of  
> 0xee that
> covers the whole disk).  What this box is doing is trying to make  
> the MBR
> match the first 4 partitions in the GPT.  I'm not sure if you will  
> be able to
> get FreeBSD's GPT stuff to recognize that reliably.  Marcel (cc'd)  
> might have
> some ideas.

In FreeBSD 6, the kernel checks explicitly for a PMBR when it checks
for a GPT. Besides being part of the specification, it also avoids
conflicts. In the GEOM framework, there's no a priori support for
having one GEOM control another. When there's a valid MBR as well as
a valid GPT, it's undeterministic which one will be used, unless
they both cooperate. They don't.

This is where GPart helps out. In FreeBSD 7 and up, GPart supports
multiple partitioning schemes, including MBR and GPT. The kernel
will not enforce a PMBR in front of a GPT, because upon detecting
both a MBR and a GPT, the GPT will be used. However, this only
applies when the kernel is configured with GEOM_PART_MBR and not
with GEOM_MBR. At this time GEOM_MBR is still the default.

So, to make it work for you, you need at least FreeBSD 7.1 (to
be released shortly) or use next month's snapshot and build a
custom kernel without GEOM_MBR and with GEOM_PART_MBR.

In FreeBSD 8 and up GPart is the default and you won't have to make
a custom kernel in that case.

FYI,

-- 
Marcel Moolenaar
xcllnt at mac.com





More information about the freebsd-questions mailing list