Grub timeout is ignored with serial connection

I have a headless machine with F35 (but the same problem appeared in F34 and F33, so probably is not relevant).

I configured to system to work with a serial console. And it works fine. When connected via serial, I can see the grub menu, select a kernel entry and boot. If I’m connected and I don’t select an entry, the system boots after 5 seconds. This configuration just works.

The problem is when I’m not connected to the serial port. In that case the system doesn’t boot automatically. As far as I can see, grub waits in the kernel menu ignoring the timeout. If I connect via serial in this case, the system boots if I hit enter and I can recover the boot menu if I press up/down keys.

So, as a summary. If I’m connected to the serial port, grub behaves as expected. If I’m not connected, grub waits for input in the kernel menu.

This is my grub file. The system has BIOS, no EFI

cat /etc/default/grub
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="xxxx crashkernel=128M console=ttyS0,115200 console=tty0"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

Does adding:

make any difference?

If I add that line, it’s the same. In fact grub.cfg is identical. It contains

serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
terminal_input serial
terminal_output serial

If I remove GRUB_TERMINAL, then terminal_input is not set in grub.cfg.

serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
terminal_output serial

Without terminal_input, I think grub reverts to graphical console. But I don’t want that.

1 Like