gpt booting (Was: Re: boot problem after freebsd-update from 9.1-RC2 to 9.1-RC3)

Arthur Chance freebsd at qeng-ho.org
Wed Nov 21 08:42:58 UTC 2012


On 11/21/12 05:11, Warren Block wrote:
> gptboot looks for the first UFS partition.  Maybe /boot/boot can be
> modified to do that also.

It's a little more complicated than that Warren.

AIUI gptboot first looks (in partition order) for partitions with both 
the bootme and bootonce attributes set. If it doesn't find any, or if 
they all failed to boot it then tries booting partitions with just the 
bootme attribute. It only boots the first UFS partition if no partitions 
have the bootme attribute set, and IIRC that is for compatibility with 
the 8.x gptboot which didn't know the boot* attributes.

Confusingly, there's no manual page for gptboot to document this. It's 
sort of implicit in the gpart manual page, in the section on ATTRIBUTES 
for GPT, but the best way to understand it is to read the code for 
gptfind in

/usr/src/sys/boot/common/gpt.c




More information about the freebsd-questions mailing list