开发板NFS启动

平台:Ubuntu14.04,JZ2440
一、 Ubuntu14.04安装nfs
1.  sudo apt-get install nfs-kernel-server
2.  sudo apt-get install rpcbind
3. 修改/etc/exports
/mnt/local/rootfs 192.168.1.*(rw,sync,no_root_squash)
4.  修改/etc/hosts.allow
portmap: 192.168.1.
lockd: 192.168.1.
rquotad: 192.168.1.
mountd: 192.168.1.
statd: 192.168.1.
5. 修改/etc/hosts.deny
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
6. 启动nfs
sudo /etc/init.d/rpcbind start
sudo /etc/init.d/nfs-kernel-server start


7. 测试
showmount -e
mount -t nfs 192.168.1.213:/mnt/local /test
ls /test


二、 开发板设置
uboot模式下设置启动命令、参数
set bootcmd 'nfs 0x30007FC0 192.168.1.213:/mnt/local/rootfs/uImage;bootm 0x30007FC0'
setenv bootargs 'root=/dev/nfs nfsroot=192.168.1.213:/mnt/local/rootfs/fs_mini_mdev ip=192.168.1.130:192.168.1.1:255.255.255.0 console=ttySAC0,115200'
save;reset








你可能感兴趣的:(nfs)