Jump to content











Photo
* * * * * 3 votes

Virtual Machine USB Boot

boot usb machine virtual

  • Please log in to reply
176 replies to this topic

#151 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 01 March 2015 - 10:51 AM

New version: 1.51 Beta 2

 

Changes:

1. A few adjustments to the latest modifications;
2. Some bugs solved.

The scan for (USB) disks is now as fast as possible. But, if you have many disks connected and you notice a long delay in their scan, could be from the security solution. For example I noticed that Comodo Internet Security delays every access to each removable disk with a few hundred ms. It may not seem much, but when you have a few disks connected and VMUB accesses each of them 2..3 times (to get all their data), it will become noticeable (but not very annoying). I advise you to notify the security solution support so they can fix the problem.
Just so you know:
1. For most of the security solutions, deactivating it from its icon in tray won't help. For Comodo I had to uninstall it to get rid of the delay.
2. When the delay from the security solution is gone, VMUB accesses each disk in a matter of ms.

 

LE: download links removed, you can find a better version in the next posts.



#152 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 01 March 2015 - 11:00 AM

Just installed the Setup version

I had already USB drive locked in QEMU with VMUB (old version used in RMPrepUSB) but...

When it launched I noticed that no drives were green even though before one was (as locked by QEMU - so OK - expected).

I edited a VM entry to add the USB drive that was already connected and then ran it.

I got Internal Error  Yes - No

If I click Yes then get VBOx error

 

OK if I quit QEMU so drive no longer locked by VMUB.

Can message box be improved?

Attached Thumbnails

  • CaptureVMUBIntError.JPG
  • CaptureVMUBIntError2.JPG


#153 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 01 March 2015 - 01:00 PM

If I understand correctly, the only problem here is the message "Internal error"?



#154 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 01 March 2015 - 01:01 PM

Yes, sorry, I was not very clear (I didn't realise QEMU+VMUB was running at first!).

It's just the message and not knowing what  Yes and No would do.



#155 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 01 March 2015 - 01:48 PM

Found the problem.
Looks like I was too "intoxicated" with C  :rolleyes: 
In C the format string functions accept %c for character and %s for string. In Delphi it's %s for both.

Now it's fixed:

Thank you for reporting  :)

LE: download links removed, you can find a better version in the next posts.



#156 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 10 March 2015 - 04:55 PM

New version: 1.51 final

All changes:

1. The scan for (USB) disks is faster.
2. In the Add/Edit window the information about found disks and CDROM drives is shown on columns (name/size/volume letter(s)).
3. A few bugs solved.
4. Some small improvements to the language code.
5. Added german translation (lng file) sent by Blackcrack.

 

Download from here



#157 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 10:49 AM

P.S. Found a problem with VBox and .vmdk files

 

If using VBox to boot from grub4dos USB drive, when reading sectors from the end of the USB drive (flash removable USB 3.0 NTFS), it returns all 00's for the last 80 odd sectors and not the correct sectors.

 

Changing the .vmdk file  to make the drive bigger does not fix the problem. This is the one made by VMUB...

# Extent description
RW 125045424 FLAT "\\.\PhysicalDrive2" 0

The problem occurs just under VBox (no VMUB used) as well as using VMUB+VBox.

 

I put marker bytes in the last sectors so I could tell if the correct data was returned.

 

Under VBox+booting to WinPE however, a disk editor does return the correct data.

Under QEMU with grub4dos, the correct data is returned.

 

So maybe it is a Vbox-BIOS bug?

 

Test grub4dos batch file was: (Last sector on drive is 0x7740AAF)

!BAT
# DISK can be 0-9, A-F only
# Returns: CAP = Capacity of disk displayed in GB
set DISK=0
# Get disk capacity
write 0x60000 0x42
write 0x60010 0 > nul
# get size of disk from INT 13h AH=48 into memory at DS:DI+10h  - edx=80h is hard disk 0, 81h would be hard disk 1
/%grub%/bios int=0x13 eax=0x4800 edx=0x8%DISK% ds=0x6000 edi=0x0 > nul
read 0x60010 > nul
set /A A=%@retval% & 0xffffffff > nul
set /a CAP=%A%>>21&0xffffffff > nul
# Get most significant dword
read 0x60014  > nul
set /A B=%@retval% & 0x1ffff > nul
set /a CAP=%B% * 0x800 + %CAP% > nul
echo DISK %DISK% = %CAP%GiB (LS_DWORD=%A% MS_DWORD=%B%, TOTAL SECTORS=%B%%%A:~2,999%)
set /A LAST=%A%-1
cat --hex --length=0x10 (hd%DISK%)%LAST%+1
cat --hex --length=0x10 (hd%DISK%)0x7740000+1
cat --hex --length=0x10 (hd%DISK%)0x7740800+1
cat --hex --length=0x10 (hd%DISK%)0x7740A00+1
cat --hex --length=0x10 (hd%DISK%)0x7740A40+1
cat --hex --length=0x10 (hd%DISK%)0x7740A50+1
cat --hex --length=0x10 (hd%DISK%)0x7740A5e+1
echo these return 00's
cat --hex --length=0x10 (hd%DISK%)0x7740A5f+1
cat --hex --length=0x10 (hd%DISK%)0x7740A60+1
cat --hex --length=0x10 (hd%DISK%)0x7740A80+1


#158 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 02 April 2015 - 12:19 PM

On my computer I use both real and virtual disks (vhds, mounted with vhdmount.exe from Microsoft Virtual Server) to test grubinst.
I created 2 virtual disks (2 and 9 GB), partitioned them NTFS and filled the last sector with 30's:

2 GB virtual.png

9 GB virtual.png

I then used a real disk. The last sector had some data so I didn't have to fill it:

 

real USB disk.png

I got the same results in QEMU.



#159 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 02 April 2015 - 12:37 PM

So I don't see any problems...

Or should I test in a different way?

 

Which version of VirtualBox are you using?



#160 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 12:54 PM

I am using 4.3.26 r98988

 

I tried a 8GB FAT32 USB drive  as well - it returned data, but not the right sector.

No problems under QEMU.

 

I tested with and without VMUB - both fail to return the right sector data


Edited by steve6375, 02 April 2015 - 12:55 PM.


#161 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 01:01 PM

P.S. The partitions on the USB disks do not go right to the end, there is some 'unused' space at the end of the disk.

Not sure if this matters...

 

Partition 1   SIZE=61050.676MiB   Type: 07 NTFS  *ACTIVE*
START POS   = CYL:0 HD:32 SEC:33       END POS = CYL:1023 HD:254 SEC:63
START (LBA) = 2,048 (00000800) SIZE (LBA) = 125,031,784 (0773D568) [End=125,033,831]

 

Partition 2   SIZE=0.031MiB   Type: 21 Hidden(rsvd)      
START POS   = CYL:1023 HD:254 SEC:63       END POS = CYL:1023 HD:254 SEC:63
START (LBA) = 125,033,832 (0773DD68) SIZE (LBA) = 63 (0000003F) [End=125,033,894]

 

Partition 3   SIZE=0MiB   Type: 00       
START POS   = CYL:0 HD:0 SEC:0       END POS = CYL:0 HD:0 SEC:0

START (LBA) = 0 (00000000) SIZE (LBA) = 0 (00000000)

 

Partition 4   SIZE=0MiB   Type: 00       
START POS   = CYL:0 HD:0 SEC:0       END POS = CYL:0 HD:0 SEC:0
START (LBA) = 0 (00000000) SIZE (LBA) = 0 (00000000)

 

P1   Start=2,048 (1,048,576 bytes) End=125,033,831 (64,017,321,472 bytes)
P2   Start=125,033,832 (64,017,321,984 bytes) End=125,033,894 (64,017,353,728 bytes)

 

Drive 2  SanDisk Extreme  F/W Rev.=0001  Serial No.= [ bytes = 00 00 00 00 00 00 00 00 ]
Reported size 64,023,257,088 bytes (59.6263GiB)  Last LBA 125,045,423



#162 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 01:13 PM

P.S. I can also access sectors (presumably not real ones though?) past the end of the USB drive too!



#163 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 02 April 2015 - 01:15 PM

I am using 4.3.26 r98988

 

Me too.

Clipboard02.png

 

 

P.S. The partitions on the USB disks do not go right to the end, there is some 'unused' space at the end of the disk.

Not sure if this matters...

 

The 2 and 9 GB disks have the same issue.

The real disk was partitioned 'till the end.

 

 

Here is the 2 GB VHD: Attached File  Test 2 GB vhd.7z   278.7KB   645 downloads
Don't use it directly in VB; install a vhd mounting tool like WinVHD, mount the vhd on the real computer and then use it in VMUB just like a real disk.
Let's see if you get a different result...



#164 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 04:40 PM

Sorry for delay, some things came up and also I could not get WinVHD to work. It installed and I got systray, but right-click on VHD does not seem to show any menu item for it and I can't see how to add it using the app form itself???

 

Anyway, I used Win DiskMangelement to attach the VHD and uses it as disk 1 with the E2B USB disk as disk 0.

I get 00's

 

Is it only me then?

P.S. OK found the problem with WinVHD - the help file says
'Also you can attach or detach your disk's at any time by right mouse button.'
Actually it should say
'Also you can attach or detach your disk's by right mouse button WITHIN THE APPLICATION'S FORM.' _ I thought it would add it to the right-click context menu!

Attached Thumbnails

  • Capturetest2VHD.JPG

Edited by steve6375, 02 April 2015 - 05:23 PM.


#165 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 04:51 PM

OK- it works if the disk controller is IDE - the problem occurs if the VM controller is SATA!



#166 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 02 April 2015 - 05:41 PM

Yup, that's the "trigger".

Looks like the vmdk+SATA implementation in VirtualBox is not 100% bug free...



#167 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 05:45 PM

https://www.virtualb...rg/ticket/14021



#168 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 02 April 2015 - 06:00 PM

Ok :)

 

Only one problem: the makers of VB are not too happy about VB been used for USB boot...  :rolleyes:

So you should try to report without mentioning VMUB and/or USB boot - if you want the problem fixed fast...


  • Blackcrack likes this

#169 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 02 April 2015 - 06:02 PM

too late! Why would they want to discourage people from using their software anyway (rhetorical Q!).



#170 DavidB

DavidB

    Silver Member

  • Developer
  • 611 posts

Posted 02 April 2015 - 06:08 PM

Don't know, but they were pretty "mad" about that on their forum...



#171 trufo

trufo
  • Members
  • 1 posts
  •  
    Switzerland

Posted 10 June 2015 - 01:53 PM

I know this thread is 2 month old now but I figured that since I found a solution to a problem others might have, better to post it here.

 

With version 1.51 (portable) and using vbox 4.3.28 I got the error "VERR_ACCESS_DENIED" just as vbox launched.

After some research (mainly on vbox forum), it appears that some user had the same problem with post 4.3.12 versions.

So I installed vbox 4.3.12 and it worked.

A little precision though... I restored a clean system via an acronis image beforehand.

 

This was in the context of testing imagix related stuff on some syspreped win7x64-pe usb-stick.

 

I tried the createrawvmdk command before landing on this website and it also gave me an error of somekind but later (while windows was loading), even with vbox 4.3.12.

 

Anyway thank You DavidB your app is excellent.



#172 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 17 August 2015 - 02:50 AM

hi trufo, good info! using your recommendations (4.3.12) now. and yes, his program is excellent. hope your doing well DavidB

thanks

#173 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 458 posts
  •  
    Germany

Posted 17 August 2015 - 04:16 AM

Ok :)

 

Only one problem: the makers of VB are not too happy about VB been used for USB boot...  :rolleyes:

So you should try to report without mentioning VMUB and/or USB boot - if you want the problem fixed fast...

 

well, it was my idea for include the support in the VBox for an USB-Device ..

so, why not, i tell it you, they want not an System on usb like an Linuxderivat ..

because with this stick it's so many possible, not only formating and partitioning (but about this i want not speak*g*)

how ever.. wth exist not more usb-stick systems, why it's not more support to make

it able for all peoples to have his own system on an really fast usb-system,

(why do they are not exist really fast usb-sticks like harddisks (although it would be possible) )

why makes not more easy to create something and supporting something.. i say it to you..

 

some peoples want it not and want hold the System on spot and place (if i can say it like so)

it's because danger of collusion or something, because it's easy to have his system on usb,

can you boot any computer with your system.. should i tell you more ?

You can put your system in your House and in your Car and can make many more with it..

and some peoples want it easy not, they want hold it on place for more easy catching if some peoples it not want ..

 

this is why.. you see :)

 

it is easy for build up an usb-stick for anybody, also for young and normal peoples it is really more hard for controlling it..

 

this only as side note .. why they are(or some peoples) it want not .. in clean words (take a look on VMware or other, there it s also impossible)

 

best regards

Blacky



#174 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 17 August 2015 - 04:50 AM

hi Blackcrack,

"they" dont want "us" to have this capability, youre right! another reason is tracking and control.

one of the big deals with DavidB's creation here is that you can boot an install usb in VM to install a windows on another USB! all through VM and if configured tightly there will be no traces of the actual hardware these windows were installed on.

this tool is superb but I dont think many realize just how superb it is.

#175 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 458 posts
  •  
    Germany

Posted 17 August 2015 - 10:15 AM

Hiho 7050 ;) ,

 

nope, they realize it not and all the "normal" Peoples (Users only) don't realize it also ..

because they're are not so deep in the software technical ..

the want it easy use and should work on the easiest way ..

and this want they (the VBox Dev's/Presi) don't do it because on one hand,

they become warning from different facility's in the background and publish the

"speak/information(do it not and prevent something like that of you become trouble)" it not

and on the other hand want they not go in some risk to make something more free as it need,

because, it's not in the sense of the founder.. you know maybe something also.. .. i hate some adjusting..

because, it's not really open and don't let make an really free way and try in one or other way ever to controlling it..

bahh.. something it's not "cosha" and it contradicts the open source way .. imho ..

and i wish, the usb-sticks should not orientating on commerce , should more orientate on the

technical possible and should recycle the old sticks in which one they can send back to the

Producers for make it more modern of the stand the technicals ..

(this is my wish to Santa for have same fast usb-sticks like the hddisk's/ssd*g*)

and the normal harddsisk's be never really interesting .. because any can take with his own harddisks on /as USB-Stick..

this would be the best .. I bet, it's comes, but behind the sdd's they want sell mass of hardware up to this possibility, i want bet.

usb3 is there and sdd's comes now .. should i say more? ..

( blabla "it have to emulate and not make possible some things who works per hardware in an couple Years .."  /

             " we need in couple of years also some fitures to programming in" >blubbbb< )

best regards

Blacky







Also tagged with one or more of these keywords: boot, usb, machine, virtual

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users