Finishing Up Your Dual-Boot Windows PE System

This alternative deployment strategy is easier to keep running

Last month, I began exploring how to create a more “fix-able” deployment of Window 7 or Windows Server 2008 R2 than the one I shared in “Adding Windows PE to Your Windows 7 System” (May 2011, InstantDoc ID 129793). In this alternative deployment strategy, you install the OS as before but change the 100MB “hidden” partition to 1000MB, and add a bootable copy of WinPE both to that partition and to the Windows boot manager menu, solving the age-old “I’m trying to fix a non-bootable copy of Windows NT, but there’s no such thing as an NT boot floppy to get my repairs started” conundrum. Last month, I started the process by wiping a target computer, creating the 1000MB partition, and installing the OS on the remaining space.

This month, you’ll use the Windows Automated Installation Kit (WAIK) and ImageX to install WinPE onto the 1000MB partition, and then use Bcdedit to add WinPE to the boot manager menu. If you’ve been following these columns for a while, you’ll find no surprises; you’ll be using tools that you’ve seen before. In a sense, this is just a particularly useful application of previously covered power tools.

Boot up your freshly installed copy of Windows 7 or Server 2008 R2, surf over to, and pull down the latest version of the WAIK, and as I write this in mid-2011, that would be “Windows AIK for Windows 7,” released August 6, 2009. (Do not download the newer “Supplement.”) Install the WAIK.

Next, you’re going to use ImageX to apply the WAIK’s WinPE image (in WIM file format) to the 1000MB partition, which doesn’t have a drive letter. Unfortunately, ImageX needs a drive letter before it can apply a WIM file, so you’ll have to give the unlettered partition a drive letter before you can proceed. You can do that with Diskpart, as I’ve described in earlier columns, or you can use the GUI by clicking Start, typing diskmgmt.msc into the Search programs and files field, and pressing Enter. Locate and right-click the unlettered 1000MB partition in the Microsoft Management Console (MMC) Disk Management snap-in. Choose Change Drive Letter and Paths and, in the resulting dialog box, click Add, then click Adding the following drive letter and choose the letter T, and click OK. Minimize the Disk Management snap-in but don’t close it; you’ll want to remove that drive letter once you have WinPE installed.

Next, click Start, All Programs, Microsoft Windows AIK, then right-click Deployment Tools Command Prompt, choose Run as administrator, and click OK at the UAC prompt. You’ll now have an elevated command prompt open at C:\Program Files\Windows AIK\Tools\PETools. Within that folder are three folders named amd64, ia64, and x86, each containing an entire copy of WinPE—one for standard 64-bit systems, one for the nearly nonexistent Itaniums, and one for standard 32-bit systems. If you’re adding WinPE to a 32-bit Windows 7 system, type cd x86 and press Enter; if you’re adding WinPE to a 64-bit Windows 7 system or a Server 2008 R2 system, type cd amd64 and press Enter. Image WinPE onto your T drive with the command

imagex /apply winpe.wim 1 t: /verify

In a moment, you should see the message Successfully applied image and a report of the elapsed time. WinPE is on your hard disk, but your OS doesn’t know how to boot from it. To fix that, create a second OS entry from your one current one with the following command. (Type it right at the Deployment Tools Command Prompt.)

bcdedit /copy {current} /d “Boot WinPE”

Bcdedit will report the GUID of the newly created OS entry with a response such as

The entry was successfully copied to {8868422c-79b7-11e0-964b-c25a31d9e8b7} 

Copy that GUID—the hex value between the curly braces—into your clipboard by right-clicking the command prompt window and choosing "Mark," then highlight the GUID and press Enter. (You’ll want to do that because the next four commands require you to enter that GUID, and unless you’re being paid by the hour, it’s no fun to type GUIDs.) Then, type these four commands, replacing {GUID} with your actual GUID value by right-clicking in the command window and choosing Paste:

bcdedit /set {GUID} osdevice partition=t:
bcdedit /set {GUID} device partition=t:
bcdedit /set {GUID} winpe yes
bcdedit /set {GUID} detecthal yes

Finally, return to the Disk Management snap-in and remove the letter from the 1000MB partition by right-clicking it, selecting Choose Drive Letter and Paths, highlighting T, clicking Remove, and assuring Windows that you do, indeed, want to un-letter the partition. Congratulations, you’ve now built a copy of Windows that is a trifle easier to keep running. Enjoy it!

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.