My static website generator using poole https://www.xythobuz.de
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2013_12_30_virtual_usb.md 1.4KB

title: Blog post: Booting a USB Stick in VirtualBox with a Mac OS X Host date: 2013-12-30

comments: true

{{ page[“post”] }}

You can’t just boot from a USB Stick with VirtualBox because it’s BIOS does not support USB. However, you can still get it to boot from USB. But first, you have to convince OS X not to remount your USB Stick everytime it’s /dev/diskX file is accessed.

To do this, you need to know the Label of your USB drive (with spaces escaped with \) and it’s filesystem type (fat32 in this case).

Create the /etc/fstab file, if it doesn’t exist already, and mark your stick as noauto:

sudo touch /etc/fstab
sudo nano /etc/fstab
LABEL=yourUSBstick none fat32 rw,noauto

Then create a VirtualBox Disk Image, pointing to the block device file of your USB stick. Use diskutil to find out the device file name.

diskutil list
sudo VBoxManage internalcommands createrawvmdk -filename rawUsbStick.vmdk -rawdisk /dev/diskX

Now, run VirtualBox as root

sudo /Applications/VirtualBox.app/Contents/MacOS/VirtualBox

Create a new Virtual Machine, using the .vmdk file created before as virtual hard disk drive. Boot it, and…

Done! :)