From nobody Sat Apr 4 08:17:44 2026 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fnpPP4BY9z6YCLM for ; Sat, 04 Apr 2026 08:18:01 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4fnpPN0w8Zz3FHX for ; Sat, 04 Apr 2026 08:18:00 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=freebsd.org (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kib@freebsd.org) smtp.mailfrom=kib@freebsd.org Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 6348HisP095682; Sat, 4 Apr 2026 11:17:47 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 6348HisP095682 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 6348Hij0095681; Sat, 4 Apr 2026 11:17:44 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Sat, 4 Apr 2026 11:17:44 +0300 From: Konstantin Belousov To: Rick Macklem Cc: Warner Losh , FreeBSD CURRENT Subject: Re: Getting boottime early in booting Message-ID: References: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Result: default: False [-2.96 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; NEURAL_HAM_MEDIUM(-0.97)[-0.969]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; TAGGED_RCPT(0.00)[]; ARC_NA(0.00)[]; HAS_XAW(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[kib]; MISSING_XM_UA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[3] X-Rspamd-Queue-Id: 4fnpPN0w8Zz3FHX X-Spamd-Bar: -- On Sat, Apr 04, 2026 at 12:37:52AM -0700, Rick Macklem wrote: > On Fri, Apr 3, 2026 at 8:15 PM Konstantin Belousov wrote: > > > > On Fri, Apr 03, 2026 at 07:13:02PM -0600, Warner Losh wrote: > > > On Fri, Apr 3, 2026, 7:05 PM Rick Macklem 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? It is /boot/entropy I think. Also I see 'entropy_efi_seed' which implies that loader might get some entropy from the UEFI facilities. But this is a speculation based on the documentation. > 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.) If UEFI source works, then the machine should get enough entropy even for shared rootfs. > > 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 > > > > > > > > > > >