make NFSv3 default now on diskless

From: John-Mark Gurney <>
Date: Thu, 02 Jun 2022 03:24:56 UTC
I just booted FreeBSD-current diskless, using NFS root, and I ended
up having issues because by default, NFS root is only v2.

One of things that happened was disk space available was listed as
-138G, or -144830429K.  I assume this is because the server is reporting
TBs instead.

If I mount via mount_nfs, the sizes are normal/correct because it mounts

The other issue that I ran into is that NFSv2 can't access >4GB files
(or create them).

Anyone object to adding BOOTP_NFSV3 to GENERIC?  Or maybe making it a
tunable that defaults to set, because it seems a bit crazy to default
to v2 these days.

This option was added in 432aad0e in 1997 so that the nfs_diskless
structure didn't need to be filled out.  Does anything even
populate/fill it out anymore?  I saw code in i386/i386/locore.s that
does this, but it doesn't appear anywhere else.

There also appears to possibly be a way via mount options, but I can't
see where it's documented to set them.

  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."