Linux – How to serial-over-lan past “Loading initial ramdisk”

consoleipmikernellinuxserial

I'd like to use "ipmitool … sol activate" to record any kernel panics that may happen. I managed to keep GRUB2 in text-mode with "GRUB_TERMINAL=console" in /etc/default/grub. But right after the message "Loading initial ramdisk" (which is still GRUB), when Linux starts printing text on VGA console, messages on the serial console stop.

I guess either GRUB or Linux is doing something at that point, like loading a font, which kills off the vga-text-to-serial line. I'd like to keep it from doing that, whatever it is.

I have tried so far:

  • Kernel options "nofb nomodeset text" (the latter being for other Distros, I think).
  • GRUB_GFXPAYLOAD_LINUX=text

One obvious alternative is to setup serial console redirection to the virtual COM port, which should make panics appear on the serial-over-lan as well, but I'd prefer to stay in the initial text-mode, so VGA and console are in sync and both accept input.

Best Answer

By default kernel does not output anything to serial ports. You should explictly mention it.
To solve this add following to GRUB_CMDLINE_LINUX_DEFAULT

console=tty0 console=ttyS0,9600n8

replace 9600n8 with your sol console settings.