天天看點

(親測有效)解決在SecureCRT終端挂載Ubuntu時遇到的問題

作者:編碼小哥

ubuntu側

root@ubuntu:/home# /etc/init.d/rpcbind restart

bash: /etc/init.d/rpcbind: No such file or directory

解決方法:

root@ubuntu:/home# apt-get install nfs-kernel-server

root@ubuntu:/home# /etc/init.d/rpcbind restart

[ ok ] Restarting rpcbind (via systemctl): rpcbind.service.

root@ubuntu:/home# /etc/init.d/nfs-kernel-server restart

[ ok ] Restarting nfs-kernel-server (via systemctl): nfs-kernel-server.service.

CRT側

root@OpenWrt:~# busybox mount -t nfs -o nolock 192.168.2.13:/home/work /mnt/

mount: mounting 192.168.2.13:/home/work on /mnt/ failed: No such device

解決方法:核心配置打開NFS,如圖所示:

(親測有效)解決在SecureCRT終端挂載Ubuntu時遇到的問題

root@OpenWrt:~# busybox mount -t nfs -o nolock 192.168.2.13:/home/work /mnt/

mount: mounting 192.168.2.13:/home/work on /mnt/ failed: Protocol not supported

解決方法:

(親測有效)解決在SecureCRT終端挂載Ubuntu時遇到的問題

核心配置打開nfs-v3,如圖所示:

(親測有效)解決在SecureCRT終端挂載Ubuntu時遇到的問題

root@OpenWrt:~# busybox mount -t nfs -o nolock 192.168.2.13:/home/work /mnt/

mount: mounting 192.168.2.13:/home/work on /mnt/ failed: Permission denied

解決方法:

打開/etc/exports檔案,在最後加一行:

/home/work *(rw,sync,no_root_squash)

重新開機nfs服務:

/etc/init.d/nfs-kernel-server restart

執行挂載指令即可正常挂載,最後使用mount檢視挂載情況