Creating a Dual-Boot WinPE System, Take Two

In “Adding Windows PE to Your Windows 7 System” (May 2011, InstantDoc ID 129793), I talked about installing a copy of Windows PE alongside your Windows 7 or Windows Server 2008 R2 installation—that second Windows OS can greatly simplify some classes of maintenance, troubleshooting, and disaster recovery tasks. The method I offered for retrofitting WinPE onto an existing system was a bit inelegant but simple to explain. This month, I’ll begin a series that will show you how to install WinPE and Windows 7/Server 2008 R2 onto your system in a more streamlined fashion. Basically, you’ll create a dual-boot system in five steps. The following steps might look a trifle ugly, but I’ve found this Windows configuration tremendously useful, and I think many of you will also.

The Steps

First, you’ll install Windows 7 (or Server 2008 R2) onto a new system but tweak the install by pre-creating the “unlettered” partition. Recall that the Windows 7/Server 2008 R2 family prefers to create a 100MB partition wherein the OS stores the boot configuration database (BCD) and then does not give that partition a drive letter—thus keeping it hidden and safe from accidental user meddling. We’ll create that partition sized at 1GB rather than 100MB, however, to leave room for a copy of WinPE. That’s necessary because all the Vista-and-later versions of Windows don’t like to coexist with another copy of Windows on the same partition. You can avoid the need to create a third partition for WinPE (as I did in the earlier procedure) by simply expanding and exploiting the hidden partition.

Second, you’ll download and install the Windows Automated Installation Kit. The WAIK will provide two useful items: a working copy of WinPE in the form of a file named winpe.wim, and the imagex.exe tool that allows us to install a WIM-type file onto a hard disk. (There are actually two winpe.wim files in the WAIK—a 32-bit version and a 64-bit version—so you’ll need to choose the one whose architecture matches that of your Windows 7/Server R2 OS.)

Third, you’ll deal with the fact that you can’t image a WIM onto a partition unless that partition has a drive letter by using the Microsoft Management Console (MMC) Disk Management snap-in to temporarily give the 1GB partition a drive letter (i.e., T). Fourth, you’ll use ImageX to put that winpe.wim file onto T. And fifth, you’ll modify the BCD to add a new Boot WinPE option to the boot menu.

That set of blueprints is obviously compressed, and none of the concepts should be entirely foreign. I’ve covered them all in the past two and a half years in this column. So, in this column and in forthcoming columns, I’ll begin walking through the steps in more detail.

Tweaked Install

You’ll be building a Windows installation from scratch, so start from a system that you don’t mind wiping clean. Boot the PC from a Windows 7 or Server 2008 R2 Setup disk. (As far as I know, this should work on any version of Windows 7 or Server 2008 R2, although I’ve tried it only on Windows 7 Professional and Ultimate RTM and SP1.) When the Install Windows screen appears, choose your language, time and currency, and keyboard type, and click Next to get to the Install Now screen.

At this point, you’ll deviate from a standard Windows setup by pressing Shift-F10 to get a command prompt or—more correctly—a WinPE command prompt so that you can head Setup off at the pass and create a 1GB “unlettered” partition before Setup creates a 100MB one. Dust off your Diskpart skills, and type these commands:

diskpart list disk

That will display all the physical hard disks that Setup can see on your system. On most workstations, that’s going to show just one hard disk, disk 0. If, however, you’re installing Windows on a system that has more than one disk, use the output of the List Disk command to identify the integer that names the disk you want to install Windows onto. Next, you’ll wipe that disk clean, create a 1GB partition on it, and mark that as the bootable partition with these commands:

After the two Exit commands, the command prompt window will be gone and you’ll be back at the Install Now screen. Click Next, accept the license, and click Next. On the next wizard page, click Custom (advanced), instruct Setup to put Windows on the remaining unallocated large chunk of disk space, and let Setup run as usual. Once that’s done, you’ll be ready to blend in the WinPE magic—which I’ll show you next month.

John Savill's Hyper-V Master Class

Join John Savill for 12 hours of comprehensive Hyper-V training. This master-level online training course will explore all the key aspects of a Hyper-V based virtualization environment covering both current capabilities in Windows Server 2012 R2 and looking at the future with Windows Server vNext.