wagner helps you

Configure Ubuntu 18.04 with grub2 to activate serial console

Thanks to hiroom2

1 /etc/default/grub

  • Change GRUB terminal to console and ttyS0. This will provide one GRUB to a monitor display and serial console.
  • Change linux kernel console to tty1 and ttyS0. This setting will be taken over to userland, and there will be two login prompt for tty1 and ttyS0.
GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0,115200"
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"