How to Create a WinPE 3.1 Boot Image & Import it to SCCM 2012R2

Microsoft’s SCCM 2012R2 comes with WinPE5.0 by default and due to compatibility issues with Windows XP with that version I have proceeded to utilize WinPE3.1. To get WinPE 3.1’s image imported onto the SCCM2012R2 environment several steps had to be taken to extract the file and import the appropriate drivers before being able to re-import it back into SCCM.

These steps are commonly documented throughout various sites, but during my research I did not find many complete guides. My recommendation is to create a Windows 7 virtual machine whose only purpose will be to create and update WinPE boot images. We will start with the following steps as bare minimums:

Downloading & Installing WAIK 3.1

  1. Download and Install the WAIK 3.0 on this machine.
  2. Download and mount the supplementary WAIK 3.0 update
    1. If using virtual machine you can mount the ISO to the virtual CD/DVD drive.
  3. To install the WAIK 3.1 supplementary update, run command prompt in elevated mode and change directory onto the mounted CD/DVD drive with the following command assuming E: drive is where the CD/DVD was mounted.
    1. xcopy E:\ “C:\Program Files\Windows AIK\Tools\PETools” /ERDY
    2. There will be 1131 files that should be copied.
  4. Now you can launch the “Deployment Tools Command Prompt” as an administrator to begin the creation process.

Creating a Custom WinPE Image

  1. Once the “Deployment Tools Command Prompt” has been launched as an administrator run the following command:
    1. copype.cmd x86 c:\winpe_x86
    2. copype.cmd amd64 c:\winpe_amd64

Note: The copype.cmd batch will create a folder structure under the named destination above “c:\winpe_x86” and “c:\winpe_amd64” with appropriate sub-folders.

  1. Run the following commands to copy the WinPE base image:
    1. copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\WinPE3.1_boot_x86.wim
    2. copy c:\winpe_amd64\winpe.wim c:\winpe_amd64\ISO\sources\WinPe3.1_boot_amd64.wim
  2. Mount the base Windows PE image using the following command:
    1. Dism /Mount-Wim /WimFile:C:\winpe_x86\ISO\sources\WinPE3.1_boot_x86.wim /index:1 /MountDir:C:\winpe_x86\mount
  3. Add the appropriate packages to the WinPE image, we only need three but more are available. The required ones should be added with the following commands:
    1. Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\<version>\Tools\PETools\<architecture>\WinPE_FPs\winpe-Scripting.cab”
    2. Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\<version>\Tools\PETools\<architecture>\WinPE_FPs\winpe-WMI.cab”  
    3. Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:”C:\Program Files\<version>\Tools\PETools\<architecture>\WinPE_FPs\winpe-WDS-Tools.cab”
  4. Verify that the packages were installed by running the following command:
    1. Dism /image:c:\winpe_x86\mount /Get-Packages
  5. Finally commit changes to the image by running the following command:
    1. Dism /unmount-Wim /MountDir:C:\winpe_x86\mount /Commit

Note: Keep track of the “boot.wim” files, name them accordingly to not get the x86 and amd64 mixed up. For example WinPE3.1_Boot_x86.wim and WinPE3.1_boot_amd64.wim will be used as reference from this point forward.

Adding Drivers to SCCM

Adding drivers to WinPE boot images outside of SCCM’s native format is a painstaking process. However, for our needs we needed to add drivers for at least 8 different models. I decided to leverage SCCM by importing each model’s drivers and organizing them through driver packages. This would let me have future usage of the drivers that may be needed in future OS deployments on newer versions of WinPE. If you already have a driver structure configured you may skip this section and go straight into injecting drivers into the WinPE boot image.

  1. Create a folder in an easily accessible location for SCCM where drivers will be dumped and be used as an import repository, for example:
    1. \\SERVERNAME\SHARENAME\OperatingSystems\Drivers\Imports\Manufacturer\Model\Model#\
  2. Create a folder in an easily accessible location for SCCM where driver packages will be stored and used by SCCM, for example:
    1. \\SERVERNAME\SHARENAME\OperatingSystems\Drivers\Packages\Manufacturer\Model\Model#\
  3. Launch the SCCM Console, within Software Library expand Operating Systems and right click under Drivers.

    ImportDriver

  4. Import the downloaded drivers to SCCM leveraging the newly create import repository as the source folder for each Model #.

    DriverImport

  5. Assign the newly imported drivers to a category matching the model # for easier management.
  6. Create a driver package if it does not already exist and leverage the newly created driver packages repository, where SCCM will store the already processed drivers.

    CreateDriverPackage

  7. Repeat this process for all the desired models that will need WinPE 3.1 drivers imported.
  8. Continue through and finish the wizard.

Adding Drivers to WinPE 3.1 Boot Image

Now that all the drivers have been added onto SCCM, I can maintain the driver’s folder structure where it can allow me to import all of the packaged drivers onto the WinPE 3.1 boot image. This is where I would bring back the Windows 7 VM that was used to create the base WinPE boot image and follow these steps:

  1. Create a folder on the root of C:\ called WinPE.
  2. Create three sub-directories called: Images, Offline and Drivers
  3. Copy the WinPE3.1_Boot_x86.wim file previously saved under C:\winpe_x86\ to the C:\WinPE\Images\ directory.
  4. Copy all of the processed drivers located under the driver packages directory’s top folder \\SERVERNAME\SHARENAME\OperatingSystems\Drivers\Packages\ to the C:\WinPE\Drivers\ directory.
  5. To get the WMI file information open a command prompt as an elevated administrator and type the following commands:
    1. Dism /Get-WimInfo /WimFile:C:\WinPE\Images\WinPE3.1_Boot_x86.wim
  6. Now mount the wim file and use the name provided from the previous command. It should be something like “Microsoft Windows PE (x86)”
    1. Dism /Mount-Wim /WimFile:C:\WinPE\Images\WinPE3.1_Boot_x86.wim /Name:” Microsoft Windows PE (x86)” /MountDir:C:\WinPE\Offline
  7. Inject the drivers to the newly mounted wim file with the following command:
    1. Dism /Image:C:\WinPE\Offline /Add-Driver /Driver:C:\WinPE\Drivers /Recurse
  8. Now wait as this process can take a fair amount of time based on the number of drivers.
  9. Finally get ready to finalize all the modifications and commit the changes
    1. Dism /Unmount-Wim /MountDir:C:\WinPE\Offline /Commit
  10. The modified file should reside under the C:\WinPE\ directory and is now ready to be imported as a boot image in SCCM.

Import a WinPE 3.1 Boot Image to SCCM

Finally we can import the modified WinPE 3.1 boot image into SCCM so it can be used for any type of OS deployment on the appropriate machines.

  1. Copy the WinPE3.1_Boot_x86.wim files to the share location where SCCM can access them in whatever structured mechanism works for you.
  2. Launch the SCCM Console, within Software Library expand Operating Systems and right click under Boot Images.

    AddBootImage

  3. Specify the UNC path for the custom wim file and click next
  4. Specify the name, version and comments.
  5. Review the summary and hit next and close.
  6. Distribute the boot image to distribution servers as needed.

Note: Custom wim files do not have a lot of the properties available to the default WinPE 5.0 boot image.

One thought on “How to Create a WinPE 3.1 Boot Image & Import it to SCCM 2012R2

  1. Pingback: THOUGHTS BEHIND LARGE SCALE OS UPGRADES – PART 2 | OMG Tech Stuff

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s