Skip to content

Instantly share code, notes, and snippets.

@MattesGroeger
Created January 18, 2014 12:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattesGroeger/8489830 to your computer and use it in GitHub Desktop.
Save MattesGroeger/8489830 to your computer and use it in GitHub Desktop.
I use the following script to boot my Windows 7 bootcamp partition under OSX with VirtualBox. Replace the name of your Bootcamp partition and the name of your VirtualBox image accordingly. The script was written after following this description: http://www.kevinrockwood.info/2010/04/windows7-in-osx-with-bootcamp-and-virtualbox/
#!/bin/sh
# find and unmount volume (change 'BOOTCAMP' name accordingly)
amount=`diskutil list | grep BOOTCAMP | wc -l`
if [ $amount = 1 ]
then
path=`diskutil list | grep BOOTCAMP | sed -e 's/^\(.*\)\(disk0s.\)$/\/dev\/\2/g'`
sudo chmod 777 $path
diskutil unmount $path
fi
# start virtual machine (replace 'WindowsBootcamp' with your VirtualBox image name!)
vboxmanage startvm WindowsBootcamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment