Skip to content

Instantly share code, notes, and snippets.

@nmaupu
Last active November 14, 2017 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmaupu/d17629ad73b2f0b680eee512b2683a5d to your computer and use it in GitHub Desktop.
Save nmaupu/d17629ad73b2f0b680eee512b2683a5d to your computer and use it in GitHub Desktop.

Booting from USB under virtualbox

List all disks:

$ diskutil list
[...]
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.0 GB     disk2

Change permission on USB disk:

chown user /dev/disk2

Create virtualbox raw device:

sudo VBoxManage internalcommands createrawvmdk -filename ./usbdisk1.vmdk -rawdisk /dev/disk2
sudo chown user ./usbdisk1.vmdk

Finally, add the disk under virtualbox.

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