Last active
August 29, 2015 13:58
-
-
Save thapakazi/9928172 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#source: http://www.twm-kd.com/software/boot-virtualbox-machine-from-a-usb-flash-drive/ | |
#adding virualbox modules | |
sudo modprobe vboxdrv | |
#make a vbox hdd for the usb_drive | |
mkdir -p /tmp/VHardDisks | |
#create a new virual hdd... just a link to the /dev/sdxy | |
VBoxManage internalcommands createrawvmdk -filename /tmp/VHardDisks/usbdisk.vmdk -rawdisk /dev/sdb1 | |
if [ $? -eq 0 ] | |
then | |
#virtualbox & | |
echo -e "\e[33m Now add new virtual Machine with /tmp/VHardDisks/usbdisk.vmdk as your storage... \n that's it... Enjoy. हस त । नमस्ते:P" | |
exit | |
fi | |
echo -e "\n \e[31m Check if your usb is /dev/sdb1 or sth else...fishy" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for short url
curl http://git.io/AoRh | bash