You are here:   Research
  |  Login

Welcome to my blog, quickest way to find articles is usually to search for them.

Search in All Title Contents

Creating a dual-boot WinPE 5.0 boot image (x86 and x64 support)

Sep 26 2013

Earlier this afternoon I got a question in my YouTube channel, where a fellow deployment geek wanted to know if it was possible to create a WinPE image that had support for both x86 and x64 boot images. E.g. a dual-boot boot image (my own wording). My first thought was to respond and say: No problem just check the x86 and x64 options in the MDT Media and it will build a dual-boot image for you, but then I thought I should also describe what MDT actually does in the background. Meaning, you can also use this guide for custom boot images that you build, even without MDT.

Enabling dual-boot on a MDT 2013 Media.


Create a WinPE 5.0 boot image that has both x86 and x64 versions - Step-by-Step guide

To create the boot image you need to have Windows ADK 8.1 installed. Then creating the dual-boot boot image is quite straightforward and consists of the following steps:

  • Create the x86 boot image
  • Create the x64 boot image
  • Modify the BCD entry to contain both boot images
  • Create the ISO or USB stick

Create the x86 WinPE 5.0 boot image

  1. On the machine with Windows ADK 8.1 installed, from the Start screen, launch Deployment and Imaging Tools Environment
  2. In the Command prompt that appears, run the following command:

    copype x86 C:\Tmp\WinPE50_x86
  3. Using File Explorer, create the C:\Tmp\WinPE50_Combined folder
  4. Navigate to the C:\Tmp\WinPE50_x86\media folder and copy the content to the  C:\Tmp\WinPE50_Combined folder
  5. In the C:\Tmp\WinPE50_Combined\Sources folder, rename boot.wim to boot_x86.wim

Create the x64 WinPE 5.0 boot image

  1. Still in the Deployment and Imaging Tools Environment Command prompt run the following command:

    copype amd64 c:\tmp\WinPE50_x64
  2. Navigate to the C:\Tmp\WinPE50_x64\media\sources folder and copy the boot.wim file to the  C:\Tmp\WinPE50_Combined\Sources folder
  3. In the C:\Tmp\WinPE50_Combined\Sources folder, rename boot.wim to boot_x64.wim

    The C:\Tmp\WinPE50_Combined\Sources folder after adding the x86 and x64 boot images.

Modify the BCD entry

  1. Still in the Deployment and Imaging Tools Environment Command prompt run the following command to find out the guid for the x86 boot image:

    bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /enum | find "osdevice"

    The guid for the x86 boot image displayed.
  2. Make a note of the guid (copy it), you need it in the next step. In this example my guid was {7619dcc8-fafe-11d9-b411-000476eba25f}.
  3. Modify the x86 boot entry by typing the following commands, press Enter after each command (replace the guid with your guid value):

    bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {default} device ramdisk=[boot]\sources\boot_x86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

    bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {default} osdevice ramdisk=[boot]\sources\boot_x86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

    bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {default} description "WinPE 5.0 x86"

  4. Create a x64 boot entry by making a copy of the x86 entry. Run the following command and make a note of the new guid. In this example the guid for the copied entry was {c449d072-26f3-11e3-af16-00155da12e2b}:

    bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /copy {default} /d "WinPE 5.0 x64"

    The new x64 boot entry, copied from the x86 entry.
  5. Next step is to modify the new x64 entry. In these steps you use both the original guid from the x86 boot image (it’s the RAM disk), and the new guid you got when copying the x86 entry. Again, in my example the original x86 guid was {7619dcc8-fafe-11d9-b411-000476eba25f} and the new x64 entry was {c449d072-26f3-11e3-af16-00155da12e2b}. Run the following commands:

    bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {c449d072-26f3-11e3-af16-00155da12e2b} device ramdisk=[boot]\sources\boot_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

    bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /set {c449d072-26f3-11e3-af16-00155da12e2b} osdevice ramdisk=[boot]\sources\boot_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

  6. And finally, enable the menu selection in the boot manager menu, by running the following command:

    bcdedit.exe /store C:\Tmp\WinPE50_Combined\Boot\BCD /deletevalue {default} bootmenupolicy

Create the bootable ISO or USB stick

  1. Rename the C:\Tmp\WinPE50_Combined folder to C:\Tmp\Media (the MakeWinPEMedia.cmd is hardcoded to look for a folder named media)
  2. Copy the C:\Tmp\WinPE50_x86\fwfiles folder to C:\Tmp.
  3. If you want to create a bootable ISO, run the following command (the /f forces to overwrite if the ISO already exist, not required, but good to know about):

    MakeWinPEMedia /iso /f C:\Tmp C:\Tmp\WinPE50_DualBoot.iso
  4. If you want to create a bootable USB, run the following command (the /f forces suppresses the warning about formatting the USB stick):

    MakeWinPEMedia /ufd /f C:\Tmp H:

The working boot menu in WinPE 5.0.

Happy deployment, Johan

Happy deployment, and thanks for reading!

What our lawyers makes us say:

This information is provided "AS IS" with no warranties, confers no rights and is not supported by the authors or Deployment Artist.

Copyright © 2017 by Deployment Artist (the company behind deployment research). All rights reserved. No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

Shorthand: Don't pass off our work as yours, it's not nice.

Blog Archive