Date: Thu, 21 Jun 2018 09:41:04 -0700 From: Michael Sierchio <kudzu@tenebras.com> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Minimum size of freebsd-boot Message-ID: <CAHu1Y70WnvN7QjduYRxk0ucJB=pvtgmxu5LbwvuDjsWg6eHajg@mail.gmail.com> In-Reply-To: <CAHu1Y70T%2B=F0vxMsSCjVVgnMsyr3D%2BLL-W15JzEWRKq9L7YNMw@mail.gmail.com> References: <024a7da5-4d80-960c-9479-34fef887ff35@yandex.com> <CAHu1Y70T%2B=F0vxMsSCjVVgnMsyr3D%2BLL-W15JzEWRKq9L7YNMw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
It's worth mentioning that if you're going to reuse a disk with a gpart
table already on the disk, do something to remove it
offset=3D`diskinfo $DISK | awk '{ print $4 - 129 }'`
dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k count=3D1
dd if=3D/dev/zero of=3D/dev/$DISK seek=3D$offset
On Thu, Jun 21, 2018 at 9:39 AM, Michael Sierchio <kudzu@tenebras.com>
wrote:
>
>
> 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}
>
>
>
>
>
> --
> "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
>
--=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?CAHu1Y70WnvN7QjduYRxk0ucJB=pvtgmxu5LbwvuDjsWg6eHajg>
