Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Apr 2026 00:37:52 -0700
From:      Rick Macklem <rick.macklem@gmail.com>
To:        Konstantin Belousov <kib@freebsd.org>
Cc:        Warner Losh <imp@bsdimp.com>, FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: Getting boottime early in booting
Message-ID:  <CAM5tNy7kJ3NxA3Lt0Yj_e285mX5FoBUH8%2BCFDaLAiV%2B1bBywtg@mail.gmail.com>
In-Reply-To: <adCB5JLDgnoYNrXI@kib.kiev.ua>
References:  <CAM5tNy4mPmG=OmQtiGrMQ8NnPZrN=dw_Xw1h9=s4iyOLiZCWng@mail.gmail.com> <CANCZdfrS6YbL2JCe=MgQL1==CL-x4hL=AEAvjJRdiK-8URARWg@mail.gmail.com> <adCB5JLDgnoYNrXI@kib.kiev.ua>

index | next in thread | previous in thread | raw e-mail

On Fri, Apr 3, 2026 at 8:15 PM Konstantin Belousov <kib@freebsd.org> wrote:
>
> On Fri, Apr 03, 2026 at 07:13:02PM -0600, Warner Losh wrote:
> > On Fri, Apr 3, 2026, 7:05 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I'm fiddling with a NFSv4 diskless root fs setup and I've run
> > > into a couple of challenges.
> > >
> > > 1 - I need a value that will be different each time the machine boots.
> > >      I would normally use getboottime(), but for the NFS root fs mount,
> > >      it just returns 0.
> > >      Any ideas w.r.t. something I can acquire early in booting that will
> > >      change each time the system is booted?
> > >
> >
> > We don't have this today. And we can't have it without hardware assist...
> > though you may be ok enough with a value from the rtc.
> >
> > There's work to pass the vale from the monotonicly increasing counter uefi
> > provides. But not on all platforms.
>
> We already have mechanisms to ensure that early entropy is provided on
> boot.  Do you care if the value used is indeed boot time, or should it
> only be unique per boot?
>
> With the entropy loading, I believe you would get what you need on any
> machine with the persistent storage.
Hmm, do you mean the stuff under /var/db/entropy?
If so, that doesn't work for this case, since for an NFS root fs, /etc is
usually a memory fs.
(See https://docs-archive.freebsd.org/doc/8.4-RELEASE/usr/share/doc/freebsd/handbook/network-pxe-nfs.html)

Without a unique per boot value, things work, it's just that it
loops once more during the mount attempt, each time it is
rebooted. (Without boring you with the details, each time
a seq# gets incremented by 1 and it needs to loop until
it gets to the next seq#. I can tweak the mount code so
that it doesn't spew out printf()s when it loops.)

Thanks, rick


>
> >
> > Warner
> >
> > 2 - Does anyone know how to fix "could not determine audit condition"
> > >      which I get whenever I try and login when it is multiuser?
> > >      (I can run single user, but since I can't login once it's multiuser??)
> > >
> > > Thanks for any help with these, rick
> > >
> > >
>


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy7kJ3NxA3Lt0Yj_e285mX5FoBUH8%2BCFDaLAiV%2B1bBywtg>