1.设置启动参数nfs :
param set linux_cmd_line "console=ttyS0 root=/dev/nfs nfsroot=192.168.213.217:/real2410/root_nfs ip=192.168.213.215:192.168.213.217:192.168.213.254:255.255.255.0:localhost:eth0:off"
ntfroot:nfs服务主机名:目录
ip=开发板ip:服务器ip:网关ip:子网掩码:dns:网络设备名:开启状态
2.ubuntu主机:
安装nfs server
apt-get install nfs-kernel-server
3.确定开放的目录,在etc/exports 里添加:
/real2410/root_nfs * (rw,sync,no_root_squash)
4.在etc/host.deny先不允许任何人访问
### NFS DAEMONS
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
5.在etc/host.allow允许访问的特例:下面是个子网
portmap: 192.168.213.*
lockd: 192.168.213.*
rquotad: 192.168.213.*
mountd: 192.168.213.*
statd: 192.168.213.*
然后
/etc/init.d/portmap restart
/etc/init.d/nfs-kernel-server restart
启动服务
mount -t nfs 192.168.213.217:/real2410/root_nfs /mnt
可以挂上并看到了文件系统内容 ok
开发板上电,进入console
写入yaffs,改写启动参数从yaffs启动
param set linux_cmd_line "noinitrd root=/dev/mtdblock/2 init=/linuxrc console=ttyS0"