嵌入式Linux启动过程中的问题积累
嵌入式Linux启动过程中的问题积累
Dongas 07-12-19
1.Bad Magic Number
## Booting image at 33000000 ...
Bad Magic Number
OMAP5912 OSK # (tftp下载好kernel的uImage后就停止在这,不能启动kernel)
问题原因:启动参数设置错误,0x30000000处不可以执行。
有的开发板sdram不是在0x33000000,所以不能把kernel uImage下载到0x33000000中运行。如我之前的bootcmd参数为:setenv bootcmd tftpboot 33000000 uImage/; bootm 33000000。但板子Omap5912的sdram地址在0x100000000,将参数改为setenv bootcmd tftpboot 10000000 uImage/; bootm 10000000后便可以启动kernel了。
2.启动停止在"Starting kernel ..."
TFTP from server 192.168.167.170; our IP address is 192.168.167.15
Filename 'uImage'
Load address: 0x10000000
Loading: #################################################################
#################################################################
done
Bytes transferred = 2025908 (1ee9b4 hex)
## Booting image at 10000000 ...
Image Name: Linux-2.6.18-mh8_pro500-versatil
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2025844 Bytes = 1.9 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
OK
Starting kernel ... (卡在这里)
问题原因:多半是kernel没编译成功。
确认configure参数是否配置正确,是否选择了正确的目标编译平台,如smdk2410等。
3.不能启动kernel
Starting kernel ...
Uncompressing Linux.........................................................
.................... done, booting the kernel.
问题原因:可能是Bootargs参数设置错误,确认bootargs设置是否正确。
4.不能挂载nfs
eth0: link up
IP-Config: Complete:
device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,
host=192.168.167.15, domain=, nis-domain=(none),
bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=
Looking up port of RPC 100003/2 on 192.168.167.170
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.167.170
Root-NFS: Unable to get mountd port number from server, using default
mount: server 192.168.167.170 not responding, timed out
Root-NFS: Server returned error -5 while mounting /work/nfs/rootfs_bluetooth_omap
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
问题原因:这种情况通常是nfs配置问题。
确认uboot的bootargs参数里和nfs相关的ip地址信息设置是否正确,以及Host机/etc/exports配置无误,重起nfs服务,重新尝试连接。另外还需要注意bootargs内console和mem两个参数的设置。kernel2.6后console最好设置为ttySAC0,mem也要根据开发板实际情况设置正确。
5.文件系统不能启动问题
eth0: link up
IP-Config: Complete:
device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,
host=192.168.167.15, domain=, nis-domain=(none),
bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=
Looking up port of RPC 100003/2 on 192.168.167.170
Looking up port of RPC 100005/1 on 192.168.167.170
VFS: Mounted root (nfs filesystem).
Freeing init memory: 128K
/sbin/initKernel panic - not syncing: Attempted to kill init!
问题原因:制作的文件系统缺少运行busybox所需的libcrypt.so库,新版本会有缺库提示,老版本(1.60)没有。
注:运行一个busybox文件系统至少需要如下几个库:
ld-linux.so.x
libc.so.6
libcrypt.so.x
较新版本的busybox可能还需要
libm.so.6
libgcc_s.so.x
(x为版本号)
6.文件系统不能启动问题2
eth0: link up
IP-Config: Complete:
device=eth0, addr=192.168.167.15, mask=255.255.255.0, gw=192.168.167.254,
host=192.168.167.15, domain=, nis-domain=(none),
bootserver=192.168.167.170, rootserver=192.168.167.170, rootpath=
Looking up port of RPC 100003/2 on 192.168.167.170
Looking up port of RPC 100005/1 on 192.168.167.170
VFS: Mounted root (nfs filesystem).
Freeing init memory: 128K
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
问题原因:对比一个可用的文件系统后发现,缺少了ld-linux.so.x库,文件系统里只有ld-linux.so.x的连接文件,少拷了库文件。
8.不能获得帐户UID信息
Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry
Unknown username "root" in message bus configuration file
Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry
Failed to start message bus: Could not get UID and GID for username "root"
问题原因:
情况一:系统帐户验证出现问题.怀疑是调用getuid、getguid时并没有返回正确值,可能是缺少帐户验证相关库,实际排查后发现,缺少libnss_files库。拷贝交叉编译器的libnss_files库到文件系统后,启动文件系统成功。
情况二:系统没有root帐号。可以由whoami命令看出。
手动创建帐号。
#vi /etc/passwd
root:x:0:0:root:/root:/bin/sh
kyo:x:500:500:kyo:/home/kyo:/bin/bash
添加组
#vi group
root:x:0:root
9.
Freeing init memory: 128K
init started: BusyBox v1.6.1 (2007-08-27 14:33:15 CST) multi-call binary
starting pid 834, tty '': '/etc/init.d/rcS'
Cannot run '/etc/init.d/rcS': No such file or directory
Please press Enter to activate this console.
发现没有/etc/init.d/rcS文件系统一样能正常启动。看来rcS只是用来设置一些随机启动的参数,对文件能否正常运行关系不大。
注:这个不是错误,是偶然发现! :)
嵌入式Linux启动过程中的问题积累的更多相关文章
- 为什么要有uboot?带你全面分析嵌入式linux系统启动过程中uboot的作用
1.为什么要有uboot 1.1.计算机系统的主要部件 (1)计算机系统就是以CPU为核心来运行的系统.典型的计算机系统有:PC机(台式机+笔记本).嵌入式设备(手机.平板电脑.游戏机).单片机(家用 ...
- 嵌入式linux启动过程详解
启动第一步--加载BIOS 当你打开计算机电源,计算机会首先加载BIOS信息,BIOS信息是如此的重要,以至于计算机必须在最开始就找到它.这是因为BIOS中包含了CPU的相关信息.设备启动顺序信息.硬 ...
- linux启动过程中建立临时页表
intel的x86这种架构为了兼容以前同系列的架构有一些很繁琐无用的东西.比如分段和分页两种机制都可以实现隔离进程的内存空间,在x86上两种机制都有,用起来比较繁琐.所以linux内核在启动的时候通过 ...
- 如何设置linux启动过程中的停止阶段
设置方法: 1 启动过程中点击“e”键(fedora)或者"tab"(centOS)键进入目标启动项的命令行参数下,移除initrd所在行末尾的"quiet" ...
- Linux启动过程中几个重要配置文件的执行过程
Linux 登录后,配置执行顺序为(Debian Serials Capable):/etc/environment -> /etc/profile -> (~/.bash_profile ...
- 带你全面分析嵌入式linux系统启动过程中uboot的作用
资料链接:http://mp.weixin.qq.com/s/rYVchD-xy7Bdkc1O3fW2Wg
- 嵌入式linux启动信息完全注释
嵌入式linux启动信息完全注释 from:http://www.embedlinux.cn/ShowPost.asp?ThreadID=377 摘要 我们在这里讨论的是对嵌入式linux系统的启动过 ...
- Linux系统在启动过程中mbr主引导程序被破坏的解决方案
首先,mbr主引导程序被破坏是指系统在启动过程中,磁头找不到/boot分区(windows的启动分区在c盘). 1)下面我们模拟主引导分区被破坏的情况:(在启动分区划分446M的存储大小) 2)重启( ...
- 转:嵌入式linux启动时运行的inittab文件
嵌入式系统下的linux启动配置文件,不同与普通的PC linux启动配置,启动相关文件与文件的内容也要少得多.嵌入式系统下的linux启动过程一般是: 1 在bootloader中制定各种要 ...
随机推荐
- Beaglebone Back学习三(开发环境搭建)
开发环境搭建 1 Ubuntu环境搭建 2 Window环境搭建 3 开发板环境搭建 1 Ubuntu环境搭建 (1)安装必要的网络工具 samba nfs tftp vmware-tools sam ...
- 【IOS】利用ASIHTTPRequest 实现一个简单的登陆验证
http://blog.csdn.net/toss156/article/details/7638529
- sp_depends 查询在sybase中依赖的函数
sp_depends 查询在sybase中依赖的函数. sp_depends tblEK7_policy_exclude sp_depends tblEK7_agent_exclude
- java实现.net中的枚举
Java 和 .net中的枚举不一样,在.net中,枚举是属于值类型的,而在java中确实引用类型的(其实就是一个特殊的类,enum默认集成java.lang.Enum类),所以在java中操作枚举类 ...
- Android模拟神器Genymotion eclipse插件安装问题出解决
我之前一直是打开eclipse之前直接运行Genymotion模拟器就可以连接到adb了,非常方便,但最近突然想来装个eclipse的Genymotion插件玩玩,安装时居然出错了,于是不折腾好心里不 ...
- 【BZOJ 3098】 Hash Killer II
Description 这天天气不错,hzhwcmhf神犇给VFleaKing出了一道题:给你一个长度为N的字符串S,求有多少个不同的长度为L的子串.子串的定义是S[l].S[l + 1].... S ...
- CQRS学习——集成ASP.NET Identity[其五]
[其实和Cqrs没啥关系] 缘由 其实没啥原因,只是觉得以前写了不知多少遍的用户登录复用性太差,实现的功能也不多. 依赖的Nuget包 简单登陆 就简单登陆而言,只需要实现如下接口/抽象类: Stor ...
- js页面刷新一次
// var str = document.location.hash, // index = str.indexOf("#"); // if(index == 0){ // wi ...
- JS中遍历普通数组和字典数组的区别
// 普通数组 var intArray = new Array(); intArray[0] = "第一个"; intArray[1] = "第二个"; fo ...
- (五)乱入之如何使用MNIST数据库
(五)乱入之如何使用MNIST数据库 今天花了整整一天时间查各种资料,终于搞清楚了怎么使用MNIST数据库.哈哈,MNIST,是不是高端洋气上档次?是不是不知道是什么东东? MNIST是一个据说很出名 ...