Re: FreeBSD nfsroot - will it work with NFSv4.2?
Rick Macklem <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.hackers |
|---|---|
| Message-ID | <CAM5tNy7Yg2VjyGZr5RU==RJa__w1jBfNZNTamJBiaw4fHyX+hQ@mail.gmail.com> |
On Sun, Apr 12, 2026 at 3:49 PM Dan Shelton <[email protected]> wrote: > > On Tue, 7 Apr 2026 at 22:27, Rick Macklem <[email protected]> wrote: > > > > On Sun, Apr 5, 2026 at 9:16 AM Rick Macklem <[email protected]> wrote: > > > > > > On Thu, Feb 19, 2026 at 2:23 PM Dan Shelton <[email protected]> wrote: > > > > > > > > Hello, > > > > > > > > Will a FreeBSD 15.0 diskless setup with nfsroot work with NFSv4.2? > > > I just committed a patch to main that does this, with some limitations. > > > It will be in 15.1. > > > > > > The limitations are: > > > - The server must be configured to handle both NFSv3 and NFSv4 > > > because the bootstrap code still uses NFSv3. > > > - The root directory specified in the "V4:" line in /etc/exports must > > > be "/" so that the root-path is the same for an NFSv3 and NFSv4 mount. > > > - The NFSv4 server must be configured to use id-numbers in strings and > > > not be running the nfsused(8) daemon. (This limitation might be lifted > > > in a future commit which hard-wires enough mapping info to make > > > things work until the nfsuserd(8) daemon is running.) > > I just did a commit to main that allows the nfsuserd(8) daemon to run > > on the NFSv4 root fs. > > > > I'm not 100% sure if it will work for a read/write root fs mount. > > (I tested a read-only one, as suggested by Section 34.10 of the > > FreeBSD Handbook. > > > > For the nfsuserd(8) daemon setup (ie. name@domain strings for > > uid/gid's), you need.. > > > > In /boot/loader.conf > > boot.nfsroot.user_domain="<user-domain>" > > along with the two lines > > nfsuserd_enable="YES" > > nfsuserd_flags="-domain <user-domain>" > > in /etc/sysctl.conf. > > Thank you! > > What about a static mapping until nfsuserd is running? The static mapping is in an array called nfs_prime_userd[]. It is filled in statically via initialization in sys/fs/nfs/nfs_commonsubs.c. (It only has root/wheel/bin/operator at this time, which appears sufficient to get booted to where nfsuser(8) starts up.) rick > > Dan >