Expanding the Scratch Space in Windows PE 2.1
Recently, I have had to create a bigger scratch space (the MDT X: drive) in Windows PE to deal with the injection of a largish driver during a Windows Vista deployment. The driver in question is the NVidia driver for the Lenovo P60 and P61 and because of the limited scratch space under PE 2.0, this was causing an issue at injection time. There is a scratch file change (registry hack) that can be made to Windows PE 2.0 and below to change the scratch file space from the default 32 Mb - however this is unsupported.
With the introduction of Windows PE 2.1 (supplied with the Windows Automated Installation Kit (Windows AIK) 1.1), the scratch area can be changed from the command line. Below is the process for creating a larger scratch area.
- Create a temporary mount folder on your hard disk - MD c:\temp\mount
- Go to the Windows AIK tools folder for the platform of PE that you will be changing (ie x86/x64) - CD "Program Files\Windows AIK\Tools\x86"
- Mount the default Windows PE image supplied with Windows AIK to your temporary mount folder - imagex.exe /MOUNTRW "C:\Program Files\Windows AIK\Tools\PETools\x86\winpe.wim" 1 c:\temp\mount
- Go to the Windows AIK PETools folder - CD "C:\Program Files\Windows AIK\Tools\PETools"
- Run the PEIMG command to adjust the scratch size in the mounted image using /SCRATCHSPACE flag to set the size of the drive you want (in this case 128Mb) - peimg.exe /SCRATCHSPACE=128 c:\temp\mount\windows
- Change back to the PETools directory - CD "Program Files\Windows AIK\Tools\x86"
- Unmount the image and commit the changes - imagex.exe /UNMOUNT /COMMIT c:\temp\mount
That's it - the scratch area will now be set at 128 Mb for all boot images based on this source - which means all boot images created by MDT will now have the set scratch space set (there's a script here somewhere to automate this - so feel free to create and send in your suggestions via the comments area :-)).
Remember that the scratch space is a RAM drive, so the machine being built by this boot environment will need enough memory to deal with Windows PE plus your additional scratch space (so that's approximately 240 Mb plus scratch space).
This post was contributed by Richard Smith a Senior Consultant with Microsoft Services, UK.
Comments
Anonymous
January 01, 2003
Would it ever be possible to add this feature to MDT so you could set it when creating the wim using update deployment point?Anonymous
May 12, 2008
Thx :) Spot on my recent problem. And thank you for fantastic information in this blog.Anonymous
May 12, 2008
Great blog guys. But... Rather than increasing the RAM requirements on the system by increasing the scratch space, I prefer the solution in KB932403 which just requires that you change the USERPROFILE environment variable to point to somewhere on C: drive before you launch the vista setup.exe, or run pkgmgr.exe. see: http://support.microsoft.com/kb/932403Anonymous
May 19, 2008
Michael Neihaus is looking for comments on MDT2008 updates, what people like about it, what they'd like to see in the next upgrade. You can post this suggestion on his blog about it.Anonymous
March 29, 2011
whers the answers