发新话题
打印

"init: Id "x" respawning too fast: disabled for 5 m

"init: Id "x" respawning too fast: disabled for 5 m

In most distributions this means that the system is booting by default
into runlevel 5, which is supposed to respawn (re-start again after
it's been exited) a graphical login via xdm, kdm, gdm, or whatever,
and the system can't locate the program.

However, "Id" can also indicate the absence or misconfiguration of
another program, like mingetty, if init tries to respawn itself more
than 10 times in 2 minutes.

Id "x" is the number in the leftmost column of the /etc/inittab file:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

Commenting the offending line out and then fixing the errant program
and testing on the command line will allow you to see any error
messages that go to standard error output (console) if the errors are
not going to the system log file. Uncomment the line and restart init
with "kill -SIGHUP 1" or "telinit q" to cause init to reinitialize and
reread the /etc/inittab file.

Some systems, however, rewrite /etc/inittab when booting. In that
case, refer to the init man page, and/or the settings in
/etc/sysconfig/init.

Refer to the init and /etc/inittab man pages for detailed information.

[Carl King]      

TOP

当使用/etc/inittab里面的某个程序,例如mgetty来接受modem拨入,同时系统又重新启动或者几个拨入都不成功;又或者登录提示数次被取消(例如用ctrl+D),都会出现这种提示。
  

原因在于,当init通过/etc/inittab来启动某个程序的时候,如果这个程序连续几次被很快地终止,那么在/etc/inittab里面对应的条目就会被禁用并不再启动。正常情况下程序应该在被结束后两分钟后重新启动,这个问题不应该归咎于init的bug。
解决方法是:
首先,很多程序有自己的日志或者把他们的syslog写到/var/log/messages或者这个目录下面类似的日志里面,所以可以查看这些日志来得到错误信息。你也可以手动在shell下面启动这些程序来得到错误信息,但是记得不要改动/etc/inittab里面的项目。你可以以root身份使用init q命令使得这些无效的命令重新可以使用。   

---------------------------------------------
找了些资料,:
http://www.unixguide.net/linux/faq/09.24.shtml

不过报错没有具体指出X=多少,所以没法使用注释掉以下某一行的方法。

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

查看/var/log/message中的日志,也没有具体说明是哪里出错。。

于是切换到命令行

vi /etc/inittab

将id=5改成id=3,从文本界面登录。
重启 reboot
然后
startx
启动失败,但得到具体的出错信息!原来几个文件(libmodle***)找不到。

locate libmodle

总之找到这几个文件,cp到/usr/lib

然后将

/etc/inittab中id改回5,默认启动X窗口。

reboot

搞定




上面的文章是在linuxaid中的,不过我一般都用“#”把"1:2345:respawn:/sbin/mingetty tty1"注销了,因为我一般都只用串口上。我觉得是编译内核的时候,漏了什么东西了吧!      

TOP

发新话题