Jump to content











Photo
- - - - -

Specific VHD creation and mounting problems.


  • Please log in to reply
69 replies to this topic

#26 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 26 November 2014 - 01:19 PM

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" )

The vhd is assigned a volume label which can been seen in XP's Explorer and Disk Manager, Clone Disk clears the Logical Drive field when taking a screenshot via the Tools menu.
 

 

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".

Using a file hex editor, the string "AKEO" pertaining to Rufus can be been seen in the header and the
"conectix" string in the footer, so that conflictingly suggests(to me at least), that it is both fixed
and not fixed at the same time. I'll try deleting the conectix sector to covert the file from RAW to VHD to see if this helps me.
 

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).

Creating a bootable virtual disk in Rufus can be achieved in Windows 7 at least, by clicking on the "Format Options" button and then enabling the "List USB Hard Drives" checkbox under Advanced Settings.



#27 erwan.l

erwan.l

    Gold Member

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

Posted 26 November 2014 - 01:23 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

 

 

good point indeed !

 

thus under windows 7, my virtual disk (mounted thru ms virtual disk apis) is detected by rufus (when my fixed drive and sd/mmc drive are not).



#28 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 26 November 2014 - 01:26 PM

good point indeed !

 

thus under windows 7, my virtual disk (mounted thru ms virtual disk apis) is detected by rufus (when my fixed drive and sd/mmc drive are not).

 

Virtual Disk API in Windows 7 does not emulate USB disks, though. It uses a storport based virtual SCSI miniport and attaches "removable hard disks" to that adapter. Pretty much like how Arsenal Image Mounter does when the new "removable" mount option is in use.

 

So with this in mind, there is still a chance that an Arsenal Image Mounter virtual disk mounted in "removable" mode could be detected by Rufus.



#29 erwan.l

erwan.l

    Gold Member

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

Posted 26 November 2014 - 01:26 PM

The vhd is assigned a volume label which can been seen in XP's Explorer and Disk Manager, Clone Disk clears the Logical Drive field when taking a screenshot via the Tools menu.
 

Using a file hex editor, the string "AKEO" pertaining to Rufus can be been seen in the header and the
"conectix" string in the footer, so that conflictingly suggests(to me at least), that it is both fixed
and not fixed at the same time. I'll try deleting the conectix sector to covert the file from RAW to VHD to see if this helps me.
 

Creating a bootable virtual disk in Rufus can be achieved in Windows 7 at least, by clicking on the "Format Options" button and then enabling the "List USB Hard Drives" checkbox under Advanced Settings.

 

Just to be sure I understand what you are trying to achieve : are you willing to write an iso to a virtual disk just like you would do with a USB key?

 

If so, I am not sure you can do that (but may be wrong) and I am not sure the resulting disk will be valid?

Guys like Wonko probably know much better than me here.



#30 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 01:29 PM

Creating a bootable virtual disk in Rufus can be achieved in Windows 7 at least, by clicking on the "Format Options" button and then enabling the "List USB Hard Drives" checkbox under Advanced Settings.

Well, then you'd better talk to Akeo about the "issue" (or "feature") here:

http://reboot.pro/to...-been-released/

I don't think (but cannot really say) that a .vhd on Windows 7 is "USB connected" :unsure:, it is possible that under the "List USB Hard Drives" checkbox Rufus has a "special detection" that works for the Windows 7 "native" driver only :unsure:.

https://github.com/p..._use_with_Rufus

 

To "reassure" somehow Olof ;), on my XP a .img/.vhd mounted in Total Mounter (and accessible in disk management and partitioned/formatted and having a drive letter assigned) is not seen in Rufus (with or without the hard disk checkbox set), so this is not strictly related to Arsenal Image Mounter.

(and Total Mounter seemingly mounts the image as "fixed" device)

 

:duff:

Wonko



#31 erwan.l

erwan.l

    Gold Member

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

Posted 26 November 2014 - 01:29 PM

Virtual Disk API in Windows 7 does not emulate USB disks, though. It uses a storport based virtual SCSI miniport and attaches "removable hard disks" to that adapter. Pretty much like how Arsenal Image Mounter does when the new "removable" mount option is in use.

 

So with this in mind, there is still a chance that an Arsenal Image Mounter virtual disk mounted in "removable" mode could be detected by Rufus.

 

Just tried with Arsenal under Win7 : rufus does not see my virtual drive (when it does with a ms virtual drive).

I may not have the latest arsenal driver thus : would this make a difference?

 

I shall add : Rufus does not need to tick "list usb drives" to see my MS virtual drive.

Ticking this option with Arsenal does not make a difference.

 

EDIT:

updated to latest Arsenal driver (from Nov 1, 2014) : still does not show under Rufus.

I used the removable bit in the Arsenal Mount Tool : no difference even when combining with "list usb" in Rufus.

 

As Wonko mentionned, this discussion may have to be taken to Aeko now.



#32 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 26 November 2014 - 01:32 PM

Just to be sure I understand what you are trying to achieve : are you willing to write an iso to a virtual disk just like you would do with a USB key?

Yes that's exacly what I want to do.

If so, I am not sure you can do that (but may be wrong) and I am not sure the resulting disk will be valid?
Guys like Wonko probably know much better than me here.

It works perfectly running Windows 7, my main goal is to do exactly the same running an XP system.

#33 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 26 November 2014 - 01:36 PM

Just tried with Arsenal under Win7 : rufus does not see my virtual drive (when it does with a ms virtual drive).
I may not have the latest arsenal driver thus : would this make a difference?


The difference here is that with latest version of Arsenal Image Mounter you could mount in "removable" mode. Such virtual disks show as removable disks in Disk Management, they get an "eject" option in Disk Management context menu etc.

#34 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 26 November 2014 - 01:41 PM

Thank you gentlemen. I wasn't aware Akeo was active on this forum. I'll direct him to this thread to get his opinion on this issue. :)

Edited by Nuvo, 26 November 2014 - 01:52 PM.


#35 erwan.l

erwan.l

    Gold Member

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

Posted 26 November 2014 - 01:44 PM

The difference here is that with latest version of Arsenal Image Mounter you could mount in "removable" mode. Such virtual disks show as removable disks in Disk Management, they get an "eject" option in Disk Management context menu etc.

 

Hi Olof,

 

I updated my previous post : tried with the latest version and Arsenal Mount Tool enabling the removable bit.

Still no success.

 

MS Disk Management and CloneDisk sees the drive fine (removable or not) but not Rufus.

There is still a difference between a MS Virtual Disk and a Arsenal Virtual Disk.

 

Thus I must say I am surprised Rufus detects the MS Virtual Disk (but not my other disks fixed or removable).



#36 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 26 November 2014 - 01:46 PM

Hi Olof,
 
I updated my previous post : tried with the latest version and Arsenal Mount Tool enabling the removable bit.
Still no success.
 
MS Disk Management and CloneDisk sees the drive fine (removable or not) but not Rufus.
There is still a difference between a MS Virtual Disk and a Arsenal Virtual Disk.


Yes, there must be something. It would be really interesting to find out what that could be.

#37 Akeo

Akeo

    Frequent Member

  • Developer
  • 303 posts
  •  
    Ireland

Posted 26 November 2014 - 03:07 PM

Ok, a few points:

  1. If you have an issue with Rufus, please try to use the github issue tracker (a link for which is provided in the "About" dialog) first and foremost. This is the main place to ask for support, as I will get e-mail notifications for any new issue created, whereas, if you create a new thread here or on another forum, I'm unlikely to see it: As much as I'd like to, I don't really have the time to browse reboot.pro or other user forums that much.
    I do tend to reply to github tracker issues within 24 hours and furthermore, I also have plastered direct means of contact (e-mail) all over the place in the app as well as the homepage, so if you feel like you're not getting anywhere with an issue, you can aslo try to send an e-mail.
    I'll try not to bite, I promise!
     
  2. While I understand that not everyone here is a coder, it does sadden me a bit that, when an application is 100% Open Source, people are still spending a lot of time trying to take wild guesses with regards to a specific behaviour, while some investigative work with the source could probably provide a fairly solid answer relatively quickly. Granted, navigating a large amount of code written by someone else can be tricky, but that's also the part where trying to asking the developer directly can help.
    In this case, I will surmise that what everyone is looking for is with in the 2 following lines of code from the application: https://github.com/p...usb.c#L116-L117.
     
  3. From this section of code, this whole thread can be collapsed into a single question:

    What do you see in Device Manager when your VHD device is mounted on XP?

    If you don't see the VHD listed as either "Microsoft Virtual Disk" or "Msft Virtual Disk", as in the screenshot below, then it's unlikely to be listed in Rufus:

    R0n9x8v.png
     
  4. Finally, for those who might wonder on why Rufus is restrictive about the disks it lists, I'm gonna pointout that one of the prime design goals of Rufus is to make it very hard for people to lose data, either by accident, or through an application bug. This means that, when listing anything non-USB, Rufus is set to work on an very strict exception basis, to avoid mistakenly granting access to an internal drive with valuable data.

    Now of course, if you can tell under which name the software/driver you use on XP lists VHDs, I can try to add an exception for it in a future version. ;)


#38 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 26 November 2014 - 03:36 PM

Ok, a few points:

While I understand that not everyone here is a coder, it does sadden me a bit that, when an application is 100% Open Source, people are still spending a lot of time trying to take wild guesses with regards to a specific behaviour, while some investigative work with the source could probably provide a fairly solid answer relatively quickly. Granted, navigating a large amount of code written by someone else can be tricky, but that's also the part where trying to asking the developer directly can help.


I generally agree and feel the same way sometimes. But it should also be said that it could take quite some time to dive into some source code that one have never seen before and try to find out exactly where the interesting parts for a particular matter is located. And why it is done in the way it is done. The time for that is not always less than time for trying to find out how an application handles something using a more "test-case" or "reverse engineering" approach. Although I personally usually like to do both that and try to browse through the source code.
 

In this case, I will surmise that what everyone is looking for is with in the 2 following lines of code from the application: https://github.com/p...usb.c#L116-L117.


Great. That's exactly what I wanted to know! Thanks!

:cheers:

I found that you used setup API to enumerate disks and filtered in some way, but for some reason missed the name filtering part. I didn't have enough time right now to do more code research than that. Any code that uses setup API tends to look rather complicated and takes some time to follow.

But then, one question remains. That is, why didn't the Virtual Server vhdmount approach work with Rufus? Or did Nuvo never try that? Or are they named something other than "Msft Virtual Disk" for some reason? :dubbio: Needs to be checked!

#39 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 03:56 PM

Ok, a few points :ph34r::

  1. reboot.pro is intended (or was intended) to be a Community where people can exchange ideas, informations and opinions (including wild or not wild guesses), possibly on a "same dignity base" and in a friendly manner between developers, non-developers, coders, non-coders, long time experts and complete newbies, should you be too busy to take part to it, there are no issues, it is clear that asking for support for your tool is to be done through the means you specified, though as an one time exception it seems like my suggestion to post on the Rufus topic worked fine enough, since you replied swiftly.
  2. It seems like, while not being a coder, my guess was a rather educated one (and not at all "wild").
  3. the way you hardcoded those virtual driver names is IMHO perfectly fine - but - if I may - provided that they are "seen" only when the checkbox for "List USB hard drives" is checked, is far from "intuitive"
  4. finally, noone ever even doubted your dedication to preserve other people's data and attempt to avoid them commit mistakes, but really, it is not like all other developers/coders or "common people" around are crazy mindless bastards and you are the only one caring for this. (the fact that I personally am a grumpy old bastard doesn't necessarily mean that I am also crazy, nor mindless)

 

OK, so I did bite. :ranting2:

 

Now, if we can go back to normal ideas exchanges:

 

 

Now of course, if you can tell under which name the software/driver you use on XP lists VHDs, I can try to add an exception for it in a future version.  ;)

 

 

 it would IMHO be easier/less work for you if you could add *somewhere* (like in a checkbox or a .ini or *whatever*) an option like "Reserved for reckless crazy bastards" :whistling:, possibly password protected with "YESIWANTTORISKMYBYTES" where it would be possible to add a virtual disk driver name (as seen in Device Managerment).

 

JFYI, Kernsafe Total Mounter is seen as "Kernsafe Virtual SCSI Disk Device" .

I will post the one for the MS VSS driver as soon as I can reboot.

In the .inf file there is:

 

[Strings]

; *******Localizable Strings*******
MSFT= "Microsoft"
StdMfg = "(Standard system devices)"
DiskId1 = "Virtual Storage Installation Disk"
VirtualBus.DeviceDesc = "Virtual Storage"
VirtualBus.SVCDESC = "Virtual Storage"

 

 

:duff:

Wonko



#40 Akeo

Akeo

    Frequent Member

  • Developer
  • 303 posts
  •  
    Ireland

Posted 26 November 2014 - 04:22 PM

  1. I get e-mail notifications on a couple of reboot.pro threads, but I wouldn't consider that the best place to report issues with Rufus when there exists a proper issue tracker.
  2. Please bear in mind that you aren't the only one who posted guesses. As such, some are wilder than others. I'm actually a bit surprised that you are taking my earlier reply personally, as I was commenting on the thread as a whole (which, as far as I am concerned, seems awfully long, with a lot of time and effort vested in by many people, whereas I feel this could have been avoided by using the expected reporting channel for the app).
  3. I'm afraid that that's a wrong guess. Rufus does lists VHDs regardless of whether the "List USB Hard Drives" option is checked.
  4. Better try to overclarify something, than leave doubts, but point taken.

As to your suggestion for an "advanced user" options, there are a bunch of cheat modes, but the problem, really, is striking the balance. While some may think that the application is skewed towards non-power users, you'd be surprised by the requests I also receive from that side, especially when someone still managed to format a drive by mistake. For instance I was recently asked for Rufus not list any drives by default, unless the user deliberately authorized them... Trying to satisfy everyone is a losing game.

 

Also, please bear in mind that adding a seemingly innocuous feature may be anything but innocuous, and even more so if it deals with the UI, as I then have to rally 30+ translators to update their translation.

 

Anyway, I truly respect and appreciate your relentless willingness to help the people coming to reboot.pro for help, so if what I wrote earlier offended you in any way, I sincerely apologize.



#41 erwan.l

erwan.l

    Gold Member

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

Posted 26 November 2014 - 04:29 PM

Nice discussion :)

 

As far I am concerned, I consider myself as a bastard and thefeore tend to consider everybody else equally :)

Of course, I am everything but an example to follow...

 

That being said, now we know why the MS Virtual Disk is listed by Rufus : it is designed that way !



#42 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 06:04 PM

@Akeo

Rest assured, no offence taken personally :), just wanted to make some points.

 

@erwan.l

That is the idea, basically we are all bastards (or non-bastards doesn't really matters) in our own, specific, personal and peculiar way, but we are all together on the same boat and we'd better all row in the same direction if we want to get somewhere ;).

 

@All

The MS VSS drivers is seemingly (not-unexpectedly since it comes directly out of the mouth of the wolf :whistling:) a "strange beast".

 

UNLIKE the Kernsafe driver that has it's "own name" in Device Manager and is attached under the SCSI bus, i.e. 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_KernSafe&Prod_Virtual&Rev_1.50

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_KernSafe&Prod_Virtual&Rev_1.50\2&185905ec&4&020

and has in the latter a "FriendlyName=KernSafe Virtual SCSI Disk Device" REG_SZ, which I presume is the string used.

the MS driver has it's own bus, i.e.:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\VirtualBus\GenDisk

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\VirtualBus\GenDisk\{f0fb1a5e-758f-11e4-b08f-001fc6bb76ce}

and it is a "Gendisk" and by default has not a "friendly name".

 

The net result is that (on my Italian system) it is shown "generically" as "Unità disco" (under the "Unità disco" node corresponding to "Disk Drives").

 

See the attached screenshots.

 

:duff:

Wonko

Attached Thumbnails

  • VSSandKernsafe.jpg
  • VSSandKernsafebyconnection.jpg


#43 Nuvo

Nuvo

    Member

  • Members
  • 34 posts
  •  
    Scotland

Posted 26 November 2014 - 06:11 PM

But then, one question remains. That is, why didn't the Virtual Server vhdmount approach work with Rufus? Or did Nuvo never try that? Or are they named something other than "Msft Virtual Disk" for some reason? :dubbio: Needs to be checked!

I did indeed try this using the vhdmount command line tool but I got the following message:
"Error: Fails to to plug in the VHD process cannot access the VHD access the VHD because it is use by another process".
I'll recheck this and report back.

edit #1:
Rebooting the system and opening a CLI window, I entered and see the following:

G:\VHDTEST\MicrosoftVirtualServer\Vhdmount>vhdmount /p /f WinXPHomeQFE2014_4GB.vhd Failed to plug in the Virtual Hard Disk.
 

 

edit #2:

Right, I now realise that I needed to run vssrvc (Microsoft Virtual Server 2005 R2 SP1 service) first and vhdmount is now able to attach the vhd file.

jq5g6e.png

Rufus still doesn't show this virtual device however.

 

 


Edited by Nuvo, 26 November 2014 - 07:08 PM.


#44 erwan.l

erwan.l

    Gold Member

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

Posted 26 November 2014 - 06:45 PM

side note : I see that one of the questions that was often asked in the first posts of this thread was "was sort of VHD  : fixed/dynamic/differencing".

 

In latest clonedisk version 2.3 (x32 only for now), one can get basic information from the VHD.

That version is available thru reboot.pro download section or in my signature.

Note that I dont use MS virtual disk API so that this will work on any windows version (like XP).

 

svtv9xK.png



#45 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 07:18 PM

OK.
 
Changing in the Registry in key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\Disk&Ven_KernSafe&Prod_Virtual&Rev_1.65\2&185905ec&5&010
the value from:
FriendlyName=KernSafe Virtual SCSI Disk Device
to:
FriendlyName=Microsoft Virtual Disk
 
Makes the disk image mounted in Total Mounter (not necessarily a .vhd, a RAW image in my case) "visible" in Rufus alright. :thumbsup:
 
And now, for NO apparent reason:

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

:smiling9:

:duff:
Wonko

#46 Akeo

Akeo

    Frequent Member

  • Developer
  • 303 posts
  •  
    Ireland

Posted 26 November 2014 - 07:44 PM

Thanks.

Rufus does indeed use the Friendly Name to try to figure out if the drive is a VHD, so I guess I'll add "Kernsafe Virtual SCSI Disk Device" and "MS Virtual Server SCSI Disk Device" as virtual device names in the next version (#407).

But I'm not gonna touch anything that's being presented as generic, even with a 10 foot pole.
I also don't have any plans to handle VHD with anything but the friendly name, as it pretty much would only matter for OSes that don't have native VHD handling, namely Windows "WILL-YOU-DIE-ALREADY" XP. :raygun:



#47 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 07:57 PM

... I'll add "Kernsafe Virtual SCSI Disk Device" and "MS Virtual Server SCSI Disk Device" as virtual device names in the next version

Please do wait until Olof (or someone else) checks/provides the Arsenal Image Mounter friendly name...
 

But I'm not gonna touch anything that's being presented as generic, even with a 10 foot pole.

Sure :), too bad for the otherwise handy "MS VSS driver" :(.

Should you, in case of real emergency need one, I still have a couple ones available ;):
http://www.msfn.org/...xp/#entry807225

:duff:
Wonko



#48 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 26 November 2014 - 08:45 PM

Hm. Bad news. There is no "Friendly Name" for Arsenal Image Mounter virtual disks. I wonder how those names are set up really. Is it simply something in the .inf file? Or is it something that the miniport driver needs to respond to with some data, like when it respond what kind of device, manufacturer etc an attached SCSI device is? I guess I need to do some research on this matter.

 

AIMXP.PNG



#49 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 26 November 2014 - 09:00 PM

Maybe it is "DeviceDesc" that is used "automagically" if NO "Friendlyname is found"? :unsure:

Or, the other way round, maybe "FriendlyName" - if present - overrides DeviceDesc"? :dubbio:

 

:duff:

Wonko



#50 erwan.l

erwan.l

    Gold Member

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

Posted 26 November 2014 - 09:03 PM

See below the productid & vendorid I get using IOCTL_STORAGE_QUERY_PROPERTY which seems to match SPDRP_FRIENDLYNAME used by the setupapi from Rufus code.

 

fQTBekY.png






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users