diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 16:15:14 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 16:15:14 -0200 |
commit | 4882bc0e6d31e804e4456656c629806eb59eca0a (patch) | |
tree | bbcc7e14c68fb76062265c20c6c371c6ea6460cc /share/provision/development | |
parent | cf9577525e94ff7972edf2b03979b41abdedb95b (diff) | |
download | kvmx-4882bc0e6d31e804e4456656c629806eb59eca0a.tar.gz kvmx-4882bc0e6d31e804e4456656c629806eb59eca0a.tar.bz2 |
Serial console support thanks to kvm-manager
Diffstat (limited to 'share/provision/development')
-rwxr-xr-x | share/provision/development | 13 |
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 |