Univention Bugzilla – Bug 41211
Describe how to configure serial access (serial console) via ucr
Last modified: 2020-07-02 17:20:15 CEST
Hello Univention, This bug report is related to: Bug 40596 - option to configure serial access (serial console) via ucr (http://errata.software-univention.de/ucs/4.1/171.html) The aims of #40596: * serial access is completely configurable via ucr * Some basic documentation "how to configure serial console in UCS servers" is available After errata 171, serial access is completely configurable via ucr: Thanks a lot for applying the patches. But there is still no documentation or sdb entry about how to configure this task. Furthermore, the sdb-entry with id #1308 (Boot loader and bootsplash) is misleading now, because configuring a serial console is possible without patching a configuration file now. (Topic: "Advanced options" in sdb #1308) I'm going to write some basic documentation. Ff possible, please add this documentation (after review) as a new sdb entry. Best regards Lutz Willek
Product: UCS Component: Grub Version: UCS 4.1 sdb.univention.de Category: 13 Category-Name: Boot loader and bootsplash URL: http://sdb.univention.de/category/13/boot-loader-and-bootsplash.html Suggested entry: How to configure grub serial access (serial console) Suggested Tags: console, serial, ipmi, grub, GRUB2, boot, Linux Related sdb entrys: * #42 * #1308 * #1360 ################### How to configure grub serial access (serial console) ==================================================== For the average user a serial console has no advantage compared to a graphical console offered by a directly attached keyboard and screen. But there are some scenarios where serial consoles are useful: * Systems administration of remote computers via remote management (ipmi) * Console redirection to non-standard settings * Recording boot console messages * Handicapped (blind) administrators who can not do anything with a graphical output * Disable graphical grub output (text output only) Note "Hardware Servers": Many USB serial converters don't work reliably, please use the hardwares serial console or "console re-direction" on affected servers. Many servers support serial console re-direction over network nowadays, for example over IPMI. Note "Virtual Servers": Please add a virtual "serial console device" on affected virtual servers. Note "UCS Version": The following does not apply on systems earlier UCS 4.1, erratum #171. On affected systems, please update first to UCS 4.1 erratum #171 or higher. Problems/Tasks to solve ----------------------- * Disable graphical output of grub, enable text output: To disable the graphical output of grub: # ucr set grub/terminal='console' # reboot * Configure serial access (standard serial settings) The serial connection is being made at 115200/8n1, on first serial port. Default fallback if your hardware does not support 115200 baud, is 9600/8n1. Default console (/dev/console) is always the first entry given to ucr variable "grub/terminal". This makes the VGA console the default console, as "console" is given first: # ucr set grub/terminal='console serial' # reboot This makes the serial console the default console, as "serial" is given first: # ucr set grub/terminal='serial console' # reboot * Configure serial access (standard serial settings) Serial settings are configurable via ucr variable "grub/serialcommand". This variable accepts many other options, please refer to http://www.gnu.org/software/grub/manual/grub.html#serial for more details. Note that the serial port is not used as a communication channel unless a terminal is configured (see above: "grub/terminal") Example to configure serial access to the second console: # ucr set grub/serialcommand='serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1' Related: handicapped (blind) administrators ------------------------------------------- Especially for blind administrators, any graphical output during or after the boot is not only useless but a hindrance. In addition to disable the graphical output of grub (see above) the following settings may be usefull: To disable graphical startup animation: # ucr set grub/bootsplash=nosplash To disable the graphical welcome-screen after boot: # ucr set welcome-screen/autostart=disabled Related: Configure a login prompt on the serial console ------------------------------------------------------- In addition to redirect grub messages, you often want to configure a login prompt (getty) via serial console. This is already prepared in the /etc/inittab file and only needs to be activated. To use the standard settings, simply enable the line beginning with '#T0:': # sed -i -re '/^#?T0:/s/#//' /etc/inittab # reboot To customize settings, the file /etc/inittab must be edited manually. As an example, in order to use the second serial port: # Example how to put a getty on a serial line (for a terminal) # T0:23:respawn:/sbin/getty -L ttyS1 115200 vt102 Related: Configure serial settings in older UCS installations ------------------------------------------------------------- WARNING: ONLY FOR OLDER INSTALLATIONS Of course we recommend an version update to to UCS 4.1 erratum #171 or higher. Should this not be possible, some settings can be adjusted directly, e.g. as follows: # Re-direct GRUB input/output to serial console: cat >>/etc/univention/templates/files/etc/default/grub <<__GRUB__ GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" __GRUB__ ucr commit /etc/default/grub
please review, and if possible add to a new sdb entry, Thanks. Best Regards Lutz Willek
Changes and improvements for SDB entries aren't tracked in Bugzilla anymore, so I close these entries. Please comment on help.univention.com or get in touch with the Univention Support team in case you have any suggestions for the SDB.