Users Guide
5. 向下滚动并选择“Console Redirection”(控制台重定向)。
6. 将“Console Redirection”(控制台重定向)屏幕设为以下设置:
“Console Redirection”(控制台重定向) – “Serial Port 1”(串行端口 1)
“Redirection After Boot”(启动后重定向) – “Disabled”(已禁用)
7. 按 <Esc> 退出系统设置程序以完成系统设置程序配置。
为启动期间串行重定向配置 Red Hat Enterprise Linux
通过执行下列步骤编辑 /etc/grub.conf 文件。 示例文件(请参阅表3-1)显示此步骤中说明的更改。
1. 将以下两行新命令添加到文件的
常规设置
部分:
serial --unit=0 --speed=57600
terminal --timeout=10 serial
2. 在内核行上追加两个选项:
kernel ............. console=ttyS0,57600
3. 如果 /etc/grub.conf 包含 splashimage 指令,应将其从文件中注释掉。
表 3-1. 示例文件:/etc/grub.con
有关编辑 grub.conf 的其它信息:
l 可能需要禁用 GRUB 的图形界面并转而使用基于文本的界面;否则,GRUB 屏幕将不会显示在 RAC 控制台重定向中。 要执行此操作,注释掉以 splashimage 开头的行。
l 如果在 GRUB 中有多个选项并且想要所有选项都通过 RAC 串行连接启动控制台会话,则给所有选项添加 console=ttyS1,57600。 表3-1 中的示例显示只给第一个选项添加了
console=ttyS0,57600。
启用引导后登录到控制台
通过添加以下新行编辑文件 /etc/inittab 在 COM1 串行端口上配置 getty:
co:2345:respawn:/sbin/agetty -h -L 57600 ttyS0 vt100
示例文件(请参阅表3-2)显示新行。
注:以下说明专门针对 Red Hat Enterprise Linux GRand Unified Bootloader (GRUB)。 如果使用不同的启动装载程序,可能需要进行相似的更改。
注:在配置客户 VT100 仿真窗口中,必须将显示重定向控制台的窗口或应用程序设置为 25 行 x 80 列以确保正确的文本显示;否则,有些文本屏幕可能会出现乱码。
#grub.confgeneratedbyanaconda
#
Note that you do not have to rerun grub after making changes to this file
(注意您不必在改变这个文件后重新运行grub)
# NOTICE:Youdonothavea/bootpartition.Thismeansthat
#allkernelandinitrdpathsarerelativeto/,e.g.
# (注意:您没有一个 /boot分区。 这意谓所有的核心和 initrd 路径都相对于)
#root (hd0,0)
#kernel/boot/vmlinuz-version ro root=/dev/sdal
#initrd/boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=10
#splashimage=(hd0,2)/grub/splash.xpm.gz
serial --unit=0 --speed=57600
terminal --timeout=10 serial
title Red Hat Linux Advanced Server (2.4.9-e.3smp)
root(hd0,0)
kernel/boot/vmlinuz-2.4.9-e.3smp ro root=/dev/sda1 hda=ide-scsi console=tty0 console=ttyS0,57600
initrd/boot/initrd-2.4.9-e.3smp.img
title Red Hat Linux Advanced Server-up (2.4.9-e.3
root(hd0,00)
kernel/boot/vmlinuz-2.4.9-e.3 ro root=/dev/sda1 s
initrd/boot/initrd-2.4.9-e.3.im