NFS V2 mounting

The man page for NFS(5) says …

Depending on kernel configuration, the Linux NFS client may support NFS versions 3, 4.0, 4.1, or 4.2.

I am trying to connect to an old instrument (with an embedded OS (VxWorks) ) that has an NFS server running version 2.
Is there a way to mount this with Fedora 38?

[CatLab-NW ~] 😼 rpcinfo -p 192.168.1.16
   program vers proto   port  service
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100003    2   udp   2049  nfs
    100005    1   udp   1009  mountd
 536891429    1   tcp   1013
 536891431    1   tcp   1013

[CatLab-NW ~] 😼 sudo mount -vt nfs -o nfsvers=2 192.168.1.16:/data /mnt/HP1660ES
mount.nfs: requested NFS version or transport protocol is not supported for /mnt/HP1660ES

[CatLab-NW ~] 😼 sudo mount -vt nfs 192.168.1.16:/data /mnt/HP1660ES
mount.nfs: timeout set for Wed Jul 19 19:43:04 2023
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.16,clientaddr=192.168.1.1'
mount.nfs: mount(2): Connection refused
mount.nfs: trying text-based options 'addr=192.168.1.16'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: portmap query retrying: RPC: Program not registered
mount.nfs: prog 100003, trying vers=3, prot=17
mount.nfs: trying 192.168.1.16 prog 100003 vers 3 prot UDP port 2049
mount.nfs: portmap query failed: RPC: Program/version mismatch
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.16,clientaddr=192.168.1.1'
mount.nfs: mount(2): Connection refused

It doesn’t look like support is compiled into the kernel.

$ grep CONFIG_NFS_V2 /lib/modules/$(uname -r)/config
# CONFIG_NFS_V2 is not set

You’d probably have to compile the kernel with CONFIG_NFS_V2=m to get that to work.

Edit: It looks like there is some documentation on how to do so here: Building a Custom Kernel :: Fedora Docs

2 Likes