How to install Windows RE on the hard disk

I have been getting a lot of questions about installing Windows RE on the hard disk. This is good news for us as that means many of you are actually trying out Windows RE. So here's the simple four step process.

Step 1: Choosing a partition to install Windows RE

The hardest part about installing Windows RE seems to be deciding where to install it. The following considerations should go into deciding which partition to choose (listed in the priority order):

  1. The partition should not be the same as the Windows OS partition. This is so that you can boot into Windows RE even if your OS partition becomes corrupt or inaccessible for any reason. This helps maximize the chances that you would be able to boot into Windows RE when your main Windows installation is in trouble.
  2. The partition should be hidden so that users do not accidentally delete files or corrupt the Windows RE installation in anyway. Microsoft has defined a special partition type for this specific purpose. On MBR disks, the partition should be assigned partition type 0x27. And on GPT disks, the partition should have the partition type GUID: {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}.
  3. The partition should not interfere with any advanced volume management functionalities, such as dynamic volumes. Any hidden partitions after the Windows OS partition may interfere with dynamic volume creations. Therefore, the Windows RE partition should be created before the Windows OS partition.

In the Windows OPK and the Windows AIK, we have a couple of partition layout recommendations. These recommendations were made by following the above considerations. These recommendations are:

  1. If the machine is not BitLocker enabled, then the partition should be a hidden recovery partition allocated before the OS partition. It should be assigned type 0x27 on MBR disks and type {DE94BBA4-06D1-4D40-A16A-BFD50179D6AC} on GPT disks. The partition should be at least large enough to hold the Windows RE WIM, 1.5GB should be plenty for the base Windows RE.
  2. If the machine is BitLocker enabled, then the BitLocker partition (a.k.a. the system partition) can be used for Windows RE installation.  It should be noted that when using this configuration, the Windows RE on the BitLocker partition cannot be used to launch the Complete PC restore application.

 

Note:- If you just want to experiment with Windows RE without creating a separate partition for Windows RE, you can choose any visible drive in Vista.

 

Step 2: Copying Windows RE Files

For the purposes of this post, I am going to assume a WIM-based installation. If you want to install an expanded Windows RE, please look at the Windows OPK or the Windows AIK for appropriate documentation.

You need to copy the following two files to the root of the partition you chose in step 1 above.

  1. winre.wim (you can build a winre.wim using the installation media and the Windows AIK, as described here)
  2. boot.sdi (you can find it in the Windows AIK, under C:\Program Files\Windows AIK\Tools\PETools\x86\boot)

 

Step 3: Configuring Windows RE

To configure Windows RE, you can use the SetAutoFailover.cmd script provided in the Windows AIK (under: C:\Program Files\Windows AIK\Recovery). If you copied Windows RE files on the D: in step 2 above, and assuming that D: is the first partition on the disk, you would use it as:

SetAutoFailover.cmd /target D: /wim /nohide

Note:- You need to run SetAutoFailover.cmd from an elevated command prompt. To open an elevated command prompt, search for cmd.exe in the search box off Start button, then right click on the cmd icon in search results and choose Run as administrator.

 

Step 4: Testing Windows RE Installation

To test that Windows RE is installed correctly on the hard disk - Restart your computer and press F8 very early during boot. If you press it early enough, you should see an Advanced boot menu. The first item on this menu should be "Repair your computer." Choosing this option will take you to Windows RE.