HP ProLiant 160G6 の Debian/GNU Linux でコンソールをリダイレクトする


 BIOS の設定変更については明日にならないとできないので、とりあえず Debian/GNU Linux(lenny)の設定変更内容だけメモ。

$ sudo vi /etc/inittab
(snip)
$ diff -u inittab.old inittab 
--- inittab     2008-08-12 23:20:17.000000000 +0900
+++ /tmp/inittab        2009-11-19 20:00:22.000000000 +0900
@@ -60,7 +60,7 @@
 
 # Example how to put a getty on a serial line (for a terminal)
 #
-#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
+T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
 #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
 
 # Example how to put a getty on a modem line.
$ sudo init q
$ ps -ef | grep getty
root      2387     1  0 16:05 tty1     00:00:00 /sbin/getty 38400 tty1
root      2388     1  0 16:05 tty2     00:00:00 /sbin/getty 38400 tty2
root      2389     1  0 16:05 tty3     00:00:00 /sbin/getty 38400 tty3
root      2390     1  0 16:05 tty4     00:00:00 /sbin/getty 38400 tty4
root      2391     1  0 16:05 tty5     00:00:00 /sbin/getty 38400 tty5
root      2392     1  0 16:05 tty6     00:00:00 /sbin/getty 38400 tty6
root     10017     1  0 20:01 ttyS0    00:00:00 /sbin/getty -L ttyS0 9600 vt100
ueda     10032  8771  0 20:01 pts/0    00:00:00 grep getty
$ sudo vi /boot/grub/menu.lst
(snip)
$ diff -u menu.lst.orig menu.lst
--- menu.lst.orig       2009-11-19 19:38:54.000000000 +0900
+++ menu.lst    2009-11-19 20:03:30.000000000 +0900
@@ -42,6 +42,9 @@
 # kernel       /vmlinuz root=/dev/hda2 ro
 #
 
+serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
+terminal --timeout=10 serial console
+
 #
 # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
 
@@ -59,7 +62,7 @@
 ## e.g. kopt=root=/dev/hda1 ro
 ##      kopt_2_6_8=root=/dev/hdc1 ro
 ##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
-# kopt=root=/dev/cciss/c0d0p1 ro
+# kopt=root=/dev/cciss/c0d0p1 ro console=tty0 console=ttyS0,115200n8
 
 ## default grub root device
 ## e.g. groot=(hd0,0)
@@ -121,12 +124,12 @@
 
 title          Debian GNU/Linux, kernel 2.6.26-2-amd64
 root           (hd0,0)
-kernel         /boot/vmlinuz-2.6.26-2-amd64 root=/dev/cciss/c0d0p1 ro quiet
+kernel         /boot/vmlinuz-2.6.26-2-amd64 root=/dev/cciss/c0d0p1 ro console=tty0 console=ttyS0,115200n8 quiet
 initrd         /boot/initrd.img-2.6.26-2-amd64
 
 title          Debian GNU/Linux, kernel 2.6.26-2-amd64 (single-user mode)
 root           (hd0,0)
-kernel         /boot/vmlinuz-2.6.26-2-amd64 root=/dev/cciss/c0d0p1 ro single
+kernel         /boot/vmlinuz-2.6.26-2-amd64 root=/dev/cciss/c0d0p1 ro console=tty0 console=ttyS0,115200n8 single
 initrd         /boot/initrd.img-2.6.26-2-amd64
 
 ### END DEBIAN AUTOMAGIC KERNELS LIST

これで良いのかなぁ? 自信なし。明日、確認しよう。これで問題なくコンソールがシリアルポートに出力できました :)。

更に BIOS の設定を変更して DL160G6 の NIC 1ポートを共有して管理ポートにし、IP 経由でもコンソールが表示されました。めでたし×2... と思ったんですが、Debian 側から eth0 も eth1 も見える状態になっていることに気づきました。これってよろしく無い*1気が --;)。

*1:eth0 で tcpdump すると管理ネットワークのパケットが見えちゃう?