You are here:   Research
Register   |  Login
The quickest way to find articles is to use the below search option.

However, if you go to the end of this page, you also find the Blog archive (calendar format) that allows for browsing of older articles.

Search:

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

Sep 26

Written by:
9/26/2013 2:47 PM  RssIcon

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.

MDTMedia
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

    CombinedFolder
    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"

    bootx86
    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"

    bootx6401
    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:

Bootmenu
The working boot menu in WinPE 5.0.


Happy deployment, Johan


42 comment(s) so far...


Gravatar

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

I always find BCDEdit a nightmare to use - it's great to have a nice step by step process documented, thanks Johan

By Mosquat on   9/30/2013 12:13 AM
Gravatar

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

I am only able to get to Step 4.

When I attempt to either command in Step 5, I receive the following error: "An error occurred while attempting to reference the specified entry.
The system cannot find the file specified."

It might be that I've been looking at this too long and I can no longer see the forest from the trees.

I'm running the Windows ADK 8.1 on a laptop running Windows 8.1 32-bit upgraded from Windows 8.0.

Thank you in advance of any suggestions you may have as they would be greatly appreciated.

By MBManiac on   12/1/2013 3:39 PM
Gravatar

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

Please mail me a screendump of your commands, you find contact info on the about page.

/ Johan

By Arwidmark on   12/2/2013 4:32 PM
Gravatar

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

Duhh!!! Never mind.

I checked the GUID for the 64-bit boot.wim I was using and realized mine was different then yours. Once I made the realization and used the correct GUID, everything worked fine.

Thank you again.

By MBManiac on   12/7/2013 12:44 PM
Gravatar

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

Dear Johan,

Would this soltuion work with Windows ADK 8 (Win PE 4.0)? In addition I would be interested in to use this dual boot image with CM12 SP1 in combination with PXE boot.

Thanks for your answer, clarification in advanced!

By Veddo on   12/10/2013 2:23 PM
Gravatar

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

Yes, WinPE 4.0 has the same capabilities, but this doesn't work with the ConfigMgr 2012 PXE provider.

You can use third party PXE menus to select ConfigMgr 2012 boot images, but that's a blog post for another day.

/ Johan

By Arwidmark on   12/10/2013 8:38 PM
Gravatar

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

Everything went fine until I hit. bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /enum | find "osdevice" I pasted the command line into and nothing came back. I even made sure the prompt was c:\tmp> any idea's?

By prz on   12/12/2013 9:19 AM
Gravatar

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

Probably a typo, what does bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /enum give you?

/ Johan

By Arwidmark on   12/19/2013 1:40 AM
Gravatar

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

Had exact same issue as prz on, "bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /enum | find "osdevice" I pasted the command line into and nothing came back." Found that the issue was caused by not right clicking on Deployment and Imaging Tools Environment and running as administrator. Being rather lazy to write stuff down or type I modified the command slightly to redirect the output to a file like this
bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /enum | find "osdevice" > C:\tmp\x86_GUID.txt
and after that just copied and pasted the GUID into subsequent commands.

By nahhee on   1/18/2014 4:53 AM
Gravatar

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

Another thing that may bite you is trying this on an ancient PC as I did. Followed every step carefully, USB stick booted and showed the two choices, picking either one resulted in blue screens on multiple PCs I tried it on. Ran through the procedure to create the dual boot sticks on multiple other PCs and it worked flawlessly. Decided to test whether NX bit capability was the cause. Seemed to be the case - the PC that produced the bad stick output "False" in response to the wmic OS Get DataExecutionPrevention_Available command. It's an ancient Athlon XP 3000 I keep around for sentimental reasons. Other PCs which output true all worked. Guessing that, like being able to load Win 8 itself, PE 4 and up require NX/XD processor capability.
wmic OS Get DataExecutionPrevention_Available is described here pressf1.pcworld.co.nz/archive/index.php/t-127868.html and in many other places.

By nahhee on   1/20/2014 6:32 AM
Gravatar

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

Ok I can successfully create a dual boot that will work on our basic laptops for deployment, but as soon as I try to run it on our tablets it goes into a loop and never brings up the selection. Any idea what could be going on?

By Oglar on   1/23/2014 8:51 PM
Gravatar

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

UEFI based machines maybe?

/ Johan

By Arwidmark on   1/24/2014 3:15 AM
Gravatar

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

That was it could have sworn I had secure boot turned off, and legacy boot on.

By Oglar on   1/24/2014 7:34 PM
Gravatar

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

I successfully created the boot cd from the iso file and successfully can choose between x86/x64. I added a few packages from the Windows ADK and a batch script that will give the user the option to launch cmd, smartnet, diskpart and gimagex. I chose diskpart to wipe the factory partitions:

select disk 0
clean
create part primary
select part 1
active
assign c

format fs=ntfs quick

I then map a drive to the network share and launch gimagex, choose source/dest and let the image apply. After it finishes and I restart I get this:

Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:

1. Insert your Windows installation disc and restart your computer.
2. Choose your language settings, and then click "Next."
3. Click "Repair your computer."

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.


Status: 0xc000000e


ideas? I think it may have something to do with the GUID's from the wim images? I'm not even certain if that makes sense but intuitively I feel it's something with that. I've tried applying the image twice to make sure it wasn't something I forgot to do during diskpart or applying it. Thanks so much!

By heckishfire on   1/31/2014 11:11 AM
Gravatar

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

The Setupact.log file should give you more info.... That being said, if you want to deploy Windows, you should be using the free MDT 2013 solution. It takes away pains like this :)

/ Johan

By Arwidmark on   1/31/2014 12:31 PM
Gravatar

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

I've used MDT 2012 before for larger image role outs but this is only four workstations, so i figured I would simply make a new WinPE disc to upgrade from my winpe 3.0 disc. I've used the winpe 3 disc to great success with small role outs, so I was hoping for the same with the winpe 5. The setupact.log file, where is that located? Thanks!

By heckishfire on   1/31/2014 12:52 PM
Gravatar

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

It depends, the setupact.log jumps around to different locations during setup, search for it :)

/ Johan

By Arwidmark on   1/31/2014 12:57 PM
Gravatar

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

I've used MDT 2012 before for larger image role outs but this is only four workstations, so i figured I would simply make a new WinPE disc to upgrade from my winpe 3.0 disc. I've used the winpe 3 disc to great success with small role outs, so I was hoping for the same with the winpe 5. The setupact.log file, where is that located? Thanks!

By heckishfire on   1/31/2014 1:07 PM
Gravatar

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

I've used MDT 2012 before for larger image role outs but this is only four workstations, so i figured I would simply make a new WinPE disc to upgrade from my winpe 3.0 disc. I've used the winpe 3 disc to great success with small role outs, so I was hoping for the same with the winpe 5. The setupact.log file, where is that located? Thanks!

By heckishfire on   1/31/2014 1:11 PM
Gravatar

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

Hi
everything is working uptil no5 but when run the command to enable the menu /deletevalue {default} bootmenupolicy it fails sysing
D:\Boot\Dual-Boot>bcdedit /store d:\boot\dual-boot\boot\bcd /deletevalue {default} bootmenupolicy
The element data type specified is not recognized, or does not apply to the
specified entry.
Run "bcdedit /?" for command line assistance.
Element not found.
Could you please help?

By afarrukh on   2/6/2014 2:12 AM
Gravatar

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

I'm having problems getting guid for the boot image. Running the program as administrator of course and getting nothing.
Also tried just with "bcdedit /store C:\Tmp\WinPE50_Combined\Boot\BCD /enum", It gave me "The boot configuration data store could not be opened.". Help?

By Crispywhip on   2/16/2014 11:56 PM
Gravatar

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

Hi heckishfire, the setupact.log is moved around during deployment, search for it. MDT 2012 Update 1 does not support WinPE 5.0, you need to upgrade to MDT 2013, and then MDT will create the boot image for you.

/ Johan

By Arwidmark on   2/18/2014 2:30 AM
Gravatar

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

Hi afarrukh, I would recommend starting over, and making sure you do all the steps in the same Deployment and Imaging Tools Environment command prompt. I have been testing these steps quite many times.

/ Johan

By Arwidmark on   2/18/2014 3:30 AM
Gravatar

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

Hi Crispywhip,

Make sure you typed in the correct path when creating the store, check if the C:\Tmp\WinPE50_Combined\Boot\BCD file exist.

/ Johan

By Arwidmark on   2/18/2014 3:32 AM
Gravatar

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

Hi
Thanks for the detailed guide.

How can you set this in (Boot Menu) WDS for PXE (Server 2003 R2).

Eg:- PXE show Main Menu EG: WinPE5.0, when clicked on then the 2 sub menus will show?

By whhaatt on   2/22/2014 8:56 AM
Gravatar

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

Hi
Thanks for the detailed guide.

How can you set this in (Boot Menu) WDS for PXE (Server 2003 R2).

Eg:- PXE show Main Menu EG: WinPE5.0, when clicked on then the 2 sub menus will show?

By whhaatt on   2/22/2014 8:59 AM
Gravatar

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

For WDS, you simply add two boot images, one x86 and and one x64, and they will be listed in the menu.

/ Johan

By Arwidmark on   2/23/2014 12:51 PM
Gravatar

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

I was hoping that someone might be able to explain what I'm missing here.

I have never done this before so please bare with me. In the first step, it states this:

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

... when I get to the part that states, "Navigate to the c:\tmp\winpe50_x86\media folder" ... I noticed that there is no media folder. This puts a kink in the whole damn thing for me. I'm sure it's simply, so I thought I'd ask. Please advise. I'm trying to get all our ghost images into a single WIM. (Primary drivers are the difference.) Thanks so much, cheers!

-Tony

By qzmicro on   2/24/2014 2:30 PM
Gravatar

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

The copype x86 C:\Tmp\WinPE50_x86 command create the copype x86 C:\Tmp\WinPE50_x86\media folder.

Second. If you are new into windows deployment/imaging, you should not do this as a first step. Use the free MDT 2013 deployment solution from Microsoft to replace your ghost images. In fact, everybody doing Windows deployment should use MDT 2013.

/ Johan

By Arwidmark on   2/27/2014 10:56 PM
Gravatar

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

Ok, so I've had this dual boot scenario working for quite a while. My problem is getting a working BCD for UEFI booting to both options. The default EFI BCD for WinPE 5.0 works for both 64 and 32-bit if I swap out my boot.wims, but any time I try creating a BCD with multiple boot options the 32-bit will always fail. I'm not sure what commands I'm missing to get 32-bit to work. Any thoughts?

By poppyq on   3/3/2014 3:43 PM
Gravatar

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

Sorry, let me add more detail. The entries both appear in UEFI boot mode, but when I select the 32-Bit, the progress bar gets all the way across and then I get a blackscreen error referencing winload.efi.

By poppyq on   3/3/2014 3:53 PM
Gravatar

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

Sorry for the comment spam. I think I just figured out my problem. I'm testing this on a notebook, but it looks like the 32-Bit UEFI only works on IA32, which are typically only tablets with Intel Atom CPUs (hence the IA).

By poppyq on   3/3/2014 3:56 PM
Gravatar

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

Is it possible to dual boot say: a Winpe 5.0 X64 and a windows 7/8 deployment created in MDT ? How different would the steps be? this would be gold in my organisation, we already have a nice windows 8 Build create in MDT and a WinPE 5.0 X64 build also, putting them both on a usb bootable stick would be a dream come true, if anyone can help, pleeeeease let me know!

thanking you in advance

Cheers
Seb

By sbeaudette on   4/1/2014 4:01 PM
Gravatar

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

Hi Seb,

For MDT, you can use a single x86 boot image deploy both x86 and x64 operating systems (except x64 UEFI).

/ Johan

By Arwidmark on   4/8/2014 2:04 PM
Gravatar

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

Hi Seb,

For MDT, you can use a single x86 boot image deploy both x86 and x64 operating systems (except x64 UEFI).

/ Johan

Thanks for the answer Johan but this isn't what I am looking for unfortunetely, I am not sure I explained myself correctly the first time, let me try again.

I am trying to dual boot (on a usb stick) a WinPE session (already created with Microsoft AIK not MDT) and a windows 7 x64 deploy created in MDT. So basically i want the option to boot either into WinPE or deploy windows 7 x64. Both are already created separately. Is this even possible?

thanking you in advance!
Seb

By sbeaudette on   4/10/2014 10:16 AM
Gravatar

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

Sure, you can use the above techniques to select between different WIM files.

Personally I normal add customizations to the MDT WinPE boot image instead of generating a separate WinPE bootimage.

/ Johan

By Arwidmark on   4/12/2014 1:55 AM
Gravatar

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

uh ho, both my WINPE_X86 and my Windows 7 X64 deploy have the same GUID (7619dcc8-fafe-11d9-b411-000476eba25f) I am screwed aren't i? :-(

Also, I am a bit lost since my files don't match the ones from the procedure above (for my windows 7 x64 deploy) so I am having a hard time following the procedure and trying to compensate for the windows 7 x64 structure... doh!

I realize you must be super busy Johan so I really appreciate the time you take to answer us (me)

Much obliged!

cheers!

By sbeaudette on   4/16/2014 8:15 AM
Gravatar

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

You only need to create (or edit) the bcd with the correct info... If you search for WinPE and Windows 7 dual boot you find plenty of examples.

/ Johan

By Arwidmark on   4/16/2014 9:00 AM
Gravatar

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

found it!!!

thank you!!

By sbeaudette on   4/17/2014 4:46 AM
Gravatar

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

This was an awesome write-up! Thank you for sharing it and allowing us to utilize it. I do have a "next step" question. I run a centos pxe server that currently boots up winpe 5.0 but only a 64bit version. From your write-up do you know what I need to do in order for me to pxe boot the dual boot?

Here's a file list of my current winpe that pxe boots:

abortpxe.com BCD.LOG2 hdlscom1.com pxeboot.com wdsmgfw.efi
BCD bootmgr.exe hdlscom1.n12 pxeboot.n12 wdsnbp.com
BCD.LOG boot.sdi hdlscom2.com startrom.0 winpe.wim
BCD.LOG1 boot.wim hdlscom2.n12 WdsConfig.inf

By jlo834 on   7/5/2014 3:08 PM
Gravatar

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

It's been a while since I used PXELinux (Syslinux), but you should be able to just add another menu entry for the x86 boot image. No need to change the loader.

/ Johan

By Arwidmark on   7/6/2014 8:31 AM
Gravatar

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

Thank you Johan!

By jlo834 on   7/6/2014 8:10 PM