标题: Linux 串口终端设置 [打印本页] 作者: eleclogic 时间: 2006-07-27 10:28 标题: Linux 串口终端设置
Grub 例子:
----------------------------------------------------------
[color="#000000"]default=0
timeout=10
#这2行指定 Grub 的 Serial 重定向的参数, 9600,n81
serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
terminal --timeout=10 serial console
title Linux
root (hd0,0)
# console 内核参数指定console设备,可以同时指定多个console,
# 但是不能同时指定相同类型的console,例如:ttyS0 和 ttyS1。
# 最后面的一个将被认定为 /dev/console 设备。
kernel /boot/vmlinuz root=/dev/hda6 console=tty0 console=ttyS0,9600n8
initrd /boot/initrd
-----------------------------------------------------------
加入行在/etc/inittab:
其中 115200,9600 参数指定如果115200失败,则降速到9600。
s0:2345:respawn:/sbin/agetty ttyS0 115200,9600 linux
[color="#000000"]-----------------------------------------------------------
参考:
Figure 5-2. Recommended kernel parameters, PCs with
video card
[color="#000000"]console=tty0 console=ttyS0,9600n8
Kernel messages will appear on both the first virtual terminal
and the serial port. Messages from the
init system and the system logger will
appear only on the first serial port. This can be slightly
confusing when looking at the attached monitor: the machine will
appear to boot and then hang. Don't panic, the
init system has started but is now
printing messages to the serial port but is printing nothing to the
screen. If a getty has been configured
then a login: prompt will
eventually appear on the attached monitor.
[color="#000000"]