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.

Posted Friday, January 12, 2007 1:44 AM by WinRE | 14 Comments

Creating Window RE Using Windows AIK

We have been getting many questions on how to create Windows RE using the Windows Automated Installation Kit (AIK). So I thought I would publish the updated instructions here. The instructions listed below are accurate as of Windows Vista RTM.

 

These instructions are also included in the Windows AIK. Please note that the ReadMe file that accompanies the Windows AIK contains an important update to the instructions.

 

Note: If you install Windows RE using the Windows OPK, please continue to follow the instructions in the Windows OPK. Those instructions remain unchanged. Use these instructions only if you do not have access to the Windows OPK.

 

Step 1: Copy Windows PE from the Installation Media

The version of Windows PE that ships with the Windows AIK does not contain the components required to support Windows RE. However every Windows installation disk contains Windows RE that can be used for recovery of Windows Vista. Therefore, we will use the Windows RE from the Windows installation media.

  1. On your technician computer, click Start, point to All Programs, then Windows AIK, and then click Windows PE Tools Command Prompt.
    The menu shortcut opens a command prompt window and automatically sets environment variables to point to all the necessary tools.
  2. Create a directory for the Windows PE image and a mount point

            mkdir c:\winre_image

            mkdir c:\winre_mount

  1. Copy the Windows PE image from the installation media using ImageX

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

  1. Mount the image using ImageX

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

Step 2: Add Windows RE shell script

The Windows PE we copied in step 1, does not launch Windows RE automatically. In this step, we will create a script called winpeshl.ini that will launch the Windows RE shell at startup.

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

    [LaunchApp]

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

  1. Copy this file to \Windows\System32 directory in your mounted Windows RE directory. For example,

              copy winpeshl.ini c:\winre_mount\Windows\System32

Step 3: Add mass-storage drivers (optional)

If necessary, you can include third-party drivers (.inf) in your Windows RE image by using the peimg.exe /inf command. For example,

    peimg.exe /inf=<path> C:\winre_x86\mount\Windows

        Where <path> is the location of the. inf file.

Step 4: Add custom tools to Windows RE (optional)

You can customize Windows RE shell by creating an .xml file called WinREConfig.xml. WinREConfig.xml enables you to define custom support and diagnostic tools within Windows RE. This step is optional. For more information, refer to the Windows RE documentation in the Windows AIK.

Step 5: Save changes to the image

Unmount the image by using ImageX. For example,

    imagex.exe /unmount /commit c:\winre_mount

 

That's it! The WinRE.wim file is now ready to be deployed on the harddisk or a WDS server. Let us know if these updated instructions do not work for you.

-Parveen

Posted Tuesday, December 12, 2006 8:10 AM by WinRE | 32 Comments

Where are recovery console commands?

As mentioned in the first post on Windows RE, the recovery console has been deprecated in Windows Vista. So you ask what happened to all those wonderful commands that were available in recovery console. Well, we were kind of hoping that you wouldn't need them anymore. But if you do, you'll be glad to know that most of them are available via the command line in Windows RE. Here's a list of recovery console commands that are different or unavailable in Windows RE:

Recovery console command

Windows RE equivalent

BootCfg

BootRec /ScanOS

BootRec /RebuildBcd

bcdedit

FixBoot

BootRec /FixBoot

FixMBR

BootRec /FixMbr

Map

DiskPart

Logon

Not needed

LISTSVC

Not Available

ENABLE

Not Available

DISABLE

Not Available

SYSTEMROOT

Not Available

All the remaining commands have the same name in Windows RE. The services related commands (listsvc, enable and disable) that are not available, can be worked around by manually loading the registry hive using regedit.

-Parveen

Posted Friday, October 20, 2006 3:05 AM by WinRE | 1 Comments

Running Windows Memory Diagnostic without installing Vista

I have gotten multiple queries on this. Yes, it is possible to run Windows Memory Diagnostic without installing Vista!

You can do it through the Windows installation disc. To run memory diagnostic, insert the installation disc in the computer and reboot. When you get the prompt "Press any key to boot from CD or DVD..." press and hold the SPACE BAR or tap it multiple times. This should bring up the Windows boot manager menu that lists Windows Memory Diagnostic as an advanced tool. Hit the TAB key to select Windows Memory Diagnostic and then hit ENTER to run it.

After Memory Diagnostic is done, the machine will continue booting into the installation disc.

-Parveen

Posted Wednesday, September 20, 2006 10:04 PM by WinRE | 3 Comments

Using Startup Repair to repair a boot failure due to a missing file

In this post, we describe how to use Startup Repair to repair a missing file that is preventing Windows Vista from booting. The goal is to familiarize yourself with Startup Repair so that you can use it when you or your customers need it. We really hope no one will need to use it :); but if you do, this knowledge might come handy.

Warning: Try this at your own risk. If things don't work as planned, you might not be able to boot into your Vista installation or might even loose your data.

Preparation: Before we try to make Vista unbootable, please make sure that your machine has a good restore point. The restore point is not needed for file repair, but would be useful if things go wrong. To create a restore point: search for System Restore in the search box from Vista's Start button --> click on "open system protection" --> click Create. And then follow the instructions to create a restore point.

Making Vista unbootable: To demonstrate how to use Startup Repair to repair a file we will move the %windir%\system32\winload.exe file, which is a must have for booting Vista. We cannot easily delete this file from Vista itself, so we'll use Windows RE to delete it, as follows:

  1. Boot into Vista installation DVD
  2. Choose your language settings and click Next
  3. Click Repair your computer
  4. Choose your operating system and click Next. This should bring up System Recovery Options
  5. Click on Command Prompt

Once on the command prompt move the winload.exe file from your Vista installation. For example, if Vista is installed on C: run, move C:\Windows\System32\winload.exe C:\Windows\System32\winload.exe.backup.

Now restart your computer using the Restart button on System Recovery Options.

Your Vista should now fail to boot! It should instruct you to use "Repair your computer" from the Vista installation disc.

Repairing your computer: To repair your computer using Startup Repair follow these steps:

  1. Boot into Vista installation DVD
  2. Choose your language settings and click Next
  3. Click Repair your computer
  4. Choose your operating system and click Next. This should bring up System Recovery Options.
  5. Click on Startup Repair

Startup Repair should now start diagnosing your system to identify the root cause of the failure. Once it has identified the root cause, it would automatically start repairing your computer. If you are curious to know what Startup Repair did, you can click on the details link and see which tests Startup Repair ran to diagnose the problem.

After Startup Repair has finished the repairs, click Finish to reboot your computer.

Your computer should now be able to boot normally into Vista!!

Note -- If your computer cannot boot into Vista even after repairs, then go back to System Recovery Options and run System Restore.

That's it! This is how you use Startup Repair for most unbootable situations.

-Parveen

Posted Wednesday, September 20, 2006 6:32 PM by WinRE | 2 Comments

Introducing Windows Recovery Environment (Windows RE)

The Windows Recovery Environment (aka Windows RE) team would use this blog to share information, tricks and tips about Windows RE with support professionals and end-users of Windows. We would also like to use this blog to get feedback from the community.

So what is Windows RE?

Windows Recovery Environment (Windows RE) is a recovery platform based on Windows Preinstallation Environment (Windows PE). Windows RE provides two main functionalities:

1. Automatic diagnosis and repair of boot problems using a tool called Startup Repair.

2. A centralized platform for advanced recovery tools.

We will explain more about these two functions in upcoming posts.

Windows RE is new for Windows Vista and completely replaces the recovery console in Windows XP. You should be able to perform most tasks of recovery console from Windows RE.

How can end-users get access to Windows RE and Startup Repair?

For Vista RC1 release, Windows RE is available on the Windows installation DVD. To access Windows RE, boot using the installation DVD, choose your language settings and hit "Next" and then click on "Repair Your Computer" link at the bottom of the screen. This will launch Windows RE. After choosing an OS to repair, you should see all the recovery tools available in Windows RE.

After Windows Vista releases, Windows RE will be available via other convenient means as well. For example, OEMs may pre-install Windows RE on the hard disk and corporations (SA) can make Windows RE available for network boot via a WDS server.

 

So that's Windows RE in a nutshell. Watch this space for information on how to use Windows RE and Startup Repair to fix unbootable computers.

-Parveen

Posted Monday, September 18, 2006 6:17 AM by WinRE | 15 Comments

Page view tracker