atolica

More than one Operating system (Windows7/Vista) on one DVD

47 posts in this topic

Hi guys

Do you know how can you create a multiboot dvd so you have two or more Winpe distributions (Operating systems Windows 7/ Vista) 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

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}

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

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

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.

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.

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

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.

operation completed successfully.

next

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

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 WINDOWS PEs... (I have tested 3 PEs + Windows 7 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... 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:

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

REM THIS IS THE ORIGINAL BCD FILE EXTRACTED FROM ANY VISTA WINDOWS 7 WINPE / WINDOWS 7 DVD
set BCD-File="c:\bcd 1\BCD"

REM SET THE NAME FOR THE WINPE HERE (CHANGE IT EVERY TIME FOR EVERY BOOT ENTRY)
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

Edited by atolica
0

Share this post


Link to post
Share on other sites

up

Edited by atolica
0

Share this post


Link to post
Share on other sites

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).

0

Share this post


Link to post
Share on other sites

Nothing is difficult. How did you do it?

0

Share this post


Link to post
Share on other sites

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.

Edited by atolica
0

Share this post


Link to post
Share on other sites
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

0

Share this post


Link to post
Share on other sites

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

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

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

Edited by atolica
0

Share this post


Link to post
Share on other sites

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.

Edited by Nois3
0

Share this post


Link to post
Share on other sites

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

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

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:

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

Edited by atolica
0

Share this post


Link to post
Share on other sites

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:

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.

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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.

finally got the things to work :D

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)

0

Share this post


Link to post
Share on other sites

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

Bcdedit /store "%BCDFILE%" /set %guid1% systemroot \Windows

Thank You!

Edited by atolica
0

Share this post


Link to post
Share on other sites

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}

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"

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}

operation completed successfully.

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

operation completed successfully.

bcdedit /store bcd /ENUM

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

0

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

  • Recently Browsing   0 members

    No registered users viewing this page.