所谓技术

-----simple,sometimes naive!
posts - 11, comments - 0, trackbacks - 0, articles - 0
  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

busybox的启动问题

Posted on 2008-03-27 21:29 vsolo 阅读(5140) 评论(0)  编辑 收藏 引用

VMware下用NFS把自己的busybox挂到目标板上,启动过程:
··············································································
Looking up port of RPC 100005/1 on 192.168.1.3
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing init memory: 80K
init started:  BusyBox v1.1.3 (2008.03.27-03:43+0000) multi-call binary
Starting pid 11, console /dev/tts/0: '/etc/init.d/rcS'
Bummer, could not run '/etc/init.d/rcS': No such file or directory
Bummer, could not run '/etc/init.d/rcS': No such file or directory
Starting pid 13, console /dev/console: '/sbin/getty'
Bummer, could not run '/sbin/getty': No such file or directory

·················································································
可是/etc/init.d/rcS和/sbin/getty分明就是存在着
而且由上面启动过程可见没有另外写linuxrc
那么就是直接从/sbin/init(/bin/busybox)启动
不存在说把目录/etc挂空的情况

只好把/etc/inittab删掉,让busybox使用缺省的initab配置
仍然提示:
·················································································
Starting pid 11, console /dev/tts/0: '/etc/init.d/rcS'
Bummer, could not run '/etc/init.d/rcS': No such file or directory
Bummer, could not run '/etc/init.d/rcS': No such file or directory

Please press Enter to activate this console.
Starting pid 13, console /dev/tts/0: '/bin/sh'
·················································································
不过总算是可以进去shell了
几天了,这算什么撒
疑似版本不匹配,arm-linux-gcc-3.4.1改为arm-linux-gcc-3.3.2
重新编译BusyBox v1.1.3,启动:
·················································································
init started:  BusyBox v1.1.3 (2008.03.27-04:25+0000) multi-call binary
Starting pid 11, console /dev/tts/0: '/etc/init.d/rcS'

Welcome to MontaVista Linux Preview Kit
-------by soloo-------
Starting system...
mounting /proc: done.
Mounting '/' read-only: done.
brining up loopback interface: done.
Mounting /tmp: done.
Starting inetd: done.
System started.
Starting pid 34, console /dev/console: '/sbin/getty'
getty: ioctl() TIOCSPGRP call failed: Inappropriate ioctl for device

MontaVista(R) Linux(R) Professional Edition 3.1, Preview Kit

192.168.1.1 login: root
Password:

MontaVista(R) Linux(R) Professional Edition 3.1, Preview Kit

login[34]: root login  on `console'


BusyBox v1.1.3 (2008.03.27-04:25+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

-sh: can't access tty; job control turned off
-sh: id: not found
-sh: id: not found
# ls
·················································································
虽然提示failed,终于能login进去了

----------------
在配置busybox时有一点需要非常注意:

        Shells  --->     (要回车到子菜单选中ash)
                    (*) ash
       Choose your default shell (ash)  --->      

还有就是busybox-1.1.3已经集成了tinylogin的功能
在配置时选中Login那一栏中相关的选项就无需另外的tinylogin了  

只有注册用户登录后才能发表评论。