blob: 764943fe21a9c5fbdd33a3384140e3fe5ac932df [file] [log] [blame]
Filip Pytloun7ae5c752016-01-15 13:48:38 +01001## Base packages and setup
2# Remove unwanted ubuntu security repository
Filip Pytloun30a50762016-01-19 14:50:45 +01003#sed -i '/.*security\.ubuntu.com.*/d' /etc/apt/sources.list
Filip Pytloun7ae5c752016-01-15 13:48:38 +01004
Filip Pytlouncb52dd52016-02-01 10:42:54 +01005echo "exit 101" > /usr/sbin/policy-rc.d
6chmod +x /usr/sbin/policy-rc.d
Filip Pytloun7ae5c752016-01-15 13:48:38 +01007apt-get update
8
9# Cleanup old kernels, ensure latest is installed via virtual package
Filip Pytloun30a50762016-01-19 14:50:45 +010010#apt-get purge -y linux-image-* linux-headers-*
Filip Pytloun7ae5c752016-01-15 13:48:38 +010011if [ ! -f /tmp/no_install_kernel ]; then
Filip Pytloun30a50762016-01-19 14:50:45 +010012# apt-get install -y linux-generic-lts-vivid
Filip Pytloun7ae5c752016-01-15 13:48:38 +010013
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
18fi
19
20apt-get -y upgrade
21apt-get -y dist-upgrade
22
23apt-get autoremove --purge
24
25# Useful tools
Filip Pytloun7588e372016-02-10 17:38:47 +010026apt-get -y install curl wget tmux vim-nox byobu iputils-ping traceroute htop tree
Filip Pytloun7ae5c752016-01-15 13:48:38 +010027
28# Tmux fixes
29cat << 'EOF' >> /etc/tmux.conf
30set -g default-terminal "screen-256color"
31set -g set-titles on
32set -g xterm-keys on
33EOF
34
35# Setup cloud-init
36apt-get -y install cloud-init