Enable Serial Terminal on Debain using Grub Configuration (Grub2)

Edit /etc/default/grub, enter:

# vi /etc/default/grub

Append / modify as follows:

GRUB_CMDLINE_LINUX='console=tty0 console=ttyS0,19200n8'
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1"

Save and close the file. Next run the following command to generate a grub2 config file /boot/grub/grub.cfg :

# update-grub

Ref:
https://www.cyberciti.biz/faq/howto-setup-serial-console-on-debian-linux/

Share

Add serial console boot for Opensuse 15.5

While it works with UEFI boot using “legacy BIOS” the serial console works after grub has prompted the boot menu. But this might be too late e.g. in special cases like encrypted disk where grub needs to request the password.

KVM Guest has already been changed for serial support as outlined below in /etc/default/grub:

change to:

GRUB_TERMINAL="gfxterm serial"

add following line after theme definition:

GRUB_SERIAL_COMMAND="serial --unit=0 --speed=9600 --parity=no"
add console=ttyS0 to GRUB_CMDLINE_LINUX_DEFAULT

To apply changes run:

update-bootloader --refresh

Accessing console works:

virsh console --safe --force <guest_name>;
Share

Serial Terminal Configuration in RHEL Distribution

Serial Terminal Configuration in RHEL 7

Add, or update if already present, the following lines to /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

GRUB_CMDLINE_LINUX_DEFAULT applies this configuration only to the default menu entry, use GRUB_CMDLINE_LINUX to apply it to all the menu entries.
NOTE: each line type above should only appear once within the /etc/default/grub file. If the line already exists, then just modify it rather than add a second copy of same. That is, only one GRUB_CMDLINE_LINUX_DEFAULT line should exist in the file, etc.

Rebuild the /boot/grub2/grub.cfg file by running the grub2-mkconfig -o command as follows:

On BIOS-based machines: ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
On UEFI-based machines: ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Red Hat Enterprise Linux 8

Read more

Share