ubuntu – 内核升级后Getty泛滥系统日志“无法打开标准输入”

前端之家收集整理的这篇文章主要介绍了ubuntu – 内核升级后Getty泛滥系统日志“无法打开标准输入”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我刚刚在Ubuntu 9.10系统上将内核从2.6.32.1更新到2.6.33.5,一切似乎都很顺利,除了现在我的系统日志充满了来自getty的错误
Jul 25 11:01:54 kobol getty[2414]: /dev/tty4: cannot open as standard input: No such device
Jul 25 11:01:54 kobol getty[2415]: /dev/tty2: cannot open as standard input: No such device
Jul 25 11:01:54 kobol getty[2416]: /dev/tty6: cannot open as standard input: No such device
Jul 25 11:01:54 kobol getty[2417]: /dev/tty3: cannot open as standard input: No such device
Jul 25 11:01:54 kobol getty[2418]: /dev/tty5: cannot open as standard input: No such device
Jul 25 11:01:54 kobol init: tty4 main process (2409) terminated with status 1
Jul 25 11:01:54 kobol init: tty4 main process ended,respawning
Jul 25 11:01:54 kobol init: tty2 main process (2410) terminated with status 1
Jul 25 11:01:54 kobol init: tty2 main process ended,respawning
Jul 25 11:01:54 kobol init: tty6 main process (2411) terminated with status 1
Jul 25 11:01:54 kobol init: tty6 main process ended,respawning
Jul 25 11:01:54 kobol init: tty3 main process (2412) terminated with status 1
Jul 25 11:01:54 kobol init: tty3 main process ended,respawning
Jul 25 11:01:54 kobol init: tty5 main process (2413) terminated with status 1
Jul 25 11:01:54 kobol init: tty5 main process ended,respawning

知道是什么导致了这个以及如何让它停止吗?我意识到它不是一个关键问题,但它仍然很烦人,它不断发生(并填写日志文件),我不知道为什么.

更新:这是我的tty设备的列表,其权限似乎在重启时重置

crw------- 1 root root 4,0 2010-07-26 10:00 /dev/tty1
crw--w---- 1 root tty  4,1 2010-07-26 10:00 /dev/tty2
crw--w---- 1 root tty  4,2 2010-07-26 10:00 /dev/tty3
crw--w---- 1 root tty  4,3 2010-07-26 10:00 /dev/tty4
crw--w---- 1 root tty  4,4 2010-07-26 10:00 /dev/tty5
crw--w---- 1 root tty  4,5 2010-07-26 10:00 /dev/tty6
crw--w---- 1 root tty  4,6 2010-07-26 10:00 /dev/tty7
crw--w---- 1 root tty  4,7 2010-07-26 10:00 /dev/tty8

和tty1的init脚本:

# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/getty -8 38400 tty1

和tty2-tty6的(几乎完全相同的)init脚本:

# tty2 - getty
#
# This service maintains a getty on tty2 from the point the system is
# started until it is shut down again.

start on runlevel [23]
stop on runlevel [!23]

respawn
exec /sbin/getty -8 38400 tty2

更新2:init脚本的权限如下:

-rw-r--r-- 1 root root 228 2009-12-10 11:00 /etc/init/tty1.conf
-rw-r--r-- 1 root root 213 2009-12-10 11:00 /etc/init/tty2.conf
-rw-r--r-- 1 root root 213 2009-12-10 11:00 /etc/init/tty3.conf
-rw-r--r-- 1 root root 213 2009-12-10 11:00 /etc/init/tty4.conf
-rw-r--r-- 1 root root 213 2009-12-10 11:00 /etc/init/tty5.conf
-rw-r--r-- 1 root root 213 2009-12-10 11:00 /etc/init/tty6.conf

运行getty实例的grep显示了这个:

$ps auxww|grep [g]etty
root      2228  0.0  0.2   5992   604 ?        Ss+  10:00   0:00 /sbin/getty -8 38400 tty1
root      6352  0.8  0.2   5988   688 ?        Ss   11:06   0:00 /sbin/getty -8 38400 tty3
root      6355  0.5  0.2   5988   684 ?        Ss   11:06   0:00 /sbin/getty -8 38400 tty4
root      6356  0.5  0.2   5988   684 ?        Ss   11:06   0:00 /sbin/getty -8 38400 tty6
root      6357  0.8  0.2   5988   684 ?        Ss   11:06   0:00 /sbin/getty -8 38400 tty2
root      6358  0.6  0.2   5988   684 ?        Ss   11:06   0:00 /sbin/getty -8 38400 tty5

更新3:降级到2.6.32.1后,错误消失了.我最近再次升级到2.6.34.1,他们又出现了.我现在感到非常困惑.

我最近升级到Ubuntu 12.04 LTS的Rackspace托管服务器遇到了同样的问题.我的/var/log/auth.log文件被淹没了
May 13 12:50:40 foo getty[1796]: /dev/tty2: cannot open as standard input: No such device
May 13 12:50:51 foo getty[1798]: /dev/tty3: cannot open as standard input: No such device
May 13 12:50:51 foo getty[1797]: /dev/tty4: cannot open as standard input: No such device
May 13 12:50:52 foo getty[1800]: /dev/tty5: cannot open as standard input: No such device
May 13 12:50:52 foo getty[1799]: /dev/tty6: cannot open as standard input: No such device

我所做的就是删除(备份后)以下文件

/etc/init/tty[2-6].conf

重新启动后问题解决了.尽管只有一个虚拟终端,但日志文件和Rackspace控制台中的噪音仍然无法正常工作. (无论如何,我从不在控制台上使用虚拟终端.)

原文链接:https://www.f2er.com/ubuntu/347627.html

猜你在找的Ubuntu相关文章