内核升级后,格腾淹没系统日志“无法打开标准input”

我只是将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的初始化脚本:

 # 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托pipe的服务器也遇到了同样的问题。 我的/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 

重新启动后,问题解决了。 尽pipe只有一个虚拟terminal,日志文件和Rackspace控制台仍然没有噪音。 (我永远不会在控制台上使用虚拟terminal。)

看看这些设备是否存在:

 ls -l /dev/tty[2-6] 

如果他们不这样做:

 cd /dev MAKEDEV -n console 

该命令名称全部大写。 -n开关(“无动作”)会告诉你MAKEDEV将采取的行动。 如果您对build议的内容感到满意,则将-n更改为-v (for“verbose”)并再次运行。