Re: Getting boottime early in booting

Rick Macklem <[email protected]>
Newsgroups gmane.os.freebsd.current
Message-ID <CAM5tNy6PH+7vMnSwS91vRnDn7r5tNyZdw7v3HnxykoAcUGKm1Q@mail.gmail.com>
On Fri, Apr 3, 2026 at 6:05 PM Rick Macklem <[email protected]> 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?
>
> 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??)
Btw, in case anyone is interested, #2 was caused by the conf/base/var.cpio.gz
file (used to create the md fs for /var) was too big for a 5Mbyte md.
(Getting rid of some stuff in it fixed the problem.)

I now have a NFSv4.2 root fs working ok, thanks to some help here
w.r.t. getting a new value upon each boot.

https://docs-archive.freebsd.org/doc/8.4-RELEASE/usr/share/doc/freebsd/handbook/network-pxe-nfs.html
is pretty good, but does miss a couple of things. There's making sure the
files for the md file systems aren't too big (or configuring the md's
to be larger)
and there's /tmp, which isn't mentioned.
--> There is also dealing with setting up hostuuid when there are multiple
     clients using the read-only root fs.
      I'm not quite sure what is appropriate here?
      - Maybe making /etc/hostid a symlink to a file in /var and then
        having /etc/rc.d/hostid create the file when it doesn't exist, or
        something like that. (For systems that don't have smbios.system.uuid
        this would result in a different setting each boot, but the
only alternative
        I can think of would be a site local DHCPD option to specify it.
        (This isn't a NFSv4 problem, but a shared read-only root fs problem.)

Anyhow, if someone on the doc side feels like improving the above a little,
that would be nice, rick

>
> Thanks for any help with these, rick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.