Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 1 | ## Base packages and setup |
| 2 | # Remove unwanted ubuntu security repository |
Filip Pytloun | 30a5076 | 2016-01-19 14:50:45 +0100 | [diff] [blame] | 3 | #sed -i '/.*security\.ubuntu.com.*/d' /etc/apt/sources.list |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 4 | |
| 5 | apt-get update |
| 6 | |
| 7 | # Cleanup old kernels, ensure latest is installed via virtual package |
Filip Pytloun | 30a5076 | 2016-01-19 14:50:45 +0100 | [diff] [blame] | 8 | #apt-get purge -y linux-image-* linux-headers-* |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 9 | if [ ! -f /tmp/no_install_kernel ]; then |
Filip Pytloun | 30a5076 | 2016-01-19 14:50:45 +0100 | [diff] [blame] | 10 | # apt-get install -y linux-generic-lts-vivid |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 11 | |
| 12 | # Update grub cmdline |
| 13 | sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 14 | sed -i 's|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 15 | update-grub |
| 16 | fi |
| 17 | |
| 18 | apt-get -y upgrade |
| 19 | apt-get -y dist-upgrade |
| 20 | |
| 21 | apt-get autoremove --purge |
| 22 | |
| 23 | # Useful tools |
| 24 | apt-get -y install curl wget tmux vim-nox byobu iputils-ping traceroute htop |
| 25 | |
| 26 | # Tmux fixes |
| 27 | cat << 'EOF' >> /etc/tmux.conf |
| 28 | set -g default-terminal "screen-256color" |
| 29 | set -g set-titles on |
| 30 | set -g xterm-keys on |
| 31 | EOF |
| 32 | |
| 33 | # Setup cloud-init |
| 34 | apt-get -y install cloud-init |