FreeBSD is able to use a serial port as the console. This can be useful for capturing hard to diagnose crashes and with the aid of IPMI/BMC/LoM it can also be done remotely.
Even without BIOS serial support the serial console can be used after the OS has started to debug.
Serial redirection on Supermicro X11 motherboards can be enabled by changing the following BIOS settings:
Advanced -> Serial Port 2 Attribute => SOL
Advanced -> Serial Port Console Redirection -> SOL/COM2 Console Redirection => Enabled
Advanced -> Serial Port Console Redirection -> SOL/COM2 Console Redirection -> Settings
COM2 Bits per second => 115200
COM2 Redirection After BIOS POST => Always Enable
Note that while the board physically has 2 serial ports (but one is available only as a header not a D9) one of them must be disabled to use SOL.
Other boards may support this, check the BIOS and/or manual for details.
As we selected 115200 baud above the loader needs to be told, otherwise it will default to 9600 baud. This is done by with the following loader.conf entry
comconsole_speed="115200"
FreeBSD also assumes the default serial console will be at 0x3f8 (aka /dev/cuau0 or COM1), for the Supermicro board above this is wrong so we add the following to loader.conf:
hint.uart.0.flags="0x0" hint.uart.1.at="isa" hint.uart.1.port="0x3e8" hint.uart.1.flags="0x10"
This disables the console on the first serial port and enables it on the second one at 0x3e8 (aka /dev/cuau1 or COM2). The flags are documented in the uart (4) man page.
Next the kernel needs to be told to use the serial console, we enabled both serial and video for convenience:
boot_multicons="YES" console="vidconsole,comconsole"
To connect to the serial console via IPMI the ipmitool can be used like so:
ipmitool -I lanplus -H BMC_IP_here -U someuser -P somepassword sol activate