nemesys Posted February 4, 2010 Share Posted February 4, 2010 (edited) VirtualBox USB Testing on Linux Host To test your multipass usb and if you are running a Linux host and VirtualBox I found the correct commands for creating a raw image to directly access the usb stick. This has been covered for Windows host using different methods though the Linux host version has not and the information is rather scarce. For example if you have your usb stick connected and it shows up as /dev/sdb we can run a command like this as your normal user; VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/HardDisks/usbsdb-sony.vmdk -rawdisk /dev/sdb -register What this does is create a raw vmdk image that when loaded in VirtualBox will allow booting directly into your usb drive. The name of the vmdk is not important I just used usbsdb-sony to acknowledge that it's for my sony usb. The /dev/sdb (or which ever device applies to your usb) is important in this situation. You may want to make several of these (they are only 4kb) in case your device location changes when you plug the usb stick in later, for instance I have one for /dev/sdb and /dev/sdc. **NOTE:** When creating these raw disk images, they will be associated with the model/brand of the usb device you are creating them for. So you can not use an 8GB Sandisk Cruzer with a vmdk that you made to match a Sony flash drive. You will need to rerun the commands to create a new vmdk to match the appropriate usb stick. VBoxManage will complain if you don't put your home .virtualbox path in the command like ~/.VirtualBox/HardDisks/usbsdb.vmdk. This is because of the -register command option on the end. If you remove -register from the end and don't give a full path it will create the vmdk image in whatever directory you run the command in without error. So something like; VBoxManage internalcommands createrawvmdk -filename usbsdb.vmdk -rawdisk /dev/sdb I hope this helps save some time when testing your multi-boot sticks in Linux. I know it sure has for me. Edited May 4, 2011 by nemesys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.