在Slackware 10.1中,启动过程中rc.S和rc.M之间会发生什么? 试图在这个盒子上启动内核3.x(尝试3.4和3.10),并在rc.S完成执行后立即挂起。 2.6内核启动就好了。
rc.M无法运行,因为“Going multiuser”永远不会显示在控制台上。
#!/bin/sh # # rc.M This file is executed by init(8) when the system is being # initialized for one of the "multi user" run levels (ie # levels 1 through 6). It usually does mounting of file # systems et al. # # Version: @(#)/etc/rc.d/rc.M 2.23 Wed Feb 26 19:20:58 PST 2003 # # Author: Fred N. van Kempen, <[email protected]> # Heavily modified by Patrick Volkerding <[email protected]> # # Tell the viewers what's going to happen. echo "Going multiuser..."
使用Slackware默认的inittab(注释去掉):
id:3:initdefault: si:S:sysinit:/etc/rc.d/rc.S su:1S:wait:/etc/rc.d/rc.K rc:2345:wait:/etc/rc.d/rc.M ca::ctrlaltdel:/sbin/shutdown -t5 -r now l0:0:wait:/etc/rc.d/rc.0 l6:6:wait:/etc/rc.d/rc.6 pf::powerfail:/sbin/genpowerfail start pg::powerokwait:/sbin/genpowerfail stop c1:1235:respawn:/sbin/agetty 38400 tty1 linux c2:1235:respawn:/sbin/agetty 38400 tty2 linux c3:1235:respawn:/sbin/agetty 38400 tty3 linux c4:1235:respawn:/sbin/agetty 38400 tty4 linux c5:1235:respawn:/sbin/agetty 38400 tty5 linux c6:12345:respawn:/sbin/agetty 38400 tty6 linux x1:4:wait:/etc/rc.d/rc.4
它在此之后挂起:
Using /etc/random-seed to initialize /dev/urandom.
我已经注意到rc.S中的一些代码,它仍然挂起,所以我猜这个问题是在别的地方,但是我不知道在rc.S之后会发生什么。
在rc.S之后,如果运行级别2,3,4或5,init将运行rc.M,如果运行级别1,则运行rc.K …您可以尝试运行单个(即:runlevel 1)以查看如果它启动
slackware 10.1是旧的,可能没有足够的准备好运行一个3.0内核…但是你可以尝试更好地debugging它,它可能会在内核或一些你需要更新
编辑/etc/rc.d/rc.S并在第二行添加
set -x
这将使脚本冗长,并会告诉你它的运行情况。 如果直到最后,请尝试将其添加到其他脚本。 之后你将需要读取输出,并可能在失败的部分之前添加一些testing代码和/或注释掉(取决于什么是失败)