Serial console - has anyone gotten this to work?

stuartbh

Active Member
Dec 2, 2019
120
11
38
59
Hello all!

Is anyone familiar with the configuration of GRUB / Linux in pursuance of instantiating a functioning serial console?

I have SOL (Serial over LAN) enabled on my server, whereby I can SSH to the BMC on my server enter 'console 1' and have access to the console for all UEFI/BIOS related functions until I get past the GRUB screen. I get the GRUB menu and am able to select the proper boot entry on the GRUB menu. However, thereafter (when Linux begins to boot), I seem to get zero Linux boot messages on the serial console output.

The last message I get is:
Loading Linux 6.2.16-12-pve ...
Loading initial ramdisk ...
?

The question mark indicates some odd graphical character (looks like a '?" in a diamond) that appears right after the last message.


Steps I have taken thus far:

1) I ammended my /etc/default/grub configuration file as follows hereupon.

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

I then ran sudo update-grub followed by sudo systemctl reboot

2) I did verify that the SOL and BIOS setup parameters matched those suggested in the x3650 M3 User Guide.

However, there was no appreciable change in behavior of the next boot-up of the server.

Interestingly, ProxMox does successfully boot up, that is not the issue. I just never see any output on the ttyS0 console. I am going to hook a physical serial console up and see what I see as well. All messages do appear on the VGA monitor that is plugged into the server as well.

Thanks in advance for your time and consideration regarding the instant matter before us.

Stuart
 
Last edited:
If you see garbage characters every so often, that could indicate mismatching parameters for the serial port. 8N1 is of course pretty much the standard these days. But baud rates can vary. And of course, as LnxBil points out, there always is a chance that you are talking to the wrong port.

Make sure that your BMC is in fact configured for 115200. As ridiculous as it might sound, when using things like IPMI, there still is a physical serial connection involved at some point. It's internal to your motherboard, and you never actually see the serial port exposed on a connector. But it's there. And if you don't configure all the serial port settings correctly everywhere, things simply won't work.

I have spent hours hunting down all the various BIOS and BMC settings until I finally got this to work. Every server is different. Some make this easy, others can be quite frustrating. Good luck.
 
I guess the kernel does not output to serial port because options CONFIG_SERIAL_CONSOLE and CONFIG_USB_SERIAL_CONSOLE are not compiled into Proxmox kernel.

There's a submitted feature request to add support for that:
https://forum.proxmox.com/threads/f...l_console-as-a-built-in-to-the-kernel.102269/
I just reread the thread and one way to go about is to include the module in the initrd. That should solve the problem. Have you tried adding the missing modules to /etc/initramfs-tools/modules and rebuild? I don't see a reason to include it in the compiled kernel (same as Debian), the initrd is the default way to use modules not compiled in at boot time. I do not have a serial console here so I cannot check this.
 
I just reread the thread and one way to go about is to include the module in the initrd. That should solve the problem. Have you tried adding the missing modules to /etc/initramfs-tools/modules and rebuild? I don't see a reason to include it in the compiled kernel (same as Debian), the initrd is the default way to use modules not compiled in at boot time. I do not have a serial console here so I cannot check this.
Actually I've put usbserial and pl2303 to /etc/initramfs-tools/modules
and rebuild the initramfs but have no success.

I've got working login prompt over ttyUSB0, so the serial connection works.

But still I miss kernel boot messages and Grub over serial.
 
Actually I've put usbserial and pl2303 to /etc/initramfs-tools/modules
and rebuild the initramfs but have no success.
Have you tried if it's enough by forcing into the initrd's busybox and loading the modules yourself? Have you also added netconsole, otherwise you will not have working netconsole?

Grub over serial.
Grub will not work, this has nothing to do with the linux kernel.
 
Have you tried if it's enough by forcing into the initrd's busybox and loading the modules yourself?
No, how can I do that?
Have you also added netconsole, otherwise you will not have working netconsole?
I have no interest in netconsole (at the moment). I have physical access to the machine.
Grub will not work, this has nothing to do with the linux kernel.
Grub should work, if configured like below:
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
But does not work. Probably I should configure grub modules too as described here: https://unix.stackexchange.com/a/634726
 
I think there are three more-or-less independent issues:
  1. login prompt over serial - works. Configured via
    Code:
    systemctl enable serial-getty@ttyUSB0.service
  2. grub over serial - does not work
  3. kernel boot messages - don't work
 
I have no interest in netconsole (at the moment). I have physical access to the machine.
Sorry, you're right. My fault.

Probably I should configure grub modules too as described here: https://unix.stackexchange.com/a/634726
That looks promising, yes.

No, how can I do that?
Have you access to the "real" video output?


Oh, I just saw this in OPs post:
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
What is your command line there? Have you tried switching the order if there are more than one? AFAIK only one is used, not both.
 
Sorry, you're right. My fault.


That looks promising, yes.


Have you access to the "real" video output?


Oh, I just saw this in OPs post:

What is your command line there? Have you tried switching the order if there are more than one? AFAIK only one is used, not both.
I have physical access to LCD and keyboard of the respective machine. (Why do I need serial console then? :cool: )

I have not tried to swap arguments of kernel command-line. I will give it a try, if you're right, it might solve the issue.
 
I have physical access to LCD and keyboard of the respective machine. (Why do I need serial console then? :cool: )
You need to create an error in your kernel command line, e.g. removing the root argument. Then you'll end up in the initramfs busybox automatically and can then try to load the drivers and send stuff manually to your serial device in order to see if it works.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!