public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell
Date: Tue, 12 Mar 2024 12:59:12 +0100	[thread overview]
Message-ID: <20240312115916.502928-1-c.heiss@proxmox.com> (raw)

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@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





             reply	other threads:[~2024-03-12 11:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 11:59 Christoph Heiss [this message]
2024-03-18 15:55 ` Thomas Lamprecht
2024-03-18 16:29   ` Christoph Heiss
2024-03-22 10:38 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240312115916.502928-1-c.heiss@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal