Help - Search - Members - Calendar
Full Version: More than One WinPE distribution on one DVD?
MSFN Forums > Unattended Windows Discussion & Support > Multi-Boot CD/DVDs

   


Google Internet Forums Unattended CD/DVD Guide
atolica
Hi guys

Do you know how can I create a multiboot dvd so I have two Winpe distributions on one DVD?

HERE'S THE ANSWER !!!

SEE HERE !!!

Suppose you'd like to have a dvd with Vista/Win7 setup files(installation disk) PLUS ERD Commander, Active Boot Disk, ESET SysRescue or any other custom made WinPE that you built, on a multiboot CD/DVD, so you could chose which one you'd like to boot.

How do you do it?
Answer: very easy if you know where to look


complete procedure...

use the default WinVista, WIN 7 or any WinPE dvd or any bootable wim.

copy the contents to the HDD

the structure would be

CODE
dvd1 | - Project Root
| - BOOT (CONTAINS THE BCD FILE TO BE EDITED)
| - EFI
| - SOURCES (CONTAINS THE PE .WIM FILES)
| - OTHER FILES

In the boot folder we need to run the command

bcdedit /store bcd /ENUM

This will give you the details of old entry in the boot loader.

You need to note the guid. In every case the default guid is {7619dcc8-fafe-11d9-b411-000476eba25f}


CODE
bcdedit /store bcd /enum



CODE
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


First you'd like to see the existing boot entries in the BCD store.

CODE
bcdedit /store bcd /ENUM

*** note the old guid

Then you copy the default boot entry to a new entry in the bcd store, that has to be updated.

CODE
bcdedit /store bcd /copy {default} /d "Active Boot Disk"


*** new guid is given at this stage

Active Boot Disk is the description I'd like to use for my Active Boot Disk WinPE.


CODE
operation completed successfully.
{613fe2f0-2356-11de-bf6a-001e4cdc40b1}

***{613fe2f0-2356-11de-bf6a-001e4cdc40b1}=new guid

It can be different for you.

therefore my new guid is {613fe2f0-2356-11de-bf6a-001e4cdc40b1}

now

CODE
bcdedit /store bcd /set {newguid} DEVICE ramdisk=[boot]\sources\boot32.wim,{oldguid}


boot32.wim being the name I chose for the Active Boot wim file. You can rename it as you like, but you can not use spaces.


CODE
operation completed successfully.


next

CODE
bcdedit /store bcd /set {newguid} OSDEVICE ramdisk=[boot]\sources\boot32.wim,{oldguid}


*** boot32.wim is the file copied from the active boot disk (boot.wim renamed)

*** to check whether the bcd store has 2 ramdisks
bcdedit /store bcd /ENUM



CODE
Windows Boot Manager
--------------------
identifier              {bootmgr}
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
displayorder            {default}
                                {613fe2f0-2356-11de-bf6a-001e4cdc40b1}
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


Windows Boot Loader
-------------------
identifier              {613fe2f0-2356-11de-bf6a-001e4cdc40b1}
device                  ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path                    \windows\system32\boot\winload.exe
description             Active Boot Disk
locale                  en-US
inherit                 {bootloadersettings}
osdevice                ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot              \windows
detecthal               Yes
winpe                   Yes
ems                     Yes


like this you may add n number of vista pes... (i have tested 3 PEs + Windows Vista Setup) to the BCD Store. Just you have to keep the oldguid to same as {7619dcc8-fafe-11d9-b411-000476eba25f}

CODE
{7619dcc8-fafe-11d9-b411-000476eba25f}
will never change... that's the rule.

copy the boot.wim file in sources folder of active boot disk/ ghost pe/ erdcommander 6.0 to the sources folder in disk1 in the project. and rename it to desired. i renamed it to boot32.wim you may use any...

{default} is not a variable and need not be changed.


Next
This is a script that automates the above process:


CODE
Rem BCD (boot configuration data) editor for multiple vista pe

REM THIS IS THE ORIGINAL BCD FILE EXTRACTED FROM ANY VISTA WINPE / VISTA DVD (I USED VISTA INSTALLATION)
set BCD-File="c:\bcd 1\BCD"

REM SET THE NAME FOR THE VISTA PE HERE
set pename="Your PE Name"

REM SET THE NAME FOR THE WIM.FILE HERE WITH PATH
set filena=[boot]\sources\yourwimfile.wim

for /f "eol=r tokens=1-2" %%a in ('bcdedit /store %BCD-File% /ENUM all') do set rdo=%%b


for /f "tokens=1-7" %%a in ('Bcdedit /store %BCD-File% /copy {default} /d %pename%') do set guid1=%%g
bcdedit /store %BCD-File% /set %guid1:~0,38% DEVICE ramdisk=%filena%,%rdo%
bcdedit /store %BCD-File% /set %guid1:~0,38% OSDEVICE ramdisk=%filena%,%rdo%

bcdedit /store %BCD-File% /ENUM


Run it as many times as you like to add multiple pes after changing the variables - bcd-file, pename, filena
remember not to use any spaces in filena variable.

I hope it helps

thanks to varun037
atolica
Doesn't anyone know????!?!?! How can I create a multiboot dvd with two WinPE distributions?

Thank you?
Noise
You can do it but it's pretty difficult. You need to have the two versions of Windows PE in WIM files, then specify them using BCDEdit. I've done this before so I could boot either the 64 bit or 32 bit version of WinPE 2.1 off the same disk (with a 10 second timeout defaulting to the 32 bit).
atolica
Nothing is difficult. How did you do it?
Noise
http://www.microsoft.com/downloads/details...;displaylang=en

Get the Waik. Read. Pray.
atolica
I am not so retarded. I've been using waik since the first WinPe version was released, for Windows Xp.I am building winpe images on a daily basis.

I wouldn't have asked you if I could've found the info in winpe documentation. I am interested in the bcdedit method.
Noise
CODE
echo ***   Creating WinPE BCD (boot configuration data) File
Bcdedit /createstore "%BCDFILE%"
Bcdedit /store "%BCDFILE%" /create {ramdiskoptions} /d "Ramdisk options"
Bcdedit /store "%BCDFILE%" /set {ramdiskoptions} ramdisksdidevice boot
Bcdedit /store "%BCDFILE%" /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi

rem 32Bit
for /f "tokens=1-3" %%a in ('Bcdedit /store "%BCDFILE%" /create /d "Windows 32 Bit" /application osloader') do set guid1=%%c
Bcdedit /store "%BCDFILE%" /set %guid1% systemroot \Windows
Bcdedit /store "%BCDFILE%" /set %guid1% detecthal Yes
Bcdedit /store "%BCDFILE%" /set %guid1% winpe Yes
Bcdedit /store "%BCDFILE%" /set %guid1% description "Windows 32 Bit"
Bcdedit /store "%BCDFILE%" /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store "%BCDFILE%" /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}

rem 64Bit
for /f "tokens=1-3" %%a in ('Bcdedit /store "%BCDFILE%" /create /d "Windows 64 Bit" /application osloader') do set guid2=%%c
Bcdedit /store "%BCDFILE%" /set %guid2% systemroot \Windows
Bcdedit /store "%BCDFILE%" /set %guid2% detecthal Yes
Bcdedit /store "%BCDFILE%" /set %guid2% winpe Yes
Bcdedit /store "%BCDFILE%" /set %guid2% description "Windows 64 Bit"
Bcdedit /store "%BCDFILE%" /set %guid2% loadoptions ramdisk=[boot]\Boot\winpe_x64.wim,\"DISABLE_INTEGRITY_CHECKS"
Bcdedit /store "%BCDFILE%" /set %guid2% osdevice ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}
Bcdedit /store "%BCDFILE%" /set %guid2% device ramdisk=[boot]\Boot\winpe_x64.wim,{ramdiskoptions}

rem Setup Bootmanager
Bcdedit /store "%BCDFILE%" /create {bootmgr} /d "Windows VISTA BootManager"
Bcdedit /store "%BCDFILE%" /set {bootmgr} timeout 10
Bcdedit /store "%BCDFILE%" /set {bootmgr} displayorder %guid1% %guid2%
Bcdedit /store "%BCDFILE%" /enum all
atolica
Thank you for your reply.
I searched on technet and found this http://technet.microsoft.com/en-us/library/cc766385.aspx that references what you said.

As I see it this is a batch file, that creates %BCDFILE% in system32 file.

I have two winpe bootable isos. One ErdCommander and the other one a win32 winpe.

This is the normal folder structure on each of the isos.

BOOT
EFI
SOURCES
BOOTMGR

I have to have in the end a bootable cd/dvd with both unpacked iso on it and the Boot Configuration Data (BCD) store file "BCD" inside BOOT folder modified by the help of your script.

Your script has these two lines
CODE
Bcdedit /store "%BCDFILE%" /set %guid1% osdevice ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}
Bcdedit /store "%BCDFILE%" /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim,{ramdiskoptions}


My question. Where do the wim files go? Do I have to copy both inside the boot folder? They normally reside inside the SOURCES folder.

edit:where do I run the batch file?
this line
CODE
for /f "tokens=1-3" %%a in ('Bcdedit /store "%BCDFILE%" /create /d "Windows 32 Bit" /application osloader') do set guid1=%%c
doesn't do anything. Sorry for the stupid question. I am not a big fan of script language.


Thank you very much for all your help.

Reagrds,
Atolica
Noise
The WIM's go in to the \Boot directory. As defined by:
Bcdedit /store "%BCDFILE%" /set %guid1% device ramdisk=[boot]\Boot\winpe_x86.wim

The for /f "tokens=1-3" line is meant for a Batch file. If you run that command manually you have to replace %%a with %a and %%c with %c. The double percent signs are necessary when you run the command in a cmd/bat file.
atolica
Muchos gracias for the reply


Where do you place the batch file? At what point is it executed if you say that you're not running the commands manually.

If I run the script, the way you post it, I get some errors

First

CODE
The store creation operation has failed.
A device attached to the system is not functioning
, and some others follow because the bcd file isn't created.

But if I run the command manually, it works, but the process crashes at
CODE
for /f "tokens=1-3" %%a in ('Bcdedit /store "%BCDFILE%" /create /d "Windows 32
. I guess I have to remove an "%" and build the bcd file manually.

edit:
CODE
Bcdedit /store %BCD-File% /set %guid1% systemroot \Windows
won't run at all.
What's the next step. Renaming %BCDFILE% and placing it in the boot folder?

Thank you so much, sir.

Regards
Atolica
Noise
Remember that %BCDFILE% is a variable (forgive me if you already understand this, just covering the bases here). You need to define it in the batch file. Take the above code I posted, paste it in to notepad, add the following line to the beginning of the file:
CODE
SET BCDFILE=C:\TEMP\BCD
Then save the whole thing as "MAKEBCD.CMD". Change the patch to a working directory if you want, but keep the filename BCD with no extension (and dont put it in the root of drive C: - you'll screw up your system).

And remember, you need to run these commands using the special command prompt that got installed when you installed the WAIK (it's in the start menu, I forgot exactly what they called it). There's a ton of information about this in the WAIK documentation.
atolica
I know what I did wrong. I was trying to do this running on Windows 7 and just running WAIK from an administrative install point.
I guess I have to install it. Let's see how it goes from here.

You've been of much help. Although technet and some part of the documentation covers what you've helped me with here, I didn't know where to start. I was kind of lost.

I also searched for your posts here on msfn and I've found some related ones.

Thank you again. I hope I'll have a dual boot WinPE in no time.

Regards,
Atolica
atolica
Regarding the help you gave me Nois3 and everything else, I will always be in your debt. It was a learning curve for me, a starting point.

Although I had a lot to learn from you, I couldn't make it work so I asked for help in some other place.

And it paid off. A guy from Ultraiso forum had the same problem as I, and found a way to successfully built an iso with two WinPE distributions on it. One can put as many WinPE as he likes, I don't think there's a limit.


To spare you guys the long talk, here's the original post, with thanks going to the original poster varun037.

QUOTE
finally got the things to work biggrin.gif

the correct procedure is:

copy boot.wim from active boot disk as boot32.wim in sources folder

*** default item's description cannot be changed. Its default is Windows Setup and will remain as is.

bcdedit /store J:\1\WinVista\BOOT\bcd /ENUM
*** note the old guid

bcdedit /store J:\1\WinVista\BOOT\bcd /copy {default} /d "Active Boot Disk"


*** new guid is given at this stage

bcdedit /store J:\1\WinVista\BOOT\bcd /set {newguid} DEVICE ramdisk=[boot]\sources\boot32.wim,{oldguid}

bcdedit /store J:\1\WinVista\BOOT\bcd /set {newguid} OSDEVICE ramdisk=[boot]\sources\boot32.wim,{oldguid}


*** to check whether the bcd store has 2 ramdisks
bcdedit /store J:\1\WinVista\BOOT\bcd /ENUM


*** boot32.wim is the file copied from the active boot disk (boot.wim renamed)


atolica
Can someone with good scripting skills help me create a batch that will automate varun037's method?

Probably you Nois3. For some reason your script doesn't work for me. It stops working at
CODE
Bcdedit /store "%BCDFILE%" /set %guid1% systemroot \Windows

Thank You!
varun037
complete procedure...

use the default WinVista or any WinPE dvd.

copy the contents to the HDD

the structure would be

dvd1 | - Project Root
| - BOOT (CONTAINS THE BCD FILE TO BE EDITED)
| - EFI
| - SOURCES (CONTAINS THE PE .WIM FILES)
| - EZBOOT
| - OTHER FILES

In the boot folder we need to run the command

bcdedit /store bcd /ENUM

This will give you the details of old entry in the boot loader.

u need to note the guid. in my case this is {7619dcc8-fafe-11d9-b411-000476eba25f}


CODE
bcdedit /store 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


bcdedit /store bcd /copy {default} /d "Active Boot Disk"

CODE
operation completed successfully.
{613fe2f0-2356-11de-bf6a-001e4cdc40b1}


therefore my new guid is {613fe2f0-2356-11de-bf6a-001e4cdc40b1}

now

bcdedit /store bcd /set {613fe2f0-2356-11de-bf6a-001e4cdc40b1} DEVICE ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

CODE
operation completed successfully.


bcdedit /store bcd /set {613fe2f0-2356-11de-bf6a-001e4cdc40b1} OSDEVICE ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

CODE
operation completed successfully.


bcdedit /store bcd /ENUM
CODE
Windows Boot Manager
--------------------
identifier              {bootmgr}
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
displayorder            {default}
                                {613fe2f0-2356-11de-bf6a-001e4cdc40b1}
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


Windows Boot Loader
-------------------
identifier              {613fe2f0-2356-11de-bf6a-001e4cdc40b1}
device                  ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path                    \windows\system32\boot\winload.exe
description             Active Boot Disk
locale                  en-US
inherit                 {bootloadersettings}
osdevice                ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot              \windows
detecthal               Yes
winpe                   Yes
ems                     Yes


like this you may add n number of vista pes... (i have tested 3 PEs + Windows Vista Setup) to the BCD Store. Just you have to keep the oldguid to same as {7619dcc8-fafe-11d9-b411-000476eba25f}

{7619dcc8-fafe-11d9-b411-000476eba25f} will never change... thats the rule.

copy the boot.wim file in sources folder of active boot disk/ ghost pe/ erdcommander 6.0 to the sources folder in disk1 in the project. and rename it to desired. i renamed it to boot32.wim you may use any...

{default} is not a variable and need not be changed.

I have not tested this method to change the folder as this can be done in the command by specifying a folder other than sources. So not sure to that. But the Vista PEs i have handled had only 1 file in the sources folder which i renamed this way. So if you have multiple files in sources folder for a pe you may try changing the folder and do tell me if it works....

I have attached a BCD File with following options

Windows Setup [EMS Enabled] - Loads boot.wim
Active Boot Disk [EMS Enabled] - Loads babd.wim
Norton Ghost 14.0 PE [EMS Enabled] - Loads ghostpe.wim
ERD Commander 6.0 [EMS Enabled] - Loads erd60.wim

Bcd Download
varun037
QUOTE (atolica @ Apr 8 2009, 08:08 AM) *
Can someone with good scripting skills help me create a batch that will automate varun037's method?

Probably you Nois3. For some reason your script doesn't work for me. It stops working at
CODE
Bcdedit /store "%BCDFILE%" /set %guid1% systemroot \Windows

Thank You!


Here it is
CODE
Rem BCD (boot configuration data) editor for multiple vista pe

REM THIS IS THE ORIGINAL BCD FILE EXTRACTED FROM ANY VISTA WINPE / VISTA DVD (I USED VISTA INSTALLATION)
set BCD-File="c:\bcd 1\BCD"

REM SET THE NAME FOR THE VISTA PE HERE
set pename="Your PE Name"

REM SET THE NAME FOR THE WIM.FILE HERE WITH PATH
set filena=[boot]\sources\yourwimfile.wim

for /f "eol=r tokens=1-2" %%a in ('bcdedit /store %BCD-File% /ENUM all') do set rdo=%%b


for /f "tokens=1-7" %%a in ('Bcdedit /store %BCD-File% /copy {default} /d %pename%') do set guid1=%%g
bcdedit /store %BCD-File% /set %guid1:~0,38% DEVICE ramdisk=%filena%,%rdo%
bcdedit /store %BCD-File% /set %guid1:~0,38% OSDEVICE ramdisk=%filena%,%rdo%

bcdedit /store %BCD-File% /ENUM


Run it as many times as you like to add multiple pes after changing the variables - bcd-file, pename, filena
remember not to use any spaces in filena variable
Rest all is auto
atolica
varun037

You're amazing man!

Thank you. I will alway be in your debt.

Muchos gracias!
atolica
@varun037
I just burnt a DVD with Win7 and several other winpe to see if it works. I tested it first in virtualbox , boot menu shows up normal and where besides one winpe not starting, the other 4 ran smooth. But, booting on the real machine, the boot menu is GONE. Nothing shows up. Black screen.

I'm trying to see what's causing this, but can't think of anything right now. Still searching.
varun037
I dont know what the problem could be...

may be try not to use optimization while burning the dvd.

I am also getting some problem with dvd optimization currently...
varun037

and regarding the one pe that doesnot work check the other files that are included in the pe dvd. It may have some seperate drivers like norton ghost has. That folder is also to be copied onto the combined dvd...
atolica
I think is due to the fact that Win 7 hasn't got all the "goodies" put inside. I get some strange bugs, features of bcdedit not working.
It might be due to the fact I run on build 7057.


The boot menu not showing is very weird. In virtualBox everything is working flawlessly, iso and burnt DVD.

I'll install build 7077 Sunday night, and get back to you on that.

edit: You said something about optimization. You mean ultraiso optimization? It might be the culprit.

What about creating the iso with oscdimage? Or cdimage. MS does it that way.
varun037
I am currently using windows xp to do all the stuff. I just copied bcdedit file from vista->system32 to xp->system32 folder. I have tested this is the actual environment and works flawlessly for me. Its just fine.

I dont know about Windows 7. Its still in beta stage. Have read somewhere in this forum only that the bcdedit is still in development stage. Some changes are being made to it and vista file is better than vista sp1. Might be I will suggest you to use bcdedit file from vista installation. U may use imagex or winmount to mount the wim image to extract the file.

Thanks for the suggestion but I was able to solve the problem of optimization only by using same version of ntdll.dll file in windows installations and windows xp live. Otherwise it always gave me an hard error. I dont know y during optimization to files of different versions and different sizes shall get mixed up. I had to rebuid the pe from xp sp3 pack.
atolica
You were right. Windows 7 betas BCDEDIT it is still being developed that's why it didn't work. But using the one inside vista sp1 solved the problem.

It seems MS is not releasing fully working utilities with the betas. The vista+sp1 bcdedit size is 326 KB (334,336 bytes) when Windows 7 build 7057 bcdedit is 287 KB (293,888 bytes). This might explain that behavior.
varun037
thats good it worked...




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.