Jump to content











Photo
- - - - -

Announcing open source virtual SCSI miniport driver


  • Please log in to reply
147 replies to this topic

#26 erwan.l

erwan.l

    Gold Member

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

Posted 01 October 2013 - 08:31 PM

Hi Olof,

 

I believe I am a few bits away from having a working code (that does not require dotnet) to 'talk' to the driver.

However, I end up with a 1117 error (The request could not be performed because of an I/O device err).

 

I sent you a copy of the code if you ever have 2 mns to review the logic...

 

Thanks,

Erwan



#27 erwan.l

erwan.l

    Gold Member

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

Posted 01 October 2013 - 08:52 PM

Got it to work :)

Sometimes (most of the times actually), you just need another pair of eyes ... Thanks Olof !

 

Now need to polish it to make a command line and gui that does not require dotnet 4.

 

/Erwan


  • Olof Lagerkvist likes this

#28 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 01 October 2013 - 09:03 PM

Got it work :)
Sometimes (most of the times actually), you just need another pair of eyes ... Thanks Olof !
 
Now need to polish it to make a command line and gui that does not require dotnet 4.
 
/Erwan


Great that you got it working. Your contribution is really appreciated! Thanks a lot!

#29 erwan.l

erwan.l

    Gold Member

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

Posted 01 October 2013 - 10:24 PM

Attached a quick GUI to add/remove a raw image file as a virtualdisk by using the arsenal driver.

 

Very early/beta stage version : use at your own risk.

Tested on Win7 only for now.

 

Once the driver is installed (not handled (yet?) by this proggie), the tool can :

-add a virtualdisk by selecting a raw image file (hardcoded : offset=0, id=0, bytes/sector=512)

-remove the virtualdisk #0

-check if the arsenal driver is installed

-query the arsenal drive #0 to retrieve the id and filename of the virtualdisk

 

Tool is coded with delphi and should therefore be completely portable (i.e does not require any extra components).

 

If useful, will be improved and extended with extra features...

Regards,

Erwan


  • Olof Lagerkvist likes this

#30 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 01 October 2013 - 10:30 PM

Thanks! Will definitely try it!

#31 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 12:26 PM

version 0.2

 

-can add more than one virtualdisk

-will remove all virtualdisks

-will list all virtualdisks

-install the (storport only) driver using devcon (NOT included in the package)

-check if the driver is installed

 

Next version will probably have a GUI closer to Total Mounter

 

@Olof :

I have included the Arsenal Drivers in mount.zip (along with the Arsenal licence file).

Hope this is ok with you from a distribution and/or licensing point of view.

 

Suggestion : anyway to adapt the driver to also be able to mount iso file?

 

Regards,

Erwan

Attached Thumbnails

  • mount.png


#32 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 October 2013 - 12:34 PM

version 0.2
 
-can add more than one virtualdisk
-will remove all virtualdisks
-will list all virtualdisks
-install the (storport only) driver using devcon (included in the package)
-check if the driver is installed
 
@Olof :
I have included the Arsenal Drivers in mount.zip (along with the Arsenal licence file).
Hope this is ok with you from a distribution and/or licensing point of view.


You cannot redistribute devcon.exe. http://support.microsoft.com/kb/311272 "DevCon is not redistributable. It is provided for use as a debugging and development tool."

Either link to the Microsoft download site, or extract the necessary functions from devcon source code and create your own setup tool.

#33 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 12:35 PM

You cannot redistribute devcon.exe. http://support.microsoft.com/kb/311272 "DevCon is not redistributable. It is provided for use as a debugging and development tool."

Either link to the Microsoft download site, or extract the necessary functions from devcon source code and create your own setup tool.

 

Thanks for pointing this out !

I will remove devcon.exe from the zip file.

 

Erwan


  • Olof Lagerkvist likes this

#34 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 October 2013 - 12:37 PM

I tried your tool under XP now, but no Window shows. It just shows a button on the task bar, with "minimize" and "close" when I right click on it. But nothing else happens.

I really appreciate your work, though. I have no doubts that you will make this a really useful tool!

#35 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 12:38 PM

I tried your tool under XP now, but no Window shows. It just shows a button on the task bar, with "minimize" and "close" when I right click on it. But nothing else happens.

I really appreciate your work, though. I have no doubts that you will make this a really useful tool!

 

xp is giving me a hard time these days.

will revive a xp virtual image and will do some debug there.

 

the win7 version should work fine.



#36 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 October 2013 - 01:00 PM

xp is giving me a hard time these days.


I strongly agree. But anyway just love to see when something happens to be XP compatible once in a while. ;)

will revive a xp virtual image and will do some debug there.
 
the win7 version should work fine.


I will soon try it.

#37 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 01:21 PM

Can cd/dvd images be mounted?

I tried the following but with no luck : ArsenalImageMounterControl.exe /add /filename=g:\_iso\ubcd501.iso /readonly

 

Looking at the common.h, looks like it is supported (IMSCSI_DEVICE_TYPE_CD).

 

/Erwan



#38 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 October 2013 - 01:29 PM

Can cd/dvd images be mounted?
I tried the following but with no luck : ArsenalImageMounterControl.exe /add /filename=g:\_iso\ubcd501.iso /readonly


Sorry, no CD/DVD emulation implemented.
 

Looking at the common.h, looks like it is supported (IMSCSI_DEVICE_TYPE_CD).


There are a few other "reserved for future use" or "partially implemented but never tested" things there as well. Such as TCP/IP proxy mode.

#39 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 October 2013 - 02:03 PM

@erwan.l

Cannot say if useful, check this thread (about devcon possible alternatives ):

http://www.911cd.net...showtopic=24100

starting from around here:

http://www.911cd.net...ndpost&p=165123

 

:cheers:

Wonko



#40 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 03:47 PM

@wonko, looking at your threads.

 

fyi, the following commandline (on win7) also works to install the arsenal driver : pnputil -a phdskmnt.inf.

 

my issue actually is more around installing the device rather than installer the driver ("easy" part).



#41 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 03:51 PM

I tried your tool under XP now, but no Window shows. It just shows a button on the task bar, with "minimize" and "close" when I right click on it. But nothing else happens.

I really appreciate your work, though. I have no doubts that you will make this a really useful tool!

 

Hi Olof,

 

Would you have 2 screens?

I just tried on a new xp and my app shows fine.

Thus I know it was off positionned on the right side of the screen.

I have this that and reuploaded the zip in that post .

 

Erwan



#42 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 04:10 PM

Tested my app + arsenal under windows xp.

Works :)

 

But there is definitely room for improvement around the driver installation, especially under xp.

 

Under xp, you can NOT use the add hardware wizard to install the driver.

You need to do right click on the inf file, install OR rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 path\phdskmnt.inf

Then start the driver (net start phdskmnt) (or reboot), then the device will be detected.

Firs time the device is detected, you need another reboot to be displayed correctly in xp device manager.

 

Under win7, using the add legacy hardware wizard works all fine (or devcon as well).

Attached Thumbnails

  • arsenal-xp.jpg


#43 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 October 2013 - 04:48 PM

Tested my app + arsenal under windows xp.
Works :)
 
But there is definitely room for improvement around the driver installation, especially under xp.

 
To get it working as smoothly as possible on XP, I would say that you would need to follow the steps done in the setup tools. I did a lot of investigation until I finally found out how to do what is done there.
 

Under xp, you can NOT use the add hardware wizard to install the driver.

 
That is correct, because it is not a plug-and-play driver in that case.
 

You need to do right click on the inf file, install.
Then start the driver (net start phdskmnt) (or reboot), then the device will be detected.
Firs time the device is detected, you need another reboot to be displayed correctly in xp device manager.

 
This reboot is not strictly needed, in the sense of needed to get it working properly. It is practically speaking needed to get Device Manager happy, though. Another way is to just cancel out of all "found new hardware" boxes that will pop up. I have provided a "null .inf file" in CtlUnit directory that can be used to make Device Manager stop asking for a driver for the fake RAID controller device that gets created under XP.
 

Under win7, using the add legacy hardware wizard works all fine (or devcon as well).

 

Yes and that also applies to all other supported Windows versions as well. Only XP is special in this case.

 

Would you have 2 screens?

I just tried on a new xp and my app shows fine.

Thus I know it was off positionned on the right side of the screen.

I have this that and reuploaded the zip in that post .

 

No, it is a virtual machine, only one screen. But I will try some more on other XP machines too.

 

scr.png



#44 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 04:55 PM

version 0.3 additions

 

-handles the xp installation : will add the driver and start the service

Under XP, the device manager does popup, just click OK and that should be it.

Reboot, as mentionned by Olof, is optional : it will make device manager happy and the device will then display ok.

 

-for win7 (and up) installation : will use devcon if existing in the folder or will advise to use the "add legacy hardware" wizzard

 

-when pointing to a non existing img file, the app will then ask for the size of the new virtualdisk and will create the imagefile, so one can create a virtualdisk from an existing raw image or create the raw image on the fly.

 

Will delete the attachment from previous posts to avoid confusion.

 

Now that I have a (tiny) bit of a better grip on drivers, i need to come with a sexier interface.

 

/Erwan

Attached Files


  • Olof Lagerkvist likes this

#45 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 October 2013 - 05:07 PM

Latest works for me on XP.

 

Thanks a lot!



#46 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 05:07 PM

 
To get it working as smoothly as possible on XP, I would say that you would need to follow the steps done in the setup tools. I did a lot of investigation until I finally found out how to do what is done there.
 

 

indeed.

i already reused lots of code from scsiadapter.vb to deal with the add/remove a virtual disk part.

will not have a look at the imagemounterGuiSetup code.

 

 

attachicon.gifscr.png



#47 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 October 2013 - 06:07 PM

@wonko, looking at your threads.

 

fyi, the following commandline (on win7) also works to install the arsenal driver : pnputil -a phdskmnt.inf.

 

my issue actually is more around installing the device rather than installer the driver ("easy" part).

Yep, and that was EXACTLY what my hint was aimed to (device).

 

The NSIS co-installer has proved to be an effective means for installing a device (or if you prefer as devcon replacement):

http://www.msfn.org/...on-for-project/

about paraglider's :worship: nice little tools cannot say, but most probably they would work as well.

 

Happy you solved the issue anyway. :)

 

:cheers:

Wonko



#48 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 07:06 PM

I found lots of interesting stuff there there : http://nsis.sourceforge.net/Main_Page :)

Thanks a lot for this Wonko !

 

So I can either reuse the instdrv.exe and customise an nsi file or integrate instdrv.dll in my own delphi code.

 

Another great tool to add to my toolbox !

 

Cheers,

Erwan



#49 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 October 2013 - 07:49 PM

I found lots of interesting stuff there there : http://nsis.sourceforge.net/Main_Page  :)

Thanks a lot for this Wonko !

 

Thanks! I think it should also be said that in case you find some trouble with the installer, it should be a very easy thing to change the setup tools we already have to .NET 2.0 core instead of 4.0. Probably just a matter of selecting another target framework in the build options, I guess.

 

The mount tools are a completely different matter, though, so I am very glad that you started off with that part!



#50 erwan.l

erwan.l

    Gold Member

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

Posted 02 October 2013 - 08:43 PM

Thanks! I think it should also be said that in case you find some trouble with the installer, it should be a very easy thing to change the setup tools we already have to .NET 2.0 core instead of 4.0. Probably just a matter of selecting another target framework in the build options, I guess.

 

The mount tools are a completely different matter, though, so I am very glad that you started off with that part!

 

Actually I am not planning on spending too much time on the driver installation part.

Although I am quite happy I learned a lot around this topic today.

Just wanted to propose a basic and quick way to install the driver from my app to make the user's life easy (maybe).

 

My main goal is to work around add/removing/listing virtual disks by proposing a GUI.

The user mode side of the kernel mode driver.

 

At some point it could even be merged in CloneDisk (another tool of mine).

 

Regards,

Erwan






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users