嵌入式爱好者

查看: 9869|回复: 7

[Linux] OK6410挂载NFS文件系统失败原因探讨

[复制链接]

12

主题

32

帖子

52

积分

扫一扫,手机访问本帖
发表于 2014-9-21 13:23:45 | 显示全部楼层 |阅读模式
环境:

U-BOOT参数 SMDK6410 # printenv
bootcmd=nand read 0xc0008000 0x200000 0x500000;bootm 0xc0008000
bootdelay=1
baudrate=115200
ethaddr=00:40:5c:26:0a:5b
netmask=255.255.255.0
bootargs=root=/dev/nfs nfsroot=192.168.0.128:/forlinx/root ip=192.168.0.103:192.168.0.128:192.168.0.255:255.255.255.0:witech.com.cn:eth0:off console=ttySAC0,115200
ipaddr=192.168.0.103
serverip=192.168.0.104
gatewayip=192.168.0.1
stdin=serial
stdout=serial
stderr=serial
Environment size: 411/524284 bytes

ubuntu 参数:
root@ubuntu:/forlinx/root# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:87:2a:2e
inet addr:192.168.0.128 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe87:2a2e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6720 errors:0 dropped:0 overruns:0 frame:0
TX packets:1966 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:875065 (875.0 KB) TX bytes:215477 (215.4 KB)
Interrupt:19 Base address:0x2024

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:895 errors:0 dropped:0 overruns:0 frame:0
TX packets:895 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:91828 (91.8 KB) TX bytes:91828 (91.8 KB)



之前已经PING过,ubuntu可以与开发板互相ping通;然后我是设置了开发板的U-BOOT参数之后,就启动不了了,错误如下:

asoc: wm9713-hifi <-> samsung-ac97 mapping ok
ALSA device list:
#0: smdk6410
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-01 00:00:22 UTC (946684822)
dm9000 dm9000.0: eth0: link down
IP-Config: Cannot add default route (-101).
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
VFS: Unable to mount root fs via NFS, trying floppy.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c003aca8>] (unwind_backtrace+0x0/0xfc) from [<c04a7f2c>] (dump_stack+0x18/0x1c)
[<c04a7f2c>] (dump_stack+0x18/0x1c) from [<c04a7f90>] (panic+0x60/0x1ac)
[<c04a7f90>] (panic+0x60/0x1ac) from [<c0008fd0>] (mount_block_root+0x204/0x25c)
[<c0008fd0>] (mount_block_root+0x204/0x25c) from [<c00090b0>] (mount_root+0x88/0xd0)
[<c00090b0>] (mount_root+0x88/0xd0) from [<c0009204>] (prepare_namespace+0x10c/0x1a8)
[<c0009204>] (prepare_namespace+0x10c/0x1a8) from [<c00084c4>] (kernel_init+0xf0/0x130)
[<c00084c4>] (kernel_init+0xf0/0x130) from [<c0035a34>] (kernel_thread_exit+0x0/0x8)



就卡死在这里,启动不了了,有哪个哥们知道如何解决?


回复

使用道具 举报

153

主题

3910

帖子

4207

积分

AM5718通行证AM335x通行证i.MX6UL通行证i.MX RT通行证i.MX6Q通行证XX18通行证TCU通行证FCU1401通行证FCU1301通行证FCU11xx通行证

发表于 2014-9-22 08:34:59 | 显示全部楼层
你的bootargs中的nfsroot和ip输入的是192.168.0.128,然而你的serverip设置的确实192.168.0.103.服务器那边的serverip使用的都不是一个IP

点评

感谢,我的ubuntu上的ip是192.168.0.128;开发板的ip是192.168.0.103; 你的意思说我的serverip要设置为ubuntu的ip,是吗?  详情 回复 发表于 2014-9-22 11:05
技术支持电话:0312-3119192
技术支持邮箱:Linux@forlinx.com
点评回复 支持 反对

使用道具 举报

12

主题

32

帖子

52

积分

 楼主| 发表于 2014-9-22 11:05:06 | 显示全部楼层
飞凌-unix 发表于 2014-9-22 08:34
你的bootargs中的nfsroot和ip输入的是192.168.0.128,然而你的serverip设置的确实192.168.0.103.服务器那边 ...

感谢,我的ubuntu上的ip是192.168.0.128;开发板的ip是192.168.0.103;
你的意思说我的serverip要设置为ubuntu的ip,是吗?

点评

serverip要与Ubuntu系统的IP相同  详情 回复 发表于 2014-9-22 15:03
点评回复 支持 反对

使用道具 举报

1

主题

67

帖子

108

积分

发表于 2014-9-22 15:03:49 | 显示全部楼层
Miles 发表于 2014-9-22 11:05
感谢,我的ubuntu上的ip是192.168.0.128;开发板的ip是192.168.0.103;
你的意思说我的serverip要设置为 ...

serverip要与Ubuntu系统的IP相同

点评

谢谢,回去试一试  详情 回复 发表于 2014-9-22 17:38
点评回复 支持 反对

使用道具 举报

12

主题

32

帖子

52

积分

 楼主| 发表于 2014-9-22 17:38:37 | 显示全部楼层
yexingdehuxi 发表于 2014-9-22 15:03
serverip要与Ubuntu系统的IP相同

谢谢,回去试一试
点评回复 支持 反对

使用道具 举报

12

主题

32

帖子

52

积分

 楼主| 发表于 2014-9-22 23:10:11 | 显示全部楼层
已经改过来了啊,还是不行呃


Enter your Selection:6

SMDK6410 # printenv

bootcmd=nand read 0xc0008000 0x200000 0x500000;bootm 0xc0008000

bootdelay=1

baudrate=115200

ethaddr=00:40:5c:26:0a:5b

netmask=255.255.255.0

bootargs=root=/dev/nfs nfsroot=192.168.0.128:/forlinx/root ip=192.168.0.103:192.168.0.128:192.168.0.255:255.255.255.0:witech.com.cn:eth0:off console=ttySAC0,115200

ipaddr=192.168.0.103

gatewayip=192.168.0.1

serverip=192.168.0.128

stdin=serial

stdout=serial

stderr=serial


Environment size: 411/524284 bytes




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-01 01:04:21 UTC (946688661)
dm9000 dm9000.0: eth0: link down
IP-Config: Cannot add default route (-101).
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
VFS: Mounted root (nfs filesystem) on device 0:14.
devtmpfs: error mounting -2
Freeing init memory: 176K
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<c003aca8>] (unwind_backtrace+0x0/0xfc) from [<c04a7f2c>] (dump_stack+0x18/0x1c)
[<c04a7f2c>] (dump_stack+0x18/0x1c) from [<c04a7f90>] (panic+0x60/0x1ac)
[<c04a7f90>] (panic+0x60/0x1ac) from [<c00345dc>] (init_post+0xc8/0x140)
[<c00345dc>] (init_post+0xc8/0x140) from [<c00084c8>] (kernel_init+0xf4/0x130)
[<c00084c8>] (kernel_init+0xf4/0x130) from [<c0035a34>] (kernel_thread_exit+0x0/0x8)
点评回复 支持 反对

使用道具 举报

0

主题

1

帖子

9

积分

发表于 2016-8-18 13:56:37 | 显示全部楼层
遇到同样的问题,楼主解决了吗?
点评回复 支持 反对

使用道具 举报

2

主题

10

帖子

41

积分

发表于 2020-3-18 22:13:53 | 显示全部楼层
U-boot下能ping通虚拟机吗?
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-4-17 08:01

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表