1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/installation-user-infra-machines-advanced-customizing-live-serial-console.adoc
2026-01-22 11:16:27 +00:00

78 lines
4.7 KiB
Plaintext

// Module included in the following assemblies
//
// * installing/installing_bare_metal/upi/installing-bare-metal.adoc
// * installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc
// * installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc
:_mod-docs-content-type: PROCEDURE
[id="installation-user-infra-machines-advanced-customizing-live-{boot}-serial-console_{context}"]
= Modifying a live install {boot-media} to enable the serial console
[role="_abstract"]
To redirect system output from the default graphical interface, enable the serial console by modifying the live install {boot-media}. This configuration ensures access to boot messages on {product-title} 4.12 and later clusters.
.Procedure
. Download the `coreos-installer` binary from the link:https://mirror.openshift.com/pub/openshift-v4/clients/coreos-installer/latest/[`coreos-installer` image mirror] page.
ifeval::["{boot-media}" == "ISO image"]
. Retrieve the {op-system} ISO image from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and run the following command to customize the ISO image to enable the serial console to receive output:
+
[source,terminal]
----
$ coreos-installer iso customize rhcos-<version>-live.x86_64.iso \
--dest-ignition <path> \
--dest-console tty0 \
--dest-console ttyS0,<options> \
--dest-device /dev/disk/by-id/scsi-<serial_number>
----
+
where:
+
`<path>`:: The location of the Ignition config to install.
`tty0`:: The desired secondary console. In this case, the graphical console. Omitting this option will disable the graphical console.
`<options>`:: The desired primary console. In this case, the serial console. The `options` field defines the baud rate and other settings. A common value for this field is `115200n8`. If no options are provided, the default kernel value of `9600n8` is used. For more information on the format of this option, see the link:https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html[Linux kernel serial console] documentation.
`<serial_number>`:: The specified disk to install to. If you omit this option, the {boot-media} automatically runs the installation program which will fail unless you also specify the `coreos.inst.install_dev` kernel argument.
+
[NOTE]
====
The `--dest-console` option affects the installed system and not the live ISO system. To modify the console for a live ISO system, use the `--live-karg-append` option and specify the console with `console=`.
====
+
Your customizations are applied and affect every subsequent boot of the {boot-media}.
. Optional: To remove the {boot-media} customizations and return the image to its original state, run the following command:
+
[source,terminal]
----
$ coreos-installer iso reset rhcos-<version>-live.x86_64.iso
----
+
You can now recustomize the live {boot-media} or use it in its original state.
endif::[]
ifeval::["{boot-media}" == "PXE environment"]
. Retrieve the {op-system} `kernel`, `initramfs`, and `rootfs` files from the link:https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/latest/[{op-system} image mirror] page and the Ignition config file, and then run the following command to create a new customized `initramfs` file that enables the serial console to receive output:
+
[source,terminal]
----
$ coreos-installer pxe customize rhcos-<version>-live-initramfs.x86_64.img \
--dest-ignition <path> \
--dest-console tty0 \
--dest-console ttyS0,<options> \
--dest-device /dev/disk/by-id/scsi-<serial_number> \
-o rhcos-<version>-custom-initramfs.x86_64.img
----
+
where:
+
`<path>`:: The location of the Ignition config to install.
`tty0`:: The desired secondary console. In this case, the graphical console. Omitting this option will disable the graphical console.
`<options>`:: The desired primary console. In this case, the serial console. The `options` field defines the baud rate and other settings. A common value for this field is `115200n8`. If no options are provided, the default kernel value of `9600n8` is used. For more information on the format of this option, see the link:https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html[Linux kernel serial console] documentation.
`<serial_number>`:: The specified disk to install to. If you omit this option, the {boot-media} automatically runs the installation program which will fail unless you also specify the `coreos.inst.install_dev` kernel argument.
`<version>`:: Use the customized `initramfs` file in your PXE configuration. Add the `ignition.firstboot` and `ignition.platform.id=metal` kernel arguments if they are not already present.
+
Your customizations are applied and affect every subsequent boot of the {boot-media}.
endif::[]