Jump to content











Photo
- - - - -

Specific VHD creation and mounting problems.


  • Please log in to reply
69 replies to this topic

#1 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 23 November 2014 - 01:14 PM

Hi,
can anyone tell me how to create and or mount a VHD that can be detected properly by Rufus and the Disk Management Snap-in running on an XP system as shown in this tutorial guide for Win 7 please?

In essence, I am looking to replicate the vhd support features of Windows 7 on Windows XP.

I normally use the wonderful ImDisk for all tasks such as this but in this instance I cannot get it to produce a VHD file that can be detected by Rufus (List USB Hard Drives enabled). I've tried other tools such as VirtualBox and Virtual Server among others without success.

I noticed that ImDisk mounts a NTFS VHD file created in Win 7 as RAW in Win XP.

 

Is there anyway to resolve these issues at all?

Thanks in advance for any assistance you can offer.


Edited by Nuvo, 23 November 2014 - 01:28 PM.


#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 23 November 2014 - 02:45 PM

Maybe you are mixing together a few things. :unsure:

 

Let's start from the basics.

A .vhd image can have different formats (fixed size, dynamic, differential) the only one that is "simple enough" and normally suggested is the "fixed" type.

A fixed type .vhd is nothing but a RAW image of a disk with an appended "Conectix" sector at the end.

 

Clonedisk:

http://reboot.pro/to...5244-clonedisk/

http://reboot.pro/fi...e/24-clonedisk/

among a few other tools can add/remove this sector if needed, i.e. convert RAW to VHD and back when actually *needed*.

 

A disk is the "whole thing", including the MBR and the hidden sectors.

IMDISK, notwithstanding it's name will NOT access a "whole disk", it will access volumes on it.

And it will be additionally "transparent" to a number of tools, like disk manager/diskpart and mountvol.

 

Though on later versions it will allow to "export/save" to a hard disk image, it is not a suitable tool for "generic mounting" of "whole hard disk" images, like .vhd's are.

See:

http://reboot.pro/to...and-bootsector/

 

Olof has created another driver, called Arsenal Image Mounter, that however, for a number of reasons is not particularly suited/easy on XP:

http://reboot.pro/to...iniport-driver/

 

The "traditional" way to access "whole disk images" in XP has been using Ken Kato's VDK driver, which however does NOT "integrate" in disk manager.

 

Your current best choices to work on hard disk images would be either the Microsoft original VSS driver:

http://reboot.pro/to...storage-driver/

or (easier, GUI) the Kernsafe Total Mounter:

http://www.kernsafe....talmounter.aspx

 

For booting, you will rather want to experiment with Firadisk or Winvblock.

 

We hold here a listing of Ramdisk and "Filedisk" drivers, JFYI:

http://reboot.pro/to...ledisk-drivers/

 

:duff:

Wonko

 

P.S.: Posted by mistake wrong link to the ramdisks/filedisk listing, corrected now, added also a link to the Arsenal Image Mounter release topic.



#3 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 23 November 2014 - 05:20 PM

Many thanks for the very informative reply. :)

 I'll post back my experiences after I've worked through and evaluated the various methods you have described. 



#4 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 23 November 2014 - 08:25 PM

Reading Nuvo, it sounds as if he is dealing with a non fixed VHD image (probably a dynamic one).

 

If it was a fixed one, he should have no problem mounting it under XP with ImDisk or any disk image mounter since, as Wonko mentionned, a fixed VHD is merely a simple plain disk image with an extra 512 bytes sector.

 

if not a fixed VHD, I am not sure if MS VSS Driver or Arsenal Driver will be of any use.

He could use ImDisk but with a proxy supporting dynamic VHD's then.

 

Linking this thread for reference.

 

Regards, Erwan



#5 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1344 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 23 November 2014 - 09:02 PM

Reading Nuvo, it sounds as if he is dealing with a non fixed VHD image (probably a dynamic one).
 
If it was a fixed one, he should have no problem mounting it under XP with ImDisk or any disk image mounter since, as Wonko mentionned, a fixed VHD is merely a simple plain disk image with an extra 512 bytes sector.


That's right, but it will not create a new VHD and anything mounted by ImDisk will not be detected by Disk Management and other tools that rely on Mount Manager in Windows.
 

Hi,
can anyone tell me how to create and or mount a VHD that can be detected properly by Rufus and the Disk Management Snap-in running on an XP system as shown in this tutorial guide for Win 7 please?

In essence, I am looking to replicate the vhd support features of Windows 7 on Windows XP.

I normally use the wonderful ImDisk for all tasks such as this but in this instance I cannot get it to produce a VHD file that can be detected by Rufus (List USB Hard Drives enabled). I've tried other tools such as VirtualBox and Virtual Server among others without success.


In addition to what Wonko already posted, I would like to mention that Virtual Server should definitely be able to solve at least parts of your problems. Virtual Server can create new VHD files (from the web management interface or using VMRC+). Virtual Server also includes a virtual disk driver that can mount VHD files and make the virtual disk drive visible in Disk Management, even on XP. The driver is called "vhdmount" and it comes with a command line interface that is installed in a subdirectory under the Virtual Server application directory.

Otherwise, like Wonko also says, my Arsenal Image Mounter driver could also be used to mount such images, even though it could be a little bit complicated on XP. It has a somewhat complicated driver layout on XP, the user interface tools require .NET 4.0 and the driver needs a reboot to uninstall or upgrade properly. But it should do the job. Latest version can even emulate either fixed or removable hard disk drives, which sounds like something that could be useful in your particular case.
  • omniplex likes this

#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 November 2014 - 09:50 AM

Well, to be fair, erwan.l (with some other peeps' help/suggestions) made a lot of work to allow installing Arsenal Image Mounter in XP (on the same already referenced thread), through his "side app", still it remains a tadbit "less friendly"/"more complicated" for a newcomer.

 

Maybe this could be the occasion to review and re-assemble all the related info in a dedicated thread thus making it easier for the XP user.

 

 

:duff:

Wonko 



#7 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1344 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 24 November 2014 - 11:13 AM

Well, to be fair, erwan.l (with some other peeps' help/suggestions) made a lot of work to allow installing Arsenal Image Mounter in XP (on the same already referenced thread), through his "side app", still it remains a tadbit "less friendly"/"more complicated" for a newcomer.
 
Maybe this could be the occasion to review and re-assemble all the related info in a dedicated thread thus making it easier for the XP user.


Yes, probably. I have received a few e-mails from people who got too "scared" from reading that thread to even try to install it on XP. All of them have been quite surprised when I explained that all they need to do is to download and run the Mount Tool or the stand-alone driver installer and run any of them. They install the driver and all .inf/workaround/quirks automagically. They all had the impression that it was a lot worse than that, particularly after reading through that thread that includes a lot of discussion about how to do the driver setup manually or with tools that don't require .NET 4.0.

Of course, it could be a problem if anyone really need to solve this without .NET 4.0, but at least none of those people have complained about that. Also, now when we have erwan's application without .NET requirements as well, it should be at least "doable" to install this thingy on XP too.

So, essentially, a FAQ thread similar to the ImDisk FAQ thread but for Arsenal Image Mounter could indeed be useful.

#8 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 24 November 2014 - 12:54 PM

I would second that : although not as friendly as Windows7, installing the Arsenal driver on XP computers, without using dotnet in my particular case, has proven to be "easy enough".

 

The Arsenal driver being a must have for me, it is worth doing some extra efforts when installing it.



#9 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 November 2014 - 12:59 PM

So, essentially, a FAQ thread similar to the ImDisk FAQ thread but for Arsenal Image Mounter could indeed be useful.

Yes, that is the idea. :thumbup:

 

 

 

I would second that : although not as friendly as Windows7, installing the Arsenal driver on XP computers, without using dotnet in my particular case, has proven to be "easy enough".

 

The issue is only about the related info (of course .NET is pure folly everywhere :w00t:, but particularly so on XP :whistling:,  and 4.0! :ph34r:) being a bit scattered around (though normal considering that it was posted little by little on a "development" thread) gives the impression to the newcomer of being more complex than it really is.

 

:duff:

Wonko



#10 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 25 November 2014 - 09:16 PM

I'm still working my way through the information and advice posted here and I thought I'd share some of the positive results seen thus far along with a few comments and questions I have too.

 

Initially I decided to focus my efforts on the mounting and detection of a VHD disk image created on a Windows 7 system as this is the fundamental problem as I see it after all.  My secondary objective is then to create an identical VHD on Windows XP.

 

So far, I have successfully mounted the .vhd file by installing Arsenal Image Mounter and the required .NET 4.0 framework library.

Despite the installation of AIM reporting an error, I was able to mount the .vhd which *is* detected by Disk Manager but unfortunately Rufus still fails to see the new device.

 

The error message box was titled "System.ComponentModel.Win32Exception" containing the message "Exception while enumerating disk drives".

 

The contents of the log file are shown below:







Device list view thread caught exception: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

at Arsenal.ImageMounter.IO.NativeFileIO.OpenFileHandle(String FileName, FileAccess DesiredAccess, FileShare ShareMode, FileMode CreationDisposition, Boolean Overlapped)

at Arsenal.ImageMounter.DiskStateParser._Lambda$__2(String drv)

at Arsenal.ImageMounter.DiskStateParser._Closure$__2._Lambda$__4(String drv)

at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()

at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()

at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)

at Arsenal.ImageMounter.DiskStateParser.GetDriveScsiIds(Byte portnumber)

at Arsenal.ImageMounter.DiskStateParser.GetSimpleView(Byte portnumber, List`1 deviceProperties)

at Arsenal.ImageMounter.MainForm.DeviceListRefreshThread()

 Maybe you could tell me if the above is relevant to why Rufus fails to detect the virtual device?

 

I too welcome a Arsenal Image Mounter FAQ for XP users.  I'd be particularly interested in learning how to perform an installation without the .NET framework.

 

I'd also like to ask how I can determine the specification of the VHD file I am currently using, specifically whether it is either fixed or dynamic along with any other pertinent parameters I need to know.  My thinking is that it could be useful when I want to create a similar VHD file in Windows XP to use with Rufus.  CloneDisk looks like the tool of choice for finding this information.  The trouble is I don't know enough about these yet to know what to look for, admittedly I have still to read the program help documentation.  

 

     



#11 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 25 November 2014 - 09:21 PM

In clonedisk 2.3, in the main window, double click on the virtual disk and copy paste informations here.

 

Will be a good start to understand the nature of your virtual disk.



#12 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 25 November 2014 - 09:55 PM

Sure thing. :)  Where can I download v2.3 from?  I can only seem to find v2.2.3 at present.  

 

Ah! I've just realised you are referring the the sub versions here, i.e., they are one and the same aren't they?


Edited by Nuvo, 25 November 2014 - 09:57 PM.


#13 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1344 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 25 November 2014 - 10:22 PM

I'm still working my way through the information and advice posted here and I thought I'd share some of the positive results seen thus far along with a few comments and questions I have too.
 
Initially I decided to focus my efforts on the mounting and detection of a VHD disk image created on a Windows 7 system as this is the fundamental problem as I see it after all.  My secondary objective is then to create an identical VHD on Windows XP.
 
So far, I have successfully mounted the .vhd file by installing Arsenal Image Mounter and the required .NET 4.0 framework library.
Despite the installation of AIM reporting an error, I was able to mount the .vhd which *is* detected by Disk Manager but unfortunately Rufus still fails to see the new device.
 
The error message box was titled "System.ComponentModel.Win32Exception" containing the message "Exception while enumerating disk drives".
 
The contents of the log file are shown below:

Device list view thread caught exception: System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified

at Arsenal.ImageMounter.IO.NativeFileIO.OpenFileHandle(String FileName, FileAccess DesiredAccess, FileShare ShareMode, FileMode CreationDisposition, Boolean Overlapped)

at Arsenal.ImageMounter.DiskStateParser._Lambda$__2(String drv)

at Arsenal.ImageMounter.DiskStateParser._Closure$__2._Lambda$__4(String drv)

at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()

at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()

at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)

at Arsenal.ImageMounter.DiskStateParser.GetDriveScsiIds(Byte portnumber)

at Arsenal.ImageMounter.DiskStateParser.GetSimpleView(Byte portnumber, List`1 deviceProperties)

at Arsenal.ImageMounter.MainForm.DeviceListRefreshThread()
 Maybe you could tell me if the above is relevant to why Rufus fails to detect the virtual device?


Probably not related. It is a strange error, it fails to open a handle for directly accessing a disk drive in a place where this application does not expect an error at all. It happens when the application tries to update the list that shows mounted devices and tries to connect each mounted virtual disk with physical disk drives enumerated by Windows. It uses such connections to show a little more information about each disk, but it has no effect otherwise. When I think about it, I could simply add some code to ignore errors in that scenario. Something for next release, probably!

But it surprises me that Rufus did not detect this virtual disk drive. I have not yet seen another example of an application that cannot use such virtual disk drives in the same way as physical disk drives.
 

I too welcome a Arsenal Image Mounter FAQ for XP users.  I'd be particularly interested in learning how to perform an installation without the .NET framework.


I guess that I and erwan need to build that FAQ together.
 

I'd also like to ask how I can determine the specification of the VHD file I am currently using, specifically whether it is either fixed or dynamic along with any other pertinent parameters I need to know.
My thinking is that it could be useful when I want to create a similar VHD file in Windows XP to use with Rufus.  CloneDisk looks like the tool of choice for finding this information.  The trouble is I don't know enough about these yet to know what to look for, admittedly I have still to read the program help documentation.


There are several ways. As an alternative to CloneDisk, you could also use DiscUtils command line tools. There is a tool called vhddump.exe that shows what you want to know. DiscUtils (with tools) require .NET though. Another way would be to use my devio.exe tool. You could type:
devio.exe -r shm:test C:\path\to\image.vhd
Then, devio will display a message if it detects dynamic VHD format. If that message is not displayed, it is a fixed VHD (or simply a raw image file or completely unknown format).

The devio.exe tool does not require .NET and runs on practically speaking all Windows versions without any other requirements than plain old Win32 API. There are also Linux and FreeBSD versions available of it in various places.

#14 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 25 November 2014 - 10:29 PM

Sure thing. :)  Where can I download v2.3 from?  I can only seem to find v2.2.3 at present.  

 

Ah! I've just realised you are referring the the sub versions here, i.e., they are one and the same aren't they?

 

latest on reboot.pro will do.



#15 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 25 November 2014 - 10:39 PM

@erwan.I,

                here you go. :)



->Drive Geometry

Cylinders / Heads / Sectors:522 / 255 / 63

BytesPerSector: 512

->Disk Length

Size: 4294967808 bytes, 4096 Mbytes

TotalSectors: 8388609

->Drive Layout

Style: MBR

PartitionCount: 4

DiskID: D807B

->Storage Property

Vendorid: Arsenal

ProductID: Virtual

ProductRev: 0001

Removeable:False

BusType:unknown


#16 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 26 November 2014 - 08:00 AM

 

@erwan.I,

                here you go. :)



->Drive Geometry

Cylinders / Heads / Sectors:522 / 255 / 63

BytesPerSector: 512

->Disk Length

Size: 4294967808 bytes, 4096 Mbytes

TotalSectors: 8388609

->Drive Layout

Style: MBR

PartitionCount: 4

DiskID: D807B

->Storage Property

Vendorid: Arsenal

ProductID: Virtual

ProductRev: 0001

Removeable:False

BusType:unknown

 

ok so far so good : correctly detected, right geometry, has mbr, disk id, etc...

 

now, select the disk, and on the right, under the disk section, click on "partition editor".

copy paste the screen shot here (i should make it so it can be copyed as text in the future...).

 

If all goes well, you should find 1 partition, with an offset like=32256, length=4294935552, type=0x7 and boot=true.

Or something very similar.



#17 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 26 November 2014 - 08:49 AM

Here is the mounted vhd partition details:

se0py0.png

Edited by Nuvo, 26 November 2014 - 08:50 AM.


#18 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 26 November 2014 - 08:56 AM

Here is the mounted vhd partition details:

se0py0.png

 

ok so far so good.

your disk is correctly detected and has a correct partition table.

 

at this stage i dont why this vhd would not be detected under xp but lets check one last part : the boot sector.

select the logical drive on your virtual disk.

 

see below how to.

 

xc5SjYJ.png



#19 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 26 November 2014 - 09:27 AM

Okay, here is a screen shot of the boot sector details:

 

w826at.jpg



#20 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 26 November 2014 - 11:21 AM

Okay, here is a screen shot of the boot sector details:
 
w826at.jpg


Everything looks OK and consistent.

The logical drive shows fine under Windows Explorer right?
Only rufus is now the issue correct?
And all screenshots above have been take on your troublesome windows xx?

#21 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 26 November 2014 - 11:28 AM

That's right, my answer is yes to each of your three questions.



#22 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 11:28 AM

Try using the given alternatives, it is really strange that Rufus does not detect the virtual disk.

 

Your current best choices to work on hard disk images would be either the Microsoft original VSS driver:

http://reboot.pro/to...storage-driver/

or (easier, GUI) the Kernsafe Total Mounter:

http://www.kernsafe....talmounter.aspx

 

 

 

Also, letting alone Rufus for the  moment, does the disk show in XP's Disk Manager, right?

 

From the screenshot of clonedisk you posted it seems like the volume on it was not given a drive letter, maybe Rufus uses the latter to detect the volume (and "hosting disk" :unsure:)

 

About "detecting" a fixed disk image (under the assumption that "if it is not fixed, then it is something else" ;)) you can simply open in a disk editor the last sector of the image.

If it is  the Conectix "footer" it is "fixed".

Or check the first sector, if it is NOT a MBR, then it is "not fixed".

 

 

:duff:

Wonko



#23 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 26 November 2014 - 11:38 AM

Try using the given alternatives, it is really strange that Rufus does not detect the virtual disk.


Also, letting alone Rufus for the moment, does the disk show in XP's Disk Manager, right?

From the screenshot of clonedisk you posted it seems like the volume on it was not given a drive letter, maybe Rufus uses the latter to detect the volume (and "hosting disk" :unsure:)

About "detecting" a fixed disk image (under the assumption that "if it is not fixed, then it is something else" ;)) you can simply open in a disk editor the last sector of the image.
If it is the Conectix "footer" it is "fixed".
Or check the first sector, if it is NOT a MBR, then it is "not fixed".


:duff:
Wonko

Looking at post #10, looks like xp disk management sees the disk fine.
Clonedisk uses the same Windows api to detect disks and partitions.

Seems rufus enumerating disks triggers on error within the dotnet part of arsenal.
Discutils maybe?

The missing logical drive name in latest clonedisk screenshots is indeed puzzling.

#24 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 12:43 PM

BUT, on second thought, wait a minute, what is actually meant by "Rufus does not detect"?

AFAICU/AFAICR Rufus ONLY "detects" USB devices intended as "target".

An image mounted through one of these drivers won't be attached to a USB bus (real or virtual).

 

:duff:

Wonko



#25 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1344 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 26 November 2014 - 12:52 PM

BUT, on second thought, wait a minute, what is actually meant by "Rufus does not detect"?
AFAICU/AFAICR Rufus ONLY "detects" USB devices intended as "target".
An image mounted through one of these drivers won't be attached to a USB bus (real or virtual).


That sounds like something that most probably explains what's happening and not happening.

If Rufus specifically looks for disks attached to USB buses, none of those virtual disk drivers discussed here will help. At least not in any way I am aware of.

But, if it simply looks for "removable hard disks" of some kind, attached to any bus, even to a standard SCSI bus, then the new "removable disk" feature in latest Arsenal Image Mounter could possibly help. But I am not entirely sure.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users