Skip to content

Instantly share code, notes, and snippets.

@drewr
Last active December 12, 2015 04:49
Show Gist options
  • Save drewr/4717245 to your computer and use it in GitHub Desktop.
Save drewr/4717245 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Workaround for Virtualbox 4.2.6 on Debian Wheezy running 3.7-trunk
# (3.7.1) kernel package.
#
# Linux beta 3.7-trunk-amd64 #1 SMP Debian 3.7.1-1~experimental.1 x86_64 GNU/Linux
#
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696664
bz2=$HOME/tmp/linux-3.7.6.tar.bz2
sha=811d3adb29d635ffbdbab311c1a8e44c4df88151
oem=linux-headers-3.7-trunk-common
sudo aptitude -f install linux-headers-3.7-trunk-common
cd /usr/src
mkdir -p ~/tmp
if [ ! -f $bz2 ] && ! shasum $bz2 | fgrep -q $sha ; then
curl -o $bz2 http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.6.tar.bz2
else
echo $bz2 up-to-date \($sha\)
fi
sudo bzip2 -cd $bz2 | tar xf -
sudo mv $oem $oem.OEM
sudo ln -s ~/tmp/linux-3.7.6 $oem
sudo /etc/init.d/vboxdrv setup
sudo rm $oem
sudo mv $oem.OEM $oem
sudo lsmod | fgrep vbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment