Jump to content











Photo
- - - - -

Need Help from paraglider RE: Pagefile in Windows 7 USB VHD Boot


  • Please log in to reply
9 replies to this topic

#1 Me Only

Me Only

    Newbie

  • Members
  • 17 posts
  •  
    United States

Posted 01 August 2011 - 02:43 PM

Paraglider, I have just finished getting Windows Thin PC (Windows 7 Embedded Standard) to boot from VHD on a USB disk. The problem is that I cannot use your wonderful utility SetPageFile in this environment, even on a secondary hard drive. Is it possible to update SetPageFile for Windows 7 support? For informational purposes, I am using EWF to protect the VHD from changes, but the main USB disk is unprotected. I can see another hard drive (SATA) in the computer, but when SetPageFile is run, the PagingFiles entry in the registry becomes garbage. Also, UAC is turned off. Is there hope?

EDIT: Another question. If SetPageFile cannot be updated, I am aware that wpeutil can create a pagefile, but I cannot get it to run in Windows 7. Neither in "regular" Windows 7 nor in Windows Thin PC. Are you aware of the necessary dependencies? I have wpeutil.dll in the same folder, and an en-US with wpeutil.dll.mui inside of it. However, wpeutil.exe still errors: "The application was unable to start correctly (0xc0000142). Click OK to close the application."

Edited by Me Only, 01 August 2011 - 02:51 PM.


#2 paraglider

paraglider

    Gold Member

  • .script developer
  • 1739 posts
  • Location:NC,USA
  •  
    United States

Posted 02 August 2011 - 03:47 AM

In general windows does not let you create a page file on a removeable drive. You have to load a filter driver to make the removeable drive appear to be a fixed drive.

Never tried to run setpagefile on win7pe so don't know if it works or if not why not.

You should be able to use sysinternals procmon to see which files are missing when you run wpeutil.

#3 Me Only

Me Only

    Newbie

  • Members
  • 17 posts
  •  
    United States

Posted 02 August 2011 - 10:58 AM

In general windows does not let you create a page file on a removeable drive. You have to load a filter driver to make the removeable drive appear to be a fixed drive.

Never tried to run setpagefile on win7pe so don't know if it works or if not why not.

You should be able to use sysinternals procmon to see which files are missing when you run wpeutil.


For reference, I mentioned that I was NOT trying to load a pagefile on a removeable drive (unless SATA drives are suddenly considered removeable).
As for procmon, Thanks for that. I tried that and immediately noticed that the app failed when not finding HKLM\System\CurrentControlSet\MiniNT (since it was not in a PE environment). I added the key to the registry and immediately wpeutil was able to load successfully. I have not yet tried creating a pagefile, but that is the next step. Do you know if adding this key adversely affects any other functionality of Windows or other applications?

EDIT: Just tried to make a pagefile. It fails with error 0x80070061. I cannot see any reference to this error number anywhere. I tried looking at procmon when this error occurs, but there are no obvious failures like before. Can you provide any additional information or help?

Edited by Me Only, 02 August 2011 - 11:30 AM.


#4 paraglider

paraglider

    Gold Member

  • .script developer
  • 1739 posts
  • Location:NC,USA
  •  
    United States

Posted 02 August 2011 - 11:45 AM

Unfortunately page file api are internal apis and are not documented by MS. Could not find any information about win32 error ( feature = 7 ) error code 97 ( 0x61 ).

Could well just mean a page file is not supported on the drive you are trying to create it on.

The HKLM\System\CurrentControlSet\MiniNT registry entry is reserved for use in PE. It affects how the system behaves so is certainly not a good idea to set it on full windows.

#5 Me Only

Me Only

    Newbie

  • Members
  • 17 posts
  •  
    United States

Posted 02 August 2011 - 11:54 AM

Unfortunately page file api are internal apis and are not documented by MS. Could not find any information about win32 error ( feature = 7 ) error code 97 ( 0x61 ).

Could well just mean a page file is not supported on the drive you are trying to create it on.

The HKLM\System\CurrentControlSet\MiniNT registry entry is reserved for use in PE. It affects how the system behaves so is certainly not a good idea to set it on full windows.


I have a link to a page that indicates that error 0x61 means EAFNOSUPPORT: http://www.neorouter....php?f=8&t=4728
This appears to be linux, however.

I am unable to understand why page file creation should relate to anything TCP-related, so maybe this is not the correct information. Is there a possibility you could do some digging on how to support the pagefile api on Windows 7 yourself in the event that wpeutil will not work at all?

EDIT: or maybe you can recommend an API monitor that I can run in Win7PE (where wpeutil DOES work) that can tell me enough information to help you figure it out.

Edited by Me Only, 02 August 2011 - 11:55 AM.


#6 paraglider

paraglider

    Gold Member

  • .script developer
  • 1739 posts
  • Location:NC,USA
  •  
    United States

Posted 02 August 2011 - 12:02 PM

At least from a registry point of view it probably can be made compatible. I can see that the format of the

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
PagingFiles

Changed in win7:

?:\pagefile.sys

Also seems to be an additional registry entry:

ExistingPageFiles

which on my system contains :

\??\C:\pagefile.sys


On XP:

PagingFiles contains something like: C:\pagefile.sys 1536 3072

#7 Me Only

Me Only

    Newbie

  • Members
  • 17 posts
  •  
    United States

Posted 02 August 2011 - 12:04 PM

At least from a registry point of view it probably can be made compatible. I can see that the format of the

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
PagingFiles

Changed in win7:

?:\pagefile.sys

Also seems to be an additional registry entry:

ExistingPageFiles

which on my system contains :

\??\C:\pagefile.sys


On XP:

PagingFiles contains something like: C:\pagefile.sys 1536 3072



ExistingPageFiles is the same on my system as well.
EDIT: the PagingFiles value of ?:\pagefile.sys is only if you allow windows to manage the size of the paging file. When you specify a size, you get a value similar to before: c:\pagefile.sys 512 4096

Edited by Me Only, 02 August 2011 - 12:09 PM.


#8 paraglider

paraglider

    Gold Member

  • .script developer
  • 1739 posts
  • Location:NC,USA
  •  
    United States

Posted 02 August 2011 - 12:13 PM

Just tried existing setpagefile on win7 x64 and it works without any changes. Created a page file for me.

ExistingPageFile value gets created on first reboot after creating page file.

#9 Me Only

Me Only

    Newbie

  • Members
  • 17 posts
  •  
    United States

Posted 02 August 2011 - 01:14 PM

I am sorry that there has been confusion. I have not explained the entire process, so how are you to debug it?
Here is the total explanation of what is happening and how:

I am booting Windows Thin PC 32-bit. Windows Thin PC used to be named Windows Embedded Standard 7 until Microsoft renamed it.

On USB Boot, The VHD is C:
The SATA Partition "System Reserved" is D:
The USB drive that contains the VHD is E:
The SATA Hard Drive's main partition is F:

When launching SetPageFile, the interface shows up fine. When I select something is when there is a problem.
When selecting C:, I get "SetPageFile Application has stopped working".
When selecting D:, the program doesn't die, but I get a corrupted value for Maximum Size. It looks something like "#\cw[unprintable character]IU"
When selecting E:, I get "SetPageFile Application has stopped working".
When selecting F:, I get "SetPageFile Application has stopped working".

When using the command line options, similar things occur.
SetPageFile.exe /f F:\PageTest.sys /i 512 /m 4096
This causes "SetPageFile Application has stopped working".
The pagetest.sys file is created in F:, but the system properties shows no pagefile on this drive. The registry shows a blank for PagingFiles.

If the pagefile exists, is it actually working?
Is there some program I can run to see if Windows is actually USING the page file?
If it is working, how do I avoid the errors?

Edited by Me Only, 02 August 2011 - 01:15 PM.


#10 Me Only

Me Only

    Newbie

  • Members
  • 17 posts
  •  
    United States

Posted 02 August 2011 - 02:15 PM

Paraglider, while I was waiting for your response, I downloaded a utility that allowed me to see pagefile usage. I am happy to report that it is indeed working. However, I still need to know if there is a way to avoid the errors when SetPageFile is used.

EDIT: More Good News: I managed to prevent errors when using SetPageFile (on the command line at least). I used the DisablePagingExecutive set to 1 before boot. When booted, I set this to 0 before creating a page file with SetPageFile. No errors, and the page file is active. It even set PageFiles in the registry correctly. Thanks a load for this simple but awesome utility.

Edited by Me Only, 02 August 2011 - 02:57 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users