Matt Fiddles

Life's so vast, there's just so much to do...

User Tools

Site Tools


"`A curse,' said Slartibartfast, `which will engulf the Galaxy in fire and destruction, and possibly bring the Universe to a premature doom. I mean it,' he added.
`Sounds like a bad time,' said Ford, `with luck I'll be drunk enough not to notice.'"

- Ford ensuring everyone knew where his priorities lay.

Where will you go today?

"Beware of the dark side. Anger...fear...aggression. The dark side of the Force are they. Easily they flow, quick to join you in a fight."

- Yoda


Boot OS off USB drive

This will show how to boot a system off a bootable usb drive, inside a VirtualBox container on your computer. It's nice when you want to test a usb drive out, and don't want to unplug, reboot, or any of that nonsense.

Warning: The following procedure could destroy all your data, eat your dog , scare your cat 8-O, reek havick in your life, destroy property, and do other terrible things. Proceed at your own risk.

You'll need to make a raw virtual disk out of your usb drive. No worries, it's two commands to just make a little file to link to the actual drive.

We'll assume your drive is /dev/sde1

Make sure you have permission to access the drive. In linux:

watch chown <your user> /dev/sde*

Use your drive path. Use watch in case the system reverts the perms back to the original.

Then make a little file to point to the usb drive.

VBoxManage internalcommands createrawvmdk -filename /path/to/usb-file.vmdk -rawdisk /dev/sde

Load the file into the virtualbox interface, attach it to an OS, and it's ready to go.

Note: As drive parameters change between boots, disk attachments, etc; you should not reuse the same vmdk file after rebooting your computer or re-attaching your usb drive. In short, it's a bid of a dangerous thing to do the above, but it's fun all the same.

To level with you, I've destroyed all the contents of a usb drive (long time ago). So be careful.

For pics see this tutorial.

For more info on accessing raw disks from VirtualBox, see the Help section of your VirtualBox application, and go to Advanced Topics » Advanced Storage Configuration.

computers/virtualization/virtualbox.txt · Last modified: Dec 2, 2015 (3 years ago) by Matt Bagley