ok6410开发板用nfs启动文件系统

本文详细介绍了如何在开发板上配置并测试NFS文件系统,包括安装、挂载、网络连接设置及故障排查过程。重点解决了网络不通、系统启动失败等问题,并通过修改`/etc/init.d/ifconfig-eth0`文件来解决NFS服务器连接问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.nfs服务器已经安装好,nfs安装略

测试nfs是否可用:在开发板命令行下使用命令: 

#mount –t nfs –o nolock 192.168.1.101:/work/nfs_root /mnt

或者在Linux本机命令行下执行命令:

$mount  -t nfs 192.168.1.101:/work/nfs_root /mnt

能在/mnt目录里能看到/work/nfs_root目录里的内容则表示正常

2.将制作好的文件系统解压到Linux机上的/work/nfs_root目录下

3.重启开发板,停在uboot下,输入命令:#setenv bootargs "root=/dev/nfs nfsroot=192.168.1.101:/work/nfs_root ip=192.168.1.102:::::eth0:off console=ttySAC0,115200",记得保存:#saveenv,保存后#reset重启开发板

4.若出现(http://bbs.witech.com.cn/thread-11818-1-1.html)

TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
s3c-rtc s3c64xx-rtc: setting system clock to 2000-01-05 00:30:03 UTC (947032203)
dm9000 dm9000.0: eth0: link down
mmc0: new SDHC card at address 1234
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
mmcblk0: mmc0:1234 SA32G 29.8 GiB 
mmcblk0: p1
VFS: Mounted root (nfs filesystem) on device 0:14.
devtmpfs: mounted
Freeing init memory: 172K
      ----->说明挂接成功

FAT-fs (mmcblk0p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!

/etc/rc.d/init.d/netd: line 16: /usr/sbin/inetd: not found
mkdir: cannot create directory '/mnt/disk': File exists
Try to bring eth0 interface up......nfs: server 192.168.1.100 not responding, still trying  

但是网路又不通,屏幕显示NET WORK starting



则下飞凌新的文件系统或者如:http://bbs.witech.com.cn/thread-11818-1-1.html的方法修改/etc/init.d/ifconfig-eth0文件,修改为(红色部分作改动)

if [ -f /etc/eth0-setting ] ; then
        source /etc/eth0-setting

            #if grep -q "^/dev/root / nfs " /etc/mtab ; then
              if grep -q "root=/dev/nfs" /proc/cmdline;then
 
              echo -n NFS root ... > /dev/ttySAC0
        else
                ifconfig eth0 down
                ifconfig eth0 hw ether $MAC
                ifconfig eth0 $IP netmask $Mask up
                route add default gw $Gateway
        fi

        echo nameserver $DNS > /etc/resolv.conf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值