# ARM , Root-NFS: Server returned error -5

## Gentree

Hi,

I am trying to boot an ARM system via nfs on gentoo.

This has been tried and tested many time recently but today it fails. I have had to change some of the fixed IP addresses on the local network as well as updating nfs-utils since it was last seem working.

I have reviewed the network settings and reverted nfs-utils to 1.1.5 with portmap , where it was last seen to work.

The remote system loads a kernel via http and boots it , this much is fine. Then it tries to mount the root fs via nfs and it fails:

```

NET: Registered protocol family 17                                                                                         

RPC: Registered udp transport module.                                                                                      

RPC: Registered tcp transport module.                                                                                      

rtc-m48t86 rtc-m48t86: setting system clock to 2009-08-14 19:21:55 UTC (1250277715)                                        

IP-Config: Guessing netmask 255.255.255.0                                                                                  

IP-Config: Complete:                                                                                                       

     device=eth0, addr=192.168.1.50, mask=255.255.255.0, gw=255.255.255.255,                                               

     host=192.168.1.50, domain=, nis-domain=(none),                                                                        

     bootserver=255.255.255.255, rootserver=192.168.1.3, rootpath=                                                         

Looking up port of RPC 100003/2 on 192.168.1.3                                                                             

Looking up port of RPC 100005/1 on 192.168.1.3                                                                             

PHY: 0:01 - Link is Up - 100/Full                                                                                          

Root-NFS: Server returned error -5 while mounting /mnt/nfs                                                                 

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; here are the available partitions:
```

two things seems odd:

```
RedBoot> exec -c "console=ttyAM0,115200 ip=192.168.1.50 root=/dev/nfs nfsroot=192.168.1.3:/mnt/nfs"
```

cf

```

     device=eth0, addr=192.168.1.50, mask=255.255.255.0, gw=255.255.255.255,                                               

     host=192.168.1.50, domain=, nis-domain=(none),                                                                        

     bootserver=255.255.255.255, rootserver=192.168.1.3, rootpath=  
```

rootpath=   , I would have expected /mnt/nfs here

192.168.1.50 is the IP of the system that is failing. I'm not sure that both addr and host should be the same here.

anyone understand this better ??

TIA, Gentree.   :Cool: 

----------

## Gentree

looking at rpcinfo on the gentoo nfs host:

```
bash-4.0#rpcinfo -p 192.168.1.3

   program vers proto   port

    100000    4   tcp    111  portmapper

    100000    3   tcp    111  portmapper

    100000    2   tcp    111  portmapper

    100000    4   udp    111  portmapper

    100000    3   udp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  39758  status

    100024    1   tcp  57560  status

    100005    1   udp  34072  mountd

    100005    1   tcp  48190  mountd

    100005    2   udp  34072  mountd

    100005    2   tcp  48190  mountd

    100005    3   udp  34072  mountd

    100005    3   tcp  48190  mountd

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100021    1   udp   4001  nlockmgr

    100021    3   udp   4001  nlockmgr

    100021    4   udp   4001  nlockmgr

    100021    1   tcp   4001  nlockmgr

    100021    3   tcp   4001  nlockmgr

    100021    4   tcp   4001  nlockmgr

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs
```

yet on the ARM:

```

Looking up port of RPC 100003/2 on 192.168.1.3

Looking up port of RPC 100005/1 on 192.168.1.3

PHY: 0:01 - Link is Up - 100/Full

Root-NFS: Server returned error -5 while mounting /mnt/nfs

```

Some digging reveals -5 is a portmap error.

It is unclear whether either of the port look ups succeeded.

 :Confused: 

```
Calculating dependencies... done!

[ebuild   R   ] net-fs/nfs-utils-1.2.0  USE="nfsv3 tcpd -ipv6 -kerberos -nfsv4" 0 kB

```

Aug 15 04:02:44 genbox rpc.idmapd[5674]: nfsdreopen: Opening '/proc/net/rpc/nfs4.nametoid/channel' failed: errno 2 (No such file or directory)

Aug 15 04:02:44 genbox rpc.idmapd[5674]: nfsdreopen: Opening '/proc/net/rpc/nfs4.idtoname/channel' failed: errno 2 (No such file or directory)

Aug 15 04:02:44 genbox sm-notify[9520]: Already notifying clients; Exiting!

Looks like a bug if it's still trying to use nfsv4. Neither the host or client systems have nfsv4 and as seen nfs-utils was built with this option off.

 :Rolling Eyes: 

----------

## cach0rr0

is nfsv4 in the kernel? i racked my brain for the longest time on one of those, not realizing I'd built nfsv4 support in

The other item that jumps out at me is that USE - mine is "nonfsv4"

```

[ebuild   R   ] net-fs/nfs-utils-1.1.4-r1  USE="nonfsv4 tcpd -kerberos" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

```

```

laptop02 linux # grep -i nfs /etc/make.conf

USE="X esd gnome dbus dvdcss css hal mmx sse svg alsa offensive branding win32codecs gstreamer firefox gnome-keyring -ipv6 jpeg flag ogg vorbis wxwidgets libnotify a52 aac dvd dts flac libv4l2 matroska mp3 mpeg nsplugin ogg png rtsp stream svg v4l v4l2 vorbis x264 skins truetype nonfsv4 gtk lvm2 networkmanager"

```

----------

## Gentree

the USE has changed, note the version and emerge output.

```
bash-4.0#grep -i nfs .config

CONFIG_NFS_FS=m

CONFIG_NFS_V3=y

# CONFIG_NFS_V3_ACL is not set

# CONFIG_NFS_V4 is not set

CONFIG_NFSD=m

CONFIG_NFSD_V3=y

# CONFIG_NFSD_V3_ACL is not set

# CONFIG_NFSD_V4 is not set

CONFIG_NFS_COMMON=y

```

Looks like a fat bug to me.

----------

## cach0rr0

 *Gentree wrote:*   

> the USE has changed, note the version and emerge output.
> 
> ```
> bash-4.0#grep -i nfs .config
> 
> ...

 

welp, im shit outta ideas then, and I think you're quite right. 

your USE says no v4, your kernel has no v4, yet it's polling v4-specific flags in proc - to me seems like a bug

----------

## Gentree

OK, I've put wireshark on the link:

```

4483   54.410932   192.168.1.50   192.168.1.3   Portmap   V2 GETPORT Call NFS(100003) V:2 UDP

4484   54.411018   192.168.1.3   192.168.1.50   Portmap   V2 GETPORT Reply (Call In 4483) Port:2049

4485   54.417722   192.168.1.50   192.168.1.3   Portmap   V2 GETPORT Call MOUNT(100005) V:1 UDP

4486   54.417760   192.168.1.3   192.168.1.50   Portmap   V2 GETPORT Reply (Call In 4485) Port:38988

4487   54.419088   192.168.1.50   192.168.1.3   MOUNT   V1 NULL Call

4488   54.419111   192.168.1.3   192.168.1.50   ICMP   Destination unreachable (Port unreachable)

4489   59.409979   Intel_8e:ac:39   Technolo_40:b2:73   ARP   Who has 192.168.1.50?  Tell 192.168.1.3

4490   59.411275   Technolo_40:b2:73   Intel_8e:ac:39   ARP   192.168.1.50 is at 00:d0:69:40:b2:73

4491   64.408213   192.168.1.50   192.168.1.3   MOUNT   [RPC retransmission of #4487]V1 NULL Call4492   64.408257   192.168.1.3   192.168.1.50   ICMP   Destination unreachable (Port unreachable)

```

so the nfsd and mountd ports are sent to the ARM but the MOUNT call gets frozen out.

 bash-4.0#rpcinfo -p

   program vers proto   port

    100000    4   tcp    111  portmapper

    100000    3   tcp    111  portmapper

    100000    2   tcp    111  portmapper

    100000    4   udp    111  portmapper

    100000    3   udp    111  portmapper

    100000    2   udp    111  portmapper

    100024    1   udp  40808  status

    100024    1   tcp  48366  status

    100005    1   udp  38988  mountd

    100005    1   tcp  42422  mountd

    100005    2   udp  38988  mountd

    100005    2   tcp  42422  mountd

    100005    3   udp  38988  mountd

    100005    3   tcp  42422  mountd

    100003    2   udp   2049  nfs

    100003    3   udp   2049  nfs

    100021    1   udp   4001  nlockmgr

    100021    3   udp   4001  nlockmgr

    100021    4   udp   4001  nlockmgr

    100021    1   tcp   4001  nlockmgr

    100021    3   tcp   4001  nlockmgr

    100021    4   tcp   4001  nlockmgr

    100003    2   tcp   2049  nfs

    100003    3   tcp   2049  nfs

----------

## Gentree

well in fact the "errors" shown in dmesg were a complete red herring. The base problem was the firewall getting in the way.

However, even though the so called errors are non critical it remains buggy IMHO that anything should be attempting nfs4 features on a non nfs4 system.

It is equally unhelpful to be spamming the logs with irrelevant error messages from non existanct features.

 :Rolling Eyes: 

----------

