Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

February 13, 2009 12:00 AM

Q. How can I create a Windows Preinstallation Environment (WinPE) 2.1 boot image that has both x86 and x64 versions?

Windows IT Pro
InstantDoc ID #101459
Rating: (2)

A. The Windows Automated Installation Kit (WAIK) 1.1 makes it easy to create a customized PE environment for x86 or x64, but I wanted to create a bootable USB or ISO image that had both x86 and x64 versions. It turns out this is easy to do.

  1. Create an x86 WinPE 2.1 environment and an x64 WinPE 2.1 environment. Create each environment in its own folder, such as d:\temp\winpex86 and d:\temp\winpex64.
  2. You're going to use the x64 folder as your base. Go into the sources folder in the x64 folder and rename the file boot.wim to bootx64.wim.
  3. Change the boot configuration data (BCD) to point to bootx64.wim instead of boot.wim. Start a command prompt window with administrator credentials (press Start, type cmd, then right-click the command prompt item and choose Run As Administrator) and use the following commands. You'll pass the path to the BCD you're editing, d:\temp\winpex64\iso\boot\bcd. Make sure to replace the GUID of the RAM disk for the existing value you have on your boot configuration database entry.
    C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd /enum
    
    Windows Boot Manager
    --------------------
    identifier {bootmgr}
    description Windows Boot Manager
    locale en-US
    inherit {globalsettings}
    default {default}
    displayorder {default}
    toolsdisplayorder {memdiag}
    timeout 30
    
    Windows Boot Loader
    -------------------
    identifier {default}
    device ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411
    -000476eba25f}
    path \windows\system32\boot\winload.exe
    description Windows Setup
    locale en-US
    inherit {bootloadersettings}
    osdevice ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411
    -000476eba25f}
    systemroot \windows
    detecthal Yes
    winpe Yes
    ems Yes
    
    C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd
    /set {default} device ramdisk=[boot]\sources\bootamd64.wim,
    {7619dcc8-fafe-11d9-b411-000476eba25f} The operation completed successfully. C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd
    /set {default} osdevice ramdisk=[boot]\sources\bootamd64.wim,
    {7619dcc8-fafe-11d9-b411-000476eba25f} The operation completed successfully. C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd
    /set {default} description "PE AMD64" The operation completed successfully. C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd /enum Windows Boot Manager -------------------- identifier {bootmgr} description Windows Boot Manager locale en-US inherit {globalsettings} default {default} displayorder {default} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {default} device ramdisk=[boot]\sources\bootamd64.wim,{7619dcc8-fafe-11d9 -b411-000476eba25f} path \windows\system32\boot\winload.exe description PE AMD64 locale en-US inherit {bootloadersettings} osdevice ramdisk=[boot]\sources\bootamd64.wim,{7619dcc8-fafe-11d9 -b411-000476eba25f} systemroot \windows detecthal Yes winpe Yes ems Yes
  4. Copy the boot.wim from the x86 folder into the sources folder of the x64 (the same folder as the bootx64.wim) and rename it to bootx86.wim.
  5. Add a boot entry for bootx86.wim. When you copy the boot configuration database record for default, take note of the GUID it generates, because you'll make changes to this new entry. Once again, when specifying the GUID after the name of the WIM it should be the same GUID used above, as it represents the RAM disk.
    C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd /copy
    {default} /d "PE x86" The entry was successfully copied to {3de9d48e-e7cc-11dd-a3f7-002170a954ba}. C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd /set
    {3de9d48e-e7cc-11dd-a3f7-002 170a954ba} osdevice ramdisk=[boot]\sources\bootx86.wim,{7619dcc8-fafe-11d9-b411- 000476eba25f} The operation completed successfully. C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd /set
    {3de9d48e-e7cc-11dd-a3f7-002 170a954ba} device ramdisk=[boot]\sources\bootx86.wim,{7619dcc8-fafe-11d9-b411-00 0476eba25f} The operation completed successfully. C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd
    -displayorder {3de9d48e-e7cc-11dd -a3f7-002170a954ba} -addlast The operation completed successfully. C:\Windows\system32>bcdedit /store d:\temp\winpex64\iso\boot\bcd /enum Windows Boot Manager -------------------- identifier {bootmgr} description Windows Boot Manager locale en-US inherit {globalsettings} default {default} displayorder {default} {3de9d48e-e7cc-11dd-a3f7-002170a954ba} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {default} device ramdisk=[boot]\sources\bootamd64.wim,{7619dcc8-fafe-11d9 -b411-000476eba25f} path \windows\system32\boot\winload.exe description PE AMD64 locale en-US inherit {bootloadersettings} osdevice ramdisk=[boot]\sources\bootamd64.wim,{7619dcc8-fafe-11d9 -b411-000476eba25f} systemroot \windows detecthal Yes winpe Yes ems Yes Windows Boot Loader ------------------- identifier {3de9d48e-e7cc-11dd-a3f7-002170a954ba} device ramdisk=[boot]\sources\bootx86.wim,{7619dcc8-fafe-11d9-b 411-000476eba25f} path \windows\system32\boot\winload.exe description PE x86 locale en-US inherit {bootloadersettings} osdevice ramdisk=[boot]\sources\bootx86.wim,{7619dcc8-fafe-11d9-b 411-000476eba25f} systemroot \windows detecthal Yes winpe Yes ems Yes
  6. Click to expand

    We now have the WIM files for both PE environments in one sources folder and the boot configuration database will display a menu to select which you want to use. At this point, you can copy the ISO folder to a USB device (which you've made active) or make an ISO using the usual methods. An ISO I created using the instructions above is shown here.
Related Reading:
Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.