Boot Windows PE from a Hard Drive (Standard 7 SP1)
7/8/2014
This walkthrough describes how to boot Windows Preinstallation Environment (Windows PE) 3.0 directly from a hard drive instead of by using a RAM disk.
Hardware and Software Assumptions
To complete this walkthrough, you must have the following:
- An x86-based or x64-based computer running Windows 7, Windows Vista, Windows Server 2008, or Windows Server 2003.
Step 1: Create bootable media that contains the Windows PE RAM image
- Follow the instructions for creating bootable media for the Windows PE RAM image in Boot Windows PE from RAM Using a CD or Boot Windows PE from RAM Using a UFD.
Step 2: Prepare the hard drive
Boot the computer by using the bootable Windows PE media that you created.
If the hard drive contains an active partition, you might need to override the boot sequence to boot from the CD or UFD. During boot, select the key that overrides the boot sequence. The key varies depending on the BIOS.
If the computer is a new computer with an unformatted hard drive, you can skip the hard drive preparation and begin copying Windows PE source files to the hard drive.
Format the hard drive by using DiskPart, and then set the partition as active. The active partition must be at least as large as the Windows PE image.
For information about using DiskPart, see DiskPart Command-Line Options.
Consider the following example:
diskpart select disk 0 clean create partition primary size=<insert size> select partition 1 active format fs=ntfs assign letter c exit
Step 3: Copy Windows PE files to the hard drive
Use ImageX to apply the Windows PE image (Boot.wim) from the bootable media to the hard drive.
Consider the following example, in which D is the drive letter for the media that contains ImageX and the Windows PE image:
d:\imagex /apply d:\sources\boot.wim 1 c:
Copy the Boot directory from the bootable media to the root of the hard drive. Consider the following example:
xcopy d:\boot\*.* /e /f c:\boot\
Copy the Bootmgr file, which has no file name extension, from the bootable media to the root of the hard drive. Consider the following example:
copy d:\bootmgr c:
Delete the Boot Configuration Data (BCD) file that you copied from the bootable media. Consider the following example:
del c:\boot\bcd
Step 4: Configure the BCD store
Create a new boot-configuration file by using BCDEdit. For more information about BCDEdit, see BCDEdit Command-Line Options.
Consider the following example:
bcdedit -createstore c:\boot\BCD bcdedit -store c:\boot\BCD -create {bootmgr} /d “Boot Manager” bcdedit -store c:\boot\BCD -set {bootmgr} device boot bcdedit -store c:\boot\BCD -create /d “WINPE” -application osloader
In the following examples, replace <GUID> with the GUID returned by the previous command.
bcdedit -store c:\boot\BCD -set <GUID> osdevice boot bcdedit -store c:\boot\BCD -set <GUID> device boot bcdedit -store c:\boot\BCD -set <GUID> path \windows\system32\boot\winload.exe bcdedit -store c:\boot\BCD -set <GUID> systemroot \windows bcdedit -store c:\boot\BCD -set <GUID> winpe yes bcdedit -store c:\boot\BCD -displayorder <GUID> -addlast