Xen をインストールしたことのある Ubuntu で init 後に login プロンプトが表示されない

現象

Xen をインストールしたことのある Ubuntu を起動したときに tty1 で init の rc.local 実行後に login プロンプトが表示されるはずなのに,表示されない.

解析

tty プロセスを確認.

yuyarin@petit:/home/yuyarin% ps aux | grep tty
root      4429  0.0  0.0   1628   508 tty4     Ss+  Apr27   0:00 /sbin/getty 38400 tty4
root      4430  0.0  0.0   1628   508 tty5     Ss+  Apr27   0:00 /sbin/getty 38400 tty5
root      4434  0.0  0.0   1628   512 tty3     Ss+  Apr27   0:00 /sbin/getty 38400 tty3
root      4436  0.0  0.0   1628   508 tty6     Ss+  Apr27   0:00 /sbin/getty 38400 tty6
root      6267  0.0  0.0   1624   616 ?        Ss   15:24   0:00 /sbin/getty 38400 xvc0
root     24549  0.0  0.0   1628   504 tty2     Ss+  May08   0:00 /sbin/getty 38400 tty2

syslog に以下のようなログが 10 秒おきに表示されている.

May 11 14:35:05 petit init: tty1 main process (3673) terminated with status 1
May 11 14:35:05 petit init: tty1 main process ended, respawning

原因

Xenバーチャルコンソール xvc0 が tty1 の代わりに設定されているが,Xen をアンインストールしたために xvc0 が見つからないことが原因.

解決策

/etc/event.d/tty1 を編集する.

respawn
exec /sbin/getty 38400 xvc0

これを以下のように書き換える.

respawn
exec /sbin/getty 38400 tty1

再起動する.