Ramblings of a dusty mind... Shashank Shekhar's Blog

Friday Oct 10, 2008


I've looked around the internet a lot and mostly didn't find any working solution apart from trying to make an image/virtualDisk from a raw physical disk (USB). I was basically experimenting with writing simple bootloaders in assembly language, and wanted to rapidly test and make changes to the code without rebooting my system again and again to try booting. The obvious solution is to use a Virtualization tool like VMWare or xVM VirtualBox by Sun (the latter is free), but the trouble is that neither of them support booting from pen-drives and I have long forgotten the existence of floppy drives, and have thus no way of directly writing to a disk and virtual booting straight-away, without creating an new image of the disk each time I make changes to it. So I decided to write to my USB pen-drive directly and try booting from it. It works when I boot the entire computer with it, but VMWare and VirtualBox do not have the option of booting from a USB device.

So messing around xVM VirtualBox 2.0.2 36488 for Windows yesterday, I was pretty surprised to find my USB Pen-Drive listed under the field of Floppies! That is,

a) Create a new Virtual "Machine"
b) Click on the "Floppy" link in the main screen (right panel)
c) Enable "Mount Floppy Drive", and from the drop-down list in "Host Floppy Device", select your USB drive's Drive Letter (haven't tried it in Linux, I guess you'll have to select the correct device like /dev/sdxx)

That's it. Try starting the Virtual Machine now.

Its quite wierd, and I'm still wondering why my USB drive gets listed under floppy, but it works for me! Neither VMWare Workstation, nor xVM VirtualBox permit booting directly from the USB otherwise.

Cheers
Shashank
Comments:

Sadly, it doesn't seem to work in Linux. The usb drive is detected as a usb device, but not listed as a floppy.

I want to be able to quickly boot a FaunOS installed on my usb drive within another Linux system running on my desktop pc.

Next try, using QEMU, then I might have to use Windows!

Posted by Alexis on October 11, 2008 at 12:01 PM IST #

Ah.. I haven't tried it yet in Linux. So I think its more like a "friendly bug" in the Windows version.

Do keep me updated about your attempt with QEMU. I'm planning to switch my bootloader development environment to Linux, so lets see if we come up with a solution for this case.

Cheers
Shashank

Posted by Shashank on October 13, 2008 at 02:17 AM IST #

Unfortunately, it does not work for me. On my vaio laptop, vbox only shows drive letter D: (memorystick reader) as floppydisk. It would be a very nice feature though.

Posted by Ariwa on October 17, 2008 at 10:12 PM IST #

@Ariwa: Are you using it on a Linux or Windows platform? And which version are you using? Will try to check it out with the specified configuration, and though I don't see Vaio laptops having anything to do with it I could try it out on a friend's system.

Cheers
Shashank

Posted by Shashank on October 21, 2008 at 09:08 PM IST #

Also trying to get it to work with Ubuntu as host and xp as guest. Anyone got it to work with booting from usb device?

Can't figure out how to set it up....

Posted by tob on November 10, 2008 at 06:53 PM IST #

I've found on some systems that version 2.0.2 onwards detects USB drives as a "Floppy", while the previous ones don't recognize it at all. Just an observation, don't really know if it holds as a rule in all the Operating Systems.

Check if you're using the latest VirtualBox. If you still don't get it running, (or you do) tell me about it.

Cheers
Shashank

Posted by Shashank on November 10, 2008 at 11:03 PM IST #

The reason your USB key is recognised in this example, is because it supprts USB-FDD emulation, some keys do this, others (read: most) however don't and only support USB-KEY or USB-HDD emulation in which case they will not be seen in the Virtualbox console as a floppy.

Posted by Dave Field on March 19, 2009 at 03:44 PM IST #

Hmm.. yeah that might be the reason. But to test matters I tried three different drives: a 1 GB iBall, a 2 GB Transcend, and 2 GB Sandisk. VirtualBox lists all three of them as Floppies. In any case, I found this link that might be useful in making your USB drive emulate a Floppy drive: http://www.pcdoctor-guide.com/wordpress/?p=3405 , after which you can boot off the "A:" entry in VirtualBox as usual, but you would be booting off your Pen Drive in reality.

Thanks for the info Dave!

Cheers
Shashank

Posted by Shashank on March 19, 2009 at 11:58 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed