Create WIMBoot Images
Applies To: Windows 8.1
Windows image file boot (WIMBoot) helps you save hard drive space by booting to a WIM file rather than a set of uncompressed Windows files. For more info about WIMBoot images, see Windows Image File Boot (WIMBoot) Overview.
To save room on the images, separate the Windows Recovery Environment (Windows RE) image from the main Windows image. Otherwise, this image will take up 200 MB or more of extra drive space in your image and will otherwise never be used.
The Windows RE image is stored inside the main Windows image at \Windows\System32\Recovery\winre.wim as a hidden file.
This page focuses on a method to create WIMBoot images that use a minimum of drive space. It also discusses other methods to create WIMBoot images to reduce the total number of Windows images that you manage.
Install Windows 8.1 Update to your Windows 8.1 and Windows RE images. For more info, see Install the Windows 8.1 Update for OEMs.
On your technician PC, install the Windows 8.1 Update version of the Windows Assessment and Deployment Kit (Windows ADK).
Create a Windows PE 5.1 bootable drive by adding the Windows 8.1 Update packages to Windows PE 5.0, and then cleaning up the image. For more info, see Update WinPE 5.0 to WinPE 5.1.
Method 1 (recommended): Create a WIMBoot-optimized image
Note, if you’re using Microsoft Deployment Toolkit (MDT) to deploy these images, you may need to use Method 2 instead. This method removes some on-demand installation features. For more info, see To remove Windows features for on-demand installation.
Create a temporary copy of the install.wim image
Copy the install.wim to a new temporary file. You'll use this copy of the file to create your WIMBoot image.
Copy C:\Images\install_updated.wim C:\Images\install_temp.wim
Separate the Windows RE image from the main Windows image
Create a mount directory for your install.wim files and mount the image.
md C:\mount\Windows Dism /Mount-Image /ImageFile:"C:\Images\install_temp.wim" /Index:1 /MountDir:C:\mount\Windows
Unhide the Windows RE image (winre.wim).
attrib –s -h C:\mount\Windows\Windows\System32\Recovery\winre.wim
Move winre.wim out of the image.
move C:\mount\Windows\Windows\System32\Recovery\winre.wim C:\images\winre.wim
Optimize the Windows image for WIMBoot
Optimize the image to gain free drive space in the final image.
Dism /Optimize-Image /Image:C:\mount\Windows /WIMBoot
Unmount the image
Unmount and commit the changes.
Dism /Unmount-Image /MountDir:C:\mount\Windows /Commit
Boot the image to apply the updates and to clean up the image
On your reference PC, boot to Windows PE 5.1, apply your Windows image, and then boot the PC again. For more info, see Samples: Applying Windows, System, and Recovery Partitions by using a Deployment Script.
Press CTRL+SHIFT+F3 at OOBE to enter audit mode.
Clean up the Windows image to gain additional free drive space in the final image. Use
/StartComponentCleanupto clean up the superseded components and reduce the size of the component store. If you've already used the
/ResetBaseoption when creating your base Windows 8.1 Update image, you don't need to run it again. To see the file size reduction, you'll need to either recapture or export the image.
Dism /Cleanup-Image /Online /StartComponentCleanup
Use Sysprep to generalize and shut down the PC.
C:\Windows\System32\Sysprep\sysprep /generalize /shutdown /oobe
Boot the PC to Windows PE 5.1. If the PC starts to reboot to Windows, you'll need to let it finish booting and then use Sysprep to generalize and shut down the PC again.
Recommended: Create a temporary scratch directory, for example, C:\Recycler\Scratch. Choose a location on a physical drive to avoid issues related to capturing files with long file names in the default Windows PE virtual scratch space. Choose a space that’s in the DISM Exclusion list to prevent capturing the DISM logs in your image. For more info, see DISM Configuration List and WimScript.ini Files.
Recapture the Windows image. This captures the applied updates and removes any files that were marked as superseded during
DISM /Cleanup-Image. Use the
/WIMBootoption to save the image as a WIMBoot image. Save the file to a location on a USB drive or your network (example: N:\Images), and give the image a name (example: Enterprise_x64 with 8.1 Updates).
DISM /Capture-Image /WIMBoot /ImageFile:"N:\Images\install_wimboot.wim" /CaptureDir:C: /Name:"WIMBoot Enterprise_x64 with 8.1 Updates" /ScratchDir:C:\Recycler\Scratch
Method 2: Add WIMBoot support to a standard image
To quickly add WIMBoot support to a standard (flat-boot) image to a WIMBoot image, you can either capture or export the image. The final image size will be larger than the original WIM file, because WIMBoot uses a different compression algorithm. You can use the instructions from Method 1 to optimize the image size.
You’ll also need a separate, updated Windows RE (winre.wim) file. For more info, see Install the Windows 8.1 Update for OEMs.
Dism /Export-Image /WIMBoot /SourceImageFile:C:\Images\install.wim /SourceIndex:1 /DestinationImageFile:C:\Images\install_wimboot.wim
Optional: Confirm the image is configured for WIMBoot:
Use DISM to check to make sure the image is configured correctly:
Dism /Get-ImageInfo /imagefile:C:\Images\install.wim /Index:1
In the output, you should see the following line:
WIM Bootable : Yes
- Don’t append images into an existing WIM file, because WIMBoot only supports using the first Windows image in the file (index value of 1).
Next steps: Deploy the WIMBoot images
- See Deploy WIMBoot Images: If you know the size of the images upfront or Deploy WIMBoot Images: If you don't know the size of the images upfront.