Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
Last active July 20, 2020 04:43
Show Gist options
  • Save matthewjberger/c489fcc861a7d664237bb204532650fc to your computer and use it in GitHub Desktop.
Save matthewjberger/c489fcc861a7d664237bb204532650fc to your computer and use it in GitHub Desktop.
Booting a Linux Live USB using Virtualbox

Check the drive number for your usb on windows using:

diskmgmt.msc

and looking for your USB drive.

Then, in a powershell admin terminal:

cd $env:ProgramFiles\Oracle\VirtualBox
# The number at the end of this command is the drive number. For this example, the drive number is '2'.
./VBoxManage.exe internalcommands createrawvmdk -filename "$env:USERPROFILE\.VirtualBox\usb-vm.vmdk" -rawdisk \\.\PhysicalDrive2

Then open VirtualBox and make a new Virtual Machine. When it asks if you want to create a hard disk, choose use existing hard disk and select the file at $env:USERPROFILE\.VirtualBox\usb-vm.vmdk. When you boot this vm, you will be running your live USB using VirtualBox.

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