From 4882bc0e6d31e804e4456656c629806eb59eca0a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 30 Dec 2017 16:15:14 -0200 Subject: Serial console support thanks to kvm-manager --- share/provision/development | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'share/provision/development') 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 -- cgit v1.2.3