Jump to content

* * * * * 1 votes

Booting VirtualBox with USB workaround

usb virtualbox grub4dos plop

Best Answer steve6375 , 26 February 2013 - 12:18 PM

Is the Win7 64-bit or special in any way? Did you try an plain MS Win7 32-bit ISO extracted to a USB drive?

How about creating a virtual HDD, mounting the HDD, copying the USB stick to the virtual HDD, dismounting it, then boot from it via VBox?

Go to the full post

  • Please log in to reply
301 replies to this topic

#301 Gerolf



  • Members
  • 12 posts

Posted A day ago

Yes. I created this MS-DOS 5.0 VHD in VirtualBox, copied it to a USB pendrive, created a MENU.LST entry, and could boot to DOS under Qemu from RMPrepUSB without problems. There was no such error message box when leaving DOSSHELL. I modified AUTOEXEC.BAT and CONFIG.SYS, and everything worked fine and wasn't forgotten after the next VHD boot.

As I did not use RMPrepUSB for anything else than starting Qemu, I tried to find a more direct way to do this, from the scripting level and without the help of RMPrepUSB, but then stumbled over this write lock problem and saw that Steve made use of a binary named start_VM.exe in his StartFromUSB.cmd script.

For direct comparison with my other scripts and in order to simplify things, I can take the start_VM.exe that is contained in "QEMU Starter exe.zip" (post #44) and place it somewhere within the binary search path, e.g. in the %windir% folder, and create a small wrapper script just providing the parameters start_VM.exe needs:


set arg=file=\\.\PhysicalDrive7,if=ide,index=0,media=disk,format=raw
start_VM 7 500 "%ProgramFiles%\qemu\qemu-system-i386.exe" -boot c -m 512 -drive %arg%

I also have to right-click on this script in Windows Explorer and run it as administrator to get Qemu running, but this works as desired. For example, I can type "COPY CON HELLO.TXT"<Enter> and "HELLO WORLD"<F6><Enter> at the DOS prompt to create a file. After closing Qemu and finishing the wrapper script, this file can be found in Windows Explorer if the VHD gets attached in Windows Disk Management.

Does anybody dare to check out these mini-scripts on his or her own computer? I did not suffer any loss of data during my experiments, except for the DOSSHELL.INI and HELLO.TXT inside the VHD when not using start_VM.exe. Of course the volume letter (O:) and the physical drive number (7) must be corrected for other machines. You won't tell me that only the Oracle of Delphi knows the solution to this problem, at the price of 411 KiB, will you?



#302 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14263 posts
  • Location:The Outside of the Asylum (gate is closed)

Posted A day ago

So, the issue is not Windows 10 or some other "peculiar" settings in your environment, good :) (which in this case means bad :()


I am short of possible ideas, only one that comes to my mind is using instead of mountvol good ol' dosdev .


But then probably the volume cannot be re-mounted without removal/insertion or something like mountstorPE or showdrive will be needed? :dubbio:


Some reference, JFYI:





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users