debian+grub2+serial redirect 通过COM口管理linux
系统基本环境:
root@brinkman:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux testing (wheezy)
Release: testing
Codename: wheezy
root@brinkman:~# uname -a
Linux brinkman 2.6.38-2-686 #1 SMP Sun May 8 14:49:45 UTC 2011 i686 GNU/Linux
root@brinkman:~# grub-setup -V
grub-setup (GRUB) 1.99~rc1-13
配置基本方法:
1.Checking The Serial devices
$ dmesg | grep tty
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
2.With GRUB2,edit /etc/default/grub;
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,9600n8"
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1"
3.root@brinkman:~# update-grub
4.edit /etc/inittab;
root@brinkman:~# vim /etc/inittab
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
5.在/etc/securetty文件中有ttyS0,确保在串口下能直接用ROOT登录
root@brinkman:~# grep "ttyS0" /etc/securetty
ttyS0
linux下的超级终端工具minicom
1.配置终端
minicom -s
2.使用minicom
阅读(2565) | 评论(0) | 转发(0) |