HOW-TO put More than One WinPE distribution on one MultiBoot DVD

Discussion in 'Windows 7' started by kukubau, Dec 10, 2009.

  1. kukubau

    kukubau MDL Addicted

    Dec 15, 2008
    694
    48
    30
    #1 kukubau, Dec 10, 2009
    Last edited by a moderator: Apr 20, 2017
    HOW-TO put More than One WINDOWS distribution on one MultiBoot DVD

    Hi all

    Suppose you'd like to have a dvd with Vista/Win7 setup files(installation disk) PLUS ERD Commander, Active Boot Disk, ESET SysRescue, DART 6.x 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, WinPE 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

    Code:
    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 Win7 pes... (i have tested 6 PEs + Windows 7 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...(every *.wim must be named differently!)

    {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 WINDOWS 7/Vista PE
    
    REM THIS IS THE ORIGINAL BCD FILE EXTRACTED FROM ANY WINDOWS 7 WINPE / Win 7 / VISTA DVD (I USED Windows 7 INSTALLATION)
    set BCD-File="c:\bcd 1\BCD"
    
    REM SET THE NAME FOR THE WINDOWS 7 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 and Noise from msfn forums.

    kukubau aka atolica
     
  2. secr9tos

    secr9tos MDL Addicted

    Jul 28, 2009
    999
    133
    30
    interesting:)
     
  3. kukubau

    kukubau MDL Addicted

    Dec 15, 2008
    694
    48
    30
    I'm glad you like it and hope someone finds it useful.
     
  4. moaziz

    moaziz MDL Novice

    Oct 23, 2009
    2
    0
    0
    thanks for the topic
     
  5. kukubau

    kukubau MDL Addicted

    Dec 15, 2008
    694
    48
    30
    No problem.