IBM Support

Creating Bootable WinPE Media for Recovery of Microsoft Windows Server 2016 and Microsoft Windows 10

How To


Summary

Use these instructions to create a bootable Windows Preinstallation Environment (WinPE) image suitable for recovery of Microsoft Windows Server 2016 and Microsoft Windows 10. The same image can be used for both BIOS and UEFI-based systems.

Note: Although the title of this article does not mention other Windows versions, the information in this article also applies to other Windows operating systems that are supported by IBM Spectrum Protect.

Steps

Before you begin

1. Obtain and install the Microsoft Windows Assessment and Deployment Kit (ADK). Use version 1703, which runs on Microsoft Windows 10. Go to https://www.microsoft.com and search for Windows ADK for Windows 10. If you need help with installing the ADK, or you have other questions about the ADK, contact Microsoft support for assistance. During installation of the ADK, choose the Deployment Tools and Windows Preinstallation Environment (Windows PE) features.

Notes:

  • Later versions of the ADK might also work. However, do not use ADK version 1803. The WinPE in ADK version 1803 is based on Microsoft Windows version 1803, and Windows 1803 has a known issue that causes the backup-archive client to appear hung when you enter the node password. For more information, see Microsoft knowledge base article KB4458469 and IBM APAR IT26393.
  • Beginning with ADK version 1809, the Windows Preinstallation Environment (WinPE) feature is moved into a separate installation package. If you use ADK version 1809, install the Deployment Tools feature from the ADK, then install the separate WinPE add-on for the ADK. For more information, see the Microsoft ADK installation instructions.

2. Obtain the IBM Spectrum Protect backup-archive client package that you want to include in the WinPE image. Use the same, or later client version than the client version that is used to back up your Microsoft Windows systems. For example, if you back up Microsoft Windows Server 2016 with backup-archive client version 8.1.0.0, then your WinPE image must include version 8.1.0.0 or later.

  • The earliest IBM Spectrum Protect backup-archive client version that supports Microsoft Windows 10 is interim fix 7.1.3.2. However, the earliest client version to use for backup and recovery of Microsoft Windows 10 is interim fix 7.1.6.4. Between 7.1.3.2 and 7.1.6.4, important product fixes and packaging changes were made. The product fixes are important for backup and recovery reliability. The steps for extracting the client image and copying it to the WinPE image do not work correctly for any version earlier than 7.1.6.0. This document assumes that you use a minimum client version of 7.1.6.4.
  • The earliest IBM Spectrum Protect backup-archive client version that supports Microsoft Windows Server 2016 is 8.1.0.0.
  • If you want to use one bootable recovery image for both Microsoft Windows Server 2016 and Microsoft Windows 10, use client version 8.1.0.0 or later for backup and recovery operations.

Tip: Instead of manually following the steps described in this article, use the build_recovery_image.cmd script to create the WinPE recovery image. The script automates the steps described in this procedure. If you need more WinPE features or drivers that are not included in the WinPE operating system, you can customize the accompanying "user exit" script, build_recovery_image_dismexit.cmd, to add those features or drivers. The scripts are included in the .zip file that is attached at the end of this section.

After you download the .zip file, extract the scripts to a directory of your choosing on the system where the Microsoft Windows ADK is installed. The scripts must reside in the same directory, even if you do not customize the user exit script. Run build_recovery_image.cmd for usage instructions.

Latest version:

Version 2.3 includes the following changes:

  • Fixes a problem that caused EFI file restore errors and created empty drive restore scripts when the node is configured for automatic client failover.
14 January 2022 version 2.3:

Version 2.3 replaces all earlier versions. The earlier versions are no longer available.

Earlier version change history:

Version 2.2:

  • Adds support for point-in-time (PIT) restore.
  • Adds an option to open a command prompt to facilitate manual, custom network configuration.
  • Adds a "tip" to the drive restore script to add the -QUIET option for drive restores that have millions of files. This option helps to prevent the X: drive from filling up due to the size of the redirected dsmc restore output file.
  • Adds VSS_ASR tracing of system state restore for diagnostic purposes.
  • Creates a log bundle at the end of the restore that can be uploaded to IBM Support for troubleshooting restore issues.
 

Version 2.1:

  • Embeds the script restore_system.cmd in the WinPE image. The restore_system.cmd script guides you through the system state and drive restore processes, and automates many of the restore steps. The script does not yet support point-in-time restores.
  • Can embed the IBM Spectrum Protect server public certificates in the WinPE image. From a system that backs up to the server, copy the dsmcert.kdb and dsmcert.sth to the same directory where the scripts reside, then include the -addcert option in the build_recovery_image.cmd command.

Version 1.x:

  • Automates the steps to create WinPE boot media.

Support for the build_recovery_image and restore_system scripts

The scripts are distributed on an “as is” basis without any warranty either expressed or implied. Support assistance for the use of the scripts is limited to situations where IBM Spectrum Protect support is entitled and where the issues are not specific to the scripts.

Procedure

1. If you downloaded the IBM Spectrum Protect backup-archive client package from the FTP site or IBM Fix Central, run the following command to extract the installation image to a target directory that does not exist:

  n.n.n.n-TIV-TSMBAC-WinX64.exe -otargetdir

n.n.n.n is the client version number and targetdir is the directory where the installation image is extracted. For example, if you downloaded the version 8.1.0.0 client and you want to extract it to C:\download\tsm8100c:

  8.1.0.0-TIV-TSMBAC-WinX64.exe -oC:\download\tsm8100c

2. Locate the icon for the ADK Deployment and Tools Environment on your system, right-click the icon, and click Run as administrator. The ADK command prompt opens. The current directory is the location of the Windows ADK tools. Run the commands in the rest of these steps from the ADK command prompt.

3. Run the copype.cmd script, which prepares the minimum WinPE directory structure. The script requires two arguments: hardware architecture and destination location. The hardware architecture value can be x86 or amd64. The destination value is the path to a local directory that does not exist. The script creates the destination directory. For example,

For 64-bit editions of Microsoft Windows Server 2016 and Microsoft Windows 10:

  copype amd64 c:\winpe_x64

For 32-bit editions of Microsoft Windows 10:

  copype x86 c:\winpe_x86

4. Use the robocopy command to copy the IBM Spectrum Protect backup-archive client files from the client installation image to the WinPE directory structure. The command arguments include the backup-archive client Program Files 64 or Program Files directory, and the destination location of the WinPE directory structure. The command has this form:

  robocopy clientimagedir winpeimagedir\media /e

If you downloaded the client from the FTP site or IBM Fix Central, clientimagedir is the concatenation of the target directory where you extracted the installation image and \TSMClient. For example, if you extracted the installation image to C:\download\tsm8100c then clientimagedir is C:\download\tsm8100c\TSMClient.

If you obtained the client package from Passport Advantage, clientimagedir is the concatenation of the client installation package directory and \TSMCLI_WIN\tsmcli\x64\client\Disk1 for the 64-bit client or \TSMCLI_WIN\tsmcli\x32\client\Disk1 for the 32-bit client.

winpeimagedir is the destination location that you specified in the copype command in step 3.

Examples:

Copy the 8.1.0.0 Passport Advantage installation image at D:\ to the WinPE directory C:\winpe_x64:

  robocopy d:\tsmcli_win\tsmcli\x64\client\disk1 c:\winpe_x64\media /e

Copy the 8.1.0.0 FTP installation image at C:\download\tsm8100c to the WinPE directory C:\winpe_x64:

  robocopy c:\download\tsm8100c\tsmclient c:\winpe_x64\media /e

Copy the 32-bit 7.1.6.4 FTP installation image at C:\download\tsm7164c to the WinPE directory C:\winpe_x86:

  robocopy c:\download\tsm7164c\tsmclient c:\winpe_x86\media /e

5. Change to the media subdirectory of the WinPE directory that you specified in the copype command in step 3. For example,

  cd c:\winpe_x64\media

6. Run the backup-archive client script that configures the embedded client for use with WinPE.

If you are creating a 64-bit WinPE image:

  dsmc-pe-x64 set

If you are creating a 32-bit WinPE image:

  dsmc-pe set

7. Issue the following commands to remove unnecessary files and thus reduce the WinPE image size:

For 32-bit WinPE images that use the V7.1 client:

del *.ini *.mst *.msi *.htm *.exe *.spd *.cmd
rd /s /q common commonappdata issetupprerequisites system32 win windows
dir "program files\tivoli\tsm\baclient\jvm*"
rd /s /q "program files\tivoli\tsm\baclient\jvmxxxxx"

jvmxxxxx is the directory that is listed in the preceding dir command.

For 64-bit WinPE images that use the V7.1 client:

del *.ini *.mst *.msi *.htm *.exe *.spd *.cmd
rd /s /q common64 commonappdata issetupprerequisites system64 win windows
dir "program files 64\tivoli\tsm\baclient\jvm*"
rd /s /q "program files 64\tivoli\tsm\baclient\jvmxxxxx"  

jvmxxxxx is the directory that is listed in the preceding dir command.

For 64-bit WinPE images that use the V8.1 client:

del *.ini *.mst *.msi *.htm *.exe *.spd *.cmd
rd /s /q common64 commonappdata issetupprerequisites ibmspjvm system64 win windows

8. Add Windows Management Instrumentation (WMI) to the WinPE ISO image and increase the size of the WinPE X: drive

You must add WMI to the WinPE image when either of the following conditions is true.

  • The included backup-archive client version is 7.1.8.0 or later 7.1 level
  • The included backup-archive client version is 8.1.2.0 or later

However, even if you do not include a client version that requires WMI, consider following steps a, d, and e, to increase the size of the WinPE X: drive. The larger drive is useful for collecting diagnostic data during troubleshooting.

The ADK tool Dism.exe is used in this step. Issue the following commands, replacing c:\winpeimagedir with the WinPE destination directory, and platform with amd64 or x86, depending on the processor architecture of your WinPE image. This step assumes that the ADK is installed in its default location on the C: drive. If you installed the AIK to a different location, you need to modify the /packagepath option in step b.

a. Mount the WinPE image:

  dism /mount-wim /wimfile:"c:\winpeimagedir\media\sources\boot.wim" /index:1 /mountdir:"c:\winpeimagedir\mount"

b. Add the WMI packages to the image. The commands are long, and might not wrap on your screen. Scroll to the right to see the complete commands.

  dism /image:"c:\winpeimagedir\mount" /add-package /packagepath:"c:\program files (x86)\windows kits\10\assessment and deployment kit\windows preinstallation environment\platform\winpe_ocs\winpe-wmi.cab"
  dism /image:"c:\winpeimagedir\mount" /add-package /packagepath:"c:\program files (x86)\windows kits\10\assessment and deployment kit\windows preinstallation environment\platform\winpe_ocs\en-us\winpe-wmi_en-us.cab"

c. Verify that the packages were added successfully:

  dism /image:"c:\winpeimagedir\mount" /get-packages

The expected output looks similar to this example output:

Deployment Image Servicing and Management tool
Version: 10.0.15063.0

Image Version: 10.0.15063.0

Packages listing:
Package Identity : Microsoft-Windows-WinPE-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~10.0.15063.0
State : Installed
Release Type : Language Pack
Install Time : 3/18/2017 9:40 PM

Package Identity : Microsoft-Windows-WinPE-Package~31bf3856ad364e35~amd64~~10.0.15063.0
State : Installed
Release Type : Foundation
Install Time : 3/18/2017 9:39 PM

Package Identity : WinPE-WMI-Package~31bf3856ad364e35~amd64~en-US~10.0.15063.0
State : Installed
Release Type : Language Pack
Install Time : 1/9/2018 6:04 PM

Package Identity : WinPE-WMI-Package~31bf3856ad364e35~amd64~~10.0.15063.0
State : Installed
Release Type : Feature Pack
Install Time : 1/9/2018 6:04 PM

The operation completed successfully.

d. When you boot WinPE, the operating system runs in a virtual RAM drive, X:. By default, the drive size is 32 MB. You can optionally increase the size of the drive to 64 MB, 128 MB, 256 MB, or 512 MB. A larger drive is helpful when you need to collect diagnostic information for troubleshooting.

Run the following command to change the drive size, where nnn is 64, 128, 256, or 512:

  dism /image:"c:\winpeimagedir\mount" /set-scratchspace:nnn

Run this command to verify the size:

  dism /image:"c:\winpeimagedir\mount" /get-scratchspace

The expected output looks similar to the following lines. In this example, the value specified in the /set-scratchspace parameter was 512:

Deployment Image Servicing and Management tool
Version: 10.0.15063.0

Image Version: 10.0.15063.0

Configured scratch space on the Windows PE system volume:

Scratch Space : 512MB

The operation completed successfully.

e. Unmount the image:

  dism /unmount-wim /mountdir:"c:\winpeimagedir"\mount /commit

Tip: If you make any mistakes and want to cancel the changes, replace /commit with /discard, then repeat this step from the beginning.

Examples:

Some of the commands are long, and might not wrap on your screen. Scroll to the right to see the complete commands.

For x86 architecture:

dism /mount-wim /wimfile:"c:\winpe_x86\media\sources\boot.wim" /index:1 /mountdir:"c:\winpe_x86\mount"
dism /image:"c:\winpe_x86\mount" /add-package /packagepath:"c:\program files (x86)\windows kits\10\assessment and deployment kit\windows preinstallation environment\x86\winpe_ocs\winpe-wmi.cab"
dism /image:"c:\winpe_x86\mount" /add-package /packagepath:"c:\program files (x86)\windows kits\10\assessment and deployment kit\windows preinstallation environment\x86\winpe_ocs\en-us\winpe-wmi_en-us.cab"
dism /image:"c:\winpe_x86\mount" /get-packages
dism /image:"c:\winpe_x86\mount" /set-scratchspace:512
dism /image:"c:\winpe_x86\mount" /get-scratchspace
dism /unmount-wim /mountdir:"c:\winpe_x86\mount" /commit

For x64 architecture:

dism /mount-wim /wimfile:"c:\winpe_x64\media\sources\boot.wim" /index:1 /mountdir:"c:\winpe_x64\mount"
dism /image:"c:\winpe_x64\mount" /add-package /packagepath:"c:\program files (x86)\windows kits\10\assessment and deployment kit\windows preinstallation environment\amd64\winpe_ocs\winpe-wmi.cab"
dism /image:"c:\winpe_x64\mount" /add-package /packagepath:"c:\program files (x86)\windows kits\10\assessment and deployment kit\windows preinstallation environment\amd64\winpe_ocs\en-us\winpe-wmi_en-us.cab"
dism /image:"c:\winpe_x64\mount" /get-packages
dism /image:"c:\winpe_x64\mount" /set-scratchspace:512
dism /image:"c:\winpe_x64\mount" /get-scratchspace
dism /unmount-wim /mountdir:"c:\winpe_x64\mount" /commit

9. Run the MakeWinPEMedia command to build the WinPE bootable ISO image. This command requires you to provide the WinPE directory and the name of the ISO image file that you want to create. The command has this form:

  MakeWinPEMedia /ISO winpeimagedir winpeisoimagename

winpeimagedir is the WinPE directory that you specified in the copype command in step 3, and winpeisoimagename is the name of the ISO image file that you want to create.

Examples:

Create an ISO image file that is named C:\WinPE_x64.iso. The WinPE directory is C:\WinPE_x64:

  MakeWinPEMedia /ISO C:\WinPE_x64 C:\WinPE_x64.iso  

Create an ISO image file that is named C:\WinPE_x86.iso. The WinPE directory is C:\WinPE_x86:

  MakeWinPEMedia /ISO C:\WinPE_x86 C:\WinPE_x86.iso

10. Use the software of your choice to burn the ISO image to a CD (or DVD).

Restriction: A bootable USB flash drive that contains the ISO image cannot be used to restore the operating system with Automated System Recovery (ASR). You must use a CD or DVD. If you are restoring a virtual machine, you can use the ISO image file by connecting it to that virtual guest's CD drive.

Document Location

Worldwide

[{"Line of Business":{"code":"LOB26","label":"Storage"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEQVQ","label":"IBM Spectrum Protect"},"ARM Category":[{"code":"a8m3p000000hAZoAAM","label":"B\/A Client"},{"code":"a8m3p000000hAaDAAU","label":"B\/A Client-\u003EBackup"},{"code":"a8m3p000000hAaFAAU","label":"B\/A Client-\u003ERestore"},{"code":"a8m3p000000hAaBAAU","label":"B\/A Client-\u003ESystem State"}],"Platform":[{"code":"PF033","label":"Windows"}],"Version":"All Versions","Type":"MASTER"}]

Document Information

Modified date:
14 January 2022

UID

ibm11172410