Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Nov 2012 08:07:01 -0600
From:      dweimer <dweimer@dweimer.net>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: Advanced Format Drive =?UTF-8?Q?=3F?=
Message-ID:  <46dc11a33f41ccb597efc1f2efb94403@dweimer.net>
In-Reply-To: <26514.1353022306@tristatelogic.com>
References:  <26514.1353022306@tristatelogic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-11-15 17:31, Ronald F. Guilmette wrote:
> (This stuff would probably be a lot less confiusing if I actually 
> knew
> what I was doing, but...)
>
> OK, Warren, I've just done the following steps.  The first two I drew
> from the manpage examples, and then followed those up with two 
> commands
> from your tutorial.
>
>   /sbin/gpart create -s GPT ada0    # manpage example is wrong, ad0 
> -> ada0
>   /sbin/gpart bootcode -b /boot/mbr ad0  # manpage wrong again, pmbr 
> -> mbr
>   gpart add -t freebsd-boot -l gpboot -b 40 -s 512K ada0
>   gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
>
> That last one, done at the suggestion of your tutorial page, has me
> completely perplexed, because of what is said, very explicitly, in 
> the
> gpart(8) manpage:
>
>      bootcode  Embed bootstrap code into the partitioning scheme's 
> metadata on
>                the geom (using -b bootcode) or write bootstrap code 
> into a
>                partition (using -p partcode and -i index).
>
> Please note the use of the word "or".
>
> The man page is telling me to _either_ use the -p option _or else_ 
> use
> the -p and -i options together.  But you are telling me to use all 
> three
> in one go!
>
> Forgive me, but I'm confused.  (As you can tell by now, I am often 
> easily
> confused.  Sorry.)
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe@freebsd.org"

I saw this, and well started wondering myself, as I have been using 
this while doing work on booting FreeBSD via ZFS (of course using -p 
/boot/gptzfsboot), I got the line from a tutorial on booting from ZFS.  
Never thought much of it, until now, but I believe I see now why, the 
secret is the pmbr, notice the "p".  Its the protective mbr, it lets 
formatting tools that understand mbr, but not gpart know that there is 
something there, the actual boot code is in the partition.

-- 
Thanks,
    Dean E. Weimer
    http://www.dweimer.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46dc11a33f41ccb597efc1f2efb94403>