pi2 osmc 2015.06-1 NFS install

Hi all,

just to tell you a few steps I followed to NFS (linux) install osmc 2015.06-1 on pi2 using the installer:

  1. The first pi2 boot will work, files will be copied to NFS share as they should

  2. After the reboot, the pi2 will not start. I will stall while trying to access the NFS share (screen will be black). You will need to edit the cmdline.txt of the sd card and set the TCP and vers=3 options to NFS, like this (I also give larger rsize and wsize):

root=/dev/nfs nfsroot=10.11.12.1:/shares/osmc3,vers=3,rsize=1048576,wsize=1048576,tcp ip=dhcp rootwait quiet osmcdev=rbp2

  1. Once you save this and boot pi2 it will continue as it should.

  2. You will not be able to mount other NFS shares at boot (you will be able to mount them by hand later). It seems there is a systemd dependency loop for rpcbind. Systemd reports this:

Job rpcbind.service/stop deleted to break ordering cycle starting with sysinit.target/stop

Also, rpc.rstatd is not installed. You should install it with this:

sudo apt-get install rstatd

To mount an NFS share at boot, I added these to /etc/rc.local

    /etc/init.d/rpcbind start
    /usr/sbin/start-statd
    mount /your_other_nfs_share

Of course your_other_nfs_share should be present in /etc/fstab.

Costa

This is a known problem with Debian Jessie at the moment:

There is already logic in the installer to attempt an NFSv4 and NFSv3 mount. If a v3 was the only successful mount, then it will add vers=3 automatically. This means that NFSv4 mount must have succeeded for installation, but failed on the reboot…

I have not configured NFS v4 on the NFS server.

Check my NFS server logs:

1st boot
Jul 14 00:51:38 box dhcpd: DHCPOFFER on 10.11.12.142 to b8:27:eb:d7:8c:48 via eth0
Jul 14 00:51:38 box dhcpd: DHCPREQUEST for 10.11.12.142 (10.11.12.1) from b8:27:eb:d7:8c:48 via eth0
Jul 14 00:51:38 box dhcpd: DHCPACK on 10.11.12.142 to b8:27:eb:d7:8c:48 via eth0
Jul 14 00:51:38 box rpc.mountd[7348]: authenticated mount request from 10.11.12.142:984 for /shares/osmc3 (/shares/osmc3)

automatic reboot
Jul 14 01:05:30 box dhcpd: DHCPOFFER on 10.11.12.164 to b8:27:eb:d7:8c:48 via eth0
Jul 14 01:05:31 box dhcpd: DHCPOFFER on 10.11.12.164 to b8:27:eb:d7:8c:48 via eth0
Jul 14 01:05:31 box dhcpd: DHCPREQUEST for 10.11.12.164 (10.11.12.1) from b8:27:eb:d7:8c:48 via eth0
Jul 14 01:05:31 box dhcpd: DHCPACK on 10.11.12.164 to b8:27:eb:d7:8c:48 via eth0
Jul 14 01:05:31 box rpc.mountd[7348]: authenticated mount request from 10.11.12.164:884 for /shares/osmc3 (/shares/osmc3)

Later I tried to figure out what happens:
Jul 14 01:58:21 box bash: HISTORY: PID=31990 UID=0 ping 10.11.12.164
Jul 14 01:58:24 box bash: HISTORY: PID=31990 UID=0 ssh 10.11.12.164
Jul 14 02:01:31 box bash: HISTORY: PID=31990 UID=0 ping 10.11.12.164
Jul 14 02:02:18 box bash: HISTORY: PID=31990 UID=0 tcpdump -i eth0 -n host 10.11.12.164
Jul 14 02:03:14 box bash: HISTORY: PID=31990 UID=0 tcpdump -vv -i eth0 -n host 10.11.12.164
Jul 14 02:05:29 box bash: HISTORY: PID=31990 UID=0 tcpdump -i eth0 -n host 10.11.12.164

tcpdump was reporting some activity, but without luck.

Then I changed the NFS settings on the SD card