1

I have a problem with an NFS server. I basically have to boot an embedded processor from NFS. On an ubuntu machine I simply put the filesystem in /tftpboot, added in /etc/exports this line:

/tftpboot *(rw,no_root_squash,no_all_squash,sync)

then I executed the commands:

sudo /usr/sbin/exportfs -av

sudo /etc/init.d/nfs-server restart

but on the embedded processor I get this error:

Looking up port of RPC 100003/2 on 192.168.2.11
Looking up port of RPC 100005/1 on 192.168.2.11
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

in particular the lines

Looking up port of RPC 100003/2 on 192.168.2.11
Looking up port of RPC 100005/1 on 192.168.2.11

make me think that the problem is in the configuration of the NFS server, anybody can help me?

1 Answers1

0

I had today exactly the same problem with an old embedded device and an NFS Server installed on SUSE Leap. I sniffed the communication with Wireshark and it gave me an idea of what went wrong. In my case the problem had to do with "iptable filter" and "NFS server version":

  1. Configure iptables to open the NFS related ports at the NFS server side
  2. My device only supported version 2 of NFS, and SUSE NFS server was configured by default to support v3 and v4.

To solve 1: You can check post Iptables Rules for NFS Server and NFS Client

sudo iptables -A INPUT -s 172.17.200.26/16 -d 172.17.200.26/16 -p udp -m multiport --dports 10053,111,2049,32769,875,892,20048,950 -m state --state NEW,ESTABLISHED -j ACCEPT 
sudo iptables -A INPUT -s 172.17.200.26/16 -d 172.17.200.26/16 -p tcp -m multiport --dports 10053,111,2049,32803,875,892,20048,950 -m state --state NEW,ESTABLISHED -j ACCEPT 
sudo iptables -A OUTPUT -s 172.17.200.26/16 -d 172.17.200.26/16 -p udp -m multiport --sports 10053,111,2049,32769,875,892,20048,950 -m state --state ESTABLISHED -j ACCEPT 
sudo iptables -A OUTPUT -s 172.17.200.26/16 -d 172.17.200.26/16 -p tcp -m multiport --sports 10053,111,2049,32803,875,892,20048,950 -m state --state ESTABLISHED -j ACCEPT 

To solve 2 You can check: https://documentation.suse.com/sles/15-SP1/html/SLES-all/cha-nfs.html#sec-nfs-configuring-nfs-server

Enable NFS version 2 on the server by modifying /etc/sysconfig/nfs by setting:

NFSD_OPTIONS="-V2"
MOUNTD_OPTIONS="-V2

I hope it helps someone, i lost some hours with this issue

I add a screenshot of problem 2 which was found because of wireshark capture: enter image description here

amaia
  • 11
  • 2