16 - How to boot to different WinPE versions using a single boot.wim that contains multiple images

website tonight analytics

It is possible to have 4 different boot.wim files (say Vista x86, Vista amd64, Win 7 x86 and Win 7 amd64) all on the same USB drive and a grub4dos menu.lst menu file that will allow you to boot to any one of them (see tutorial #2). However, wouldn't it be nice if you could combine these four boot.wim files into one single boot.wim that contains four images and is much smaller in size than 4 separate files? Well some very clever people have now made this possible. This tutorial assumes you know how to use ImageX and have a number of boot.wim files that you want to combine into one boot.wim file. It is taken from this post by joakim and uses a great tool made by JFX - all credit to these guys!

The basic steps for a 4 choice boot.wim system are really quite simple and are outlined below: Note that this method cannot be used to install different OS's because they all expect their OS source files to be in install.wim (tutorial 2 shows you how you can do this though).

This is how to boot 1 of four different WinPE images from one single boot.wim file...

1. Make a bootable USB pen (using RMPrepUSB and the Bootmgr+HDD+FAT32 option) that will boot to one of the boot.wim (in this example I am using Vista x86 boot.wim) files using bootmgr as usual.

2. Check it boots correctly to WinPE as you expect. Now we can add the other images to this Vista x86 boot.wim as follows...

I assume at this point, that you have three more boot.wim files that you wish to boot to (but only one USB drive!).

3. Copy the Vista x86 boot.wim file from you USB stick to C:\

Extract the files from the other three boot.wim files to separate folders on your hard disk using Imagex /Apply (e.g. multipe\2, multipe\3, multipe\4) and then use ImageX /Append to add each folder to the original c:\boot.wim file. This will make a c:\boot.wim file which will contain all four WinPE images numbered 1, 2, 3 and 4.

example (assumes C:\boot.wim contains your first boot.wim)

Imagex /apply c:\win7pe64\boot.wim 1 c:\multipe\2

Imagex /append c:\multipe\2 c:\boot.wim "your description goes here"

Imagex /apply c:\visatpe64\boot.wim 1 c:\multipe\3

Imagex /append c:\multipe\3 c:\boot.wim "your description goes here"

Imagex /apply c:\win7pe\boot.wim 1 c:\multipe\4

Imagex /append c:\multipe\4 c:\boot.wim "your description goes here"

4. Run JFX's tool (note may be falsely detected as a virus - but it isn't!) and select the multiple c:\boot.wim file you have just made - the tool will present you with the correct menu content that you will need for a grub4dos menu.lst file. Copy this content (paste it using the utility - very neat!) and create a new menu.lst file on the USB drive.

5. Download joakim's new, highly patched bootmgr file here (you will need to extract it from the .rar file) and copy it to the root of the USB drive (overwriting the original one). Rename it to wimpatched.

6. Copy your new 4-in-1 boot.wim file from C:\boot.wim to the USB drive \sources folder and overwrite the original boot.wim file.

7. Run RMPrepUSB and click on Install grub4dos to install grub4dos (the RMPrepUSB download contains a version of grub4dos that is compatible with the menu.lst memory patch commands).

You should now be able to boot to either one of the four images inside your new boot.wim file!

Example menu.lst made using JFX's neat tool which was made from a boot.wim containing 4 images (note: you should not copy this menu - it will only work with my custom boot.wim - not yours!). Use JFX's tool to create your own menu.lst.

title Boot image 1 in boot.wim "Microsoft Windows Vista PE (X86)"

map --mem /wimpatched (rd)

write --offset=0x654C4 (rd)+1 \x90\x39\x02

write --offset=0x654CC (rd)+1 \xD5\xDC\x69\x07

write --offset=0x654D4 (rd)+1 \xC0\x77\x08

write --offset=0x654DC (rd)+1 \x01

chainloader (rd)+1

root ()

title Boot image 2 in boot.wim "Microsoft Windows Vista PE (X64)"

map --mem /wimpatched (rd)

write --offset=0x654C4 (rd)+1 \x9E\x8A\x02

write --offset=0x654CC (rd)+1 \x20\x6C\x3E\x09

write --offset=0x654D4 (rd)+1 \x98\xE9\x09

write --offset=0x654DC (rd)+1 \x02

chainloader (rd)+1

root ()

title Boot image 3 in boot.wim "Microsoft Windows 7 PE (X86)"

map --mem /wimpatched (rd)

write --offset=0x654C4 (rd)+1 \x1C\xF6\x02

write --offset=0x654CC (rd)+1 \x94\x8D\x98\x0A

write --offset=0x654D4 (rd)+1 \xC8\x5A\x0B

write --offset=0x654DC (rd)+1 \x03

chainloader (rd)+1

root ()

title Boot image 4 in boot.wim "Microsoft Windows 7 PE (X64)"

map --mem /wimpatched (rd)

write --offset=0x654C4 (rd)+1 \xCE\x4B\x02

write --offset=0x654CC (rd)+1 \xE7\xCB\xF7\x0F

write --offset=0x654D4 (rd)+1 \x90\xC6\x08

write --offset=0x654DC (rd)+1 \x04

chainloader (rd)+1

root ()