From e7a0135b62b7639ad22bc17304bcfac8a4de706c Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Mon, 18 Nov 2024 19:10:50 +0100 Subject: [PATCH 1/4] implement serial console support Signed-off-by: Mariusz Kogen --- debian/postinst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 0db121c56..1dc7ba7af 100755 --- a/debian/postinst +++ b/debian/postinst @@ -20,8 +20,9 @@ fi update-initramfs -u -k all if [ -f /etc/default/grub ]; then - sed -i '/\(^\|#\)GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX="boot=startos"' /etc/default/grub + sed -i '/\(^\|#\)GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX="boot=startos console=ttyS0,115200n8"' /etc/default/grub sed -i '/\(^\|#\)GRUB_DISTRIBUTOR=/c\GRUB_DISTRIBUTOR="StartOS v$(cat /usr/lib/startos/VERSION.txt)"' /etc/default/grub + sed -i '/\(^\|#\)GRUB_TERMINAL=/c\GRUB_TERMINAL="serial"\nGRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"' /etc/default/grub fi # change timezone From 2c52b78ff02caa31d93067b51f000f591bf89b4d Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Thu, 21 Nov 2024 19:20:37 +0100 Subject: [PATCH 2/4] enable early kernel messages through the serial port Signed-off-by: Mariusz Kogen --- debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 1dc7ba7af..e27559435 100755 --- a/debian/postinst +++ b/debian/postinst @@ -20,7 +20,7 @@ fi update-initramfs -u -k all if [ -f /etc/default/grub ]; then - sed -i '/\(^\|#\)GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX="boot=startos console=ttyS0,115200n8"' /etc/default/grub + sed -i '/\(^\|#\)GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX="boot=startos console=ttyS0,115200n8 earlyprintk=serial,ttyS0,115200"' /etc/default/grub sed -i '/\(^\|#\)GRUB_DISTRIBUTOR=/c\GRUB_DISTRIBUTOR="StartOS v$(cat /usr/lib/startos/VERSION.txt)"' /etc/default/grub sed -i '/\(^\|#\)GRUB_TERMINAL=/c\GRUB_TERMINAL="serial"\nGRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"' /etc/default/grub fi From c2e5aed7d792b1a4a74b8b09252ef37bcc26a137 Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Thu, 21 Nov 2024 19:38:59 +0100 Subject: [PATCH 3/4] customize local and remote login prompt Signed-off-by: Mariusz Kogen --- debian/postinst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/postinst b/debian/postinst index e27559435..6cb46e390 100755 --- a/debian/postinst +++ b/debian/postinst @@ -25,6 +25,10 @@ if [ -f /etc/default/grub ]; then sed -i '/\(^\|#\)GRUB_TERMINAL=/c\GRUB_TERMINAL="serial"\nGRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"' /etc/default/grub fi +# set local and remote login prompt +echo "StartOS v$(cat /usr/lib/startos/VERSION.txt) [\m] on \n.local (\l)" > /etc/issue +echo "StartOS v$(cat /usr/lib/startos/VERSION.txt)" > /etc/issue.net + # change timezone rm -f /etc/localtime ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime From 81d9f7780de25d4fb94decdfdff4a81b06460107 Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Fri, 22 Nov 2024 17:35:58 +0100 Subject: [PATCH 4/4] Make it quiet again Signed-off-by: Mariusz Kogen --- debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 6cb46e390..d20f778a4 100755 --- a/debian/postinst +++ b/debian/postinst @@ -20,7 +20,7 @@ fi update-initramfs -u -k all if [ -f /etc/default/grub ]; then - sed -i '/\(^\|#\)GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX="boot=startos console=ttyS0,115200n8 earlyprintk=serial,ttyS0,115200"' /etc/default/grub + sed -i '/\(^\|#\)GRUB_CMDLINE_LINUX=/c\GRUB_CMDLINE_LINUX="boot=startos console=ttyS0,115200n8"' /etc/default/grub sed -i '/\(^\|#\)GRUB_DISTRIBUTOR=/c\GRUB_DISTRIBUTOR="StartOS v$(cat /usr/lib/startos/VERSION.txt)"' /etc/default/grub sed -i '/\(^\|#\)GRUB_TERMINAL=/c\GRUB_TERMINAL="serial"\nGRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"' /etc/default/grub fi