aboutsummaryrefslogtreecommitdiff
path: root/share/provision/development
diff options
context:
space:
mode:
Diffstat (limited to 'share/provision/development')
-rwxr-xr-xshare/provision/development13
1 files changed, 12 insertions, 1 deletions
diff --git a/share/provision/development b/share/provision/development
index 2a31117..0f44c07 100755
--- a/share/provision/development
+++ b/share/provision/development
@@ -85,12 +85,23 @@ if ! grep -q "/swapfile" /etc/fstab; then
sudo update-initramfs -u
fi
-# GRUB configuration
+# GRUB timeout
if ! grep -q "GRUB_TIMEOUT=1" /etc/default/grub; then
sudo sed -i -e 's|GRUB_TIMEOUT=5|GRUB_TIMEOUT=1|' /etc/default/grub
sudo update-grub
fi
+# Serial console support for VMs not created by a recent kvmx-create
+if ! grep -q "GRUB_TERMINAL=serial" /etc/default/grub; then
+ # Serial console support
+ echo '' | sudo tee -a /etc/default/grub > /dev/null
+ echo '# Custom configuration' | sudo tee -a /etc/default/grub > /dev/null
+ echo 'GRUB_TERMINAL=serial' | sudo tee -a /etc/default/grub > /dev/null
+ echo 'GRUB_SERIAL_COMMAND="serial --speed=115200"' | sudo tee -a /etc/default/grub > /dev/null
+ echo 'GRUB_CMDLINE_LINUX="console=ttyS0,115200n8"' | sudo tee -a /etc/default/grub > /dev/null
+ sudo update-grub
+fi
+
# Fstrim
# See https://pve.proxmox.com/wiki/Shrink_Qcow2_Disk_Files
sudo fstrim -av