How To Boot From USB Drive In Virtualbox In Linux


Get real time updates directly on you device, subscribe now.

Yesterday I used to be attempting to create multiboot USB drive with Ventoy in my Linux system. After efficiently created the bootable drive, I added totally different ISOs to the bootable drive. However the issue is I needed to reboot my  system each time after including a brand new ISO to examine if the USB drive is de facto working. Since I had no extra system, It appeared just a little bit time consuming job to me. I assumed it might be higher If I might boot from USB drive in Virtualbox in my Linux system. As you may know, Oracle Virtualbox doesn’t provide any direct method to boot from USB. Fortunately, I’ve discovered a easy workaround to permit Virtualbox as well from an USB flash drive.

Boot From USB Drive In Virtualbox In Linux

To permit Virtualbox boot from USB drives, that you must create a .vmdk file and level it to your USB drive for booting to it. For these questioning, a vmdk file is nothing however a digital disk file which accommodates all the knowledge of a digital machine.

First, that you must discover your USB drive title. Refer the next information to be taught other ways to seek out disk drive particulars in Linux.

I’m going to make use of “fdisk” command to seek out my USB drive particulars:

$ sudo fdisk -l

Pattern output:

Disk /dev/sdc: 14.54 GiB
15597568000 bytes, 30464000 sectors
Disk mannequin: Cruzer Blade
Items: sectors of 1 * 512 = 512 bytes
Sector measurement (logical/bodily): 512 bytes / 512 bytes
I/O measurement (minimal/optimum): 512 bytes / 512 bytes
Disklabel sort: dos
Disk identifier: 0x4d924612

As you may see, my USB drive title is /dev/sdc.

Now, open your Terminal and run any one of many following instructions to create a vmdk file:

$ sudo vboxmanage internalcommands createrawvmdk -filename ~/usb.vmdk -rawdisk /dev/sdc

In some Linux distros, the vboxmanage command is case-sensitive. In that case, use the next command to vmdk file:

$ sudo VBoxManage internalcommands createrawvmdk -filename ~/usb.vmdk -rawdisk /dev/sdc

The above command will create a brand new vmdk file named “usb.vmdk” in your $HOME listing. Upon profitable vmdk file creation, you will notice an output like beneath:

RAW host disk entry VMDK file /residence/sk/usb.vmdk created efficiently.

Create new vmdk file using vboxmanage command

Set correct permission to the newly created vmdk file:

$ sudo chown $USER:$USER ~/usb.vmdk

Subsequent, add your person to “vboxusers” and “disk” teams utilizing the next instructions:

$ sudo usermod -a -G vboxusers sk

$ sudo usermod -a -G disk sk

Substitute “sk” with your individual person title.

Please be aware that including a person to “disk” group is harmful and safety danger. Now take away the USB drive and reboot your system to take impact the adjustments. When you don’t take away your USB, the title of your drive letter could change at subsequent boot. So it is very important take away the USB first and reboot the system.

Now open Oracle Virtualbox utility and create a brand new digital machine:

Create new virtual machine in virtualbox

Enter the title of the VM, OS sort and model and click on Subsequent to proceed:

Enter virtual machine details in virtualbox

Enter RAM measurement:

Enter RAM size to virtual machine in virtualbox

That is necessary step. Select “Use an present digital laborious disk file” possibility and click on the browse button (UP arrow button):

Use an existing virtual hard disk file

Click on “Add” button to decide on the newly created vmdk file:


Select the newly created vmdk file out of your native drive:

Choose the newly created vmdk file from your local drive

After including the vmdk file, click on Select button to substantiate:

Confirm adding the vmdk file

You’ll now see the vmdk file is chosen because the digital laborious disk for the brand new digital mahine. Click on Subsequent to proceed:

vmdk file is selected as the virtual hard disk

All carried out! Plug your bootable USB drive and begin the digital machine:

Boot from USB drive in Virtualbox

Now you may be capable to boot from USB in Oracle Virtualbox. Right here I’m booting the USB bootable drive created with Ventoy script in Virtualbox:

Boot From USB Drive In Virtualbox In Linux

Create An ISO From A Bootable USB Drive In Linux

That is one other method to boot USB drive in Virtualbox. On this technique, we don’t must create vmdk file. Simply create an ISO picture from the bootable USB utilizing “GNOME disk utility” or “dd” command as described within the following hyperlink:

After creating the ISO, open Virtualbox utility and go to the Settings of the any VM and add (mount) this newly created .iso file as an optical drive underneath “Storage Controller: IDE” possibility.

Add ISO in virtualbox storage controller

Now begin the VM and it’ll boot from the ISO picture.

Please observe that this technique won’t work with all USB pictures, particularly with multi-partitioned USB drives.

Thanks for stopping by!

Assist us that will help you:

Have a Good day!!

Leave A Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More