Jump to content











Photo
- - - - -

Announcing open source virtual SCSI miniport driver


  • Please log in to reply
147 replies to this topic

#76 bilou_gateux

bilou_gateux

    Frequent Member

  • Expert
  • 230 posts
  •  
    France

Posted 04 October 2013 - 08:25 PM

The provided setup tools should install the correct versions. On XP, it might look a little confusing sometimes after setup when you look at Device Manager. But as far as I know, setup should work correctly on XP as well. A reboot might be needed to make everything look correct though. Do you see any error messages when you try to install on XP, or does it actually work anyway when you start the mount tool GUI after setup?

 

But let me check, I will start a Windows XP and try it!

 

 
Manual installation
 
Scsiport edition of the driver
32 bit editions of Windows XP lacks storport.sys, so in order to provide something roughly equivalent on Windows XP, there is a scsiport.sys edition of this driver for XP. It fakes a non-PnP ISA SCSI adapter driver and needs to be installed in a completely different way. Either right-click the .inf file in WinXP directory and select Install, or use the corresponding call with rundll32 setupapi.dll,InstallHinfSection DefaultInstall 132 path\phdskmnt.inf, or alternatively, copy the .sys driver file to system32\drivers and use sc create phdskmnt type= kernel ... etc command to manually create this driver. Once the driver has been installed, it needs to be loaded. Type net start phdskmnt to do that. Device Manager might look strange until next reboot, but the virtual device should be immediately available.

 

Windows xp installation :

 

use inf file (*) below and devcon

; LEGACY.INF
; Installs "legacy", scsiport based, non-pnp version of Arsenal Image Mounter
; miniport driver.
; Intended for use on 32 bit editions of Windows XP, which lacks support for
; storport based miniports.
;
; Copyright (c) 2012-2013, Arsenal Consulting, Inc. (d/b/a Arsenal Recon) <http://www.ArsenalRecon.com>
; This source code is available under the terms of the Affero General Public
; License v3.
;
; Please see LICENSE.txt for full license terms, including the availability of
; proprietary exceptions.
; Questions, comments, or requests for clarification: http://ArsenalRecon.com/contact/

[Version]
Signature   = "$Windows NT$"
Provider    = "ARSENALRECON"
Class       = SCSIAdapter
ClassGUID   = {4D36E97B-E325-11CE-BFC1-08002BE10318}  ; scsi adapter
DriverVer   = 03/03/2013,1.0.0004.00004                      ; sync with the rc file
;CatalogFile = phdskmnt.cat                             ; package is signed

[DestinationDirs]
DefaultDestDir = 12                                   ; system32/drivers

[Manufacturer]
"ARSENAL" = Models                                   ; x86

[Models]
%ADAPTERNAME% = PhDskMnt, root\PhDskMnt                ; last is the hardware id

[PhDskMnt]
CopyFiles = @PhDskMnt.sys
LogConfig = PhDskMnt.LogConfig
AddReg    = RegDriver

[PhDskMnt.LogConfig]
ConfigPriority = NORMAL

[PhDskMnt.Services]
AddService = PhDskMnt, 2, Service

[Service]
ServiceType    = 1                                    ; SERVICE_KERNEL_DRIVER
StartType      = 3                                    ; SERVICE_DEMAND_START
ErrorControl   = 0                                    ; SERVICE_ERROR_IGNORE
LoadOrderGroup = SCSI Miniport
ServiceBinary  = %12%\PhDskMnt.sys
AddReg         = RegService

[RegDriver]
HKR,,LocationInformationOverride,,%LOCATION%

[RegService]
HKR, "Parameters\PnpInterface", "1"              , 0x00010001, 0x00000001 ; the adapter is pnp, isa bus style
HKR, "Parameters\Device"      , "BusType"        , 0x00010001, 0x00000000 ; the device bus is BusTypeUnknown
HKR, "Parameters\Device"      , "DriverParameter", 0x00000000, "params"   ; miniport parameters

[SourceDisksFiles]
PhDskMnt.sys = 1

[SourceDisksNames.x86]
1 = %DISKNAME%,,,i386                                  ; 32-bit

[Strings]
DISKNAME    = "Install Disk"
ADAPTERNAME = "Arsenal SCSI Host Controller"
LOCATION    = "Virtual"                               ; location to display in device manager


 

 

scripted install command line (Windows XP embedded)

line 1 to 4 to avoid popup windows about driver signing

 

1 DriverSigning-Off.exe

2 copy CtlUtil\ctlunit.inf c:\windows\inf

3 copy CtlUtil\ctlunit.cat c:\windows\i386

4 chktrust.exe -win2k -r -acl c:\windows\i386\ctlunit.cat

5 devcon32.exe install WinXP\phdskmnt.inf Root\PhDskMnt

 

all exe in Path

 

No yellow exclamation point next to device in Device Manager, driver started and ready to use

 

regdmp

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\SCSIADAPTER\0000 [8 17]
    ClassGUID = {4D36E97B-E325-11CE-BFC1-08002BE10318}
    Class = SCSIAdapter
    HardwareID = REG_MULTI_SZ "ROOT\PhDskMnt"
    Driver = {4D36E97B-E325-11CE-BFC1-08002BE10318}\0000
    Mfg = ARSENAL
    Service = PhDskMnt
    DeviceDesc = Arsenal SCSI Host Controller
    ConfigFlags = REG_DWORD 0x00000000
    Capabilities = REG_DWORD 0x00000000
    ParentIdPrefix = 1&1843ccbc&0
    Device Parameters [8 17 1]
    LogConf [8 17]
        BasicConfigVector = REG_RESOURCE_REQUIREMENTS_LIST 0x00000048 0x00000048 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00010001 0x00000001 0x00008001 0x00000000 0x00003000 0x00000000 0x00000000 \
                            0x00000000 0x00000000 0x00000000
    Control [8 17]
        ActiveService = PhDskMnt
        FilteredConfigVector = REG_RESOURCE_REQUIREMENTS_LIST 0x00000048 0x00000048 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x00010001 0x00000001 0x00008001 0x00000000 0x00003000 0x00000000 0x00000000 \
                               0x00000000 0x00000000 0x00000000
        AllocConfig = REG_RESOURCE_LIST 0x00000014 0x00000001 0x00000001 0x00000000 0x00000000 0x00000000

 

 

 

regdmp

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PhDskMnt [30 31 1 17]
    Type = REG_DWORD 0x00000001
    Start = REG_DWORD 0x00000003
    ErrorControl = REG_DWORD 0x00000000
    Tag = REG_DWORD 0x00000040
    ImagePath = REG_EXPAND_SZ system32\DRIVERS\PhDskMnt.sys
    Group = SCSI Miniport
    Parameters [30 31 1 17]
        Device [30 31 1 17]
            BusType = REG_DWORD 0x00000000
            DriverParameter = params
        PnpInterface [30 31 1 17]
            1 = REG_DWORD 0x00000001
    Security [17 1]
        Security = REG_BINARY 0x000000a8 0x80140001 0x00000090 0x0000009c 0x00000014 0x00000030 0x001c0002 0x00000001 0x00148002 0x000f01ff 0x00000101 0x01000000 0x00000000 0x00600002 0x00000004 0x00140000 0x000201fd 0x00000101 0x05000000 \
                   0x00000012 0x00180000 0x000f01ff 0x00000201 0x05000000 0x00000020 0x00000220 0x00140000 0x0002018d 0x00000101 0x05000000 0x0000000b 0x00180000 0x000201fd 0x00000201 0x05000000 0x00000020 0x00000223 0x00000101 0x05000000 \
                   0x00000012 0x00000101 0x05000000 0x00000012
    Enum [30 31 1 17]
        0 = ROOT\SCSIADAPTER\0000
        Count = REG_DWORD 0x00000001
        NextInstance = REG_DWORD 0x00000001

 

 

(*) Inf file idea comes from Perisoft miniram.inf

 

@Olof

Why SCSIADAPTER and not PhDskMnt

Hardcoded in driver ?

 

Why no cat file for Windows XP driver. Although not required, i'd like to have a digital catalog file


  • wimb likes this

#77 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 04 October 2013 - 09:37 PM

Windows xp installation :
 
 
all exe in Path
 
No yellow exclamation point next to device in Device Manager, driver started and ready to use


(*) Inf file idea comes from Perisoft miniram.inf


Sounds great that you found a way to script this setup. This means that essentially the same as what my original .NET setup tools do, is now possible to in an equally fully automated way in a script. That is really good.
 

@Olof
Why SCSIADAPTER and not PhDskMnt
Hardcoded in driver ?


I have never actually thought about that. As far as I know, a storport.sys based virtual miniport driver, like this one, is never supposed to specify such a name somewhere. But I could be mistaken there. I have simply never got that question before, but it is indeed an interesting one!
 

Why no cat file for Windows XP driver. Although not required, i'd like to have a digital catalog file


Simply because it was not needed so I just happen to forget to make one, I guess. But I agree that there really should be a signed catalog file so I will definitely fix that.

#78 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 05 October 2013 - 05:49 AM

version 0.6

 

As requested by Wimb, after a memory drive is created, the app will propose to initialise the drive (i.e createdisk+createpartition).

For this I reused functions from my app CloneDisk.

After this, windows will propose to format it.

 

 

Thanks for version 0.6 :cheers:

 

It works as described and the disk is Initialized   :) but without MBR Boot code

and indeed it requires some manual steps to add MBR Boot code and to get NTFS format and volume name RAMDISK

It would be nice if user can fill the RAMDISK and then can (warm) reboot from that RAMDISK :)

In this way you could have a very fast smart terminal suitable for Cloud computing.

 

 

@TheHive

 

ImgMount.exe seems a good name for the Arsenal Driver GUI

 

@bilou_gateux

Your way to Install the Arsenal driver is quite interesting and will be a nice improvement  :)

 
No yellow exclamation point next to device in Device Manager, driver started and ready to use

 



#79 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 458 posts
  •  
    Germany

Posted 05 October 2013 - 06:34 AM

Names

 

GIM - Great Image Mounter
IM - Image Mounter
AIM - An Image Mounter
AIMG - Arsenal Image Mounter Gui
Gmail - Greatly Mounts Alot Images Lol!

IMount - Based on ImDisk

 

attachicon.gifImount.jpg

attachicon.gifImount.png

attachicon.gifIMount.ico

 

 

AIM it's giving, the open source Messeger

Gmail also ..Google mail ?

Imount ..naahh not so much .. and aimg it's not realy , it's like aim.. and this is an messager ..

Image mounter is not bad, easy and it is true ..

 

Total Mounter ?

 

maybe with an pluginsystem for diffrent other things ?

http-ISO and compressed files or other files (and filesystems) for

hang it in drives and/or on folders ..

 

an pluginsystem where works easy with an folder, there start this

programm and read all the plugins who be on it and start the systemmounting with the last hanged in things..

or TCommanders Pluginsystem with an ini file and configuring in the ini at start ..

 

this with an installer (right mouse&System integrate) and portable for PE Systems and Sticks

 

.. IArsenal Disk and not short .. humm.. AID, Arsenal IDisk.. First Aid *lol*

 

 

alias.png

 

is this possible ? for setting up Alias in the Names ?

 

 

best regards

Blacky



#80 erwan.l

erwan.l

    Platinum Member

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

Posted 05 October 2013 - 10:50 AM

Thanks for version 0.6 :cheers:

It works as described and the disk is Initialized :) but without MBR Boot code
and indeed it requires some manual steps to add MBR Boot code and to get NTFS format and volume name RAMDISK
It would be nice if user can fill the RAMDISK and then can (warm) reboot from that RAMDISK :)
In this way you could have a very fast smart terminal suitable for Cloud computing.

Thanks for the feedback.

Mbr code: as there are many options (nt5,nt6,g4d,...) i left that to the user.

Format : since a user may want a specfic filesystem (fat32 or ntfs) or volumename, i left that to the ms format wizard.
Thus, if of importance, i could easily handle that part.

About the ramdisk and reboot, do you mean you would like to be able to dump/ save it?
I can do it.
Also note, and this is not obvious in my gui, that you can create a (file backuped) virtualdisk by entering a file that does not exist.
The gui then will ask for a size and create the file for you.

Erwan

#81 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 05 October 2013 - 12:20 PM

Also note, and this is not obvious in my gui, that you can create a (file backuped) virtualdisk by entering a file that does not exist.
The gui then will ask for a size and create the file for you.
 

 

Nice option that works OK.

 

In case of RAMDISK then in size dialog you might have combobox to set FAT32 / NTFS

As MBR Bootcode you might use XP MBR BootCode or have combobox to select NT5 / NT6 / G4D

At first as volumename you might always use RAMDISK

 

For RAMDISK it will be nice when it can be saved as file for using content next time to fill the RAMDISK.

 

I was thinking of a RAMDISK that would survive a warm Reboot,

so that you would NOT have to load some VHD into RAMDISK but instead can direct Reboot from RAMDISK.



#82 erwan.l

erwan.l

    Platinum Member

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

Posted 05 October 2013 - 12:42 PM

Following Wimb comments, i have added the following options in version 0.7

 

-When clicking add (file) icon, user can choose 'add existing' or 'new' 

-When clicking memory icon, user can choose 'add existing' (from file) or 'new'

-When adding a new file, ImgMount will also initialize the disk (and will still for now rely on windows wizard to format it)

See attached screenshot.

 

Note than when adding an existing file to memory, all modifications are lost when removing the disk !

I will later add a dump/save options there (see previous post from Wimb).

 

@Olof : When I add an exisisting file to memory, it actually consummes two times the memory?

Example : Mounting a 256mb image will use 512 mb? As opposed to creating a 256mb image will use 256mb.

 

PS : also changed the name of the app to ImgMount. Now it officially has a name :)

 

/Erwan

Attached Thumbnails

  • mount2.png

Attached Files


  • wimb likes this

#83 erwan.l

erwan.l

    Platinum Member

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

Posted 05 October 2013 - 12:46 PM

Nice option that works OK.

 

[/quote]

 

see latest version : more obvious now (extra windows offering choice)

 


In case of RAMDISK then in size dialog you might have combobox to set FAT32 / NTFS

As MBR Bootcode you might use XP MBR BootCode or have combobox to select NT5 / NT6 / G4D

At first as volumename you might always use RAMDISK

 

 

Roger that.

I need to implement the routine to find the logical drive underneath a physical drive and then I can trigger a format against that logical drive.

 


For RAMDISK it will be nice when it can be saved as file for using content next time to fill the RAMDISK.

 

I was thinking of a RAMDISK that would survive a warm Reboot,

so that you would NOT have to load some VHD into RAMDISK but instead can direct Reboot from RAMDISK.

 

I will add a dump/save feature dumping to source file (it will have to be triggered by the user).



#84 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 05 October 2013 - 01:30 PM

@Olof : When I add an exisisting file to memory, it actually consummes two times the memory?
Example : Mounting a 256mb image will use 512 mb? As opposed to creating a 256mb image will use 256mb.

Good question. I will do some tests to try to find out what happens.

I would also think that it could be useful to have an option to choose between virtual or physical memory for the ramdisk storage. Physical memory option could be implemented by using \\.\awealloc as filename along with a disk size. It is also possible to specify an image file by appending a native path, for example \\.\awealloc\??\C:\disk.img or similar.

#85 erwan.l

erwan.l

    Platinum Member

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

Posted 05 October 2013 - 01:36 PM

Good question. I will do some tests to try to find out what happens.

I would also think that it could be useful to have an option to choose between virtual or physical memory for the ramdisk storage. Physical memory option could be implemented by using \\.\awealloc as filename along with a disk size. It is also possible to specify an image file by appending a native path, for example \\.\awealloc\??\C:\disk.img or similar.

 

I did some tests with awealloc already but failed.

My plan was to get deeper at it this week.

Thanks for the following tip : \\.\awealloc\??\C:\disk.img !



#86 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 05 October 2013 - 01:41 PM

Following Wimb comments, i have added the following options in version 0.7

 

PS : also changed the name of the app to ImgMount. Now it officially has a name :)

 

 

That works already quite good :)

Thanks for all the progress that has been made :cheers:

 

For Add File and Add Memory Disk I used both options Add Existing and New

Here Drive T: is RAMDISK filled with Exist file Ars-2.vhd containing also file BOOTICE.exe

 



#87 erwan.l

erwan.l

    Platinum Member

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

Posted 05 October 2013 - 03:06 PM

@Olof

 

About \\.\AWEAlloc, I am setting the filename alright but still no luck.

Is there a specific flag or extra bit of information I would need?

 

Here below the filedata structure I am pushing to deviceiocontrol.

It works fine for file or memory vritualdisks, in add or new mode.

But when I set filename='\\.\AWEAlloc', deviceiocontrol returns success but I get not virtualdisk.

 

      pinData := Pfiledata(PChar(@Buffer) + SizeOf(SRB_IO_CONTROL));
      pinData^.device_number:=AutoDeviceNumber ;
      pinData^.disk_size :=filesize;
      pInData^.bytes_per_sector :=0; 
      pInData^.reserved :=0;
      pInData^.offset:=0;
      pInData^.flags:=flags;
      filename:='\\.\AWEAlloc';
      pInData^.filename_length:=length(filename)*2;
      StringToWideChar(filename,pInData^.filename,length(filename) +1);
 
/Erwan


#88 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 05 October 2013 - 06:04 PM

@Olof
 
About \\.\AWEAlloc, I am setting the filename alright but still no luck.


Just verified with my own control program. This works:
ArsenalImageMounterControl.exe /add /filename=\\.\awealloc /disksize=200
 

Is there a specific flag or extra bit of information I would need?
 
Here below the filedata structure I am pushing to deviceiocontrol.
It works fine for file or memory vritualdisks, in add or new mode.
But when I set filename='\\.\AWEAlloc', deviceiocontrol returns success but I get not virtualdisk.
 
      pinData := Pfiledata(PChar(@Buffer) + SizeOf(SRB_IO_CONTROL));
      pinData^.device_number:=AutoDeviceNumber ;
      pinData^.disk_size :=filesize;
      pInData^.bytes_per_sector :=0; 
      pInData^.reserved :=0;
      pInData^.offset:=0;
      pInData^.flags:=flags;
      filename:='\\.\AWEAlloc';
      pInData^.filename_length:=length(filename)*2;
      StringToWideChar(filename,pInData^.filename,length(filename) +1);


It all looks okay to me, but you don't tell which values you are using for things like filesize and flags, so I assume the problem is there somewhere. Note for example that flags should not specify a virtual memory device in this case. To the Arsenal Image Mounter driver, this is just like using an image file. The memory storage magic is handled entirely within awealloc driver and to the outside world, in this case Arsenal Image Mounter driver, it is simply a file.
 
Also, to preload such a device with an image file with the path suffix syntax I mentioned earlier, you need to use a recent enough version of awealloc.sys. Make sure that you are using the one from latest ImDisk package.



#89 erwan.l

erwan.l

    Platinum Member

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

Posted 05 October 2013 - 06:36 PM

Just verified with my own control program. This works:
ArsenalImageMounterControl.exe /add /filename=\\.\awealloc /disksize=200
 


It all looks okay to me, but you don't tell which values you are using for things like filesize and flags, so I assume the problem is there somewhere. Note for example that flags should not specify a virtual memory device in this case. To the Arsenal Image Mounter driver, this is just like using an image file. The memory storage magic is handled entirely within awealloc driver and to the outside world, in this case Arsenal Image Mounter driver, it is simply a file.
 
Also, to preload such a device with an image file with the path suffix syntax I mentioned earlier, you need to use a recent enough version of awealloc.sys. Make sure that you are using the one from latest ImDisk package.

 

 

Thanks ! Got it to work :)

Flags was wrong indeed (i was passing a memory flag) and \\.\awealloc had to be turned into an NT path (\??\awealloc).

 

Next version will shortly support awealloc / physical memory.

 

/erwan


  • wimb likes this

#90 erwan.l

erwan.l

    Platinum Member

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

Posted 05 October 2013 - 09:49 PM

version 0.8

 

-Now supports physical memory usage (vs virtual memory) thru awealloc.

edit: on my machine, i have to refresh disks in my disk mmc in order to have the disk being displayed fine - may be a bug on my side).

 

Still on the todo list :

-handle the format part and maybe the MBR part

-implement a dump/save feature

-a command line version

...

 

Thanks (again) to Olof for his support and guidance.

 

What I'd like now is a nullsoft installer handling the arsenal driver AND the awealloc driver installation, for all windows versions.

Wonko introduced the idea in a previous post : may be if he has some minutes to spare, would he be kind enough to write the nsi script for us?  :whistling:

 

The less manual work and dependencies around driver installation, the easier it gets for end users.

 

/Erwan

Attached Thumbnails

  • mount2.png

Attached Files



#91 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 06 October 2013 - 07:59 AM

version 0.8

 

-Now supports physical memory usage (vs virtual memory) thru awealloc.

edit: on my machine, i have to refresh disks in my disk mmc in order to have the disk being displayed fine - may be a bug on my side).

 

 

- case of Add Memory Disk
When 'Use Physical Memory' checkbox is Selected, then for me there is NO Ramdisk made.
In fact in this case nothing seems to happen for Add Existing or New.
After Manual Start of awealloc.sys driver then option New is working OK and creates RAMDISK,
but option Add Existing still does not work for me.
 
When the checkbox is NOT selected,
then Add Existing just as before allows to select vhd file and then RAMDISK filled with vhd is made.
It is confusing for me since I think that this RAMDISK is using Physical Memory.
In my case I never had pagefile.sys and Virtual Memory was set to 0
Until now I thought that all my RAMDISK are using Physical Memory
 
I am a bit lost and confused about what is occurring actually and hope that someone can explain ....
 
For Add Memory Disk and New without checkbox then RAMDISK is made,
but there is now a popup that did not occur previously.
The popup is: IOCTL_DISK_CREATE_DISK failed - OK
I can continue to create partition and RAMDISK is OK
 
===> 
 
- case of Add File Disk - Everything is OK as before.


#92 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 06 October 2013 - 09:48 AM

- case of Add Memory Disk
When 'Use Physical Memory' checkbox is Selected, then for me there is NO Ramdisk made.
In fact in this case nothing seems to happen for Add Existing or New.
After Manual Start of awealloc.sys driver then option New is working OK and creates RAMDISK,
but option Add Existing still does not work for me.


You need to install awealloc.sys from latest ImDisk for that to work. Earlier versions did not support adding existing image files to a new ramdisk. Also, they did not configure awealloc.sys to automatically start.
 

When the checkbox is NOT selected,
then Add Existing just as before allows to select vhd file and then RAMDISK filled with vhd is made.
It is confusing for me since I think that this RAMDISK is using Physical Memory.
In my case I never had pagefile.sys and Virtual Memory was set to 0
Until now I thought that all my RAMDISK are using Physical Memory
 
I am a bit lost and confused about what is occurring actually and hope that someone can explain ....

 
The virtual memory storage will be kept in physical memory as much as possible, too. Particularly now when you have no pagefile configured.

 

There are a couple of other differences though, such as the virtual memory disks taking up all their space in one piece of virtual address space of the calling process. This has proven to be very bad on 32-bit systems where address space is rather limited. Or, becomes very limited when you use a huge part of it for virtual disk data. On 64-bit systems however, I guess this should never mean any practical problems since the virtual address space for processes in a lot bigger.

 

The awealloc based virtual disks use a different kind of allocation, where rather small pages of physical memory are mapped into virtual address space one at a time as needed. Therefore, I would strongly recommended this for 32-bit systems.



#93 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 06 October 2013 - 10:20 AM

You need to install awealloc.sys from latest ImDisk for that to work. Earlier versions did not support adding existing image files to a new ramdisk. Also, they did not configure awealloc.sys to automatically start.

 

Thanks Olof for detailed explanatation on using awealloc.sys :)

I was using indeed the previous version 1.6.0 of ImDisk

 

I think now I understand better what awealloc is doing and why it is important especially in 32-bit system that I use. :)

 

:cheers:



#94 erwan.l

erwan.l

    Platinum Member

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

Posted 06 October 2013 - 10:24 AM

 

- case of Add Memory Disk
When 'Use Physical Memory' checkbox is Selected, then for me there is NO Ramdisk made.
In fact in this case nothing seems to happen for Add Existing or New.
After Manual Start of awealloc.sys driver then option New is working OK and creates RAMDISK,
but option Add Existing still does not work for me.
 
When the checkbox is NOT selected,
then Add Existing just as before allows to select vhd file and then RAMDISK filled with vhd is made.
It is confusing for me since I think that this RAMDISK is using Physical Memory.
In my case I never had pagefile.sys and Virtual Memory was set to 0
Until now I thought that all my RAMDISK are using Physical Memory
 
I am a bit lost and confused about what is occurring actually and hope that someone can explain ....
 
For Add Memory Disk and New without checkbox then RAMDISK is made,
but there is now a popup that did not occur previously.
The popup is: IOCTL_DISK_CREATE_DISK failed - OK
I can continue to create partition and RAMDISK is OK
 
 
- case of Add File Disk - Everything is OK as before.

 

 

Hi Wimb,

Thanks the tests.

 

I have reviewed the add/new memory window to make it more self explanatory.

Without awealloc, you will use virtual memory meaning it is up to windows to choose whether it will use physical memory or virtual memory.

 

You need latest awealloc driver (from imdisk package) and it needs to be started.

I'll see if I can includ the awealloc drivers files only in the imgmount zip file.

 

About the IOCTL_DISK_CREATE_DISK, I believe in some case, the virtual disk is not yet fully setup and I then call my IOCTL_DISK_CREATE_DISK too soon.

I believe this should not happen in the attached version.

 

Regards,

Erwan

Attached Thumbnails

  • mount2.png

Attached Files



#95 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 06 October 2013 - 11:15 AM

@Erwan

@Olof

 

After Install of latest version 1.7.5 of ImDisk and using latest version 0.8 of ImgMount.exe and Physical Memory Setting,

then everything is working OK and as expected.

 

Thanks for all help and improvement :)

 

 

:cheers:



#96 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 October 2013 - 11:22 AM

OK.
I am not getting it. :w00t: :ph34r: (tested version 0.8, will follow once tested last version that erwan just posted in the meantime).

 

Usual bunch of semi-random reports/thoughts, etc.

The nice thingy by erwan.l seemingly fails to install the driver (in the sense that it asks for a reboot).
The nice .inf by bilou_gateux, used with devcon.exe BUT WITHOUT the suppression of drivers signing policy works for installing the driver (without needing a reboot) BUT it installs TWO "devices", the first one installs OK "Arsenal Virtual SCSI Disk Device", the second asks for a driver (which is seemingly missing) and results in a "Arsenal Virtual SCSI Array Device" with a question mark in device manager.
The GUI then works alright (sees the device and can mount a disk to it).
To uninstall the Array device, no reboot is needed.

To uninstall the Disk device, seemingly a reboot is mandatory.

 

If I uninstall only the "Arsenal Virtual SCSI Array Device", the IMGMOUNT "Driver->Check" still reports the driver as being installed (as \\.\scsi5: found).

If I try to add (say) a ramdisk through IMGMOUNT, then the "install hardware" wizard pops up, asks for a driver for the "Arsenal Virtual SCSI Array Device", it reports that the device installation failed (because there is no such driver), adds the device with the question mark to the device manager, and the ramdisk works.

IMGMOUNT then CANNOT seemingly initialize it (unless I select "use physical memory", if I do the drive is connected to awealloc.sys and it is actually "initialized", see below) with an error IOCTL_DISK_CREATE_DISK: failed.

The disk mounted through awealloc.sys (\\?\awealloc) is actually initialized, by writing to it a signature (04030201 for which I suspect :dubbio: a breach of copyright :w00t: :ph34r: though erwan got it inverted ;)) a partition table and the Magic Bytes.

A second disk (most probably) is initialized by the same 04030201 signature and since it creates a conflict, the Windows Mount Manager (or *whatever*) promptly changes it to avoid the collision.

 

The disk mounted to memory (the one that fails to initilalize) only works once for session.

I mean, if I start the IMGMOUNT, select the new disk to memory, it creates it, fails to initialize it (but the disk is mapped in disk manager and can be initialized/partitioned/formatted through it and it is shown in the IMGMOUNT interface as - say - \\.\Physicaldrive7), but if I remove that one and try creating a newer one, there is NO prompt to initialize it, the disk appears in IMGMOUNT BUT it fails to appear in disk management. :w00t:

If I close IMGMOUNT and re-start it, everything starts working again as before, the behaviour is - to say the least - "queer", it seems like *something* is not "fully" refreshed in the operations.

 

Questions/ideas (mainly for erwan.l, but also for Olof and bilou):

  1. Is it not possible to have the GUI thingy install the driver without the need for a reboot?
  2. Is it not advisable to add to the GUI thingy a provision to uninstall the driver (possibly WITHOUT needing a reboot)?
  3. WHAT (the heck) is the "Arsenal Virtual SCSI Array Device"? (what it is needed for, what is it's scope, etc.)
  4. In the IMGMOUNT dialog for "memory disk", the default radio button checked is "Existing", BUT there is a "default" of "256 MB" next to "New", IMHO the "256" filed should be greyed out until the "new" radio button" is checked, as this is confusing.

It is very possible that part of the above is already made obsolete by the new version, though.

 

:cheers:

Wonko

 

P.S.:

@erwan

About the NSIS installer, the issue is actually that I have NO idea why/how exactly bilou-gateux modified the .inf,  (or how it actually works, and why the original one doesn't ) nor understand the connection to "root", etc.

The "other time" (mentioned) I played with it, it was fairly easy to make one for the QEMU TAP driver, I suspect that something in the .inf file bilou_gateux made is "non-standard" or that I have no idea which actual values to put in the NSIS installer script (and/or how to "translate" the paths/names).



#97 erwan.l

erwan.l

    Platinum Member

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

Posted 06 October 2013 - 11:24 AM

I have added the awealloc driver in the zip file.

Right click on the inf file and it will do the job.

 

PS : the inf file is a stripped version of imdisk.inf.

I also believe it is missing the start service part but I did not dived into this detail.

@Olof : Hope you are ok with that.

 

/Erwan

Attached Files



#98 erwan.l

erwan.l

    Platinum Member

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

Posted 06 October 2013 - 11:39 AM

OK.
I am not getting it. :w00t: :ph34r: (tested version 0.8, will follow once tested last version that erwan just posted in the meantime).

 

Usual bunch of semi-random reports/thoughts, etc.

The nice thingy by erwan.l seemingly fails to install the driver (in the sense that it asks for a reboot).
The nice .inf by bilou_gateux, used with devcon.exe BUT WITHOUT the suppression of drivers signing policy works for installing the driver (without needing a reboot) BUT it installs TWO "devices", the first one installs OK "Arsenal Virtual SCSI Disk Device", the second asks for a driver (which is seemingly missing) and results in a "Arsenal Virtual SCSI Array Device" with a question mark in device manager.
The GUI then works alright (sees the device and can mount a disk to it).
To uninstall the Array device, no reboot is needed.

To uninstall the Disk device, seemingly a reboot is mandatory.

 

If I uninstall only the "Arsenal Virtual SCSI Array Device", the IMGMOUNT "Driver->Check" still reports the driver as being installed (as \\.\scsi5: found).

If I try to add (say) a ramdisk through IMGMOUNT, then the "install hardware" wizard pops up, asks for a driver for the "Arsenal Virtual SCSI Array Device", it reports that the device installation failed (because there is no such driver), adds the device with the question mark to the device manager, and the ramdisk works.

IMGMOUNT then CANNOT seemingly initialize it (unless I select "use physical memory", if I do the drive is connected to awealloc.sys and it is actually "initialized", see below) with an error IOCTL_DISK_CREATE_DISK: failed.

The disk mounted through awealloc.sys (\\?\awealloc) is actually initialized, by writing to it a signature (04030201 for which I suspect :dubbio: a breach of copyright :w00t: :ph34r: though erwan got it inverted ;)) a partition table and the Magic Bytes.

A second disk (most probably) is initialized by the same 04030201 signature and since it creates a conflict, the Windows Mount Manager (or *whatever*) promptly changes it to avoid the collision.

 

The disk mounted to memory (the one that fails to initilalize) only works once for session.

I mean, if I start the IMGMOUNT, select the new disk to memory, it creates it, fails to initialize it (but the disk is mapped in disk manager and can be initialized/partitioned/formatted through it and it is shown in the IMGMOUNT interface as - say - \\.\Physicaldrive7), but if I remove that one and try creating a newer one, there is NO prompt to initialize it, the disk appears in IMGMOUNT BUT it fails to appear in disk management. :w00t:

If I close IMGMOUNT and re-start it, everything starts working again as before, the behaviour is - to say the least - "queer", it seems like *something* is not "fully" refreshed in the operations.

 

Questions/ideas (mainly for erwan.l, but also for Olof and bilou):

  1. Is it not possible to have the GUI thingy install the driver without the need for a reboot?
  2. Is it not advisable to add to the GUI thingy a provision to uninstall the driver (possibly WITHOUT needing a reboot)?
  3. WHAT (the heck) is the "Arsenal Virtual SCSI Array Device"? (what it is needed for, what is it's scope, etc.)
  4. In the IMGMOUNT dialog for "memory disk", the default radio button checked is "Existing", BUT there is a "default" of "256 MB" next to "New", IMHO the "256" filed should be greyed out until the "new" radio button" is checked, as this is confusing.

It is very possible that part of the above is already made obsolete by the new version, though.

 

:cheers:

Wonko

 

P.S.:

@erwan

About the NSIS installer, the issue is actually that I have NO idea why/how exactly bilou-gateux modified the .inf,  (or how it actually works, and why the original one doesn't ) nor understand the connection to "root", etc.

The "other time" (mentioned) I played with it, it was fairly easy to make one for the QEMU TAP driver, I suspect that something in the .inf file bilou_gateux made is "non-standard" or that I have no idea which actual values to put in the NSIS installer script (and/or how to "translate" the paths/names).

 

Hi Wonko !

 

About the driver installation part, to be fair, I'd rather stay away from this part.

At best can I call external commands (devcon, rundll32, etc) but I'd rather have a nice utility (nsis, batch or else) aside imgmount to take care of that in a clean and efficient way.

 

The latest inf file from Bilou_Gateux is definitely a big improvement and to me (IHMO) all this should be packaged in a neat NSI script by the end.

 

About the disk signature, indeed this is me hardcoding this when calling IOCTL_DISK_CREATE_DISK.

Did not know some id's were reserved. Any idea where I can find free id's ?

About the failure on IOCTL_DISK_CREATE_DISK, that error should be gone now.

 

About the memory disk using awealloc, I have noticed it can take some long seconds before appearing correctly in the disk management console. And this especially when mounting a disk image file in memory thru awealloc.

I may have to work around that like wait longer and send a IOCTL_DISK_UPDATE_PROPERTIES at the end.

 

About your questions :

 

Is it not possible to have the GUI thingy install the driver without the need for a reboot?
->I believe YES but we need a "clean" installer.
Is it not advisable to add to the GUI thingy a provision to uninstall the driver (possibly WITHOUT needing a reboot)?
->Aggreed ! i can eventually call rundll32/setuapi or devcon just like I do for install.
WHAT (the heck) is the "Arsenal Virtual SCSI Array Device"? (what it is needed for, what is it's scope, etc.)
->Olof or Billou_Gateux to answer I guess
In the IMGMOUNT dialog for "memory disk", the default radio button checked is "Existing", BUT there is a "default" of "256 MB" next to "New", IMHO the "256" filed should be greyed out until the "new" radio button" is checked, as this is confusing.
->attached version has the size textbox disabled unless you click on the new radio button
 
Thanks for this thorough feedback (as always) !
 
/Erwan

Attached Files



#99 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 06 October 2013 - 11:42 AM

OK.
I am not getting it. :w00t: :ph34r: (tested version 0.8, will follow once tested last version that erwan just posted in the meantime).
 
Usual bunch of semi-random reports/thoughts, etc.

The nice thingy by erwan.l seemingly fails to install the driver (in the sense that it asks for a reboot).
The nice .inf by bilou_gateux, used with devcon.exe BUT WITHOUT the suppression of drivers signing policy works for installing the driver (without needing a reboot) BUT it installs TWO "devices", the first one installs OK "Arsenal Virtual SCSI Disk Device", the second asks for a driver (which is seemingly missing) and results in a "Arsenal Virtual SCSI Array Device" with a question mark in device manager.
The GUI then works alright (sees the device and can mount a disk to it).
To uninstall the Array device, no reboot is needed.
To uninstall the Disk device, seemingly a reboot is mandatory.
 
If I uninstall only the "Arsenal Virtual SCSI Array Device", the IMGMOUNT "Driver->Check" still reports the driver as being installed (as \\.\scsi5: found).
If I try to add (say) a ramdisk through IMGMOUNT, then the "install hardware" wizard pops up, asks for a driver for the "Arsenal Virtual SCSI Array Device", it reports that the device installation failed (because there is no such driver), adds the device with the question mark to the device manager, and the ramdisk works.


The "array control device" is a purely non-functional-by-intention device. It is only installed in case of XP and only to avoid a specific strange phenomenon on XP. Read more about this in post #25 of this thread. There is a .inf file under CtlUnit that can be installed to make Device Manager happy about this "device".

 

IMGMOUNT then CANNOT seemingly initialize it (unless I select "use physical memory", if I do the drive is connected to awealloc.sys and it is actually "initialized", see below) with an error IOCTL_DISK_CREATE_DISK: failed.
The disk mounted through awealloc.sys (\\?\awealloc) is actually initialized, by writing to it a signature (04030201 for which I suspect :dubbio: a breach of copyright :w00t: :ph34r: though erwan got it inverted ;)) a partition table and the Magic Bytes.
A second disk (most probably) is initialized by the same 04030201 signature and since it creates a conflict, the Windows Mount Manager (or *whatever*) promptly changes it to avoid the collision.
 
The disk mounted to memory (the one that fails to initilalize) only works once for session.
I mean, if I start the IMGMOUNT, select the new disk to memory, it creates it, fails to initialize it (but the disk is mapped in disk manager and can be initialized/partitioned/formatted through it and it is shown in the IMGMOUNT interface as - say - \\.\Physicaldrive7), but if I remove that one and try creating a newer one, there is NO prompt to initialize it, the disk appears in IMGMOUNT BUT it fails to appear in disk management. :w00t:
If I close IMGMOUNT and re-start it, everything starts working again as before, the behaviour is - to say the least - "queer", it seems like *something* is not "fully" refreshed in the operations.
 
Questions/ideas (mainly for erwan.l, but also for Olof and bilou):

  • Is it not possible to have the GUI thingy install the driver without the need for a reboot?

It is. Even on XP actually. My GUI and command line setup tools do this. It takes quite a research job to see how it should be done though, so I guess it could take a while for erwan to come up with something similar.
 
  • Is it not advisable to add to the GUI thingy a provision to uninstall the driver (possibly WITHOUT needing a reboot)?


I don't think it will ever be possible to uninstall this driver without a reboot in case of XP. On all other supported versions there are no problems with uninstalling without reboot, though.

:cheers:

#100 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 06 October 2013 - 12:02 PM

Olof :),

you know how I don't usually stand out for my diplomatic attitude :w00t:, but you are making no sense, and someone has to tell you about this :frusty:.

 

Things should be IMNSHO called with their names. :ranting2:

 

If the thing that appears in device manager is a §@ç#ing "dummy" device, just §@ç#ing call it "XP dummy SCSI device" or "XP Arsenal dummy device" or "XP Arsenal dummy co-driver" AND NOT "Arsenal Virtual SCSI Array Device", which sounds a lot like a "functional device".

 

If you know how to §@ç#ing install the driver without a reboot, please tell erwan.l how exactly you managed to do it, remember that ultimately erwan.l :worship: (and bilou_gateux :), and to a much lesser extent yours truly ;)) are here trying to help improve your driver and it's setup, making it easier to be used, etc. etc.

 

About uninstalling without a reboot, all  I can tell you is that the Total Mounter (though actually asking for a reboot) *somehow* manages to remove the driver from device manager, so my guess is that *something* like that is possible.

 

@erwan.l

The copyright reference was of course a joke :), let's say that great minds think alike ;), JFYI:

http://reboot.pro/to...nsically-sound/

http://reboot.pro/to...sound/?p=177651

 

:cheers:

Wonko






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users