svn commit: r326883 - head/tools/boot

Warner Losh imp at bsdimp.com
Sat Dec 16 03:54:20 UTC 2017


On Fri, Dec 15, 2017 at 8:39 PM, Rodney W. Grimes <
freebsd at pdx.rh.cn85.dnsmgr.net> wrote:

> > Author: imp
> > Date: Fri Dec 15 23:16:27 2017
> > New Revision: 326883
> > URL: https://svnweb.freebsd.org/changeset/base/326883
> >
> > Log:
> >   For now, make the gpart commands verbose so we know exactly what's
> >   being installed.
> >
> >   Fix problem with gpt + zfs installing the wrong loader...
> ...
>
> Would it make since to get the svn version in at least the
> major parts of this code so that one can tell what is installed
> easier?  Ie, the parts of zfsboot you dd into the reserved space,
> boot1, loader.efi, etc.
>

I've often desired this. There's some practical issues around doing
something specific, however. We don't want to create a new binary that
differs only by the build date from the old one. For reproducible builds,
we try to make binaries that don't have any marking like this.


> I know that for the MBR it probably makes little since, but for
> boot1 and later we shouldnt be so tight on room we can not put
> in a short character string?
>

I like this idea. boot0/boot1/boot2 for MBR and the boot1 part of zfsboot
are quite limited in space. The others have acres of space, and are likely
to have that space for the foreseeable future.

We do this today for /boot/*loader* already, though we don't have a simple
way to retrieve things. There's also a version number that's printed, but
that's ill maintained. We may be able to leverage the built-time stuff here
somehow. I'd also like to add the compile-time boot options that's printed
on boot and maybe easily retrievable. Might be easier to pass this stuff in
via kenv vars and/or meta data somehow, but that only works on a booted
system, not on an arbitrary device.

Warner


More information about the svn-src-head mailing list