Debian or Raspbian: nfs-kernel-server not starting portmapper is not running … (warning) rpcbind.target
Here is my first try, but it doesn’t work for me. It just reset the configs. So if you messed it up, try this first.
apt-get purge rpcbind nfs-kernel-server nfs-common apt-get install nfs-kernel-server
Next, I have a look into /etc/init.d/nfs-kernel-server
and find its start level is 2 3 4 5. However, nfs-common
and rpcbind
have differenct run level, I change it to the same, i.e. 2 3 4 5.
# Have a look at these files' runlevel /etc/init.d/nfs-kernel-server /etc/init.d/nfs-common /etc/init.d/rpcbind
This is the runlevel of nfs-kernel-server
### BEGIN INIT INFO # Provides: nfs-kernel-server # Required-Start: $remote_fs nfs-common $portmap $time # Required-Stop: $remote_fs nfs-common $portmap $time # Should-Start: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Kernel NFS server support # Description: NFS is a popular protocol for file sharing across # TCP/IP networks. This service provides NFS server # functionality, which is configured via the # /etc/exports file. ### END INIT INFO
Now, let’s finish it. I forecely removed the old links by update-rc.d
and add the defaults
again.
update-rc.d -f rpcbind remove update-rc.d rpcbind defaults update-rc.d -f nfs-common remove update-rc.d nfs-common defaults update-rc.d -f nfs-kernel-server remove update-rc.d nfs-kernel-server defaults
Reboot the server, it works now! Cheers!