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.
As while for VGA 80x25 is the standard size [0], 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.
[0] https://www.kernel.org/doc/Documentation/svga.txt (`NORMAL_VGA`)
[1] https://vt100.net/dec/ek-vt100-tm-002.pdf (page 21, "Format")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
[ TL: include further references about size from discussion ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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"
/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