I am running Debian Jessie (Raspbian Jessie Lite) on my RPi model B. Previously with Wheezy I had great success booting with root filesystem mounted over NFS, but now it stalls on startup. I am running headless so don't have a console output to look at for the actual messages.

While investigating, I discovered that it will start if I disable UFW. This seems promising, but I don't know what I need to enable. When I first set it up, I ran:

sudo ufw default allow outgoing
sudo ufw default deny incoming

and added rules for some hosted services:

$ sudo ufw status Status: active
To                         Action      From
--                         ------      ----
22/tcp                     ALLOW
80                         ALLOW       Anywhere
443                        ALLOW       Anywhere
5222/tcp                   ALLOW       Anywhere
5269/tcp                   ALLOW       Anywhere
80                         ALLOW       Anywhere (v6)
443                        ALLOW       Anywhere (v6)
5222/tcp                   ALLOW       Anywhere (v6)
5269/tcp                   ALLOW       Anywhere (v6)

If I try to mount NFS to a folder while running from the SD card, the command gives an rpc.statd error:

$ sudo mount  nfs.example.com:/volume1/raspberrypi_nfs /tmp/nfsmount
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

What am I missing here? Do I need to enable a service that needs to accept incoming connections (therefore open another port in UFW)? If so, which service(s) and which port(s) should I be looking for?

If it helps, my /boot/cmdline.txt looks like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/nfs nfsroot=,udp,vers=3 ip= rootfstype=nfs smsc95xx.turbo_mode=N elevator=deadline rw rootwait
  • 1
    I can't actually answer (and don't even know what ufw is). It may be helpful to know that there is a known problem with systemd nfs startup in Jessie (all Debian derivations) which has FINALLY been fixed in Stretch – Milliways Oct 12 '17 at 23:31
  • UFW is UnComplicated Firewall. It's port based and I use it's log on other machines to ban port scanners with fail2ban. Regarding systemd on Jessie, yeah, that was what I found. I had to create some systemd config files and enable services as per this site; https://tutel.me/c/unix/questions/263331/debian+jessie+start+rpcbind+and+nfscommon+at+boot+with+systemd. – Tiksi Oct 12 '17 at 23:49
  • I downloaded the latest Stretch image and it was able to boot from NFS straight off the bat, but it also stalled as soon as I enabled ufw again. I don't understand why, because while it was booted, there were no new listening ports on the Pi that would be blocked and all outgoing traffic was allowed. – Tiksi Oct 12 '17 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.