Minimum size of freebsd-boot

Michael Sierchio kudzu at tenebras.com
Thu Jun 21 16:39:23 UTC 2018


On Thu, Jun 21, 2018 at 9:15 AM, Manish Jain <jude.obscure at yandex.com>
wrote:


>
> > Under GPT, FreeBSD needs a freebsd-boot partition of max size 512 KB...

Not so. 64k works just fine. The binary /boot/gptboot is 60258 bytes. A
snippet of the code I use to build hosts. Note that subsequent partitions
are forced to be aligned on 64k boundaries.

# add boot partition

# p1

gpart add -t freebsd-boot -l ${PFX}-boot -s 64k ${DISK}


# put boot code in boot partition

gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ${DISK}


# add root, make sectors aligned

# p2

gpart add -t freebsd-ufs -l ${PFX}-root -a 64k -s ${ROOTSIZ} ${DISK}





-- 
"Well," Brahma said, "even after ten thousand explanations, a fool is no
wiser, but an intelligent person requires only two thousand five hundred."

- The Mahābhārata


More information about the freebsd-questions mailing list