Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jun 2018 09:39:20 -0700
From:      Michael Sierchio <kudzu@tenebras.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Minimum size of freebsd-boot
Message-ID:  <CAHu1Y70T%2B=F0vxMsSCjVVgnMsyr3D%2BLL-W15JzEWRKq9L7YNMw@mail.gmail.com>
In-Reply-To: <024a7da5-4d80-960c-9479-34fef887ff35@yandex.com>
References:  <024a7da5-4d80-960c-9479-34fef887ff35@yandex.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 21, 2018 at 9:15 AM, Manish Jain <jude.obscure@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}





--=20
"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=C4=81bh=C4=81rata



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHu1Y70T%2B=F0vxMsSCjVVgnMsyr3D%2BLL-W15JzEWRKq9L7YNMw>