免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4669 | 回复: 4
打印 上一主题 下一主题

[操作系统] mini2440用NFS启动linux [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-06-04 21:37 |只看该作者 |倒序浏览
我在移植完内核,用yaffs文件系统能够使得内核启动正常。用ifconfig命令查看了网络,而且ping windows与虚拟机(linux)都能ping通。

想用NFS启动linux,却出现如下错误:
IP-Config: Failed to open eth0
IP-Config: Device `eth0' not found.
Looking up port of RPC 100003/2 on 10.138.10.177
rpcbind: server 10.138.10.177 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 10.138.10.177
rpcbind: server 10.138.10.177 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
Root-NFS: Server returned error -5 while mounting /home/FriendlyARM/rootfs_qtopi
a_qt4
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
我虚拟机的ip:10.138.10.177.windows ip:10.138.10.176.开发板的ip:10.138.10.23

还有一个很奇怪的地方就是,当我用网线联网的时候,我的虚拟机可以ping的通我的windows,但是当用交叉线(开发办自带的)与开发板连接时连windows都ping不通。
当我接网线上网又可以ping通windows。

麻烦大家帮我看看,谢谢了

论坛徽章:
0
2 [报告]
发表于 2012-06-05 09:22 |只看该作者
当你用nfs这种方式的时候,板子启动后,你windows的网口up起来了没?看起来好像你的eth0还没up,或者你的网口不是eth0???

用nfs的时候,你的启动命令行配置是什么,贴来大家看看。

论坛徽章:
0
3 [报告]
发表于 2012-06-05 15:45 |只看该作者
本帖最后由 wenlan88 于 2012-06-05 15:47 编辑

回复 2# arm_zwinger


    你好,我的虚拟机的网络信息:
eth0      Link encap:Ethernet  HWaddr 00:0C:29:3B61  
          inet addr:10.138.10.177  Bcast:10.138.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15224 errors:0 dropped:0 overruns:0 frame:0
          TX packets:155 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4304389 (4.1 MiB)  TX bytes:19076 (18.6 KiB)

在nandflash设置启动的时候,设置的参数为:
Enter your selection: q
Supervivi> param set linux_cmd_line"console=ttySAC0 root=/dev/nfs nfsroot=10.13"
8.10.177:/home/FriendlyARM/rootfs_qtopia_qt4 ip=10.138.10.23:10.138.10.177:10.1"
38.10.1:255.255.255.0:FriendlyARM.arm9.net:eth0:  off"(off前面我自己加一个空格,不然被帖子的图像给代替了)

再有一个是你说的板子启动的时候,windows的网口up没,我不是很理解这句话,我的网络一直都很正常。
昨天问了国嵌的人,他说宿主机与目标机要用交换机连接,试了还是不行!哎!大侠,都憋坏我了。

论坛徽章:
0
4 [报告]
发表于 2012-06-06 09:47 |只看该作者
本帖最后由 arm_zwinger 于 2012-06-06 09:56 编辑

回复 3# wenlan88


似乎ip=xxx那一段有问题。网关那个参数直接写nfs的ip好了。

以下是我的环境,你可以对比下:
目标板直连PC,然后pc上再装一个vmware (linux).
目标板IP: 10.56.32.111
PC IP:   10.56.32.12
vmware: bridge方式连接,IP: 10.56.32.123

param set linux_cmd_line "console=ttySAC0 root=/dev/nfs nfsroot=10.56.32.123:/usr/zwinger/project_src/root_qtopia ip=10.56.32.111:10.56.32.123:10.56.32.123:255.255.255.0:matrix4.arm9.net:eth0ff"



另外,我搭建环境的时候也遇到了些问题,一步一步地解决,下面是我的一点笔记,应当很多地方都可找到类似的描述,你参考一下吧:
3.          Uninstall the fireware, if it is installed on your PC network card.
4.        Start the arm card through NFS
4.1        Disable firewall on the VM
4.2        Disable the seLinux on the VM, especially when we use Fedora 9.
              modify the file /etc/selinux/config, by set the SELINUX="" to disabled, and then restart the Linux system.
4.3        Open ftp service on the VM, and upload the targeted file system package to the VM.
4.4        Share the directory which contain the file system used by arm card:
                  #gedit /etc/exports
             And then add the following contents:
                  /opt/FriendlyARM/mini2440/root_qtopia  *(rw,sync,no_root_squash)
4.5        Start NFS service.
                   #/etc/init.d/nfs start
                  #/etc/init.d/nfs stop
4.6        Check the NFS status by mount it to /mnt.
                   # mount -t nfs localhost: /usr/zwinger/root_qtopia /mnt/
                   #ls /mnt
                   #umount /mnt/
4.7        Set the command line on the arm card which indicate that we’ll use NFS,
“param set linux_cmd_line "console=ttySAC0 root=/dev/nfs nfsroot=10.56.32.123:/usr/zwinger/root_qtopia ip=10.56.32.111:10.56.32.123:10.56.32.123:255.255.255.0:matrix4.arm9.net:eth0ff"”





   

论坛徽章:
0
5 [报告]
发表于 2012-07-14 09:11 |只看该作者
回复 4# arm_zwinger


    已经解决了,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP