252
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
# reboot
Serial port configuration in RHEL 8
The configuration method for RHEL 7 is also applicable to RHEL 8. However, in
RHEL 8, you need to unset the existing kernelopts in advance before executing
the grub2-mkconfig command.
#grub2-editenv - unset kernelopts
The grub2-editenv tool is recommended for RHEL.
The method is as follows:
# grub2-editenv - list | grep kernelopts
kernelopts=root=/dev/mapper/rhel_example-root ro crashkernel=auto
resume=/dev/mapper/rhel_example-swap rd.lvm.lv=rhel_example/root
rd.lvm.lv=rhel_example/swap console=ttyS0
# grub2-editenv - set "kernelopts=root=/dev/mapper/rhel_example-root ro
crashkernel=auto resume=/dev/mapper/rhel_example-swap
rd.lvm.lv=rhel_example/root rd.lvm.lv=rhel_example/swap
console=ttyS0,115200 console=tty0"
# grub2-editenv - list | grep kernelopts
kernelopts=root=/dev/mapper/rhel_example-root ro crashkernel=auto
resume=/dev/mapper/rhel_example-swap rd.lvm.lv=rhel_example/root
rd.lvm.lv=rhel_example/swap console=ttyS0,115200 console=tty0
Serial port configuration in SLES
Modify the grub parameters.
# vim /boot/grub/menu.lst
Comment out the color line and the gfxmenu line and then add the following 2
lines:
serial --unit=0 --speed=115200
terminal --timeout=15 serial console
Add the following to the kernel command line:
console=tty0 console=ttyS0,115200
For example: