Advanced - Build a multi-bootable drive

Discussion in 'Windows 8' started by ColdZero, Dec 24, 2014.

  1. ColdZero

    ColdZero MDL Addicted

    Nov 9, 2009
    625
    2,874
    30
    #1 ColdZero, Dec 24, 2014
    Last edited by a moderator: Apr 20, 2017
    Build a multi-bootable flash drive
    Requirements: Knowledge of ADK (Dism, WinPE, Dart, WinRE, etc...)

    About:
    You will know how to build a flash drive that displays a bootable menu with tools like: (WinPE, Dart, WinRe, Windows Setup) for UEFI and legacy bios.
    You will learn the basic usage of: bcdedit (by example)

    What can i create with this?
    * A rescue or emergency tool. (by integrating WinPE, Dart, WinRE) <-- In this example
    * A Muti Windows setup flash drive.
    * A combination of Windows setup with multiple languages.

    You will need:
    * A WinPE already built in a flash drive.
    * A Winre.wim extracted from an install.wim
    Optional: Dart (boot.wim) and Windows (install.wim)

    Instructions UEFI:
    Code:
    * Assume F: as your WinPE flash drive.
    * Copy other images to the F: sources folder (winre.wim, dart.wim, etc...)
    
    1) Shows the BCD info for the first entry on the BCD File (Take note of the GUID)... the GUID will look like: {7619dcc8-fafe-11d9-b411-000476eba25f}
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /enum | find "osdevice"
    
    * Or use this command to view all the entries with their GUIDs: 
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /enum all
    
    
    2) Sets the first entry to the image.wim you want to boot. (In this example the WinPE) {7619dcc8-fafe-11d9-b411-000476eba25f}
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /set {default} device ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /set {Default} path \windows\system32\winload.efi
    
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /set {default} osdevice ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /set {Default} systemroot \windows
    
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /set {default} description "WinPE 5.1 x64"
    
    3) Copy the entry created to make a rule for other one: (Give the copy a name) (Example: WinRE) {7a641064-bc25-11e3-8261-00224d818f7a}
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /copy {default} /d "Windows 8.1 RE x64"
    
    4) Modify the rule to point to the other image.wim ("WinRE_x64.wim")
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /set {7a641064-bc25-11e3-8261-00224d818f7a} device ramdisk=[boot]\sources\WinRE_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    
    bcdedit /store F:\EFI\Microsoft\Boot\BCD /set {7a641064-bc25-11e3-8261-00224d818f7a} osdevice ramdisk=[boot]\sources\WinRE_x64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    
    * If you want to integrate other boot.wim or other stuff.wim ex: DART...  Then repeat steps 3 and 4 (Change the GUID and the .wim filename accordingly.)
    
    5) Creates the bootable menu
    bcdedit.exe /store F:\EFI\Microsoft\Boot\BCD /deletevalue {default} bootmenupolicy 
    
    You should also do the legacy part. Below.
     
  2. ColdZero

    ColdZero MDL Addicted

    Nov 9, 2009
    625
    2,874
    30
    #2 ColdZero, Dec 24, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  3. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,494
    633
    60
    #3 Flipp3r, Dec 25, 2014
    Last edited by a moderator: Apr 20, 2017
    Hi. Can I suggest it's better to set bootmenupolicy to legacy rather than deleting it.
    Code:
    bcdedit /store F:\Boot\BCD /set {default} bootmenupolicy legacy
    Yes, deleting it from your USB BCD works ok but deleting it from your BCD on your hdd does not work. The Win8 OS still boots as if it's still set to "Standard". This is usefull if you want F8 key to be working & access traditional menu options such as "Safe Mode".

    Setting the Timeout value is handy as well:
    Code:
    bcdedit /store F:\Boot\BCD /set {bootmgr} timeout 20
     
  4. ColdZero

    ColdZero MDL Addicted

    Nov 9, 2009
    625
    2,874
    30
    #4 ColdZero, Dec 25, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Use legacy boot loader if you frequently switch OS.

    To disable new Metro boot loader and bring back Windows Vista and 7 style boot loader in Windows 8.
    Code:
    * Local
    bcdedit /set {default} bootmenupolicy legacy
    
    * External (Flash Drive)
    bcdedit /store F:\Boot\BCD /set {default} bootmenupolicy legacy
    
    To re-enable Windows 8 Metro boot loader in future, simply execute following command in Command Prompt:
    Code:
    * Local
    bcdedit /set {default} bootmenupolicy standard
    
    * External (Flash Drive)
    bcdedit /store F:\Boot\BCD /set {default} bootmenupolicy standard
    

    Customizing Timeout value:

    Code:
    bcdedit /store F:\Boot\BCD /set {bootmgr} timeout 20
    
     
  5. Kamrul08

    Kamrul08 MDL Member

    Dec 28, 2013
    101
    12
    10
    Thanks ColdZero. For many days I’ve been looking for this tricks.


    I made Windows 7 bootable USB. Then I added sources_Win8.1_x32 (Windows 8.1 32bit) and sources_Win8.1_x64 (Windows 8.1 64bit). When I want to install Win 8.1 32 bit I just rename sources_Win8.1_x32 to sources and for Win 8.1 64 bit I rename sources_Win8.1_x64 to sources. Every time I would rename sources folder. It works fine as well as annoying to me. So I was looking for multiboot solution that you posted.
    http://forums.mydigitallife.net/attachment.php?attachmentid=32929&stc=1
    I applied your tricks but it shows Status: 0xc000000f error. Then I tried EasyBCD and it’s booting OK. EasyBCD creates a extra boot.sdi file in NST folder (screenshot above). I think it is the deference between you and EasyBCD. (attached my boot menu)
    http://forums.mydigitallife.net/attachment.php?attachmentid=32928&stc=1

    Now problem is- My setup shows Load driver problem in Windows8.1. That means my boot.wim file can’t connect install.wim file (because install.wim is run by boot.wim). Windows 7 works fine (because boot.wim & install.wim in right directory) but Win8.1 32 bit & 64 bit shows the problem. Would you please advise me about the problem?
    http://forums.mydigitallife.net/attachment.php?attachmentid=32927&stc=1
     

    Attached Files:

  6. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,494
    633
    60
    All you need is a 2 wim files. 32bit & 64bit winpe.
    Follow steps above to create 2 entries in Boot\BCD for 32 & 64bit.
    1 Entry in EFI\Microsoft\Boot\BCD for uefi.

    In bios/legacy/mbr, you can boot either 32 or 64bit. If booting uefi, you can boot the 64bit winpe.

    Once you've booted into winpe, change to your install folder & run setup.
    ie, cd /d c:\win81
    setup

    You can be creative & add a menu. Further you can have scripts to create custom partitions & use dism to extract your wim.
    See Murphy78's thread: Murphy78-DiskPart-and-Apply-Image-Script
     
  7. venu

    venu MDL Addicted

    Oct 16, 2009
    894
    99
    30
    Awesome! Just made one with DART 7 and 8.1. BTW does anyone know whether DART 8.1 works on Windows 8 (as in NOT 8.1)? I'm sick of ferrying around multiple wims.
     
  8. Heimnetz

    Heimnetz MDL Novice

    Jun 5, 2014
    7
    0
    0
    Does it work with install.swm files instead of a install.wim.
     
  9. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,494
    633
    60
    If you use Murphy78's Script then yes, it does. Dism fully supports split wim.
    If your wims are big & you split them, there's a possible license issue that crops up as these need to be in the 1st .swm.
    Murthy78's thread explains what to do...
     
  10. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,494
    633
    60
    Why are you using 8 still? Just go straight to 8.1 & save the hassle of having to download the 8.1 update each time...
     
  11. venu

    venu MDL Addicted

    Oct 16, 2009
    894
    99
    30
    Nah, not me but I do come across people who do.
     
  12. Heimnetz

    Heimnetz MDL Novice

    Jun 5, 2014
    7
    0
    0
    Thanks for the answer Flipp3r.
    My first try with win8 then had failed.
    My Win7 / 8 AIO on a FAT32 drive inclusive MSDaRT 86/64
    now works perfectly.
    Legacy as UEFI
    Also big thanks to Cold Zero for the food for thought.
     
  13. balubeto

    balubeto MDL Senior Member

    Dec 22, 2009
    461
    9
    10
    Using Windows ADK 10 v1511, the procedure of the first and second post is applicable also to create the BCD of a single iso of Windows PE/RE 10.x 32/64 bit working with computers that have the BIOS or UEFI firmware?

    Thanks

    Bye
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...