Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 23 |
Nodes: | 6 (0 / 6) |
Uptime: | 52:25:30 |
Calls: | 583 |
Files: | 1,139 |
D/L today: |
179 files (27,921K bytes) |
Messages: | 111,611 |
I am feeling increasing pain from finding EFI partitions floating
around and containing spurious binaries in /EFI/BOOT/BOOTX64.efi,
where there seems to be no means whatsoever for figuring out what
these binaries do/are at all, or which version of it they would be
and what they can support.
Currently I am in the process of migrating from R.13 to R.14, and
strangely the loader is now in the process of shrinking (from 862720
to 662528), so even "the larger the newer" won't hold.
Question: is there any concept to get some proper version information
into these binaries, from which then some identity and the commit tag
could be retrieved from which they were created?
I am feeling increasing pain from finding EFI partitions floating
around and containing spurious binaries in /EFI/BOOT/BOOTX64.efi,
where there seems to be no means whatsoever for figuring out what
these binaries do/are at all, or which version of it they would be
and what they can support.
Currently I am in the process of migrating from R.13 to R.14, and
strangely the loader is now in the process of shrinking (from 862720
to 662528), so even "the larger the newer" won't hold.
Question: is there any concept to get some proper version information
into these binaries, from which then some identity and the commit tag
could be retrieved from which they were created?
Question: is there any concept to get some proper version information
into these binaries, from which then some identity and the commit tag
could be retrieved from which they were created?
Maybe:
# strings /boot/loader.efi | fgrep Revision
DFreeBSD/amd64 EFI loader, Revision 3.0
Hi!
Question: is there any concept to get some proper version information
into these binaries, from which then some identity and the commit tag
could be retrieved from which they were created?
Maybe:
# strings /boot/loader.efi | fgrep Revision
DFreeBSD/amd64 EFI loader, Revision 3.0
I tried this:
strings loader.efi | fgrep Revision
11.1:
FreeBSD/amd64 EFI loader, Revision 1.1
12.2:
FreeBSD/amd64 EFI loader, Revision 1.1
13.2:
FreeBSD/amd64 EFI loader, Revision 1.1
14.x/15.x:
FreeBSD/amd64 EFI loader, Revision 3.0
but the size of the file was different in all 1.1 cases.
So I'm not sure it really defines the exact version.
Hi!
Question: is there any concept to get some proper version information into these binaries, from which then some identity and the commit tag could be retrieved from which they were created?
Maybe:
# strings /boot/loader.efi | fgrep Revision
DFreeBSD/amd64 EFI loader, Revision 3.0
I tried this:
strings loader.efi | fgrep Revision
11.1:
FreeBSD/amd64 EFI loader, Revision 1.1
12.2:
FreeBSD/amd64 EFI loader, Revision 1.1
13.2:
FreeBSD/amd64 EFI loader, Revision 1.1
14.x/15.x:
FreeBSD/amd64 EFI loader, Revision 3.0
but the size of the file was different in all 1.1 cases.
So I'm not sure it really defines the exact version.
--
pi@FreeBSD.org +49 171 3101372 Now what ?
On Wed, Aug 27, 2025 at 04:03:18PM +0200, Kurt Jaeger wrote:on
Hi!
Question: is there any concept to get some proper version informati=
aginto these binaries, from which then some identity and the commit t=
could be retrieved from which they were created?
Maybe:
# strings /boot/loader.efi | fgrep Revision
DFreeBSD/amd64 EFI loader, Revision 3.0
I tried this:
strings loader.efi | fgrep Revision
11.1:
FreeBSD/amd64 EFI loader, Revision 1.1
12.2:
FreeBSD/amd64 EFI loader, Revision 1.1
13.2:
FreeBSD/amd64 EFI loader, Revision 1.1
14.x/15.x:
FreeBSD/amd64 EFI loader, Revision 3.0
but the size of the file was different in all 1.1 cases.
So I'm not sure it really defines the exact version.
--
pi@FreeBSD.org +49 171 3101372 Now what ?
This was exactly my experience in the forum post. Multiple versions
had the same "Revision" tag, and there is no way to crossreference
with a specific Freebsd version.
Question: is there any concept to get some proper version information
into these binaries, from which then some identity and the commit tag
could be retrieved from which they were created?
We used to encode the date the loader was built. Reproducible builds stopped that.
Can't git hash (full or first 12 digits, possibly plus n**** number,
too) like in kernel help the situation? Yes, it shouldn't be suitable
for legacy bootcodes (wastes of bytes!), though.
On 2025-08-27 7:34, Warner Losh wrote:
On Wed, Aug 27, 2025 at 8:12=E2=80=AFAM Russell Adams <Russell.Adams@adamssystems.nl <mailto:Russell.Adams@adamssystems.nl>> wrote:
This was exactly my experience in the forum post. Multiple versions
had the same "Revision" tag, and there is no way to crossreference
with a specific Freebsd version.
We used to encode the date the loader was built. Reproducible builds stopped that.
The Revision tag really is what boot protocol is supported. ThatIf loaders had the version and patch level hardcoded into them it during
protocol changes very rarely.
the build like how that information is hardcoded into freebsd-version,
would that be a reproducible build? If so, can EFI loaders with ZFS
support also have the OpenZFS version? For example:
FreeBSD/amd64 EFI loader, Revision 1.1, 13.5-RELEASE, OpenZFS-2.1.15
Those two version numbers would be immensely helpful when moving disks
or verifying upgrades.
On 8/27/25 08:37, Russell Adams wrote:
On Thu, Aug 28, 2025 at 12:20:56AM +0900, Tomoaki AOKI wrote:
Question: is there any concept to get some proper version information >>>>>>> into these binaries, from which then some identity and the commit tag >>>>>>> could be retrieved from which they were created?
We used to encode the date the loader was built. Reproducible builds
stopped that.
Can't git hash (full or first 12 digits, possibly plus n**** number,
too) like in kernel help the situation? Yes, it shouldn't be suitable
for legacy bootcodes (wastes of bytes!), though.
Really I don't care if the data is embedded in the bootcode. I
understand it may be in a difficult format with limited space.
I'm not building my own here. I just want to be able to find out what
I have vs what was shipped.
I would expect that the OS distribution tools (freebsd-upgrade) can
verify the files I have installed, including the boot loader it is
shipping into /boot.
My understanding is freebsd-update leaves all boot loaders alone.
Having new ZFS code didn't break booting but upgrading a ZFS pool breaks boot access to the pool without a corresponding boot loader update. That
was not just an EFI issue.
I forget where but recall someone wrote a script to try to detect a difference and replace (or give instructions?) if different but it
didn't know what version anything is either. My attempt at writing a
check in my source based update scripts hasn't been correct yet but
again it was a non-version based difference check.
--I'd like to be able to compare the checksums of bootloaders I have
from EFI against a table of checksums of the same files across
authentic distributions. Even if it was just a text file in /var that freebsd-update uses or I could grep. I was disappointed that "freebsd-upgrade IDS" never mentioned files in /boot.
I must manually update the bootloader when I upgrade FreeBSD. If I
mess up, or lose track, I need a way to find out what I have in EFI
against files shipped with FreeBSD.
------------------------------------------------------------------
Russell Adams Russell.Adams@AdamsSystems.nl Principal Consultant Adams Systems Consultancy
On Wed, 27 Aug 2025 10:52:30 -0700etech.com
"Mel P." <list_freebsd@bluerosetech.com> wrote:
On 2025-08-27 9:13, Warner Losh wrote:
On Wed, Aug 27, 2025 at 10:00=E2=80=AFAM Mel P. <list_freebsd@blueros=
<mailto:list_freebsd@bluerosetech.com>> wrote:
freebsd-version,If loaders had the version and patch level hardcoded into them it
during
the build like how that information is hardcoded into
ZFSwould that be a reproducible build? If so, can EFI loaders with
support also have the OpenZFS version? For example:
OpenZFS-2.1.15FreeBSD/amd64 EFI loader, Revision 1.1, 13.5-RELEASE,
disksThose two version numbers would be immensely helpful when moving
or verifying upgrades.
theYea, that's not going to happen. The loader is independent of the release, in many ways, 13.5-RELEASE comes from the kernel, and this
would introduce a coupling between the two. We generally don't have
OpenZFSOpenZFS version available. We don't sync to OpenZFS releases, necessarily. Also, the boot loader only makes limited use of the
lagcode, so its version wouldn't necessarily help you. There's often a
understandingbetween OpenZFS code hitting the tree and the boot loader
new items introduced by that import.
This is very good to know, thank you.
AndWe can report the _FreeBSD_version for the tree we build in, though.
whenthat will give you information. We don't currently bump it, though,
we add ZFS features to the whitelist of enabled features, but could.
This would make it still reproducible.
__FreeBSD_version would be just as helpful.
That feature whitelist is exactly the information needed when figuring
out if a given loader can boot a given pool and fs. Would it be
possible to include that in the loader in a way that strings or some
other utility can find it?
Unfortunately, __FreeBSD_version is NOT promised to be bumped everytime loader/bootcode receive new ZFS read-incompatible features support.
Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
On Sat, 30 Aug 2025 16:45:15 -0700ura.ne.jp
"Mel P." <list_freebsd@bluerosetech.com> wrote:
On 2025-08-30 16:34, Tomoaki AOKI wrote:
On Fri, 29 Aug 2025 07:49:49 -0600
Warner Losh <imp@bsdimp.com> wrote:
On Fri, Aug 29, 2025, 7:12=E2=80=AFAM Tomoaki AOKI <junchoon@dec.sak=
.wrote:
This is why I previously commented with git hash and/or n number.
This is harder and introduces a git dependency to the loader process=
Thet
messkernel has this, true. And hg, svn, gitup and a few others. It's a
that I'd rather not have since the loader is built a dozen times, no=
onces
misbehaves islike the kernel, and any slowdown when one of the above scms
greater.
Warner
Yeah, precisely determining what read-incompatible features is/are enabled (whitelisted) is the key point for the bootcodes / loaders.
Using date/time, ancient method was (IIRC) the date/time the bootcode=
/ loaders are "built", NOT "committed to master repo".
Obtaining the actually wanted date / time needs git functionality
in current form, thus, heavy-weighted for bootcodes / loaders.
Just have it store the whitelist in a retrievable format. Provide the information directly.
The whitelist would be this.
https://cgit.freebsd.org/src/tree/stand/libsa/zfs/zfsimpl.c#n109
Note that it includes only read-incompatible features supported.
So seeing this alone could confuse like "Isn't feature xxx supported?
Should I re-create pool without the (read-compatible) feature xxx?!".
The comment in the file is clear enough for me, but what about for
someone just started learning about ZFS?
To know features including read-compatible ones that are "enabled"
by default ("active" is another thing), we need to understand
in what state the whole ZFS codes are when the bootcode / loader
is built. And this require to specify the commit the build is
done at.
Warner, please correct me if I'm mis-understanding.
I believe you're the best person who knows correctly in loader area.