Author: Michael Hanselmann. Updated: December 17, 2024. Published: April 2024.
This document is provided as-is without any warranty. The author is and will not be responsible for any damages that may occur due to its use.
Lenovo ThinkCentre M720q and M920q are small desktop computers released in 2019. As of 2024 they are quite popular as a home server due to their size and relative expandability (e.g. PCIe bifurcation and an additional M.2 connector).
Serial console redirection is a feature implemented by a system's firmware (BIOS) providing access to the firmware setup and early boot output via a serial port, most commonly RS-232. Such features are usually only made available on hardware marketed for servers. A bootloader such as GRUB and a subsequently loaded operating system will usually take over the serial port (necessitated by them not operating via BIOS I/O routines).
The firmware for ThinkCentre Tiny computers has the configuration options for serial console redirection merely hidden from the user interface. The implementation is still part of the firmware. All it takes is setting the correct options via UEFI variables.
This article has been verified with the M720 and M920 models. The firmware download page lists other hardware as using the same firmware. There's a good chance the same instructions work on these:
- ThinkCentre M720t, M720s, M720q
- ThinkCentre M920t, M920s, M920q, M920x
- ThinkStation P330 Tiny
The configuration changes were tested with firmware version M1UKT75A (1.0.0.117) from March 4, 2024. Initial tests used an earlier version from 2023 and I updated the firmware of one machine via the redirected console.
The COM1 RS-232 serial port must be installed (ttyS0
). COM2
or USB-to-serial adapters are not supported. The Lenovo
FRU part number is
04X2733
.
Contents
Configuration
UEFI variables, offset and value
(format variable:offset=value
as used by UefiVarTool):
# Boot (0x271A) ## Quick Boot (checkbox) Setup:0x19=1 ## Quiet Boot (checkbox) Setup:0x24=1 ## Redirection Support Setup:0x124D=1 # Advanced > Serial Port Console Redirection (0x280E) ## Console Redirection on COM0 (checkbox), settings on form 0x2811 Setup:0x1302=1 ## Console Redirection on missing port (checkbox), settings on form 0x281B Setup:0x1303=0 ## Windows Emergency Management Services (EMS), Console Redirection (checkbox), settings on form 0x280F Setup:0x1310=1 # Serial Port Console Redirection > Console Redirection Settings (0x280F) ## Out-of-Band Mgmt Port (COM0) Setup:0x1311=0 ## Terminal Type (VT-UTF8) Setup:0x1312=2 ## Bits per second (115200) Setup:0x1313=7 ## Flow Control (None) Setup:0x1314=0 # Serial Port Console Redirection > Legacy Console Redirection Settings (0x2810) ## Redirection COM Port (COM0) Setup:0x1318=0 ## Resolution (0=80x24, 1=80x25) Setup:0x130C=0 ## Redirect After POST (0=always enable, 1=bootloader) Setup:0x130F=0 # Serial Port Console Redirection > COM0 (0x2811) ## Bits per second (115200) Setup:0x12F8=7 ## Data Bits (8) Setup:0x12FA=8 ## Parity (None) Setup:0x12FC=1 ## Stop Bits (1) Setup:0x12FE=1 ## Flow Control (None) Setup:0x1300=0 ## Terminal Type (VT-UTF8) Setup:0x1304=2 ## VT-UTF8 Combo Key Support (checkbox) Setup:0x1306=1 ## Recorder Mode (checkbox) Setup:0x1308=0 ## Resolution 100x31 (checkbox) Setup:0x130A=0 ## Putty KeyPad (VT100) Setup:0x130D=1
Obtaining an UEFI shell binary
Either from
Arch Linux' edk2-shell
package
at usr/share/edk2-shell/x64/Shell_Full.efi
or
pbatard/UEFI-Shell
which
contains binaries derived from EDK2 stable releases.
Writing UEFI variables
GeographicCone/UefiVarTool enables reading and writing of individual UEFI variables at a byte level. Its configuration can be provided via standard input (which must be formatted in UTF-16LE):
fs0: uvt.efi --simulate < config.txt uvt.efi < config.txt reset
Another option is datasone/setup_var.efi, an EFI application with commands to read and write UEFI variables.
Function keys
F1 | Esc1 |
F2 | Esc2 |
F3 | Esc3 |
F4 | Esc4 |
F5 | Esc5 |
F6 | Esc6 |
F7 | Esc7 |
F8 | Esc8 |
F9 | Esc9 |
F10 | Esc0 |
F11 | Esc! |
F12 | Esc@ |
Ctrl+Alt+Del | EscShift+R EscR EscShift+R |
Background
Lenovo's ThinkCentre M720 uses
AMI Aptio V for
its firmware. The Setup
section can be extracted using
LongSoft/UEFITool.
LongSoft/IFRExtractor-RS
converts the binary data into UEFI Internal Form Representation (IFR).