Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
aj7

Combine x86 and x64 WinPE images into one

Recommended Posts

Hello. I have successfully created two WinPE ISO images with Win10PESE, one x86 version and one x64 version.

These two images were tested with VMWare Player and they worked fine.

I would like to have one single combined ISO image out of these two, such that:

  1. Only booting from UEFI needs to be supported.
  2. When booted on PC with x86 (32-bit) UEFI firmware, the x86 version of boot.wim is booted.
  3. When booted on PC with x64 (64-bit) UEFI firmware, the x64 version of boot.wim is booted.

Is it even possible to archieve this? Any pointers are welcome.

 

Share this post


Link to post
Share on other sites

We know it is possible because it is something that can be done on PXE with Linux and WDS. You'd need a way to replicate that procedure if not using PXE.

How it works in general... the client requests to boot to the server, the server asks for capabilities, the (typically) LAN firmware sends capabilities, then the PXE server passes along the appropriate boot option.

For a local based solution, you'd need an initial boot platform that is not firmware dependent, can detect the capabilities of the client and then boot the appropriate EFI image. I would imagine the initial boot would have to be on DOS or Linux, or perhaps even an EFI application or EFI-shell script.

Share this post


Link to post
Share on other sites

You can do that basically in two ways.

One (using a "flat" structure):

https://superuser.com/questions/948450/can-you-make-a-windows-10-iso-with-both-pro-home-and-32-64-bit-flavors

And the other (keeping the .iso's as they are and using a bootmanager such as GRUB2):

https://superuser.com/questions/1055305/installing-windows-x64-on-32-bit-uefi-efi-ia32-via-grub

For the first (casually ChrisPE/Win10PE is used) you can also peruse some of the info here (which is about making a dual boot USB drive):

https://www.rmprepusb.com/tutorials/127-make-dual-32-64bit-pe

and then still use oscdimg to create the .iso

jaclaz

 

Share this post


Link to post
Share on other sites
On 4/27/2020 at 10:21 PM, Tripredacus said:

We know it is possible because it is something that can be done on PXE with Linux and WDS. You'd need a way to replicate that procedure if not using PXE.

How it works in general... the client requests to boot to the server, the server asks for capabilities, the (typically) LAN firmware sends capabilities, then the PXE server passes along the appropriate boot option.

For a local based solution, you'd need an initial boot platform that is not firmware dependent, can detect the capabilities of the client and then boot the appropriate EFI image. I would imagine the initial boot would have to be on DOS or Linux, or perhaps even an EFI application or EFI-shell script.

Thanks but PXE is a different game.

On 4/28/2020 at 12:06 AM, jaclaz said:

You can do that basically in two ways.

One (using a "flat" structure):

https://superuser.com/questions/948450/can-you-make-a-windows-10-iso-with-both-pro-home-and-32-64-bit-flavors

Thanks but it seems booting on 32-bit UEFI is on a "to-fix" list. Will take a closer look.

 

On 4/28/2020 at 12:06 AM, jaclaz said:

And the other (keeping the .iso's as they are and using a bootmanager such as GRUB2):

https://superuser.com/questions/1055305/installing-windows-x64-on-32-bit-uefi-efi-ia32-via-grub

That's for installing 64-bit Windows on 32-bit UEFI. Not what I'm after.

On 4/28/2020 at 12:06 AM, jaclaz said:

For the first (casually ChrisPE/Win10PE is used) you can also peruse some of the info here (which is about making a dual boot USB drive):

https://www.rmprepusb.com/tutorials/127-make-dual-32-64bit-pe

and then still use oscdimg to create the .iso

One thing I don't like is that it presents a boot menu to choose from: one booting x86 WinPE and another booting x64 WinPE. Is there a way to eliminate it altogether? I should not be able to choose booting x64 WinPE on x86 UEFI, or x86 WinPE on x64 UEFI. The only sensible option is to boot x64 WinPE on x64 PC, and x86 WinPE on x86 PC. The menu should not be even necessary.

Thanks for the help anyway.

 

Share this post


Link to post
Share on other sites
2 hours ago, aj7 said:

That's for installing 64-bit Windows on 32-bit UEFI. Not what I'm after.

Actually it is whatever you want it to be, the link was not meant as "here it is exactly what you are looking for", it was intended as "here is a basic technique to use a boot manager to choose between two installs on EFI at boot".

 

1 hour ago, aj7 said:

One thing I don't like is that it presents a boot menu to choose from: one booting x86 WinPE and another booting x64 WinPE. Is there a way to eliminate it altogether? I should not be able to choose booting x64 WinPE on x86 UEFI, or x86 WinPE on x64 UEFI. The only sensible option is to boot x64 WinPE on x64 PC, and x86 WinPE on x86 PC. The menu should not be even necessary.

Most probably one can setup the bootmanager of choice with something similat to the "Arch" used on PXE, if I recall correctly GRUB2 can check the EFI "bitness".

jacla

Share this post


Link to post
Share on other sites
On 5/1/2020 at 5:22 PM, aj7 said:

One thing I don't like is that it presents a boot menu to choose from: one booting x86 WinPE and another booting x64 WinPE.

Use different bcd files.

 

How do you like to use the big ISO image?
Do you like to boot from a virtual CDROM drive at VMware?
Do you like to write to a USB disk at boot from a USB disk?

This are different cases. 
A Eltorito floppy boot image is used at a DVD, master is the file efisys.bin.

1809 ISO
x32 \efi\boot\bootia32.efi                                 1.210.168 bytes
x32 \efi\microsoft\boot\efisys.bin\EFI\BOOT\BOOTIA32.EFI     959.584 bytes
x32 \bootmgr.efi                                           1.199.416 bytes

x64 \efi\boot\bootx64.efi                                  1.469.240 bytes
x64 \efi\microsoft\boot\efisys.bin\EFI\BOOT\BOOTX64.EFI    1.121.792 bytes
x64 \bootmgr.efi                                           1.452.865 bytes 


efisys.bin - BOOTIA32.EFI does chainload \bootmgr.efi at a DVD.
\efi\boot\bootia32.efi is used directly at USB disk.

Win10PESE used \Programs at x86 and x64, this causes conflicts at a multi boot.
I assume RAM load feature next, \Programs is inside of each boot.wim.

(Idea: 
There is a ISO mount feature at running PESE in addition.
Add a Programs_x86.iso and a Programs_x64.iso, mount the iso file at boot.wim\windows\system32\pecmd.ini file.
Maybe used at a second step.)

Within OS default boot loader, use single files at DVD:

Expand a x64 ISO file to a folder.

Create a floppy image 7200 sectors at imdisk, mount at letter b:
format b: /fs:fat
Copy \efi\boot\bootia32.efi to b:\efi\boot\
Copy \efi\microsoft\boot\efisys.bin[EFI\BOOT\BOOTX64.EFI] to b:\efi\boot\
(This will launch the x64 \bootmgr.efi)

Hexedit b:\efi\boot\bootia32.efi, change unicode string \BCD to \B32
This breaks UEFI secure boot at x86, secure boot works at x64 still.

Save this floppy image to \efi\microsoft\boot\efisys3264.bin
Copy b:\efi\boot\bootia32.efi to \efi\boot\ (to boot from USB stick in future)

copy \efi\microsoft\boot\bcd to b32
copy a x86 boot.wim to \sources\boot_x32.wim
bcdedit.exe /store (extracted files)\efi\microsoft\boot\b32 /set {default} device ramdisk=[boot]\sources\boot_x32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
bcdedit.exe /store (extracted files)\efi\microsoft\boot\b32 /set {default} osdevice ramdisk=[boot]\sources\boot_x32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

replace (extracted files) with the full path to single files for the DVD.

oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,b(extracted files)\boot\etfsboot.com#pEF,e,b(extracted files)\efi\microsoft\boot\efisys3264.bin (extracted files) win10_3264.iso


BTW. There is a MakeWinPE3264.cmd from 2015. This uses one bcd file, no hexediting, secure boot works.
Maybe this shows some hints as a starting point anyway.

http://reboot.pro/topic/20471-windows-pe-5x-boot-problem/page-2#entry192722

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...