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" |
for short url
curl http://git.io/AoRh | bash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
किन भने, it didn't work for that time...bcuz of explaination like that....
" Apparently, what curl sends to its standard output isn't acceptable to sh. If I had to guess, the first line of the file is #!/bin/bash\r where the \r is a carriage return (CR), and the system can't find a file with the CR in the name. (And the error report is confusing because the CR spoils the display.)
Maybe you should pipe the output through tr -d '\015' before submitting it to the shell."
http://stackoverflow.com/questions/10358203/bash-curl-script-run-with-options
But, wtf... it works now... without that
curl https://gist.githubusercontent.com/zerOnepal/9928172/raw/8cea753ae7f9fb843ffccf6a9d4717d8064f2355/usb-boot-with-vbox.sh | bash