Console kernel parameter syntax

Red Hat Enterprise Linux 8.6 LPAR mode z/VM guest KVM guest

Use the console kernel parameters to configure the console device drivers, line-mode terminals, and HVC terminal devices.

The sclp_con_pages= and sclp_con_drop= parameters apply only to the SCLP line-mode terminal device driver and the VT220 terminal device driver.

The hvc_iucv= and hvc_iucv_allow= kernel parameters apply only to terminal devices that are provided by the z/VM® IUCV HVC device driver.

Console kernel parameter syntax

Read syntax diagramSkip visual syntax diagram conmode=hwcsclp321532701 console= <console_name>2 sclp_con_drop=1 sclp_con_drop=03 sclp_con_pages=6 sclp_con_pages= <n>  hvc_iucv=1 hvc_iucv= <number_of_devices>  hvc_iucv_allow=,<z/VM user ID>
Notes:
  • 1 Specify the conmode= parameter for Linux® on z/VM only.
  • 2 If you specify both the conmode= and the console= parameter, specify them in the sequence that is shown, conmode= first.
  • 3 The sclp_con_pages= and sclp_con_drop= parameters apply only to the SCLP line-mode terminal device driver and to the SCLP VT220 terminal device driver.
where:
conmode
specifies which one of the line-mode or block-mode terminal devices is present and provided by which device driver.
A Linux kernel might include multiple console device drivers that can provide a line-mode terminal:
  • SCLP line-mode terminal device driver
  • 3215 line-mode terminal device driver
  • 3270 terminal device driver

On a running Linux instance, only one of these device drivers can provide a device. Table 1 shows how the device driver that is used by default depends on the environment.

Table 1. Default device driver for the line-mode terminal device
Mode Default
LPAR SCLP line-mode terminal device driver
z/VM 3215 line-mode terminal device driver or 3270 terminal device driver, depending on the z/VM guest's console settings (the CONMODE field in the output of #CP QUERY TERMINAL).

If the device driver you specify with the conmode= kernel parameter contradicts the CONMODE z/VM setting, z/VM is reconfigured to match the specification for the kernel parameter.

KVM SCLP line-mode terminal device driver

You can use the conmode= parameter to override the default for Linux on z/VM. Do not change the default for Linux on KVM or for Linux in LPAR mode.

sclp or hwc
specifies the SCLP line-mode terminal device driver.

You need this specification if you want to use the z/VM CP VINPUT command to emulate the HMC Operating System Messages applet.

3270
specifies the 3270 device driver.
3215
specifies the 3215 device driver.
console=<console_name>
specifies the console devices to be activated to receive Linux kernel messages. If present, ttyS0 is always activated to receive Linux kernel messages and, by default, it is also the preferred console.

By default, ttyS0 is also the preferred console for Linux on z/VM and for Linux in LPAR mode. For Linux on KVM, the default order for the preferred console is ttyS1, followed by ttyS0, followed by hvc0.

The preferred console is used as an initial terminal device, beginning at the stage of the boot process when the initialization procedures run. Messages that are issued by programs that are run at this stage are therefore only displayed on the preferred console. Multiple terminal devices can be activated to receive Linux kernel messages but only one of the activated terminal devices can be the preferred console.

If you specify conmode=3270, there is no console with the name ttyS0.

If you want console devices other than ttyS0 to be activated to receive Linux kernel messages, specify a console statement for each of these other devices. The last console statement designates the preferred console.

If you specify one or more console parameters and you want to keep ttyS0 as the preferred console, add a console parameter for ttyS0 as the last console parameter. Otherwise, you do not need a console parameter for ttyS0.

<console_name> is the console name that is associated with the terminal device to be activated to receive Linux kernel messages. Of the terminal devices that are provided by the z/VM IUCV HVC device driver only hvc0 can be activated. Specify the console names as shown in Table 2.

Table 2. Device and console names
Device driver Console name
SCLP line-mode terminal device driver ttyS0
SCLP VT220 terminal device driver ttyS1
3215 line-mode terminal device driver ttyS0
3270 terminal device driver tty3270
z/VM IUCV HVC device driver hvc0
virtio-console device driver hvc0
sclp_con_drop
governs the behavior of the SCLP line-mode terminal device driver and VT220 terminal device driver if either of them runs out of output buffer pages. The trade-off is between slowing down Linux and losing console output. Possible values are 0 and 1 (default).
0
assures complete console output by pausing until used output buffer pages are written to an output device and can be reused without loss.
1
avoids system pauses by overwriting used output buffer pages, even if the content was never written to an output device.

You can use the sclp_con_pages= parameter to set the number of output buffers.

sclp_con_pages=<n>
specifies the number of 4-KB memory pages to be used as the output buffer for the SCLP line-mode and VT220 terminal. Depending on the line length, each output buffer can hold multiple lines. Use many buffer pages for a kernel with frequent phases of producing console output faster than it can be written to the output device.

Depending on the setting for the sclp_con_drop=, running out of pages can slow down Linux or cause it to lose console output.

The value is a positive integer. The default is 6.

hvc_iucv=<number_of_devices>
specifies the number of terminal devices that are provided by the z/VM IUCV HVC device driver. <number_of_devices> is an integer in the range 0 - 8. Specify 0 to switch off the z/VM IUCV HVC device driver.
hvc_iucv_allow=<z/VM user ID>,<z/VM user ID>, ...
specifies an initial list of z/VM guest virtual machines that are allowed to connect to HVC terminal devices. If this parameter is omitted, any z/VM guest virtual machine that is authorized to establish the required IUCV connection is also allowed to connect. On the running system, you can change this list with the chiucvallow command. See How to Set up a Terminal Server Environment on z/VM, SC34-2596 for more information.

Examples

  • To activate ttyS1 in addition to ttyS0, and to use ttyS1 as the preferred console, add the following specification to the kernel command line:
       console=ttyS1
  • To activate ttyS1 in addition to ttyS0, and to keep ttyS0 as the preferred console, add the following specification to the kernel command line:
       console=ttyS1 console=ttyS0
  • To use an emulated HMC Operating System Messages applet in a z/VM environment specify:
       conmode=sclp
  • To activate hvc0 in addition to ttyS0, use hvc0 as the preferred console, configure the z/VM IUCV HVC device driver to provide four devices, and limit the z/VM guest virtual machines that can connect to HVC terminal devices to lxtserv1 and lxtserv2, add the following specification to the kernel command line:
       console=hvc0 hvc_iucv=4 hvc_iucv_allow=lxtserv1,lxtserv2
  • The following specification selects the SCLP line-mode terminal and configures 32 4-KB pages (128 KB) for the output buffer. If buffer pages run out, the SCLP line-mode terminal device driver does not wait for pages to be written to an output device. Instead of pausing, it reuses output buffer pages at the expense of losing content.
       console=sclp sclp_con_pages=32 sclp_con_drop=1