using Virtual box VDI as usb stick

5,220

Yes you can (seen that before?).

You will need first to convert the vdi file into a raw format,

 VBoxManage internalcommands converttoraw Ubuntu.vdi Ubuntu.raw

which is the image of a whole drive; then you will need to dd this to the USB stick, for instance in *Nix this would be:

 dd if=/path/to/rawfile/Ubuntu.raw of=/dev/sdb

asssuming the USB stick is /dev/sdb (remember, if you misidentify it, you will wipe out the whole content of device /dev/sdb, so make sure there are no mistakes). There is also a dd version for Windows, see its sourceforge page.

Share:
5,220
PHPLove
Author by

PHPLove

Updated on September 18, 2022

Comments

  • PHPLove
    PHPLove over 1 year

    I have ubuntu installed on a virtual box , I installed a software named XYZ on it, Now I want to make this VDI file burn on a USB so I can install it on any PC, is this possible? my main goal is that I want to get the same environemnt on another PC, may be some kind of IMAGE of current window that I can replicate on other system

    Please assit

  • MariusMatutiae
    MariusMatutiae over 9 years
    @SmartMindx Yes if you have installed it in your Ubuntu virtual machine. The process above gives you an exact copy of your system.
  • PHPLove
    PHPLove over 9 years
    where I will write the dd command, on terminal? and how to find the /dev/sdb of usb? using mount?
  • MariusMatutiae
    MariusMatutiae over 9 years
    @SmartMindx You find the dev name by issuing the command fdisk -l; all commands are to be wrtten at the prompt in the terminal. Most commands will have to preceded by 'sudo' whcih grants you adminsitrative power to execute special commands like dd.
  • PHPLove
    PHPLove over 9 years
    VboxManage comman will be given in windows cmd, shall dd be used in windows as well?
  • PHPLove
    PHPLove over 9 years
    is there any way to make it bootable from USB?
  • MariusMatutiae
    MariusMatutiae over 9 years
    @SmartMindx dd is not a native Windows command, but there are several free implementations available, just google windows dd.
  • PHPLove
    PHPLove over 9 years
    @MaiusMatuatiae, i will try that as we ll now
  • PHPLove
    PHPLove over 9 years
    @MaiusMatuatiae after the dd command, the usb wasn't bootable, nor I was able to see any file in it, though it said on completion that 13Gb copied
  • MariusMatutiae
    MariusMatutiae over 9 years
    @SmartMindx You may try a different instrument, instead of dd: download (it is free) unetbootin, and use that to copy your VM image onto the usb stick.
  • PHPLove
    PHPLove over 9 years
    other tools actually accepts img or iso file ,the one we are creating is raw file