linux标准输入输出重定向到串口设置指南

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Linux标准输入输出重定向到串口指南

邮箱:

追风哥455546798@

描述:

设置linux系统的标准输入输出到com0(console口),以便维护人员在无网络、无显示器的情况下对系统维护。在各文件(/etc/grub.conf、/etc/inittab、/etc/securetty)中添加红色部分!文件修改完成后reboot系统即可在com0口看到标准输入输出信息。

1、grub.conf 文件配置

[root@localhost etc]# more grub.conf

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You do not have a /boot partition. This means that

# all kernel and initrd paths are relative to /, eg.

# root (hd0,0)

# kernel /boot/vmlinuz-version ro root=/dev/sda1

# initrd /boot/initrd-[generic-]version.img

#boot=/dev/sda

default=2

timeout=10

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

hiddenmenu

serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1

terminal --timeout=10 serial console

title Red Hat Enterprise Linux (2.6.32-71.el6.i686)

root (hd0,0)

kernel /boot/vmlinuz-2.6.32-71.el6.i686 ro

root=UUID=0cdc97d9-4515-461c-

9691-91a03b9a41ea console=ttyS0,115200n8 rd_NO_LUKS rd_NO_LVM

rd_NO_MD rd_NO_DM

LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet

console=tty0

initrd /boot/initramfs-2.6.32-71.el6.i686.img

2、inittab 文件配置

[root@localhost etc]# more inittab

id:3:initdefault:

S0:2345:respawn:/sbin/agetty -L -f /etc/issueserial 115200 ttyS0 vt100

//说明在文件末尾添加S0:2345:xxxx行

3、securetty 文件配置

[root@localhost etc]# more securetty vc/10

tty1

tty2

ttyS0

//说明在文件末尾添加ttyS0

相关文档
最新文档