Boot Drive Nomenclature and How to Figure it out

Adam Vande More amvandemore at
Fri Sep 3 15:41:15 UTC 2010

On Fri, Sep 3, 2010 at 10:04 AM, Martin McCormick
<martin at>wrote:

>        Thank you. I have never heard of gpart before so I gave
> it a try and that helps very much if the drive is already
> formatted. Most of these drives I plan to encounter will be
> formatted so this basically solves the problem but it raises a
> new question. If one does
> gpart list as suggested and the disk is formatted, one gets
> exactly the information necessary. I believe it is even the
> first line of output. It doesn't get better than that. If the
> disk is not corrected formatted such as might happen with
> corruption or maybe a new drive, gpart list executes silently
> and prints nothing on the output.
>        As I said, you answered my question so many thanks. The
> new question might best be put:
> Okay, if nothing is there, where did gpart look to see nothing?

I believe gpart checks the geom sector which the last one of a particular
geom class. The sector is written anytime the geom device is added or
updated.  This applies only to geom devices which are hardcoded.  For
example, /dev/ad0 and /dev/ad0p1 would both be seperate geom classes and
have their own meta-data sector.

FWIW, the only suitable hard disk devices I know of are:


If you're writing a test, I would probably grep dmesg for the presence of
one of them.  The first device appearance is probably a prime candidate for
installation target.

Adam Vande More

More information about the freebsd-questions mailing list