Deploy a System Recovery Image

Applies To: Windows 7, Windows Server 2008 R2

Note

This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.

This walkthrough describes how to deploy a recovery solution to reinstall the factory image in the event of a system failure. Windows® Recovery Environment (Windows RE) supports several recovery scenarios. This topic describes two sample recovery solutions: using Windows RE with Windows Setup as the primary recovery tool, and using Windows RE with a custom recovery solution.

In Windows® 7, you can install a Windows RE image on any primary NTFS partition that is on the same disk as your Windows installation, provided the partitions is one of the following types:

  • MBR disks Type 0x7 or type 0x27. If type 0x27, it must be at the beginning of the disk.

  • GPT disks   Contains the PARTITION_MSFT_RECOVERY_GUID attribute.

For more information about partition requirements, see Understanding Disk Partitions.

In This Topic

  1. Setup-based Recovery Solution

  2. Custom Recovery Solution

Setup-based Recovery Solution

The setup-based solutions provide the end user an option to use Windows RE to reinstall the factory image in the event of a system failure.

Prerequisites

To complete this walkthrough, you need the following hardware and software:

Step 1: Configure the recovery partition

In this step, you configure a setup-based recovery solution by using the same Windows 7 image you deployed and the default Windows Recovery image that is contained in the Windows partition.

  1. Start the destination computer by using a Windows PE bootable media.

  2. Connect the computer to the device or network location containing the Windows 7 image:

    net use n: \\server\share\
    
  3. Move the default Windows Recovery image (Winre.wim) from the Operating System partition to the System partition (S:).

    mkdir S:\Recovery\WindowsRE
    move C:\Windows\System32\Recovery\winre.wim S:\Recovery\WindowsRE
    

Note

You can store the Winre.wim file on any drive, but you must place it in the following directory structure: \Recovery\WindowsRE.

  1. Configure Windows to recognize the default Windows Recovery image (Winre.wim):

    C:\Windows\System32\Reagentc.exe /setreimage /path S:\Recovery\WindowsRE /target C:\Windows
    
  2. Copy your Windows 7 image (.wim) file to the recovery partition (R:).

    copy N:\images\my-windows-partition.wim R:\
    
  3. Rename the image file to Install.wim.

    rename R:\my-windows-partition.wim R:\install.wim
    

Note

You can store the Windows recovery image in any folder, but the file must be named install.wim.

  1. Configure Windows RE to recognize your Windows 7 image (.wim) file.

    C:\Windows\System32\Reagentc.exe /setosimage /path R:\ /target C:\Windows
    

Step 2: Test your recovery solution

In this step, you start the destination computer to verify that the recovery tool can be started.

  1. Remove the CD-ROM and any USB drives.

  2. Start the destination computer and complete Windows Welcome.

  3. Click Start, click Control Panel, click System and Security, click Backup and Restore, and then click Recover system settings or your computer.

  4. Click Advanced recovery methods and then click Reinstall Windows

  5. Follow the on-screen instructions. The computer restarts.

  6. Verify that the computer starts in Windows RE. The system reinstalls Windows by using the image that you placed in the recovery partition. When the installation is complete, you have the option to restore other files you have backed up.

Custom Recovery Solution

By using a custom recovery solution, you can integrate a non-Microsoft recovery solution with Windows RE. In the event of a failure, an end user can restore their computer to a factory image by using a non-Microsoft solution.

Prerequisites

To complete this walkthrough, you need the following software and hardware:

  • Customized Windows RE image, as described in step 4 of Walkthrough: Create a Windows RE Image.

  • Technician computer. For more information, see Building a Technician Computer.

  • Bootable Windows PE media with the ImageX tool. This can be a CD-ROM, a USB flash drive, or another bootable media. For more information, see Windows PE Walkthroughs.

  • A reference Windows 7 image stored on an external location, such as a network share or an external USB hard drive.

  • A destination computer with the Windows and system partitions applied, and an empty recovery partition. For more information, see Apply Images by Using ImageX.

Step 1: Configure the Recovery Partition

In this step, you configure your custom recovery solution and the default Windows recovery image that is contained in the Windows partition.

  1. Start the destination computer by using your Windows PE bootable media.

  2. Connect the computer to the device or network location containing the Windows 7 image:

    net use n: \\server\share\
    
  3. Move your custom Windows RE image (Winre.wim) to the recovery partition (R:).

    Mkdir R:\Recovery\WindowsRE
    Move N:\images\winre.wim R:\Recovery\WindowsRE\
    

Note

You can store the Winre.wim file on any drive, but you must place it in the following directory structure: \Recovery\WindowsRE.

  1. Configure your custom Windows RE image and specify that when the F1 key (scan code = 0x3b00) is pressed during startup, Windows RE and the custom recovery application launch:

    C:\Windows\System32\Reagentc.exe /setreimage /path R:\Recovery\WindowsRE /target C:\Windows /bootkey 3b00
    

    For other examples of keyboard scan codes, see REAgentC Command-Line Options. For more about customizing the bootstrapping process, see Custom Bootstrap Actions.

  2. Configure the operating system to recognize the custom recovery tool you included in your Windows RE image:

    C:\Windows\System32\Reagentc.exe /setosimage /customtool /target C:\Windows
    

Step 2: Test your recovery solution

In this step, you start the destination computer to verify that the recovery tool can be started. In addition, you verify that the custom factory recovery application can be launched from the Windows RE menu.

  1. Remove the CD-ROM and any USB drives.

  2. Restart the computer.

  3. Start the destination computer and complete Windows Welcome.

  4. Restart the computer. Immediately after POST, hold down the F8 key. The Advanced Boot Options menu appears.

  5. Select Repair your computer and then press Enter. Windows RE starts.

  6. Follow the on-screen instructions to select a keyboard layout and provide credentials.

  7. Verify that a link to your custom recovery application appears on the Windows RE menu.

  8. Restart the computer.

  9. Immediately after POST, hold down the F1 key. Windows RE starts.

  10. Verify that your custom recovery application launches automatically.

See Also

Concepts

Configure Windows Recovery Environment (Windows RE)
Walkthrough: Create a Windows RE Image
REAgentC Command-Line Options