从串行控制台控制 GRUB
您可以配置 GRUB 以使用串行控制台而不是 VGA 控制台。这允许您中断引导进程并选择其他内核或添加内核参数,例如引导至单用户模式。
要配置 GRUB 以使用串行控制台,需为初始图像添加注释,并将 serial 和 terminal 选项添加至 grub.conf:
[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
#splashimage=(hd0,0)/grub/splash.xpm.gz
serial --unit=0 --speed=1152001
注: 重新启动系统以使设置生效。