Univention Bugzilla – Full Text Bug Listing |
Summary: | option to configure serial access (serial console) via ucr | ||
---|---|---|---|
Product: | UCS | Reporter: | Lutz Willek <lutz.willek> |
Component: | Grub | Assignee: | Philipp Hahn <hahn> |
Status: | CLOSED FIXED | QA Contact: | Janek Walkenhorst <walkenhorst> |
Severity: | normal | ||
Priority: | P5 | CC: | gohmann, grandjean, hahn, sebastian |
Version: | UCS 4.1 | ||
Target Milestone: | UCS 4.1-1-errata | ||
Hardware: | Other | ||
OS: | All | ||
What kind of report is it?: | --- | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | ||
Max CVSS v3 score: | |||
Attachments: |
defines new ucr variable "grub/terminal" and "grub/serialcommand"
enhances grub configuration by using "grub/terminal" and "grub/serialcommand" variables |
Description
Lutz Willek
2016-02-06 12:27:11 CET
Created attachment 7457 [details]
defines new ucr variable "grub/terminal" and "grub/serialcommand"
# patch /etc/univention/registry.info/variables/univention-grub.cfg <univention-grub.cfg.patch
Created attachment 7458 [details]
enhances grub configuration by using "grub/terminal" and "grub/serialcommand" variables
patch /etc/univention/templates/files/etc/default/grub <grub.patch
Testcases ========= Preparation ----------- * Apply patches 7457 and 7458 * Create a backup of existing configuration files # cp /etc/default/grub /etc/default/grub_ORIG # cp /boot/grub/grub.cfg /boot/grub/grub.cfg_ORIG Testcase 0 ---------- * aim: check new variables # ucr info grub/terminal grub/terminal: <empty> Select the terminal device. Default: <empty> (graphical terminal is allowed). Set to "console" to disable graphical terminal. Set to "console serial" to also enable serial output. Documentation: http://www.gnu.org/software/grub/manual/grub.html Categories: system-base # ucr info grub/serialcommand grub/serialcommand: <empty> Configures the serial port when using the serial console. Default: <empty>. Example: "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1". Note: The serial port is not used as a communication channel unless a terminal is configured (see grub/terminal) Documentation: http://www.gnu.org/software/grub/manual/grub.html Categories: system-base --> success Testcase 1 ---------- * aim: existing systems: No configuration should be changed # ucr commit /etc/default/grub # diff /etc/default/grub_ORIG /etc/default/grub 31,32c31,35 < # Uncomment to disable graphical terminal (grub-pc only) < #GRUB_TERMINAL=console --- > # Configure UCR Variable "grub/terminal" to disable graphical terminal (grub-pc only)' > #GRUB_TERMINAL="console" > > # Configure UCR Variable "grub/serialcommand" to adapt GRUB_SERIAL_COMMAND settings > #GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" # diff /boot/grub/grub.cfg_ORIG /boot/grub/grub.cfg ; echo $? 0 --> success. No configuration will be changed Testcase 2 ---------- * aim: disable graphical output of grub, enable text output # ucr set grub/terminal='console' Create grub/terminal # ucr commit /etc/default/grub # diff /etc/default/grub_ORIG /etc/default/grub 31,32c31,35 < # Uncomment to disable graphical terminal (grub-pc only) < #GRUB_TERMINAL=console --- > # Configure UCR Variable "grub/terminal" to disable graphical terminal (grub-pc only)' > GRUB_TERMINAL="console" > > # Configure UCR Variable "grub/serialcommand" to adapt GRUB_SERIAL_COMMAND settings > #GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" # diff /boot/grub/grub.cfg_ORIG /boot/grub/grub.cfg |grep 'terminal' < terminal_output gfxterm > terminal_input console > terminal_output console # init 6 --> watch grub output, should be "text only" --> success Testcase 3 ---------- * aim: revert of "Testcase 2" # ucr unset grub/terminal Unsetting grub/terminal # ucr commit /etc/default/grub # diff /etc/default/grub_ORIG /etc/default/grub 31,32c31,35 < # Uncomment to disable graphical terminal (grub-pc only) < #GRUB_TERMINAL=console --- > # Configure UCR Variable "grub/terminal" to disable graphical terminal (grub-pc only)' > #GRUB_TERMINAL="console" > > # Configure UCR Variable "grub/serialcommand" to adapt GRUB_SERIAL_COMMAND settings > #GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" # diff /boot/grub/grub.cfg_ORIG /boot/grub/grub.cfg ; echo $? 0 --> success. Testcase 4 ---------- * aim: configure serial access # ucr set grub/terminal='console serial' Setting grub/terminal # ucr commit /etc/default/grub # diff /boot/grub/grub.cfg_ORIG /boot/grub/grub.cfg |grep 'terminal' < terminal_output gfxterm > terminal_input console serial > terminal_output console serial # diff /etc/default/grub_ORIG /etc/default/grub 31,32c31,35 < # Uncomment to disable graphical terminal (grub-pc only) < #GRUB_TERMINAL=console --- > # Configure UCR Variable "grub/terminal" to disable graphical terminal (grub-pc only)' > GRUB_TERMINAL="console serial" > > # Configure UCR Variable "grub/serialcommand" to adapt GRUB_SERIAL_COMMAND settings > #GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" # init 6 --> Connect via serial console (ttyS0) *and* the attached monitor and keyboard. Hint: The serial connection is being made at 115200/8n1, on first serial port Hint: Default fallback if your hardware does not support 115200 baud is 9600/8n1 --> Observe the (nearly) simultaneous output to the attached monitor and serial console --> Try to change grub menu settings with via both, keyboard and serial console --> Try to boot via serial console connected and *without* connected monitor/keyboard --> Try to boot via connected monitor/keyboard and *without* serial console --> success. Testcase 5 ---------- * aim: configure serial access, change serial settings to second port (ttyS1) # ucr set grub/terminal='console serial' Setting grub/terminal # ucr set grub/serialcommand='serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1' Create grub/serialcommand # ucr commit /etc/default/grub # diff /etc/default/grub_ORIG /etc/default/grub 31,32c31,35 < # Uncomment to disable graphical terminal (grub-pc only) < #GRUB_TERMINAL=console --- > # Configure UCR Variable "grub/terminal" to disable graphical terminal (grub-pc only)' > GRUB_TERMINAL="console serial" > > # Configure UCR Variable "grub/serialcommand" to adapt GRUB_SERIAL_COMMAND settings > GRUB_SERIAL_COMMAND="serial --unit=1 --speed=115200 --word=8 --parity=no --stop=1" # diff /boot/grub/grub.cfg_ORIG /boot/grub/grub.cfg |grep 'terminal' < terminal_output gfxterm > terminal_input console serial > terminal_output console serial # init 6 --> Connect via serial console (ttyS1) --> success Testcase 6 aim: Accidental setting of "grub/serialcommand" without adjustments to "grub/terminal" No configuration should be changed # ucr unset grub/terminal Unsetting grub/terminal # ucr unset grub/serialcommand Unsetting grub/serialcommand # ucr set grub/serialcommand='serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1' Create grub/serialcommand # ucr commit /etc/default/grub # diff /etc/default/grub_ORIG /etc/default/grub 31,32c31,35 < # Uncomment to disable graphical terminal (grub-pc only) < #GRUB_TERMINAL=console --- > # Configure UCR Variable "grub/terminal" to disable graphical terminal (grub-pc only)' > #GRUB_TERMINAL="console" > > # Configure UCR Variable "grub/serialcommand" to adapt GRUB_SERIAL_COMMAND settings > GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" # diff /boot/grub/grub.cfg_ORIG /boot/grub/grub.cfg ; echo $? 0 --> success ==> all tests successfully finished. Dear Uninvention , please review the submitted patches and testcases and, if possible, apply to the next UCS 4.1 errata patch. Best Regards Lutz Willek r68737 | Apply patches Thanks Lutz. r68744 | Bug #40596 grub: Fix UCR variable registration Package: univention-grub Version: 9.0.1-7.135.201604190607 Branch: ucs_4.1-0 Scope: errata4.1-1 r68745 | Bug #40596 grub: Fix UCR variable registration YAML univention-grub.yaml Code review: OK Advisory: OK Tests: OK |