Skip to content

Instantly share code, notes, and snippets.

@gardner
Last active April 5, 2016 02:07
Show Gist options
  • Save gardner/bddd1d1bfd82d3197229 to your computer and use it in GitHub Desktop.
Save gardner/bddd1d1bfd82d3197229 to your computer and use it in GitHub Desktop.
Turn VirtualBox disk into a bootable usb
cd ~/.vagrant.d/boxes/eda-VAGRANTSLASH-phase-zero/1.0.0/virtualbox
VBoxManage clonehd box-disk1.vmdk eda.img --format RAW
diskutil list
# USB_BLOCK_DEVICE=/dev/rdisk2
diskutil unmountDisk $USB_BLOCK_DEVICE
sudo dd if=eda.img of=$USB_BLOCK_DEVICE bs=16m
@gardner
Copy link
Author

gardner commented Apr 5, 2016

If diskutil list shows your usb disk as /dev/disk2 then you want to do diskutil unmountDisk /dev/disk2 but when you do the dd command it will be faster to use the raw disk device. This can be done by writing to /dev/rdisk2 instead of /dev/disk2. Please note the r in the raw disk device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment