Centos 配置串口连接

系统版本:Centos 7

1. 配置grub:

[root@localhost test]# cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"

以上串口参数根据自己设备进行配置。

2. 更新grub

grub2-mkconfig -o /boot/grub2/grub.cfg

重启之后即可远程登陆。

原文地址:https://www.cnblogs.com/zoneofmine/p/13546037.html