Skip to content

Instantly share code, notes, and snippets.

@joaumg
Created May 19, 2016 18:04
Show Gist options
  • Save joaumg/c0e21c28c487c5faa5f1d5d2e4a3fa36 to your computer and use it in GitHub Desktop.
Save joaumg/c0e21c28c487c5faa5f1d5d2e4a3fa36 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Usage : fix_vbox_guest_addition VERSION
# Example : fix_vbox_guest_addition 5.0.20
# License: MIT ( https://opensource.org/licenses/MIT )
fix_vbox_guest_addition() {
sudo wget \
-c http://download.virtualbox.org/virtualbox/$1/VBoxGuestAdditions_$1.iso \
-O VBoxGuestAdditions_$1.iso
# mount: block device /opt/VBoxGuestAdditions_VERSION.iso is write-protected,
# mounting read-only
sudo mount VBoxGuestAdditions_$1.iso -o loop /mnt
cd /mnt
sudo sh VBoxLinuxAdditions.run --nox11
sudo /etc/init.d/vboxadd setup
cd -
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment