Creating a WinPE Boot DVD for Disk Cloning



UPDATED September 2010: Added section on adding custom drivers

A custom Windows PE boot disc can be used to boot quickly to a windows command prompt, complete with additional drivers already loaded. These drivers could be for an exotic hard disk controller, or unusual network adapter. I have used this at work to allow network deployment of a customised windows image file.

Below are the steps I took to get a useful WinPE boot disc (command prompt only).

  • Install the The Windows® Automated Installation Kit (AIK) for Windows® 7
  • Open a WAIK elevated command prompt
  • copype.cmd amd64 d:\win7pe
  • copy d:\win7pe\winpe.wim d:\win7pe\ISO\sources\boot.wim
  • Dism /Mount-Wim /WimFile:D:\win7pe\ISO\sources\boot.wim /index:1 /MountDir:D:\win7pe\mount
  • Copy ImageX to the mounted iso image (crazy that it’s not included)
    • copy "C:\Program Files\Windows AIK\Tools\amd64\imagex.exe" D:\win7pe\mount\Windows\System32
  • Copy BootRec to the mounted iso image (the util that allows easy boot problem repairs). We must get this util by mounting a Windows 7 DVD and extracting the relevant files.
    • copy <windvd>\sources\boot.wim d:\win7dvd.wim
      • Dism /Mount-Wim /WimFile:d:\win7dvd.wim /index:1 /MountDir:D:\win7dvd\mount
    • copy d:\win7dvd\mount\windows\system32\Bootrec.exe d:\win7pe\mount\windows\system32
    • copy d:\win7dvd\mount\windows\system32\wer.dll d:\win7pe\mount\windows\system32
    • copy d:\win7dvd\mount\windows\system32\en-US\Bootrec.exe.mui d:\win7pe\mount\windows\system32\en-US
    • copy d:\win7dvd\mount\windows\system32\en-US\wer.dll.mui d:\win7pe\mount\windows\system32\en-US
    • Dism /unmount-Wim /MountDir:D:\win7dvd\mount /discard
  • Add drivers (used this step to make the boot disc compatible with the Lenovo laptops)
    • Downloaded a Dell driver package CAB file (various sources say it includes the drivers used by the Lenovo range) Dell driver bundle
    • Extracted the CAB file using 7zip to D:\drivers
    • Dism /image:D:\win7pe\mount /Add-Driver /driver:D:\drivers\winpe\x64 /recurse
  • close any folders pointing to D:\win7pe\mount, or the commit will fail
  • Dism /unmount-Wim /MountDir:D:\win7pe\mount /Commit
  • oscdimg n bD:\win7pe\ D:\win7pe\ISO D:\win7pe\win7pe_amd64_bootdisk.iso
  • Burn d:\win7pe\win7pe_amd64_bootdisk.iso to DVD using your favourite tool
  • Copy the ISO for later use, to \server\share\foldername