[pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell

Christoph Heiss c.heiss at proxmox.com
Tue Mar 12 12:59:12 CET 2024


Otherwise, when using the serial debug shell, the console size will be
0x0. This in turn breaks the TUI installer, as it cannot detect the size
properly.

It also adjust the size to the proper 80x24 instead of 80x25, as
advertised in the log message.

Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
 unconfigured.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/unconfigured.sh b/unconfigured.sh
index cf7de83..b921fc2 100755
--- a/unconfigured.sh
+++ b/unconfigured.sh
@@ -194,6 +194,11 @@ busybox --install -s || true
 
 setupcon || echo "setupcon failed, TUI rendering might be garbled - $?"
 
+if [ "$serial" -ne 0 ]; then
+    echo "Setting terminal size to 80x24 for serial install"
+    stty columns 80 rows 24
+fi
+
 if [ $proxdebug -ne 0 ]; then
     /sbin/agetty -o '-p -- \\u' --noclear tty9 &
     printf "\nDropping in debug shell before starting installation\n"
@@ -215,11 +220,6 @@ setsid /sbin/agetty -a root --noclear tty3 &
 /usr/bin/proxmox-low-level-installer dump-env
 
 if [ $proxtui -ne 0 ]; then
-    if [ "$serial" -ne 0 ]; then
-        echo "Setting terminal size to 80x24 for serial install"
-        stty columns 80 rows 25
-    fi
-
     echo "Starting the TUI installer"
     /usr/bin/proxmox-tui-installer 2>/dev/tty2
 else
-- 
2.43.1





More information about the pve-devel mailing list