当前位置: 移动技术网 > 网络运营>服务器>Linux > linux移植过程遇到系统崩溃(根文件原因)

linux移植过程遇到系统崩溃(根文件原因)

2020年08月12日  | 移动技术网网络运营  | 我要评论
在linux启动过程中报如下错误:Starting init: /sbin/init exists but couldn't execute it (error -8)request_module: runaway loop modprobe binfmt-464cStarting init: /bin/sh exists but couldn't execute it (error -8)Kernel panic - not syncing: No working init found. Try

在linux启动过程中报如下错误:

Starting init: /sbin/init exists but couldn't execute it (error -8)
request_module: runaway loop modprobe binfmt-464c
Starting init: /bin/sh exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

在这里插入图片描述
根据错误信息,定位到了/sbin/init这个文件,使用ls -la命令查看发现其指向/bin/busybox这个文件,说明问题出在busybox这个文件上。
在这里插入图片描述
进入/bin文件夹后使用file命令查看busybox这个文件的属性,找到了问题,原来该文件使用的默认的编译器编译出来的,而默认编译器为x86平台的,在arm运行不出问题才怪。找到问题后,解决办法就有了,打开busybox工具的Mafile文件,将arm-linux-gnueabihf-赋值给CROSS_COMPILE变量,指定使用arm编译器编译。
在这里插入图片描述
重新编译busybox

make install CONFIG_PREFIX=/home/linux/rootfs

重新查看/bin/busybox的属性
在这里插入图片描述
显示为arm平台程序,烧录进开发板,成功进入根目录,问题解决。
在这里插入图片描述

本文地址:https://blog.csdn.net/lxh1205509119/article/details/107934762

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网