本文共 1225 字,大约阅读时间需要 4 分钟。
在开发阶段,利用nfs的方式来调试rootfs是一种非常方便快捷的方式。
环境 ubuntu14.04 64位 板载kernel版本2.6.35apt-get install nfs-kernel-server
apt-get install nfs-common
chmod 777 -R /root/rootfs_test
vi /etc/exports
,在最后一行添加/root/rootfs_test *(rw,sync,no_root_squash,no_subtree_check)
showmount -e
看看有没有成功,发现报错: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)/etc/init.d/rpcbind restart
,不过有的时候restart也会失败,这个时候重启一下ubuntu即可/etc/init.d/nfs-kernel-server restart
showmount localhost -e
看看有没有成功,发现:Export list for localhost:/root/rootfs_test *
搭建成功!
setenv bootargs root=/dev/nfs nfsroot=192.168.1.2:/root/rootfs_test ip=192.168.1.3:192.168.1.2:192.168.1.10:255.255.255.0::eth0:off init=/linuxrc console=ttySAC2,115200