Jump to content











Photo
- - - - -

Can imdisk mount an image as virtual UFD?


  • Please log in to reply
9 replies to this topic

#1 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 23 March 2012 - 01:43 PM

I only use the most basic features of IMDISK - to mount some volume image as removable.

Using IMDISK (either by its applet or by the command line), is there some way to mount a raw volume image and that then Windows would "identify" it as UFD (or alternatively, as a volume of a USB drive)?

Maybe the image needs to have some specific characteristic so to achieve the goal (like some MBR / offset, for example)?

In case it is indeed plausible, is it possible to achieve this only with an image file, or would a ram-based disk be also a possibility?

Or maybe I'd need some additional tool to work together with IMDISK?

For what I've been reading, ISTM IMDISK is (will) NOT (be) able to perform this type of action ("virtual UFD"), but I'd like to confirm this, before I try some other alternative tool (suggestions?)
.
If indeed IMDISK is not able to do this, is there any "relatively-simple" (freeware for personal use, or similarly licensed) tool, compatible with Windows v6.x ? Or any suggestion on how to achieve this goal?

TIA.

#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 23 March 2012 - 04:54 PM

If indeed IMDISK is not able to do this, is there any "relatively-simple" (freeware for personal use, or similarly licensed) tool, compatible with Windows v6.x ? Or any suggestion on how to achieve this goal?

More generally IMDISK does not "fully" emulate a disk, so no way to emulate "fully" a partitioned UFD.
About "emulating" a volume on USB disk it won't work as well, in the sense that it will "emulate" the volume but obviously NOT the "chain of drivers" (USBHUB, USBSTOR, etc.).
If you could specify the scope (as opposed to the way you think you should reach it) maybe you coould get some alterntive suggestions.

:cheers:
Wonko

#3 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 23 March 2012 - 06:58 PM

Thanks. I originally wasn't sure I understood it correctly. You are confirming what I thought.

About the scope, I'm not sure how to answer. With IMDISK I can mount an image as a volume and Windows Explorer will see the drive correctly. Sometimes I'd like to try some UFD-related tool (I mean, to try the tool itself, maybe more than testing the resulting UFD; so this topic is not related to booting with UFDs or more complicated matters, but about emulating a virtual USB disk/drive/volume). Some tools will accept the IMDISK volume as target, but some tools will only identify / accept a target if it is seen as connected by USB. Whether such tool accepts simple flash drives or other types of USB drives would be another issue, possibly to be considered only after I can find a method (tool?) being able to emulate the first "virtual UFD" requirement.

I've been searching and reading, about some "VSS driver" or something alike ( http://reboot.pro/6492/ ) , but I wasn't capable of understanding what I should actually do to actually mount an image as connected by USB. Additionally, that topic seems to be related to XP and previous Windows versions. In case I would decide to try this method (driver?), I am not sure if I should download the updated version of Windows SDK (compatible with Windows 6.x), and try to find in it the "equivalent" files mentioned in that topic. But even in such case, then what...? :dubbio:

I also read about other tools (filedisk, freeotfe, VFD, TotalMounter, GizmoDrive and even more). I read about them, visit their websites, but I can't find a clear answer as to whether they are able to achieve my goal. Some of the tools I read about (which I didn't mention here) are not clear enough for my knowledge, and/or some tools/methods talk about virtual CD's or virtual volumes in general (not specifically about virtual USB disk/drive/volume).

I'd like to avoid downloading, installing and learning each one of those tools just to find out IF they are able to achieve the final goal or not.

Since the first answer to this topic is that IMDISK seems indeed unable to achieve my goal (as I was already suspecting), I wonder now if I should open a new topic in some other section of the forum (and in such case, where) and repeat or clarify my goal, or maybe one (or two?) additional suggestions here would be enough so to point me in the right direction.

Thanks in advance for any suggestions that Olof or anyone else could provide.

#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 23 March 2012 - 07:28 PM

It seems to me like you are missing some aspects.
In a nutshell it's posted here:
http://reboot.pro/11642/page__st__40

There is a known issue with terminology, to me a DISK is the "whole" thing and the drive (or partition or volume or superfloppy) are only parts of it.
  • VSS is a driver that uses "whole" disk images and mounts them at the "lowest possible" level
  • VDK is a driver that uses "whole" disk images (though it can also map "drives") and mounts them in an "intermediate" level
  • IMDISK is a driver that can use "whole" disk images BUT discards the MBR and hidden sectors and mounts just the "drives" or "vvolumes", thus at a "higher level"

Examples:
  • VSS shows "new hardware connected" and allow diskpart and mount manager to interact with the virtual device (diskpart and mountvol are working)
  • VDK does not show "new hardware connected" and and does not allow diskpart to interact with the virtual device but allows mount manager to interact with it (diskpart doesn't work but mountvol does)
  • IMDISK is not even "connected" to mount manager (both diskpart and mountvol don't work)

Cannot say about new (post XP/2003 version of the VSS drivers).

What you can try are WinVblock and Firadisk and also the driver that comes with the nice tool Total Mounter:
http://reboot.pro/15170/
that should provide the same "low level" connection as the VSS drivers (or even better - kernel driver).

BUT none of the above will allow you to actually "emulate" a USB device., as the driver will anyway be connected NOT to the USB bus.

What you are looking for is seemingly a "Virtual USB Bus" and/or a "Virtual USB Mass Storage device" something that none of the above are or can be.
This illustrates the above quite well:
http://www.intellidr...Technology.html

If the USB tool looks for a "drive" (or "volume" or "partiton") any of the above will do.
If the USB tool looks for a "disk" ("whole" disk or "partitioned media") most if not all of the above - with the exception of IMDISK will do.

BUT IF the USB tool looks to the way the disk is connected (USB bus, USBSTOR drivers, etc. and/or corresponding Registry keys) none of the above will work (and this is where Virtual Machines may come handy, though introducing possibly other limtiations/issues)

A nice tool, useful as an example of a tool that will need a physical USB device is Chipgenius:
http://reboot.pro/4661/

:cheers:
Wonko

#5 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 23 March 2012 - 11:22 PM

OK, thanks for all the info and links. I'll take a look at them.

Since I'm not the developer of any USB-related tool (and not a developer at all), I have no idea about which of such USB-related tools would work with, say, VFD (or with VSS, in case I can eventually manage to understand how to use it and in case it results compatible with Windows 6.x).

I know about some USB-related tools that already accept an IMDISK volume, but the ones that won't, may or may not work with some of the drivers you mentioned. This means that I would need to learn how to use one of those "virtual drivers", download it, install it, try / test some USB-related tools (that are not accepting an IMDISK mounted volume), and move on to the next "virtual driver" to keep testing. According to what you posted, there might also be a possibility that some USB-related tool(s) won't recognize / accept any of those "virtual drivers" :( (Here I'm not using the correct complete terminology, but I think the intention / meaning of the paragraph is understandable anyway, considering the context / topic. If something is not clear, please let me know and I'll try to clarify / re-word it).

About the VM possibility, it seems "too much" to have a complete VM (disk space, guest OS, virtual USB port, install USB-related tools and other additional resources), just to play around with USB-related utilities :dubbio: . Since I have no concrete / specific final goal (other than to play around with USB-related tools, and maybe learn a couple of new things), I'll have to consider if all / any of these possibilities is worth the effort / resources.

I'm open to any additional suggestions, or additional tips about where to start, from all those options so to ease the path or narrow down the possible drivers to try/test (maybe already discarding the ones that won't add anything new, or won't work under Windows 6.x). In the mean time, I'm going to take a look at those links you already posted. Thank you very much.


@ Olof,

Since IMDISK was already "emulating" a CD/DVD and/or a (super)floppy volume, I thought that, maybe, emulating a USB volume was also possible. Since IMDISK is not really emulating the 'device' (CD/DVD/floppy), I guess I should write the previous sentence as "IMDISK was almost emulating a CD/DVD/floppy, since it's not the 'device' but a 'volume' that is emulated, for Windows Explorer". I apologize if I caused any confusion to any user of IMDISK.

#6 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 March 2012 - 06:51 PM

This should be more like the something you are asking for:
http://msdn.microsof...1(v=vs.85).aspx


Though it seems like I cannot find any "user level" app/driver/tool/utility using this approach, seemingly the WDK contains samples that may be enough for your scopes.
http://msdn.microsof...7(v=vs.85).aspx

Here there is a .ppt that may be of help (or completely fail to):
http://download.micr...dev098_wh06.ppt

And a .doc that may actually be of some (minimal) help:
http://tucc.us/docs/simDevGuide.doc

:cheers:
Wonko

#7 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 25 March 2012 - 12:35 AM

Thanks again for the info and links. I've been reading them and trying to understand what parts are relevant and important to me (which means, for me, reading them more than once).

About the "user" type of app, I have found the relevant info for the current WDK (knowledge, requirements...) so to develop one, but I'm not a developer :(. I'm a little bit surprised that no dev here in reboot.pro have taken the challenge (just for the USB storage type of simulation). So I hope the samples in the WDK would suffice.


I was in my way to try the VSS method for the latest "Windows and .net framework SDK" (x86, v7.1). I downloaded the complete x86 iso DVD. I was able to find two vstorcontrol.exe (and two of each of the rest of the files needed), so I wasn't sure which files to extract and use :dubbio: .

The "same" iso I downloaded is the one containing the WDK ("SDK") mentioned in the last document you linked to. Well, not exactly the same. As with the info I found for VSS, that doc references older versions of the SDK, so I am trying to "translate" it to newer versions. For example I am guessing that the old "runtime" references now is the "redistributable" ("redis") installer :dubbio: (am I guessing correctly?).

Also, some sections that were in the past included in previous SDKs, now are no longer included by default. So currently it seems that I'll have to install many unneeded (by me) files / packages of the WDK just to find out and use a little subset, and maybe I'll still need to download and install even more (that is not included in the original WDK 7.1).

If anyone can help me narrow down the really needed sections of the WDK 7.1 that I really need to install so to accomplish this goal (simulate a USB storage device using WDK), it would help me a lot (specially when I am not a developer, so, sometimes, understanding the jargon of all the documents is not an easy task for me). If I could know which "individual" files to extract, instead of installing whole (msi) packages, even better (but if not, at least the current name of the packages I really need to install would already reduce waste). I indeed understand that this request may need some previous experience with the current WDK, but I have no idea if this kind of knowledge is something common or frequent here in the forum, or if rather this is a very specific case.

In addition, are my current guesses correct? (And, although it seems I won't need it for this after all, is there any way for me to identify the "correct" vstorcontrol.exe and the rest of the files for the VSS method in WDK 7.1, in case I want to extract them too?)

Hopefully, with help, I will eventually be able to simulate a USB drive/disk/volume. I appreciate any additional info.

#8 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 25 March 2012 - 11:28 AM

If you could provide "exact" references instead of the usual "current", "latest", "old", previous", etc. including actual links and/or .iso/whatever filenames it would really help :), there is so much confusion on the WDK, SDK and the like.
Compare the info you just posted with the ones provided in the thread you originally referenced:
http://reboot.pro/6492/

You might see how what was posted there is "reproducible", whilst your info imply lots of guessing.

:cheers:
Wonko

#9 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 25 March 2012 - 07:00 PM

Well, I actually took the relevant links and info from those topics you linked to (in addition to my own searches, but the files and tools are the same referenced there).

Windows Development Kit (x86) v7.1 : http://www.microsoft...lang=en&id=8442

( CRC32: BD8F1237 )

where two "vstorcontrol.exe" files can be found at (or extracted from) :

_ WinSDKWin32Tools -> cab1.cab -> "WinSDK_vstorcontrol_exe_7B47EEB5_8790_4D3D_A93A_F027305A74F8_x86" (82KB)
_ WinSDKWin32Tools -> cab1.cab -> "WinSDK_vstorcontrol_exe_8944EA97_A5A4_4508_8B59_963683A75F83_x86" (57KB)

and similar "double" (but different) files (like the dll files originally mentioned in the original VSS-related topics here in the forum). I could try all possible combinations, but I'm not sure if I would know how to identify which combination of files is really working correctly for the VSS method.

Regarding my "runtime" comment, the last document you linked to mentions a "DSFx86runtime.msi" installer (so to extract files from it, or to install the component, or to run a command line...), but that's relevant for older SDK versions (SDKs for XP/2003 and in some cases even for Vista, but not for WDK v7.1 ). Since other files from MS used to be labeled as "runtime", and now, for newer versions or their replacements, are called "redistributable", then I am guessing the "translated" installer for WDK 7.1 (x86) is the one named "WinSDKRedist...". But that's just a guess, and there are other installers that may be the ones actually containing the "equivalent" files I should be looking for.

For other installers mentioned in that document (so to eventually simulate a USB volume), I am unable to guess (much less, identify) the exact "equivalent" installer.

Moreover, the same document you linked to also mentions the need to install samples (included in older versions of SDKs, like the ones referenced also in the topics you already linked to), but I don't know if the samples needed are included in the iso I downloaded. One reason for my doubt in this regard is the "Release Notes" of the WDK 7.1 ( http://download.micr...in7_1RTMSDK.Htm , relevant to the WDK I downloaded):

What’s Been Removed?
...Documentation... ...Managed Samples... ...Tools...


Also from the same Release Notes:

Cleaner setup: features on setup screens have been grouped into native, managed, and common buckets to help you choose the components you need faster.


So, since the components are grouped and named differently from previous versions of SDK (previous versions like the ones referenced in that document you linked to and in the relevant topics here in the forum), I am unable to "translate" which components of the WDK 7.1 to install. If I could at least identify which components to install, then I'd need to identify the new exact files, previously referenced in the documents and topics (if they have similar names, hoping only one similarly named file would be actually installed; not two).

It seems I will need to install entire WDK components, as opposed to extract individual files. The relevant components to be installed are "mentioned" in the document you linked to, but with the older names / groups. So if at least someone could point me to the "correct and current" components I need to install from WDK x86 7.1 (which names and groups are different than in older SDK versions), it would help me a lot in narrowing down the whole procedure.

I'll try to list (and then post here) the "older" components/installers referenced in the document, so maybe someone here could "translate" for me the list into the new components (for WDK v7.1 ). In the mean time, if someone already knows them (or if someone is curious about the subject and reads the document you linked to, "simDevGuide.doc"), I appreciate every tip.

If I wasn't clear, or some link still needs to be posted, please let me know.

TIA.

#10 ady

ady

    Frequent Member

  • Advanced user
  • 161 posts

Posted 26 March 2012 - 02:04 PM

OK, here's the list / steps, which I still need to "translate" to the names / components / paths used in WDK 7.1 (x86).

1. Installing the Simulated USB Controller.
1.1 Install DSFx86runtime.msi
1.2. In cmd, type cd “C:\Program Files\dsf\softehci”
1.3. Type "softehcicfg /install".

2. Installing the WDK Build Environment and DSF Sample Code.
2.1. Insert WDK CD, Custom Setup window, expand Microsoft Windows Drivers Kit, expand "Driver Development Kit", and set "Build Environment" to "Entire feature will be installed on local hard drive".
2.2. Set Device Simulation Framework to "Will be installed on local hard drive".
2.3. Click Next and finish the installation.

3. Samples.
3.1 By default, the sample source code installs to c:\WinDDK\buildNumber\src\Test\DSF\USB. To build the samples, from the Windows Start menu, click All Programs, click Windows Driver Kits, click WDK, click Build Environments, click Windows Vista and Windows Server Longhorn, and click the build environment for your computer’s architecture.
3.2 At the build command prompt, type "cd src\Test\DSF\USB". Then type "build -cZP".

The available samples include a HID keyboard, a USB External HUB, a Bulk Loopback device, a USB Streaming Audio, and some technical "bla-bla" about "SoftUSBDevice".

For developers, the whole jargon might be understandable, but I was not able to find something like "USB Storage" device or similar in the document (I don't need to simulate a keyboard nor Audio devices, but a storage device).

I'd need to "translate" the above references / list to something I can install from WDK v7.1, and then find out how to simulate a USB storage device. Although I could try with the first part, the "USB storage device" seems over my knowledge. Any help is very welcome :).

TIA.


PS: BTW, if any developer here would like to take a look, and hopefully develop something to simulate a USB storage device for final users ;) :

Packaging a USB Device Simulator
A USB device simulator can be implemented in any COM client compliant language. The only requirement is that the simulator be able to create and call methods on the COM objects provided by the framework (e.g. SoftUSBDevice, SoftUSBEndpoint). The simulator can be packaged in any executable format that is convenient – executable, DLL, service, in-proc or local server COM object, or .NET object. Simulators are typically packaged as COM or .NET objects and designed to export interfaces that provide the functionality needed by test applications to control them.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users