Not enough free space error when using ImageX to deploy files to NTFS volume

Article ID: 2699055 - View products that this article applies to.
Expand all | Collapse all

SUMMARY

Consider the following scenario:
  • You have a computer that has a small volume created on a hard disk (100MB or less, for example).
  • The volume has less than 50% free space available.
  • The computer is booted using WinPE boot media created through the Windows OPK or Windows Automated Installation Kit (WAIK).
  • You use ImageX.exe to capture files and/or folders from the volume.
  • You later try to apply the WIM file that you created earlier using ImageX to the same volume.

In this scenario, you may receive an error message that there is not enough space on the target volume.


MORE INFORMATION

The native file system for Windows Vista and later operating systems is NTFS. NTFS uses compression on some files and directories to conserve space on the hard disk. However, when using ImageX to restore a WIM to the same volume it was captured from, files are restored in an uncompressed format. The file system will eventually recompress these files but it is independent of Imagex. Since ImageX is unable to force the file system to provide real-time compression as it deploys files back to the target volume, the total size of the uncompressed files may exceed the size of the volume. As a result, once all available space on the volume has been exhausted, you will receive an error message stating that there is not enough space.

Windows 7 and Windows Server 2008 R2 have the in-box command line utility DISM.exe which can be used to determine in advance if the target volume is smaller than the files contained in the WIM image. To check the uncompressed file size of the WIM, run the following DISM command at an elevated command prompt (replacing <pathto> with the path to the WIM file you created and filename.wim with the name of your WIM file):

Dism.exe /get-wiminfo /wimfile:<pathto>\filename.wim

If the target volume is smaller than the total size of the files contained in the WIM image, you can try one of the following methods to work around this:
  1. Use ImageX with the /split parameter to split the WIM into multiple sections. Applying the WIM in multiple sections may force disk compression to occur in between appliction of the sections instead of via a lazy write or reboot. To split the WIM into multiple sections, use the following steps:
    1. Install the Windows OPK or Automated Install Kit tools. Links can be found at the end of this article.
    2. Open an Administrative command prompt.
    3. Run the following ImageX command on your WIM image that you've created to split the WIM file into multiple read-only WIM files, which will have an .SWM extension once split:

      Imagex.exe [FLAGS] /SPLIT image_filedest_filesize

      image_file - The path and file name of the WIM file that you want to split.
      dest_file - The destination path and file name of the split files.
      size - The maximum size in megabytes for each created file.

      Example:Imagex.exe /split d:\imaging\data.wim d:\imaging\splitdata.swm 600
    4. To restore the split SWM files to the target volume, use a command similar to the following (use the ImageX command line help for addition detail):

      Imagex /ref <driveletter>:\image*.swm /apply <driveletter>:\image.swm 1 <targetdrive>

    NOTE: When you are ready to restore the split *.SWM files, be sure that all SWM files are in the same root or folder location prior to running ImageX.
  2. Manually apply the WIM to a folder on a different computer, extract some files and/or folders to reduce the size of the WIM and then capture the WIM again, which should now be reduced in size. You can then create a second WIM that contains the extracted files and/or folders, as long as it does not contain any of the same files and/or folders that the first WIM contains. The following steps can be used to complete this process:
    1. Copy your WIM file to writable media other than the target volume that you want to restore to.
    2. Create a folder on the writable media (ex. MOUNT).
    3. If the WIM information is not known, retrieve it using the following DISM command at an elevated command prompt:
      Dism /get-wiminfo /wimfile:<pathto>filename.WIM
    4. Apply the WIM file to the MOUNT folder that you created off of the root of the writable media:
      Imagex.exe /apply filename.wim 1 <driveletter>:\MOUNT
    5. Create a second folder (ex. MOUNT2).
    6. Move some of the files from the \MOUNT folder to the MOUNT2 folder. Make sure that you use the MOVE command as opposed to the COPY command to ensure that there are not redundant files.
    7. Capture the contents of the MOUNT folder into your first WIM using the following command:
      Imagex /capture \mount c:\Image1.WIM "Image part 1"
    8. Capture the contents of the MOUNT2 folder into your second WIM file:
      Imagex /capture \mount2 c:\Image2.WIM "Image part 2"
    9. Once you have captured both WIMs, be sure to test to ensure that each WIM file deploys successfully. A reboot should not be required between deployment of each WIM file.
  3. Alternatively, a 3rd-party sector-based imaging solution can be used.
For more information on the Windows Automated Installation Kit and ImageX command-line options, click on one of the following links:

ImageX Command-Line Options
http://technet.microsoft.com/en-us/library/dd799302(v=WS.10).aspx

Windows Automated Installation Kit for Windows 7
http://technet.microsoft.com/en-us/library/dd349343(v=WS.10).aspx


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2699055 - Last Review: May 1, 2012 - Revision: 4.0
APPLIES TO
  • Windows Automated Installation Kit for Windows 7
Keywords: 
KB2699055

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com