qemu_imx6ul使用mount挂载Permission denied问题解决记录
- nfs服务安装和启用后发现死活挂载不上(
ubuntu18.04 + weidongshan/ubuntu-18.04_imx6ul_qemu_system
)
mount: mounting 10.0.2.2:/mnt/ext4 on /mnt failed: Permission denied
- 检查了文件权限等信息读写和组都没问题
- 为了定位问题,show log:
可以看到,在我进行挂载请求时被拒绝了,拒绝原因是端口号非法;
book@100ask:~/ubuntu-18.04_imx6ul_qemu_system$ sudo tail -f /var/log/syslog
Nov 4 04:25:19 100ask rpc.mountd[16046]: refused mount request from 127.0.0.1 for /home/book/nfs_rootfs (/home/book/nfs_rootfs): illegal port 59908
Nov 4 04:25:19 100ask rpc.mountd[16046]: refused mount request from 127.0.0.1 for /home/book/nfs_rootfs (/home/book/nfs_rootfs): illegal port 59912
- 修改配置文件/etc/exports,加入
insecure
选项
/home/book/nfs_rootfs *(insecure,rw,sync,no_subtree_check)
- 重启nfs服务就ok
sudo /etc/init.d/nfs-kernel-server restart
- 验证挂载
mount -t nfs -o nolock,vers=3 10.0.2.2:/home/book/nfs_rootfs /mnt
宿主机:
qemu:
参考:https://blog.csdn.net/u013009575/article/details/42422833