Skip to content

Instantly share code, notes, and snippets.

@brandonheller
Created May 19, 2012 08:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandonheller/2730049 to your computer and use it in GitHub Desktop.
Save brandonheller/2730049 to your computer and use it in GitHub Desktop.
Install MPTCP apt repo & kernel image on Ubuntu Precise on EC2
#!/bin/bash
# Script to install MPTCP kernel from the MPTCP apt-get repo
# Instructions from http://mptcp.info.ucl.ac.be/pmwiki.php?n=Users.AptRepository
# Get key
wget -q -O - http://mptcp.info.ucl.ac.be/mptcp.gpg.key | sudo apt-key add -
# Add repo
sudo sh -c 'echo "deb http://mptcp.info.ucl.ac.be/repos/apt/debian precise main" > /etc/apt/sources.list.d/mptcp.list'
# Enable proposed: from https://wiki.ubuntu.com/Testing/EnableProposed
sudo sh -c 'echo "" >> /etc/apt/sources.list'
sudo sh -c 'echo "# MPTCP apt-get setup: enable proposed packages" >> /etc/apt/sources.list'
sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu/ precise-proposed restricted main multiverse universe" >> /etc/apt/sources.list'
# Update:
sudo apt-get update
# Install appropriate kernel version; -virtual for EC2.
if [ -n "`uname -a | grep virtual`" ]
then
linux_kernel=linux-mptcp-virtual
else
linux_kernel=linux-mptcp
fi
echo "installing linux kernel: $linux_kernel"
sudo apt-get install $linux_kernel
echo "New kernel should require no /boot/grub/menu.lst changes if the MPTCP kernel is newer than the original."
echo "Verify this:"
grep ^default /boot/grub/menu.lst
echo "If *-mptcp-virtual is not the first entry, change the default param in /boot/grub/menu.lst to match it (probably 2 or 4, but not odd - those are rescue kernels)."
grep ^default /boot/grub/menu.lst
echo "Then, reboot to enjoy a fresh MPTCP kernel, with 'sudo reboot'."
echo "Once rebooted, verify the kernel version with 'uname -a'."
echo "Enjoy!"
#sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment