I had some trouble enable the SOL (Serial-Over-LAN) access to my ASRock Rack motherboard. Here’s how I finally managed to get it working.
First start off by configuring “Serial Console Redirection” in the BIOS with the following settings (credit to pvalkone at GitHub):
/----------------------------------------------------+-------------------------\ | SOL |Emulation: ANSI: | | Console Redirection Settings |Extended ASCII char | | |set. VT100: ASCII char | | Terminal Type [VT100] |set. VT100+: Extends | | Bits per second [115200] |VT100 to support color, | | Data Bits [8] |function keys, etc. | | Parity [None] |VT-UTF8: Uses UTF8 | | Stop Bits [1] |encoding to map Unicode | | Flow Control [None] |chars onto 1 or more | | VT-UTF8 Combo Key Sup [Enabled] |-------------------------| | Recorder Mode [Disabled] |<>: Select Screen | | Resolution 100x31 [Disabled] |^v: Select Item | | Legacy OS Redirection [80x24] |Enter: Select | | Putty KeyPad [VT100] |+/-: Change Option | | Redirection After BIO [Always Enable] |F1: General Help | | |F7: Discard Changes | | |F9: Load UEFI Defaults | | |F10: Save and Exit | | |ESC: Exit | \----------------------------------------------------+-------------------------/
From your client (where you have installed ipmitools
):
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 | ➞ ipmitool -I lanplus -H <bmc-mgmt-ip> -U admin -e \& sol info 1 Password: Set in progress : set-complete Enabled : true Force Encryption : false Force Authentication : false Privilege Level : USER Character Accumulate Level (ms) : 60 Character Send Threshold : 96 Retry Count : 7 Retry Interval (ms) : 500 Volatile Bit Rate (kbps) : 115.2 Non-Volatile Bit Rate (kbps) : 115.2 Payload Channel : 1 (0x01) Payload Port : 623 |
Make sure that Volatile Bit Rate (kbps)
and Non-Volatile Bit Rate (kbps)
is set to 115.2
(115200).
Restart the server and login. Edit /etc/default/grub
and change GRUB_CMDLINE_LINUX_DEFAULT
, GRUB_TERMINAL
and GRUB_SERIAL_COMMAND
:
1 2 3 | GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS1,115200n8 console=tty0" GRUB_TERMINAL="serial console" GRUB_SERIAL_COMMAND="serial --speed 115200 --unit=1 --word=8 --parity=no --stop=1" |
After saving the file, do not forget to run update-grub
.
Then we need to tell systemd to start serial ttyS1
on boot.
Optional, it can be worth changing the default serial-getty@.service
to only accept 115200 as baud-rate, as according to Roger Irvin. Do this by coping the default service to /etc/systemd/system/
.
1 | cp /lib/systemd/system/serial-getty@.service /etc/systemd/system/ |
1 |
Then change the ExecStart
line from:
1 | ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,38400,9600 %I $TERM |
To:
1 | ExecStart=-/sbin/agetty -o '-p -- \\u' 115200 %I $TERM' |
Save the file, reload systemd daemon, start and enable ttyS1
:
1 2 3 | systemctl daemon-reload systemctl start serial-getty@ttyS1 systemctl enable serial-getty@ttyS1 |
Reboot the server, and use ipmitool
to get a SOL session:
1 | ipmitool -I lanplus -H <bmc-mgmt-ip> -U admin -e \& sol activate |
To exit the session type &.
(no enter!) and the session is terminated.