From e4a2af6ae7363a2c5124397f6f3616fcf2509e79 Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Sat, 23 Nov 2024 12:32:52 +0100 Subject: [PATCH] Add serial console support for headless operation (#2790) * implement serial console support * customize local and remote login prompt --- debian/postinst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 0db121c56..d20f778a4 100755 --- a/debian/postinst +++ b/debian/postinst @@ -20,10 +20,15 @@ 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 +# 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