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 | |
Filip Pytloun | cb52dd5 | 2016-02-01 10:42:54 +0100 | [diff] [blame] | 5 | echo "exit 101" > /usr/sbin/policy-rc.d |
| 6 | chmod +x /usr/sbin/policy-rc.d |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 7 | apt-get update |
| 8 | |
| 9 | # Cleanup old kernels, ensure latest is installed via virtual package |
Filip Pytloun | 30a5076 | 2016-01-19 14:50:45 +0100 | [diff] [blame] | 10 | #apt-get purge -y linux-image-* linux-headers-* |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 11 | if [ ! -f /tmp/no_install_kernel ]; then |
Filip Pytloun | 30a5076 | 2016-01-19 14:50:45 +0100 | [diff] [blame] | 12 | # apt-get install -y linux-generic-lts-vivid |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 13 | |
| 14 | # Update grub cmdline |
| 15 | sed -i 's|GRUB_CMDLINE_LINUX_DEFAULT=.*|GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 16 | sed -i 's|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"|g' /etc/default/grub |
| 17 | update-grub |
| 18 | fi |
| 19 | |
| 20 | apt-get -y upgrade |
| 21 | apt-get -y dist-upgrade |
| 22 | |
| 23 | apt-get autoremove --purge |
| 24 | |
| 25 | # Useful tools |
Filip Pytloun | 7588e37 | 2016-02-10 17:38:47 +0100 | [diff] [blame^] | 26 | apt-get -y install curl wget tmux vim-nox byobu iputils-ping traceroute htop tree |
Filip Pytloun | 7ae5c75 | 2016-01-15 13:48:38 +0100 | [diff] [blame] | 27 | |
| 28 | # Tmux fixes |
| 29 | cat << 'EOF' >> /etc/tmux.conf |
| 30 | set -g default-terminal "screen-256color" |
| 31 | set -g set-titles on |
| 32 | set -g xterm-keys on |
| 33 | EOF |
| 34 | |
| 35 | # Setup cloud-init |
| 36 | apt-get -y install cloud-init |