Boot from bootable USB drive in VB?

Discussions related to using VirtualBox on Windows hosts.
Rhashime
Posts: 1
Joined: 19. Dec 2007, 22:38

Boot from bootable USB drive in VB?

Post by Rhashime »

I have setup a bootable usb drive with persistent Ubuntu 7.10 install on it. I would like to be able to boot from this in VB. For example: When at work I need to be in windows 100% of the time. But I would like to use VB to load my bootable usb drive. Then when at a friends house, I would like to be able to just boot off the usb drive. Is there anyway to do this? Maybe something like booting from a shared folder. Or running some sort of emulator that will treat my USB drive as a CD drive.

My usb drive is setup very similarly to one here:
http://www.pendrivelinux.com/2007/09/28 ... n-install/
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Post by frank »

Direct booting from an USB device is not possible with VirtualBox as this requires USB support in the BIOS which we don't provide.
Olive
Posts: 8
Joined: 30. Dec 2007, 23:56

Post by Olive »

It is not passible directly but it is possible indirectly. Configure your USB drive as a raw disk in VirtualBox (page 105 of the manual). Then the guest will see your USB drive as a IDE drive and will be able to boot on it.
SoftDux
Posts: 26
Joined: 4. Jul 2007, 15:30
Location: Johannesburg, South Africa
Contact:

Post by SoftDux »

Frank Mehnert wrote:Direct booting from an USB device is not possible with VirtualBox as this requires USB support in the BIOS which we don't provide.
Are there any plans for adding USB support to the BIOS?
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Post by frank »

SoftDux: I'm afraid not since this is too much work with too little benefit.
kantoboy
Posts: 14
Joined: 22. Jan 2008, 20:50

Post by kantoboy »

Olive wrote:It is not passible directly but it is possible indirectly. Configure your USB drive as a raw disk in VirtualBox (page 105 of the manual). Then the guest will see your USB drive as a IDE drive and will be able to boot on it.
Does windows version of vb supports this?
I'm trying to look for the raw disk options at the windows version of vb.
lkraav
Posts: 13
Joined: 21. Feb 2008, 09:35
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: Win7 RC (X86, X64), Gentoo Linux

Post by lkraav »

not sure if this is gravedigging, but looks like i just successfully completed this on OS X. it makes more sense to install gentoo for an old ass laptop in a virtual machine than to wait around (for like forever on this p2-400 laptop). connected the laptop HDD with an IDE 2 USB cable and did this:

(01/07 02:32) lkraav@mobilitymac /Users/Shared/Virtual Machines $ VBoxManage internalcommands createrawvmdk -filename MobilityGentoo/IDE2USB-DBCA-206480-6.49G.vmdk -rawdisk /dev/disk3
VirtualBox Command Line Management Interface Version 1.6.2
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

RAW host disk access VMDK file MobilityGentoo/IDE2USB-DBCA-206480-6.49G.vmdk created successfully.

then add the drive to the hard drive list and off you go!

i've done the same thing in vmware server on windows before, so i knew there shouldnt be any serious technical limitations. glad to see that even if the UI isnt there, the functionality is all there.
solamour
Posts: 18
Joined: 11. Mar 2009, 18:06

Re: Boot from bootable USB drive in VB?

Post by solamour »

I'm not sure it works same in the Linux version, but at least in VirtualBox 2.1.4 Windows, when I plug in a USB flash drive, it's recognized as a floppy. So, I can simply select "Mount Floppy Drive" with "Host Floppy Drive" (e.g. "G:"), and booting it from there works like a charm.
__
sol
Soulatial
Posts: 96
Joined: 11. Nov 2008, 21:07

Re: Boot from bootable USB drive in VB?

Post by Soulatial »

McStarfighter
Posts: 62
Joined: 3. Nov 2007, 22:55

Re: Boot from bootable USB drive in VB?

Post by McStarfighter »

Little information by the way: RAW access isn't possible under NT6 (Vista, Server 2008 and the forthcoming Seven), because MS restricted it ... To avoid this Sun has to implent a driver which enables the option again ...
Lawand
Posts: 1
Joined: 22. Sep 2009, 17:47
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Ubuntu
Contact:

Re: Boot from bootable USB drive in VB?

Post by Lawand »

I came up with this method for booting virtual box guests from USB devices a while ago. It works for me but might not work for others...

This guide contains a method for creating a Bootable CD that includes the Linux kernel and some other stuff including the USB driver needed to use a bootable USB device. This CD boots up and loads the USB driver then continues the boot process from any USB device.

This CD can be used to boot a USB HDD in VirtualBox.

After creating a new virtual machine, select the USB section of that device’s settings and add a new USB device which would be the USB HDD. Then start the machine, boot from the bootable CD created before, and then the boot process continues and the OS found on the HDD would load.

Notes
  • Saving the machine state doesn’t work.
Last edited by Lawand on 26. Jan 2011, 00:31, edited 1 time in total.
agni
Posts: 2
Joined: 23. Dec 2009, 12:12
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: XP

Re: Boot from bootable USB drive in VB?

Post by agni »

vaniaspeedy
Posts: 1
Joined: 17. Mar 2010, 17:27
Primary OS: MS Windows XP
VBox Version: OSE Debian
Guest OSses: USB boot

Re: Boot from bootable USB drive in VB?

Post by vaniaspeedy »

Here is a much easier and better way to get a USB drive to boot in a Virtual Machine.

1. Go to http://www.plop.at/en/bootmanagerdl.html , and download the most recent .zip .
2. Extract it, and navigate to /intsall/plpbtin.iso .
3. Add the ISO in the VM, and install PLoP to the virtual hard disk (option 1)
4. Now, when you turn on the VM, it gives you an option to boot USB, Floppy, Hard Drive, and CD.
drewsus
Posts: 4
Joined: 6. Jun 2010, 18:11
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 7, Windows XP, Ubuntu 10.04, Lubuntu 10.04, Meego

Re: Boot from bootable USB drive in VB?

Post by drewsus »

vaniaspeedy wrote:Here is a much easier and better way to get a USB drive to boot in a Virtual Machine.

1. Go to http://www.plop.at/en/bootmanagerdl.html , and download the most recent .zip .
2. Extract it, and navigate to /intsall/plpbtin.iso .
3. Add the ISO in the VM, and install PLoP to the virtual hard disk (option 1)
4. Now, when you turn on the VM, it gives you an option to boot USB, Floppy, Hard Drive, and CD.
Okay, since there are many options and *.isos... for step 3, what am I installing? From where? plpbtin.iso does not have any installation options within windows. Am I BOOTING from plpbtin.iso USING my windows machine (ie- not running/booting windows and trying to install from there?). Since I don't want to mess anything up, this needs to be more clear.
Thanks,
Drew
drewsus
Posts: 4
Joined: 6. Jun 2010, 18:11
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 7, Windows XP, Ubuntu 10.04, Lubuntu 10.04, Meego

Re: Boot from bootable USB drive in VB?

Post by drewsus »

Moments later I said screw it and tried on my own.
The answer is to, yes, boot from the .iso and use option 1 as said.
Easy peasy.

[UPDATE]
It just freezes after:

Code: Select all

Loading EHCI Driver
Searching on Hosts
Host 1
Locked