I want to connect my "CentOS Linux release 7.6.1810 (Core)" device via COM2 port,then I modify '/etc/default/grub':

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS1,115200n8"
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="115200n8 serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

then run:

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

as the result I could only get the output after "boot menu", not including the grub2.

PS: I'm using COM2(ttyS1) not COM1(ttyS0)


Your GRUB_SERIAL_COMMAND is specifying to use serial port 0, but you specifically said you wanted to use serial port 1.

You specified --unit=0, which means serial port 0.

You should instead use --unit=1, to use serial port 1.

Also, your serial command begins with 115200n8 which is not valid and should not be present. It should instead start with serial.

  • I truly appreciate your timely help. – mrco Jan 20 at 5:53

If you only need the second one, simply change the --unit=0 into --unit=1.

The serial unit 0 is usually called ‘COM1’, so, if you want to use COM2, you must specify ‘--unit=1’ instead. -- grub manual

  • I'm too young too simple,,,it works!! – mrco Jan 20 at 5:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.