Skip to content

Instantly share code, notes, and snippets.

@ymek
Created October 31, 2013 21:49
Show Gist options
  • Select an option

  • Save ymek/7257784 to your computer and use it in GitHub Desktop.

Select an option

Save ymek/7257784 to your computer and use it in GitHub Desktop.
# Apt-install various things necessary for Ruby, guest additions,
# etc., and remove optional things to trim down the machine.
# needed sometimes for the system to "settle"
sleep 30
mkdir -p /etc/chef
# Compress apt indexes
cat <<EOF > /etc/apt/apt.conf.d/02compress-indexes
Acquire::GzipIndexes "true";
Acquire::CompressionTypes::Order:: "gz";
EOF
apt-get -y update
apt-get -y upgrade
apt-get -y install linux-headers-$(uname -r) build-essential
apt-get -y install git-core curl wget vim-nox dstat
# Remove 5s grub timeout to speed up booting
cat <<EOF > /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="debian-installer=en_US cgroup_enable=memory swapaccount=1"
EOF
update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment