OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 8855|回复: 4

NFS挂载根目录卡在random: nonblocking pool is initialized

[复制链接]

3

主题

8

帖子

0

精华

新手上路

积分
31
金钱
31
注册时间
2019-11-5
在线时间
11 小时
发表于 2020-2-14 17:12:19 | 显示全部楼层 |阅读模式
1金钱
开发指南第三十八章-38.3根文件系统初步测试,出现问题。SecureCRT终端信息表面根文件已挂载,但是最终卡在random: nonblocking pool is initialized,没有继续运行。
终端信息:
  1. fec 20b4000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1)
  2. IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
  3. fec 20b4000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
  4. IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
  5. IP-Config: Complete:
  6.      device=eth0, hwaddr=00:04:9f:04:d2:35, ipaddr=192.168.214.50, mask=255.255.255.0, gw=192.168.214.1
  7.      host=192.168.214.50, domain=, nis-domain=(none)
  8.      bootserver=192.168.214.30, rootserver=192.168.214.30, rootpath=
  9. can-3v3: disabling
  10. ALSA device list:
  11.   No soundcards found.
  12. VFS: Mounted root (nfs filesystem) on device 0:15.
  13. devtmpfs: mounted
  14. Freeing unused kernel memory: 480K (8090e000 - 80986000)
  15. request_module: runaway loop modprobe binfmt-464c
  16. Starting init: /sbin/init exists but couldn't execute it (error -8)
  17. request_module: runaway loop modprobe binfmt-464c
  18. Starting init: /bin/sh exists but couldn't execute it (error -8)
  19. Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
  20. ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
  21. random: nonblocking pool is initialized
复制代码
我的环境变量配置:
  1. bootargs=console=ttymxc0,115200 root=/dev/nfs rw nfsroot=192.168.214.30:/home/liangchanghao/linux/nfs/rootfs ip=192.168.214.50:192.168.214.30:192.168.214.1:255.255.255.0::eth0:off
复制代码

我的分析:
1、在前面的37.2.3linux内核启动测试是成功的,当时是用了EMMC里面的根文件
说明:NFS 下载没有问题,Uboot linux内核以及.dtb设备文件没有问题。
2、启动挂载NFS根目录时,打印的信息中出现了,VFS: Mounted root (nfs filesystem) on device 0:15.
说明,已经挂载成功了,环境变量应该没有输错。
3、根据最后出现的报错信息推断,
  1. Starting init: /sbin/init exists but couldn't execute it (error -8)
  2. request_module: runaway loop modprobe binfmt-464c
  3. Starting init: /bin/sh exists but couldn't execute it (error -8)
  4. Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
  5. ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
  6. random: nonblocking pool is initialized
复制代码


出错原因是Linux内核无法执行init这个文件。既然能找到文件,并提示无法执行应该是权限问题或者配置问题。按照教程检查了一遍根文件的配置,并没有找出问题。


求助各位出现过类似问题的提供一下思路!

最佳答案

查看完整内容[请看2#楼]

是文件格式不对了,在rootfs目录下查看 file bin/busybox。发现文件是X86的64位。 检查了下,是busybox编译时,手册里给的Makefile参考多了个问号,导致编译不对。 去掉问号重新编译,查看文件,是32位的了。重新运行,一切正常。
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

3

主题

8

帖子

0

精华

新手上路

积分
31
金钱
31
注册时间
2019-11-5
在线时间
11 小时
 楼主| 发表于 2020-2-14 17:12:20 | 显示全部楼层


是文件格式不对了,在rootfs目录下查看 file bin/busybox。发现文件是X86的64位。

检查了下,是busybox编译时,手册里给的Makefile参考多了个问号,导致编译不对。
  1. 164 CROSS_COMPILE ?= /usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
复制代码


去掉问号重新编译,查看文件,是32位的了。重新运行,一切正常。
回复

使用道具 举报

9

主题

890

帖子

0

精华

资深版主

Rank: 8Rank: 8

积分
2396
金钱
2396
注册时间
2019-9-25
在线时间
398 小时
发表于 2020-2-15 12:48:55 | 显示全部楼层
感谢分享
回复

使用道具 举报

0

主题

1

帖子

0

精华

新手入门

积分
12
金钱
12
注册时间
2025-4-22
在线时间
2 小时
发表于 2025-5-3 15:55:33 | 显示全部楼层
怎么看文件是哪个平台的多少位啊
回复

使用道具 举报

2

主题

6

帖子

0

精华

新手上路

积分
21
金钱
21
注册时间
2022-12-8
在线时间
4 小时
发表于 2025-5-23 21:18:22 | 显示全部楼层
我也是出现这个问题 不知道是什么原因。emmc 烧录没有问题 。通过命令行挂载起来就出现如上错。
[  102.871796] VFS: Unable to mount root fs via NFS, trying floppy.
[  102.878743] VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[  102.886106] Please append a correct "root=" boot option; here are the available partitions:
[  102.894544] 0100           65536 ram0  (driver?)
[  102.899191] 0101           65536 ram1  (driver?)
[  102.903919] 0102           65536 ram2  (driver?)
[  102.908562] 0103           65536 ram3  (driver?)
[  102.913202] 0104           65536 ram4  (driver?)
[  102.917897] 0105           65536 ram5  (driver?)
[  102.922539] 0106           65536 ram6  (driver?)
[  102.927227] 0107           65536 ram7  (driver?)
[  102.931868] 0108           65536 ram8  (driver?)
[  102.936537] 0109           65536 ram9  (driver?)
[  102.941176] 010a           65536 ram10  (driver?)
[  102.945925] 010b           65536 ram11  (driver?)
[  102.950653] 010c           65536 ram12  (driver?)
[  102.955432] 010d           65536 ram13  (driver?)
[  102.960159] 010e           65536 ram14  (driver?)
[  102.964911] 010f           65536 ram15  (driver?)
[  102.969649] b300         7634944 mmcblk1  driver: mmcblk
[  102.975010]   b301          131072 mmcblk1p1 68412317-01
[  102.980344]   b302         7493632 mmcblk1p2 68412317-02
[  102.985700] b318             512 mmcblk1rpmb  (driver?)
[  102.990950] b310            4096 mmcblk1boot1  (driver?)
[  102.996306] b308            4096 mmcblk1boot0  (driver?)
[  103.001640] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[  103.009917] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[  118.433700] random: nonblocking pool is initialized


U-Boot 2016.03-g0ae7e33 (Aug 14 2022 - 19:42:45 +0800)
回复

使用道具 举报

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

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-7-1 00:28

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

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