Enable Serial/SOL Output in GNU/Linux Systems



When system boot to grub menu, press e to edit boot options, in the line starting with linux ($root)/vmlinuz-, append console=ttyS0,115200n8 console=tty0 to the end. Then press Ctrl + x to continue to boot.


Below steps were tested in RHEL 8.2 and 9.0.

  1. Enter directory /etc/default and make a backup of file grub.
    $ cd /etc/default
    $ sudo cp grub grub.bak
  2. Edit file /etc/default/grub, in line starting with GRUB_CMDLINE_LINUX=, append console=ttyS0,115200n8 console=tty0 within the quotation marks.
  3. Execute below commands:
    $ sudo grub2-editenv - unset kernelopts
    $ sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

If Something Is Wrong...

In case that something was did mistakenly in above procedure and the system cannot boot, you can try to boot into single user mode and restore the file grub from grub.bak created in first step, and then redo step 3.

GitHub | Email me