Boot from USB Stick?

Discussions related to using VirtualBox on Windows hosts.
sanny
Posts: 3
Joined: 1. Aug 2008, 20:38

Boot from USB Stick?

Post by sanny »

Hi,

I am already new in this "scene" (using Virtual Machines). I want to know if it is possible with VirtualBox to boot from USB Stick when already for example a live ilnux is installed?

Host: WinXP SP3

thx in advance
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

No, VB cannot boot from USB.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
dewittdale
Posts: 69
Joined: 22. Mar 2008, 00:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: ubuntu 8.04
Location: Kansas City Missouri

Post by dewittdale »

But you can place your .vdi file on the portable flash drive and install virtualbox on the new computer. If you have administrative access and since the installation is quick. It's close to what you'd want.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Another option is to use RAW Disk Access to access the USB drive directly. You would then use it like a hard drive. I don't know if it's done before and if it actually works properly.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
dewittdale
Posts: 69
Joined: 22. Mar 2008, 00:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: ubuntu 8.04
Location: Kansas City Missouri

Post by dewittdale »

Truth be told. I merely thought that since a flash drive is seen as any other drive it would therefor be available to the virtualbox program. My flash drives are all too small to make the experiment. I suppose I could try with the really small linux but I lack the motivation right now.

So I launched this reply thinking I'd get a thumbs up or thumbs down. You seem to be saying maybe I'm incorrect. If so do you have time to explain why? It seems logical to me since I've operated virtual machines from different drives already. And there's been no problems with that approach. Flash drives are different?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

What are you asking for exactly? The first idea I got was that you wanted to boot from the flash drive, which needs to be mounted to the VM before you can boot from it, but VB does not support that.
But if you use RAW Disk Access, as more about it is described in the Tutorial: All about VDIs, you can make it boot in a VM, but you don't mount it directly in the VM through the USB settings.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
dewittdale
Posts: 69
Joined: 22. Mar 2008, 00:59
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: ubuntu 8.04
Location: Kansas City Missouri

Post by dewittdale »

Make a xxxx.vdi on flash drive. Place flash drive in usb slot on computer. Start virtualbox on computer with virtual disk manager indicating xxxx.vdi is located on flash drive.

That is called booting from usb drive?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Damn it. dewittdale, I thought you were the TS on the previous post.

USB boot is just as it says, boot from it like a CD/HDD. Not with some vdi on it and boot that. Or the TS means something else ;).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
allbestmessages
Posts: 2
Joined: 7. Nov 2008, 08:56
Contact:

Re: Boot from USB Stick?

Post by allbestmessages »

I have read on the internet about the boot from USB stick.
USB - Universal Serial Bus - is a standard for connecting additional equipment to your computer, like printers, scanners, webcam's, digital camera's, keyboards, mouse, harddisks, etc. For more details, please read this article. One of these devices is the Thumbdrive, keychange disk, USB pen, etc however you want to call them. We'd like to use one of those to boot our PC from.

Meer en meer PC's staan het toe van een dergelijke thumbdrive te starten. Maar helemaal vlekkeloss en eenvoudig is dit niet. In dit artikel focussen we dus op een dergelijke thumbdrive. We willen deze drive voorbereiden vanuit iedere gewenste Windows versie (Ik deed het met Windows XP), d.m.v. MKBT.

Tip: niet alle PC's zijn instaat van een USB disk te starten. Kijk of jouw PC dit kan door te kijken welke BIOS instellingen beschikbaar zijn. Update eventueel de BIOS van je PC.
LastLawyer
Posts: 21
Joined: 15. Nov 2008, 16:07

Boot VB from USB Stick

Post by LastLawyer »

Hi Folks,

i installed VB today completely on my 8 GB USB-Stick(under h:\VirtualBox). It runs normaly like installed on an internal hdd. Then i placed a 5 GB *.vdi File on the USB-Stick and installed XP Pro in within it. Boots normally (within 1-2 minutes), just installation took longer. Then i changed to another machine with no VB installed. I tried to start it from h:\VirtualBox\VirtualBox.exe and received an error-message. So i "overinstalled" VB on my USB-Stick on that machine and afterwards i was able to start and boot my virtual XP-Machine. Then switched back to the first machine, and started VB without any problems.

Wouldn´t it be a phantastic thing when the programers could change VB that way that it does not use the Windows-Registry anymore what would make it a completely independent USB-PC Solution like MoJoPack tried to be but never realy was.

best regards

LL
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Allbestmessages, please stick to English here. VB does NOT support USB booting, even though your PC might be able to. That feature is not yet build.

LastLawyer, that will be a bit difficult, because even if they strip the registry part (what is stored there anyway, nothing for the use of VMs anyway) you still have the problem with the kernel module. It needs direct kernel calls to access the hardware.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
LastLawyer
Posts: 21
Joined: 15. Nov 2008, 16:07

Post by LastLawyer »

hi sasquach,

maybe, but maybe not. Take a look here:

http://www.german-nlite.org/wbb/index.p ... hreadID=28

This seems to be built specially for the use on usb-sticks. Have not tested it yet but the description sounds good. But you still have to have main user rights.

Download it here:

http://vbox.me/

best regards

LL
LastLawyer
Posts: 21
Joined: 15. Nov 2008, 16:07

Post by LastLawyer »

seems to work !
zerlgi
Posts: 1
Joined: 12. Aug 2009, 09:27
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: opensolaris windows linux ubuntu opensuse freeBSD

Re: Raw disk access to boot from USB

Post by zerlgi »

Sasquatch wrote:Another option is to use RAW Disk Access to access the USB drive directly. You would then use it like a hard drive. I don't know if it's done before and if it actually works properly.
I have tested this partially on Ubuntu with VirtualBox 3.04

IMPORTANT: make sure you have a backup of your USB, in case you corrupt it.

I wanted to boot off a USB image file "moblin.img"
I had to first create a block dev, and then copy the contents of moblin.img to it.
(mknod requires sudo/root privileges)

sudo mknod /dev/moblin b 8 0
sudo dd if=~/DOWNLOAD/ISO2/moblin.img of=/dev/moblin
sudo chgrp vboxuser /dev/moblin
sudo chmod ug+rw /dev/moblin
sudo chmod g+s /dev/moblin

then create the vmdk:
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/diskimages/moblin1.mvdk -rawdisk /dev/moblin -register

then just add that "hard drive" do your virtual machine.

If this was a plugged in USB, then first unmount the USB.
Find out which device it is:
sudo fdisk -l
(look for sdb or sdc and size that matches your USB stick)
then change the device permissions, and create the VMDK
sudo chgrp vboxusers /dev/sdc? [yes, that is a question mark, it is a single character wild-card]
sudo chmod g+rw /dev/sdc?
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/diskimages/data-traveler1.vmdk -rawdisk /dev/sdc -register


---------------------
There are 2 rules for success in life
1. Don't tell anyone everything you know
BDixon
Posts: 5
Joined: 6. Apr 2009, 15:28
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Linux

Re: Boot from USB Stick?

Post by BDixon »

At the risk of confusing things, I too would like to be able to boot from a USB drive (or more preferably from a folder containing the contents of the USB drive). Here is what I would like to accomplish.

I have created a bootable version of Ubuntu on a thumb drive, using instructions from this site:
http://www.pendrivelinux.com/usb-ubuntu ... l-windows/
This allows me to pop the thumb drive into any PC (that allows booting from a thumb drive, of course) and boot up under Linux. Don't do it often, but often enough to like to be able to do it.

My primary machine is my work Windows laptop (no option of installing Ubuntu there). The other computers in the house belong to various family members, none of whom want to swap Windows for Linux. So, I've been using VirtualBox to play around with Linux. (Although I use commercial Unix at work, I'm still learning what can be done with it on a personal level.)

So, if I have 10 minutes to spare during the day, I switch over to VBox and play with Linux. But, if I do something there and want the same setting on my bootable thumb drive, I have to wait until I have a whole lot more free time, shut down Windows, boot up from the thumb drive, make the setting, shut down, boot back up under Windows.

What I would love to do is:
- copy all the files from my USB to a folder on my Windows machine
- tell VirtualBox to treat that folder as a USB drive
- tell VirtualBox to boot from that "USB drive"
- play around with Linux to my heart's content
- periodically, copy the files from the folder to the real USB drive

Obviously, to be able to do this I would also be willing to convert the USB drive to some other file format. (I can easily create a *.iso from it, I could also create a *.img if someone told me how.) Even more obviously, a simple copy to a folder would be easier for me, but I'm willing to jump through a certain number of hoops if necessary.

Questions:
- Is this possible with the current version of VirtualBox? (from this thread, I doubt it)
- Is this something that the VB developers would consider adding to a future release? (please, please, please)

Thanks for letting me muddy the water. Should I have created a new thread?

Bill
Post Reply