G_PART macro definitions

perryh at pluto.rain.com perryh at pluto.rain.com
Thu Dec 2 11:11:06 UTC 2010


"Andrey V. Elsukov" <bu7cher at yandex.ru> wrote:

> On 01.12.2010 12:25, perryh at pluto.rain.com wrote:
> > There's _something_ -- probably several things -- about all this
> > that I am not understanding at all, the most important being:
> > 
> >     How _should_ I be setting this up, so as to
> >     * mirror only one partition -- not the whole disk or the whole
> >       FreeBSD slice,
> >     * subdivide that mirror into journalled root, /var, and /usr
> >       filesystems, and
> >     * have the resulting root partition be bootable
> >     given that the system is too old for its BIOS to recognize GPT?
>
> I do not know about any BIOS restrictions which can prevent booting
> from GPT. BIOS does not should know anything about GPT.

I'm not sure where I first got the impression that not all BIOS
can handle GPT, but the most recent apparent confirmation was here:
http://lists.freebsd.org/pipermail/freebsd-questions/2010-September/221669.html

> It only does run boot code from PMBR, PMBR does run boot code from
> "freebsd-boot" partition, and so on.

PMBR is one of the GPT-isms that I haven't made sense of yet
(and was hoping not to have to :)

> 4. ad0s2a is offered for tasting. It depends which ranges has this
> provider, by default it starts with zero offset

I had gotten the impression somewhere that "a" partitions started
at a non-zero block offset in the slice, but maybe I am thinking
of the first slice defined by an MBR rather than the "a" partition
defined by a BSD label.  If the "a" partition is at offset zero
of its slice, and thus contains the label which defines it, that
explains everything:

gm0 starts at offset zero of ad0s2a -- its metadata is at the end
of its provider -- and the BSD label on gm0 (which was intended
to partition gm0 into gm0a, gm0d, and gm0e) occupies exactly the
same disk block(s) as the BSD label on ad0s2.  IOW the process of
labelling gm0 overwrote and destroyed the label on ad0s2.

The reason the original ad0s2 label seems to have no effect is that
it no longer exists!


More information about the freebsd-geom mailing list