Welcome to MSDN Blogs Sign in | Join | Help

Syndication

Tags

    No tags have been created or used yet.
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.

Published Friday, January 12, 2007 1:44 AM by WinRE

Comments

# re: How to install WinRE on the hard disk @ Sunday, January 14, 2007 8:28 AM

This worked great for me the first time, and I think we should make this part of our image for recovery purposes.  

wosully

# re: How to install WinRE on the hard disk @ Wednesday, January 24, 2007 8:50 AM

Hi, this is a fantastic concept - I've been seriously looking into how to install WinRE on the hard disk for all the Vista PC's we build, as we're planning on shipping a recovery solution on the hard disk, rather than ship external media. However, I've found that the autofailover breaks after running Sysprep /generalized and the PC no longer boots into WinRE after 'first' boot. We need to use the generalize command, because we mass duplicate the hard drives when an image is sealed. Any ideas on how to maintain the boot configuration data after generalizing? I've looked EVERYWHERE for any other referenece to this issue.

Thanks

James

jamesperrycms

# re: How to install WinRE on the hard disk @ Wednesday, January 24, 2007 6:02 PM

Yes, generalizing a Windows image causes auto failover to break. This is known issue and there is a work around for it. You should run SetAutoFailover.cmd (or equivalent) during the OOBESystem phase of setup by setting this in your FirstLogonCommands.

WinRE

# re: How to install WinRE on the hard disk @ Wednesday, January 31, 2007 6:07 PM

Hi. My computer had Windows XP on Partition 1 and Windows Vista on Partition 2. I also had the recovery console installed on XP. I used Partition Magic to move the XP partition up and created a new small partition at the start of the disk for WinRE.

After I rebooted, I couldn't access XP (which was now on Partition 2). I used the WinRE notepad to edit boot.ini and now everything works.

What's confusing is that many drive letters have changed. I have 2 320 GB hard drives and 4 USB drives with 12 partitions (there's a reason)!

So my question is: "Is there a way to preconfigure the volume to drive letter mapping when building the WIM?"

Thanks.

hswear3

# re: How to install WinRE on the hard disk @ Wednesday, January 31, 2007 11:12 PM

You may be able to assign drive letters using setup while installing Vista. Please look for documentation about Windows System Image Manager. The following component can be used to assign drive letters:

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition

WinRE

# re: How to install WinRE on the hard disk @ Friday, February 09, 2007 5:20 AM

Regarding running the SetAutoFailover.cmd (I have this script) during the OOBESystem phase of setup - is there any supporting documentation for doing this? Also, as I'm looking to install WinRE on the hard drive, won't the autofailover just break again, if the end user restores the factory image?

Final question, there are numerous references to OEM's being able to store this factory image into the WinRE partition, but again, very little information as to how to set this up, to allow the end user to easily restore the image from WinRE (I'll be using a *.WIM Image). Do you know of any supporting documents? We don't have any software developers here, so it would most likely have to be a 'no frills' script that is run from a command prompt that utilises Imagex.exe - has anyone managed to create a restore solution using this method yet?

jamesperrycms

# re: How to install WinRE on the hard disk @ Friday, April 13, 2007 2:00 AM

I read about some sort of "Self-healing" functionality in Vista and Longhorn Server's NTFS. Would you elaborate in detail on this?

someone

# re: How to install WinRE on the hard disk @ Friday, April 13, 2007 2:08 PM

Regarding NTFS self-healing, you can find some information from the following WinHEC 2006 presentation:

http://download.microsoft.com/download/5/b/9/5b97017b-e28a-4bae-ba48-174cf47d23cd/STO123_WH06.ppt

WinRE

# re: How to install Windows RE on the hard disk @ Sunday, June 17, 2007 2:43 AM

Why your blog updated very slowly?

samsung

# re: How to install Windows RE on the hard disk @ Tuesday, June 26, 2007 1:28 PM

How does one go about creating the magic hidden partitions on Longhorn Server?  I have created the WIM file and I'm ready to plop-n-drop, but I can't figure out how to create the recovery partition before the Windows OS partition.  

Any help is appreciated!

Hilde

hilde

# re: How to install Windows RE on the hard disk @ Sunday, December 16, 2007 2:22 PM

I like these articles, by reading over the less than recent posts I can see that I am a little late in posting (sorry). Anyway, I think it might also be a given that a user may want to have a backup Windows RE on CD. This is sort of a given, but for the record (helpful for running cloning utilities):

#1 login to Windows PE build directory:

copype.cmd x86 c:\winpe2_x86

#2 as stated in your blog post:

mkdir c:\winre_image

mkdir c:\winre_mount

#3 as stated in your blog post:

imagex.exe /export /boot e:\sources\boot.wim 2 c:\winre_image\winre.wim “WinRE”

#4 as stated in your blog post:

imagex /mountrw c:\winre_image\winre.wim 1 c:\winre_mount

#5 as stated in your blog post:

  1. By using a text editor, create a file called winpeshl.ini that contains the following text:

    [LaunchApp]

    AppPath=x:\sources\recovery\recenv.exe

  2. Copy this file to \Windows\System32 directory in your mounted Windows RE directory. For example, copy winpeshl.ini C:\winre_mount\Windows\System32

#6 as stated in your blog:

Unmount the image by using ImageX. For example,

imagex.exe /unmount /commit c:\winre_mount

#7 now move winre.wim to folder c:\winpe2_x86\ISO\sources and delete old boot.wim and rename winre.wim to boot.wim

#8 finally, CD back to c:\program files\Windows AIK\Tools\PETools\ and issue the following command:

oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

Now burn winpe_x86.iso to a CD, this gives you a secondary Windows RE with your favorite utilities that can be accessed through a root command prompt.

jeffXYZ

# re: How to install Windows RE on the hard disk @ Tuesday, February 05, 2008 12:21 PM

HI, Great Blog and thanks for posting all your great advice, But......and it's a big one..Ive been bashing my prune trying to get the setautofailover.cmd to apply the nescessary changes in the recovery partition in the OOBE system pass and it will not apply! it works fine if im in end user maode or audit mode but as far as im aware it needs to trigger the command during the OOBE as the generalize option will break it, i have done this and i can see it in \panther\unattend.xml but if i OOBE /generalize nothing happens, the partition is still visable and F8 has just the regular options! am i the only one with this issue? Please any advice would be greatly appreciated!

Perk

# amd64 @ Wednesday, February 06, 2008 10:55 PM

What would need to be changed for a 64bit system?

Would the winpeshl.ini still go in the system32 directory?

Would i use the boot.sdi file from the amd64 directory or still use the x86 version?

And if i want to add inf driver files would i have to be running inside a 64bit OS?

JSComputerTech

# re: How to install Windows RE on the hard disk @ Monday, June 02, 2008 5:48 PM

Hi!

I have followed steps to install it on HD, but there are errors ...

I manage to see the option "Repair your computer" in advanced menu with F8, but after i click on it i get the following error:

...

boot selection failed because required device is inaccessible

...

Is someone having a similar problem(s)?

Any help would be appreciated ...

Brgds,

Sergej

sergejk

Anonymous comments are disabled
Page view tracker