嵌入式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启动过程中的问题积累的更多相关文章

  1. 为什么要有uboot?带你全面分析嵌入式linux系统启动过程中uboot的作用

    1.为什么要有uboot 1.1.计算机系统的主要部件 (1)计算机系统就是以CPU为核心来运行的系统.典型的计算机系统有:PC机(台式机+笔记本).嵌入式设备(手机.平板电脑.游戏机).单片机(家用 ...

  2. 嵌入式linux启动过程详解

    启动第一步--加载BIOS 当你打开计算机电源,计算机会首先加载BIOS信息,BIOS信息是如此的重要,以至于计算机必须在最开始就找到它.这是因为BIOS中包含了CPU的相关信息.设备启动顺序信息.硬 ...

  3. linux启动过程中建立临时页表

    intel的x86这种架构为了兼容以前同系列的架构有一些很繁琐无用的东西.比如分段和分页两种机制都可以实现隔离进程的内存空间,在x86上两种机制都有,用起来比较繁琐.所以linux内核在启动的时候通过 ...

  4. 如何设置linux启动过程中的停止阶段

    设置方法: 1 启动过程中点击“e”键(fedora)或者"tab"(centOS)键进入目标启动项的命令行参数下,移除initrd所在行末尾的"quiet" ...

  5. Linux启动过程中几个重要配置文件的执行过程

    Linux 登录后,配置执行顺序为(Debian Serials Capable):/etc/environment -> /etc/profile -> (~/.bash_profile ...

  6. 带你全面分析嵌入式linux系统启动过程中uboot的作用

    资料链接:http://mp.weixin.qq.com/s/rYVchD-xy7Bdkc1O3fW2Wg

  7. 嵌入式linux启动信息完全注释

    嵌入式linux启动信息完全注释 from:http://www.embedlinux.cn/ShowPost.asp?ThreadID=377 摘要 我们在这里讨论的是对嵌入式linux系统的启动过 ...

  8. Linux系统在启动过程中mbr主引导程序被破坏的解决方案

    首先,mbr主引导程序被破坏是指系统在启动过程中,磁头找不到/boot分区(windows的启动分区在c盘). 1)下面我们模拟主引导分区被破坏的情况:(在启动分区划分446M的存储大小) 2)重启( ...

  9. 转:嵌入式linux启动时运行的inittab文件

    嵌入式系统下的linux启动配置文件,不同与普通的PC linux启动配置,启动相关文件与文件的内容也要少得多.嵌入式系统下的linux启动过程一般是:     1 在bootloader中制定各种要 ...

随机推荐

  1. 1028. List Sorting (25)

    #include <vector> #include <stdio.h> #include <string.h> #include <algorithm> ...

  2. insert into (select...WITH CHECK OPTION) values(...)

    insert into (<subquery> WITH CHECK OPTION) values (...) 语法看起来很特殊,其实是insert进subquery的这张表里: 1. 只 ...

  3. 统计网卡TX(发送)RX(接受)流量脚本

    显示网卡流量的方法蛮多,一般我们可以通过dstat来查看,但dstat不一定所有的机器都有安装.而我们知道,通过ifconfig可以看到某一网卡发送与接收的字节数,所以我们可以写一个脚本来统计一下. ...

  4. linux工作队列

    工作队列一般用来做滞后的工作,比如在中断里面要做很多事,但是比较耗时,这时就可以把耗时的工作放到工作队列.说白了就是系统延时调度的一个自定义函数. 工作队列是实现延迟的新机制,从 2.5 版本 Lin ...

  5. EXTJS 4.2 资料 控件之combo 联动

    写两个数据源: 1.IM_ST_Module.js { success:true, data:[ { ModuleId: '1', ModuleName: '资讯' } , { ModuleId: ' ...

  6. Java注解处理器(转)

    Java中的注解(Annotation)是一个很神奇的东西,特别现在有很多Android库都是使用注解的方式来实现的.一直想详细了解一下其中的原理.很有幸阅读到一篇详细解释编写注解处理器的文章.本文的 ...

  7. iOS的view翻转动画实现--代码老,供参考

    新建一个view-based模板工程,在ViewController文件中添加下面的代码,即可实现翻转效果: - (void)viewDidLoad { [super viewDidLoad]; // ...

  8. Nhibernate 一对一关系映射(主键映射)

    参考:点击这里 妈的,搞了一天了,终于可以了,现在总结下,以防下次再出现这样痛苦的问题了,有两个表:user(用户)和Blog(设置表),它们之间的关系正如我所说的是一对一的关系.现在我们来映射这两个 ...

  9. GIS的数学基础

    在这里需要说明一点,任何领域的概念.技术都有其特定的适用范围,有其解决的问题,有其发展的历史,所以,抛开应用环境.范围来谈技术就像是没有根系的枝丫,枝丫再粗壮也只是一根木头而已. 那接下来我们来聊聊什 ...

  10. DLL远程注入与卸载

    以下提供两个函数,分别用于向其它进程注入和卸载指定DLL模块.支持Unicode编码. #include <windows.h>#include <tchar.h>#inclu ...