Now I got a RPI4b and tried 20.04-64/32 and the same NFS mount gloriously fails on boot.
I've got a Synology NAS and can mount the share just fine after boot with "sudo mount -a"
I got my entry in fstab and it fails. It seems the network is not available when systemd tries to mount on boot.
I tried it with "_netdevs, x-systemd.after=network-online.target" to no avail.
So I went to just Pi-Image a clean 20.04-32 and started from the top.
Updated apt, upgraded, installed nfs-common, tried to manually mount and it worked. Added the same entry to fstab as on the RPI2b, rebooted and it fails again.
So I dug into the syslog and systemctl.
Code: Select all
ubuntu@ubuntu:~$ cat /var/log/syslog | grep -C 5 "remote-fs.target"
May 30 20:34:55 ubuntu mount[1222]: mount.nfs: Network is unreachable
May 30 20:34:55 ubuntu systemd[1]: media-nas-emulation.mount: Mount process exited, code=exited, status=32/n/a
May 30 20:34:55 ubuntu systemd[1]: media-nas-emulation.mount: Failed with result 'exit-code'.
May 30 20:34:55 ubuntu systemd[1]: Failed to mount /media/nas/emulation.
May 30 20:34:55 ubuntu systemd[1]: Dependency failed for Remote File Systems.
May 30 20:34:55 ubuntu systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
...
Right after boot:
Code: Select all
ubuntu@ubuntu:~$ sudo systemctl | grep remote-fs
remote-fs-pre.target loaded active active Remote File Systems (Pre) Code: Select all
ubuntu@ubuntu:~$ sudo systemctl start remote-fs.target
ubuntu@ubuntu:~$ sudo systemctl | grep remote-fs
remote-fs-pre.target loaded active active Remote File Systems (Pre)
remote-fs.target loaded active active Remote File Systems
So it seems something's really wrong and remote-fs.target never is called, even after the network is up.
On the RPi2b with 20.04 32b the NFS just mounts during boot with systemd reporting success.
Does anyone have any idea what's wrong, how to fix it? Or is this old Ubuntu bug back? I think to recall that there were similar issues a few years back.