public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell
@ 2024-03-12 11:59 Christoph Heiss
  2024-03-18 15:55 ` Thomas Lamprecht
  2024-03-22 10:38 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Heiss @ 2024-03-12 11:59 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell
  2024-03-12 11:59 [pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell Christoph Heiss
@ 2024-03-18 15:55 ` Thomas Lamprecht
  2024-03-18 16:29   ` Christoph Heiss
  2024-03-22 10:38 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Lamprecht @ 2024-03-18 15:55 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

On 12/03/2024 12:59, Christoph Heiss wrote:
> 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.

That's ok, but...

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

... why not going the opposite direction and change the log message,
or is there some reason to go for 24 rows?

Isn't 80x25 the standard VGA one?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell
  2024-03-18 15:55 ` Thomas Lamprecht
@ 2024-03-18 16:29   ` Christoph Heiss
  0 siblings, 0 replies; 4+ messages in thread
From: Christoph Heiss @ 2024-03-18 16:29 UTC (permalink / raw)
  To: Thomas Lamprecht; +Cc: Proxmox VE development discussion

On Mon, Mar 18, 2024 at 04:55:20PM +0100, Thomas Lamprecht wrote:
> On 12/03/2024 12:59, Christoph Heiss wrote:
> > 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.
>
> That's ok, but...
>
> >
> > It also adjust the size to the proper 80x24 instead of 80x25, as
> > advertised in the log message.
>
> ... why not going the opposite direction and change the log message,
> or is there some reason to go for 24 rows?
>
> Isn't 80x25 the standard VGA one?

For VGA 80x25 is the standard size [0], yes.

But for serial consoles aka. VT10x emulated terminals it is actually
80x24 [1], which basically everything uses as reference. GRUB also uses
80x24 when used over a serial interface. It spits out 24 lines at least.

Probably should have noted that in the commit messages, sorry.

[0] https://www.kernel.org/doc/Documentation/svga.txt (`NORMAL_VGA`)
[1] https://vt100.net/dec/ek-vt100-tm-002.pdf (page 21, "Format")




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] applied: [PATCH installer] unconfigured: move terminal size setting before starting debug shell
  2024-03-12 11:59 [pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell Christoph Heiss
  2024-03-18 15:55 ` Thomas Lamprecht
@ 2024-03-22 10:38 ` Thomas Lamprecht
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2024-03-22 10:38 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

On 12/03/2024 12:59, Christoph Heiss wrote:
> 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(-)
> 
>

applied, with the info and references you provided in your
reply massaged into the commit message, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-22 10:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 11:59 [pve-devel] [PATCH installer] unconfigured: move terminal size setting before starting debug shell Christoph Heiss
2024-03-18 15:55 ` Thomas Lamprecht
2024-03-18 16:29   ` Christoph Heiss
2024-03-22 10:38 ` [pve-devel] applied: " Thomas Lamprecht

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