Jump to content











Photo
- - - - -

Could not make drive


  • Please log in to reply
20 replies to this topic

#1 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 02 May 2012 - 10:15 AM

I followed this guide - http://forums.guru3d...ad.php?t=356046.

I made two ramdisk: one for temp files - a:, and one for pagefile.sys - z:.

imdisk-start.cmd

%windir%\system32\imdisk.exe -a -s 256m -p "/fs:exfat /a:256 /q/y/v:RAM_WORK" -m a:

mkdir a:\temp

rd /s /q "c:\windows\temp"

mklink /j "c:\windows\temp" a:\temp

%windir%\system32\imdisk.exe -a -s 990M -p "/fs:ntfs /q /y/v:Pagefile" -m z:

%windir%\system32\swapadd z:\pagefile.sys 990M 990M


imdisk-save.cmd

%windir%\system32\rawcopy -mld \\.\Z: "H:\Z.img"



After restarting windows, I could not find a: and z: drive.

Please let me know What I am wrong?

Thanks in advance.

#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 May 2012 - 11:18 AM

Copy&paste from a machine here with similar setup right now (which works correctly):

imdisk -a -f .awealloc -s 1G -m S: -p "/fs:ntfs /q /y /v:AWESwap"

swapadd S:pagefile.sys 970M 970M


Could you try and see if similar command lines work for you?

You can let your scheduled script create a log file, for example:


imdisk -a -f .awealloc -s 1G -m S: -p "/fs:ntfs /q /y /v:AWESwap" >> C:ramdisk.log 2>&1

swapadd S:pagefile.sys 970M 970M >> C:ramdisk.log 2>&1


This way you can check C:ramdisk.log after startup and see if there are any error messages in it. You can also check system event log for any relevant log entries.

Btw, I would strongly suggest you to use awealloc driver for allocating memory for your RAM disk if you are storing pagefiles on them. (Example in my command line above.) The awealloc driver allocates memory that is non-swappable at all times. Otherwise you will have a more-or-less risky pagefile, that may dead-lock or crash your system if it is ever swapped out onto itself at some point.
  • bluespy likes this

#3 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 03 May 2012 - 07:24 AM


Olof Lagerkvist/ Thanks a lot. Resolved.


#4 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 04 May 2012 - 07:55 AM

I found a: and z: drive letters, and I thought everything's fine. But at the log I found this error message.

C:\Windows\system32\swapadd.exe is not recognized as an internal or external command, operable program or batch file


I downloaded swapadd x64 version and copied to "%windir%\system32" folder.

#5 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 04 May 2012 - 05:52 PM

I found a: and z: drive letters, and I thought everything's fine. But at the log I found this error message.

I downloaded swapadd x64 version and copied to "%windir%system32" folder.


If you start a 64 bit command prompt, can you see swapadd.exe if you navigate to C:Windowssystem32? If you by any chance used a 32 bit application to save the file to C:Windowssystem32, then it would actually have been saved in C:Windowssyswow64. If so, use a 64 bit application, such as 64 bit command prompt, to move swapadd.exe from C:Windowssyswow64 to C:Windowssystem32.

Another possibility could be that your imdisk-start.cmd script is running in 32 bit command prompt for some reason. Not a big deal really, just put swapadd.exe somewhere else and change path to that directory. It should work anyway. It does not require any particular dll files other than system "known" dlls.
  • bluespy likes this

#6 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 04 May 2012 - 11:37 PM

About a: drive, 'a:" drive is created but, when I clicked 'a:" drive at left pane at explorer "format a: drive" message is shown at windows.

%windir%\SysWOW64\imdisk -a -t vm -f "H:\Z.img" -m A: >> C:\ramdisk.log 2>&1


About "z:" drive, it has an error message at log file.


Created device 0: A: -> H:\Z.img

Notifying applications...

Done.

Creating device...

Error creating virtual disk: could not find specified file.

access denied.


I checked "H:\Z.img" file, and there is "H:\Z.img".


The code of creating imdisk is this.


%windir%\SysWOW64\imdisk.exe -a -f \\.\awealloc -s 990M -m Z: -p "/fs:ntfs /q /y /v:Pagefile" >> C:\ramdisk.log 2>&1

%windir%\SysWOW64\swapadd.exe Z:\pagefile.sys 970M 970M >> C:\ramdisk.log 2>&1


I tried to make "z:" drive at command prompt;


E:\>%windir%\SysWOW64\imdisk.exe -a -f \\.\awealloc -s 990M -m Z: -p "/fs:ntfs /q /y /v:Pagefile" >> C:\ramdisk.log 2>&1

E:\>


At the log file, I can see "could not find specified file".

#7 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 05 May 2012 - 09:06 AM

I would suggest that you remove all references to syswow64 and replace them with system32. There is no reason to call 32 bit imdisk.exe in that way. It will just cause a lot of trouble because imdisk.exe itself will not be able to call 64 bit format command.
  • bluespy likes this

#8 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 05 May 2012 - 11:44 PM

Olof Lagerkvist/ At this time, I got these errors



E:>%windir%\system32\imdisk.exe -a -f \\.\awealloc -s 990M -m Z: -p "/fs:ntfs /q /y /v:Pagefile" >> C:\ramdisk.log 2>&1
Creating device...
Error creating virtual disk: could not find specified file.
Page file creation failed: {no path} there is not path hs.

E:>%windir%\system32\swapadd.exe Z:\pagefile.sys 970M 970M >> C:\ramdisk.log 2>&1
Page file creation failed: No object name.



#9 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 06 May 2012 - 11:49 AM

You probably don't have awealloc driver auto-loaded. Type:

sc config awealloc start= auto

net start awealloc


Then try again.

#10 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 07 May 2012 - 01:55 PM

I did your commands.

sc config awealloc start= auto
net start awealloc


And creating a: drive with this command,


%windir%system32imdisk -a -t vm -f "H:Z.img" -m A: >> C:ramdisk.log 2>&1


when I open a: drive, "format a:" windows is opening. The log shows,

The ImDisk Virtual Disk Driver was loaded into the kernel.
Creating device...
Created device 0: A: -> H:Z.img
Notifying applications...
Done.


And creating z: drive with this command,

E:>%windir%system32imdisk.exe -a -f .awealloc -s 990M -m Z: -p "/fs:ntfs /q /y /v:Pagefile" >> C:ramdisk.log 2>&1
File System Type is RAW.
New File System Typ is NTFS.
Quick formatting 990MB.
making File System.
Formatted.
Total Disk Space: 990.0MB
Avaiable Disk Space: 982.8MB

E:>%windir%system32swapadd.exe Z:pagefile.sys 970M 970M >> C:ramdisk.log 2>&1
Page file creation failed: No object name.


The log shows;

Creating device...
Created device 3: Z: -> .awealloc
Formatting disk...
Notifying applications...
Done.
Page file creation failed: No object name.



#11 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 07 May 2012 - 02:41 PM

I did your commands.



And creating a: drive with this command,


%windir%system32imdisk -a -t vm -f "H:Z.img" -m A: >> C:ramdisk.log 2>&1


when I open a: drive, "format a:" windows is opening.


Yes, that is exactly as expected. It creates the virtual disk, but does not format, because you have no -p switch on that command line. Therefore you will be asked to format when you use it instead.

And creating z: drive with this command,

The log shows;


It creates the virtual disk and formats successfully. The problem occurs when it tries to create the pagefile. Are you absolutely sure that you are using the 64 bit version of swapadd.exe?
  • bluespy likes this

#12 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 09 May 2012 - 12:26 AM

E:>%windir%\SysWOW64\swapadd z:\pagefile.sys 990M 990M
Page file creation failed: No object name.

E:>%windir%\system32\swapadd z:\pagefile.sys 990M 990M
Page file creation failed: No object name.


The size of "%windir%\SysWOW64\swapadd.exe" is 5632byte and the size of "%windir%\system32\swapadd.exe" is 4608byte.

And about "a:" drive, how to load image file "H:\Z.img"?

I added "-p" switch, but doesn't work.


%windir%\system32\imdisk -a -t -p "/fs:exfat /a:512 /q/y/v:RAM_WORK" vm -f "H:\Z.img" -m A: >> C:\ramdisk.log 2>&1


#13 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 09 May 2012 - 07:22 AM

If you want to load image file H:\Z.img onto your new A: drive:

%windir%\system32\imdisk -a -t vm -f "H:\Z.img" -m A: >> C:\ramdisk.log 2>&1


Or, if you want it as a blank formatted drive:

%windir%\system32\imdisk -a -t vm -p "/fs:exfat /a:512 /q/y/v:RAM_WORK" -m A: >> C:\ramdisk.log 2>&1


You tried to add -p with its argument between -t and its argument, that would not work. Switches that expect arguments must be immediately followed by their argument.
  • bluespy likes this

#14 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 09 May 2012 - 12:39 PM


%windir%system32imdisk -a -t vm -f "H:Z.img" -m A: >> C:ramdisk.log 2>&1


After executing this command, the message window shows "foramt a:".

#15 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 09 May 2012 - 12:43 PM


%windir%system32imdisk -a -t vm -f "H:Z.img" -m A: >> C:ramdisk.log 2>&1


After executing this command, the message window shows "foramt a:".


Is H:Z.img really formatted? If not, do that first and then try again.
  • bluespy likes this

#16 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 09 May 2012 - 12:58 PM


Olof Lagerkvist/ Please let me know which application could open "H:Z.img". I could not open 'H:Z.img" with ultraiso.


#17 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 09 May 2012 - 01:18 PM

Olof Lagerkvist/ Please let me know which application could open "H:\Z.img". I could not open 'H:\Z.img" with ultraiso.


How would I know? I have no idea what your H:\Z.img contains. Is it a disk volume image? Is it a whole disk image (with partition table)? Is it a CD/DVD image? Something else?

I thought you were creating a new image file, but I see now that you are probably not. So, you need to know what your image file contains. Once you explain that or where you got it from and/or how you created it, then I or someone else, might be able to help you.
  • bluespy likes this

#18 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 09 May 2012 - 03:43 PM

The "H:Z.img" file is made at windows shut down as explained at the guide http://forums.guru3d...ad.php?t=356046 with this command.

imdisk-save.cmd


%windir%system32rawcopy -mld .A: "H:Z.img"


So this "H:Z.img" file is the image of "a:" drive.

The content of "a:" drive is explained at my question.

At the imdisk-start.cmd


%windir%system32imdisk.exe -a -s 256m -p "/fs:exfat /a:256 /q/y/v:RAM_WORK" -m a:

mkdir a:	emp

rd /s /q "c:windows	emp"

mklink /j "c:windows	emp" a:	emp


In other words, I made "a: drive" with imdisk-start.cmd at system start-up, and save "a:" drive to "H:Z.img" file with imdisk-save.cmd at system shut down.

And I want to load "H:Z.img" whenever system boots, so I asked how to change "imdisk-start.cmd".


%windir%system32imdisk -a -t vm -f "H:Z.img" -m A: >> C:ramdisk.log 2>&1


This command does not load "H:Z.img", but shows the message windows "format a: drive".

#19 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 09 May 2012 - 05:55 PM

Now you have suddenly changed /a:512 to /a:256 in the format arguments. That is not a supported value. I must say it takes some work to figure out what you change between all your posts without notice... :whistling:

In your above example, the format part when the drive is created, will not work. So you get an unformatted drive.

Now, to create an exfat formatted 256 MB image with a subdirectory "\temp" on it:


imdisk -a -s 256M -p "/fs:exfat /q /y /v:RAM_WORK" -f H:\Z.img -m a:

md a:\temp

imdisk -d -m a:


Then, in your startup script:

imdisk -a -t vm -f H:\Z.img -m a:

rd /s /q c:\windows\temp

mklink /j c:\windows\temp a:\temp


...and in your shutdown script:

rawcopy -mld \\.\a: H:\Z.img


  • bluespy likes this

#20 bluespy

bluespy

    Member

  • Members
  • 31 posts

Posted 11 May 2012 - 02:47 AM

At the log file, this message is found.

Warning! Source device not locked: Access denied


This message is made from

%windir%SysWOW64rawcopy -mld .A: "H:Z.img"  >> C:ramdisk.log 2>&1



#21 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 11 May 2012 - 07:00 AM

Yes, that is in most cases okay. It is just a warning. It tells you that there might be open files on the volume when you run rawcopy and that these files may be saved in a corrupt state if they are in the middle of an update of some kind.
  • bluespy likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users