[pve-devel] [PATCH installer] unconfigured.sh: set kernel.printk to level warn

Stoiko Ivanov s.ivanov at proxmox.com
Tue Nov 26 19:42:11 CET 2024


we got a few reports of kernel-output drawing over the TUI-installer.
(e.g. when ZFS loads for the pool-cleanup, also mkfs.xfs sometimes
triggers a message being printed).

As the information gets logged in the kernel ringbuffer (`dmesg`)
anyways, there's little gain on having it displayed on the console in
addition.

following https://www.kernel.org/doc/Documentation/sysctl/kernel.txt
and
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/getting-started-with-kernel-logging_managing-monitoring-and-updating-the-kernel
simply set the sysctl to log only messages of level warn and above to
the console.

Tested in a VM, where I manually ran the command before starting the
TUI installer (and selecting XFS as filesystem there). without it the
messages got displayed, with the command they did not.

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
as it's a cosmetic issue I would not pull it in late in the release cycle.
Sending it nonetheless now, in order not to forget it.

 unconfigured.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/unconfigured.sh b/unconfigured.sh
index 070cf33..ef9aa3c 100755
--- a/unconfigured.sh
+++ b/unconfigured.sh
@@ -233,6 +233,9 @@ chronyd || echo "starting chrony failed ($?)"
 echo "Starting a root shell on tty3."
 setsid /sbin/agetty -a root --noclear tty3 &
 
+echo "Setting console loglevel to warn."
+sysctl -w kernel.printk='4 4 1 7'
+
 /usr/bin/proxmox-low-level-installer dump-env
 
 if [ $proxtui -ne 0 ]; then
-- 
2.39.5





More information about the pve-devel mailing list