Richard Smith: 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:tempmount
- Go to the Windows AIK tools folder for the platform of PE that you will be changing (ie x86/x64) - CD "Program FilesWindows AIKToolsx86"
- Mount the default Windows PE image supplied with Windows AIK to your temporary mount folder - imagex.exe /MOUNTRW "C:Program FilesWindows AIKToolsPEToolsx86winpe.wim" 1 c:tempmount
- Go to the Windows AIK PETools folder - CD "C:Program FilesWindows AIKToolsPETools"
- 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:tempmountwindows
- Change back to the PETools directory - CD "Program FilesWindows AIKToolsx86"
- Unmount the image and commit the changes - imagex.exe /UNMOUNT /COMMIT c:tempmount