Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Dec 2016 16:39:23 -0800
From:      Warner Losh <imp@bsdimp.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        Antony Uspensky <uspensky@x-art.ru>, =?UTF-8?Q?Fernando_Herrero_Carr=C3=B3n?= <elferdo@gmail.com>,  Eric van Gyzen <vangyzen@freebsd.org>, freebsd-stable <freebsd-stable@freebsd.org>,  Slawa Olhovchenkov <slw@zxy.spb.ru>
Subject:   Re: Upgrading boot from GPT(BIOS) to GPT(UEFI)
Message-ID:  <CANCZdfr-WA6Wv_TzgcqKaysg5tN%2BJEheMbJC%2BYVbMznL4AoqJg@mail.gmail.com>
In-Reply-To: <2720DE76-B524-4AEA-ACC0-1EBD8813547D@FreeBSD.org>
References:  <CAMwkeZznenmN1RkUaKZ7i12F0FA185ZH%2BcHPXUp56S8j3SrubQ@mail.gmail.com> <20161216173930.GD90401@zxy.spb.ru> <b9ede396-2a86-8319-2f40-fe1c40cc6483@FreeBSD.org> <alpine.BSF.2.00.1612162047120.13320@gw-old.x-art.ru> <85F3F813-D821-439B-B700-DCE51C53E035@FreeBSD.org> <CANCZdfpBVN%2BtuYkxE_OM9vfKHyxsMgywkPCZTmNz4O_nigp%2BJA@mail.gmail.com> <2720DE76-B524-4AEA-ACC0-1EBD8813547D@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 17, 2016 at 6:38 AM, Dimitry Andric <dim@freebsd.org> wrote:
> On 16 Dec 2016, at 23:56, Warner Losh <imp@bsdimp.com> wrote:
>>
>> On Fri, Dec 16, 2016 at 11:00 AM, Dimitry Andric <dim@freebsd.org> wrote:
> ...
>>> Yes, this is almost exactly what I have done on a machine that was
>>> originally installed with gptzfsboot on the first partition, which was
>>> 512K.  Since all the partitions on this SSD were aligned to 1M, I
>>> reduced the size of the first partition to 224K, freeing up a hole of
>>> exactly 800K for an EFI partition:
> ...
>> You likely want to carve out more like 50MB instead of 800k for UEFI
>> partition. 800k is the minimum, but it also precludes many things you
>> may need to do with UEFI applications down the line.
>
> Well, this is the default boot1.efifat size.  If you think 50MB is more
> reasonable, the boot1.efifat size should have a corresponding size.

We shouldn't have a boot1.efifat at all. We should make the fat based
on what the size of the partition is. boot1.efifat is an ugly hack to
make the installers happy when we should have fixed the installers.
The standard suggests an even larger 200MB. On most modern drives, the
delta this usage is tiny, though on SD card-based systems 200MB takes
up too large a percentage.

> That said, as long as there are almost no such UEFI applications, I'm
> not bothering.  Besides, even if there were, I don't have any interest
> in the UEFI "ecosphere" as-is.  I see it as an ugly-but-necessary
> pre-bootloader environment only.

At work we get programs to run from time to time that upgrade BIOS
that's in different cards in our system, or to dump diagnostics. It's
helpful to have the space space when you need it, because when you
need it, you really need it. It's also used to deploy "capsules" that
have the upgrades for the BIOS (there's a standard now, but we don't
implement it all yet). There are secure boot things you need space for
as well.

If you judge from today's, barely enough to boot a single partition
w/o the other features of our traditional pre-/boot/loader
environment, I can see how you might think there's nothing but 'waste'
here. However, as we flesh out things, I think we'd be doing our users
a disservice from doing anything less than ~50MB by default.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr-WA6Wv_TzgcqKaysg5tN%2BJEheMbJC%2BYVbMznL4AoqJg>