Solved About bootstrap code and protective mbr

I read gptboot(8) and gpart(8). So I'm confused. Is /boot/pmbr a bootstrap code that will be embedded in a protective MBR? Or is /boot/pmbr the protective MBR image that will be embedded in the first sector of the disk?
Thanks.
 
The code in /boot/pmbr and /boot/mbr is stored in the same place, the 512 bytes inside the partition table. They function differently though, /boot/mbr looks for a partition/slice that's marked active whereas pmbr looks for a freebsd-boot partition and starts the /boot/gptboot or /boot/gptzfsboot code that's stored inside it.
 
The code in /boot/pmbr and /boot/mbr is stored in the same place, the 512 bytes inside the partition table. They function differently though, /boot/mbr looks for a partition/slice that's marked active whereas pmbr looks for a freebsd-boot partition and starts the /boot/gptboot or /boot/gptzfsboot code that's stored inside it.

I note that formatting the freebsd-boot is useless !
 
You don't format the freebsd-boot partition. You install the gptboot/gptzfsboot code into it via the -p option for gpart(8). For example:
Code:
# gpart bootcode -p /boot/gptboot -i 1 ada0
 
It's what I understood. I had formatted it. Afterwards I realized this partition is likely not to be formatted, so I deleted it, added it again to be sure and installed the bootcode.
 
Back
Top