Serial Over LAN on FreeBSD 10.0 with SuperMicro X9-SCM-F
How can I setup Serial-Over-Lan (SOL) on FreeBSD 10.0 with a SuperMicro X9-SCM-F motherboard? There are a few resources out there but they contradict each other, are unclear, and don’t actually allow me to get SOL working past the boot loader.
Solution 1:
This is tested on FreeBSD 10.0-RELEASE, but will likely work on FreeBSD 9.x.
BIOS Configuration
Open the BIOS settings and navigate to “Advanced → Serial Port Console Redirection” and ensure “SOL Console Redirection” is set to “Enabled” (you do not need to enable COM1 or COM2 or Out-of-Band management).
-
Open the “SOL Console Redirection Settings” and configure as follows:
Terminal Type [VT-UTF8] Bits per second [115200] Data Bits [8] Parity [None] Stop Bits [1] Flow Control [None] VT-UTF8 Combo Key Support [Enabled] Recorder Mode [Disabled] Resolution 100x31 [Enabled] Legacy OS Redirection Resolution [80x24] Putty KeyPad [VT100] Redirection After BIOS POST [Always Enable]
You can leave “Terminal Type” set to “VT100” (the default) if you desire. You should only have to change “Bits per second” to 115200 to achieve the above configuration.
FreeBSD Configuration
-
Boot FreeBSD and add the following lines to
/boot/loader.conf
:console="comconsole vidconsole" comconsole_speed=115200 comconsole_port="0x3E8"
0x3E8
is the port for COM3 (“SOL” in the BIOS settings). You can discover the possible values by inspectingdmesg
like so:$ dmesg | grep uart uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart0: console (115200,n,8,1) uart1: <16550 or compatible> port 0x2f8-0x2ff irq 3 on acpi0 uart2: <16550 or compatible> port 0x3e8-0x3ef irq 10 on acpi0
-
If you wish to be get a login prompt (and thus be able to login) via SOL, edit
/etc/ttys
changing the following line:ttyu2 "/usr/libexec/getty std.9600" dialup off secure
to
ttyu2 "/usr/libexec/getty std.115200" vt100 on secure
We change
ttyu2
because this corresponds to COM3 (since TTYs are zero-indexed and COM is not) which is what our SOL uses. If you don’t need to login (because, for example, you just need to enter a password for GELI during boot), you can leave/etc/ttys
as-is.
Notes
Above is the minimum required to get this working. Various people (see “References” below) recommended or stated that they “needed” a slew of other settings which, for me, were not needed but did not impair SOL functionality either. Again, the following should not be needed, and is included for reference only.
-
In
/boot/loader.conf
:boot_multicons="yes" boot_serial="yes" hint.uart.0.flags="0x00" hint.uart.2.at="isa" hint.uart.2.flags="0x10" hint.uart.2.irq="10" hint.uart.2.port="0x3E8"
-
In
/boot.config
:-P
or
-Dh
Despite what the FreeBSD handbook seems to say, you should not need to compile a custom kernel.
References
Please note that many of these are wrong, out-of-date, or overzealous in setting options not actually needed.
- http://www.ackstorm.org/?p=44 (archive.org mirror)
- http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/serialconsole-setup.html
- http://lists.freebsd.org/pipermail/freebsd-questions/2012-June/242173.html
- http://freebsd.1045724.n5.nabble.com/IPMI-SOL-setup-on-FreeBSD-9-1-amd64-supermicro-X9SCM-F-X9CL-F-td5779729.html
- http://lists.freebsd.org/pipermail/freebsd-stable/2013-February/thread.html#72437
- http://www.paranoid.nl/~eilander/freebsd/ipmi/ipmicons.html (archive.org mirror)
Solution 2:
Not enough rep to comment on the answer above, so:
I run FreeBSD 9.2 and Andrew's configuration above enables SOL on COM 3 for me on X8SIL-F / X8SIE-F, from BIOS to login prompt. It is completely based on his above answer but tested on 9.2 with GENERIC kernel--thank you, Andrew!
A few notes:
It seems to be the order of 'comconsole' or 'vidconsole' in the line "console=..." in
/boot/loader.conf
, that determines which becomes the boot console proper, and thus where the console messages (and single user prompt) appears. I could not get/boot.config
to influence that, neither probing for keyboard, -P, or double console, -D, seeboot(8)
, had any effect--so I do not have a/boot.config
.The X8SIL's BIOS settings for COM3 were spot on. I only changed the terminal type to VT-UTF8 as suggested, even though ANSI and VT100 works, too--I tested them.
It was not necessary for me to set the irq for
uart2
in/boot/loader.conf
. For the flags, seeuart(8)
.In
/dev/ttys
, I setttyu2
to 'insecure', because I don't want root to login over SOL (single user mode will still get you root). I suggest to set the console insecure as well.