LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 679|回复: 5

sysvinit openrc 流程。

[复制链接]
发表于 2010-10-8 13:10:19 | 显示全部楼层 |阅读模式
用 qemu + nfs 虚拟了一个 arm9 平台。想用emerge 交叉编译一个gentoo系统。
目前已经emerge-arm* 完了一个基本系统,但目标机启动后...

   OpenRC 0.6.3 is starting up Gentoo Linux (armv5tejl)

Press I to enter interactive boot mode

* Mounting /proc ...
[ ok ]
* Caching service dependencies ...
[ ok ]
* Caching service dependencies ...
[ ok ]
* Clock skew detected with `/etc/rc.conf'
* Adjusting mtime of `/lib/rc/init.d/deptree' to Fri Oct  8 03:28:58 2010
* Mounting /dev/pts ...
[ ok ]
* Mounting /dev/shm ...
[ ok ]
* WARNING: clock skew detected!
* Setting system clock using the hardware clock [UTC] ...
FATAL: Could not load /lib/modules/2.6.34/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.34/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.34/modules.dep: No such file or directory
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
* Failed to set the system clock
[ !! ]
* Autoloaded 0 module(s)
* Checking local filesystems  ...
[ ok ]
* Updating /etc/mtab ...
[ ok ]
* Mounting local filesystems ...
[ ok ]
* Setting hostname to localhost ...
[ ok ]
* Configuring kernel parameters ...
[ ok ]
* Creating user login records ...
[ ok ]
* Cleaning /var/run ...
[ ok ]
* Wiping /tmp directory ...
[ ok ]
* Setting terminal encoding [UTF-8] ...
[ ok ]
* Setting keyboard mode [UTF-8] ...
[ ok ]
* Loading key mappings [us] ...
[ ok ]
* Bringing up interface lo
*   Caching network module dependencies
*   127.0.0.1/8 ...
[ ok ]
*   Adding routes
*     127.0.0.0/8 via 127.0.0.1 ...
[ ok ]
FATAL: Could not load /lib/modules/2.6.34/modules.dep: No such file or directory
* Mounting NFS filesystem ...
[ ok ]
* Activating swap devices ...
[ ok ]
* Initializing random number generator ...
[ ok ]
INIT: Entering runlevel: 3
* WARNING: clock skew detected!
* Mounting network filesystems ...
[ ok ]
* Starting local ...
[ ok ]

    至此,没有新的输出,似乎挂住了。
请问,openrc 或 sysvinit 启动完 /etc/init.d/ 目录下的服务后,接下来本来是要做哪一步? 感觉有可能系统里某个包没有emerge才这样。

[已解决]
多谢张乐的提醒。。。

由于目标机从serial打印。所以应该在 inittab 中打开 ttyS0。 这样就没这个问题。
发表于 2010-10-8 13:55:26 | 显示全部楼层
/etc/inittab贴一下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-8 14:06:43 | 显示全部楼层
$ cat etc/inittab

...
# Default runlevel.
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit

# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown
l0s:0:wait:/sbin/halt -dhp
l1:1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
l6r:6:wait:/sbin/reboot -dk
#z6:6:respawn:/sbin/sulogin

# new-style single-user
su0:S:wait:/sbin/rc single
su1:S:wait:/sbin/sulogin

# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux

# SERIAL CONSOLES
#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now

# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
#x:ance:/etc/X11/startDM.sh

这个文件是从host直接cp 过去的。
回复 支持 反对

使用道具 举报

发表于 2010-10-8 14:07:57 | 显示全部楼层
/sbin/agetty有么
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-8 14:11:46 | 显示全部楼层
有了,已经 emerge-arm* util-linux  这个包了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-10-8 14:18:32 | 显示全部楼层
Kernel command line:  rw console=ttyAMA0 ip=192.168.0.203:192.168.0.202:192.168.0.1:255.255.255.0 root=/dev/nfs nfsroot=192.168.0.202:/usr/__CHOST__,port=2049,rsize=8192,wsize=8192,timeo=5

qemu 参数
-net nic -net tap,script=ifup -nographic -M versatilepb -kernel ./out/zImage
回复 支持 反对

使用道具 举报

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

本版积分规则

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