Looking for help from someone who knows BCDEDIT very well


  1. Posts : 4,192
    Windows 11 Pro, 22H2
       #1

    Looking for help from someone who knows BCDEDIT very well


    I won't bore you with the lengthy details of what I am trying to accomplish, but the short version is that I am trying to recreate a very specific BCD file from scratch.

    Specifically, I want to create duplicates of 2 BCD files that are found on a Windows 10 Consumer Edition DVD. Even more spefically, this MUST be the BCD files that are located in \boot and \efi\microsoft\boot on the dual architecture Windows media (it has both the x64 and x86 editions on it).

    I have worked out all of the commands that let me recreate these BCD files from scratch with the excetion of the very last section that looks like this:

    Device options
    --------------
    identifier {7619dcc8-fafe-11d9-b411-000476eba25f}
    ramdisksdidevice boot
    ramdisksdipath \boot\boot.sdi

    Nowhere on the internet can I find anything and Microsoft's own BCDEDIT reference documentation says nothing about this.

    Normally the settings ramdisksdidevice and ramdisksdipath appear under a section called ramdrive (if memory serves correctly) rather than Device options and it references a completely different GUID on the "identifier" line.

    I know I'm pushing my luck in the hopes of finding an answer, but does anyone have any ideas on this?

    NOTE: Yes, I am aware that I can simply copy these 2 BCD files from the original media, but I have a specific purpose in mind that requires creating these from scratch using the BCDEDIT command line.

    Should you need to see the above section in context, below is a complete copy of one of those BCD files:

    Code:
    Windows Boot Manager
    --------------------
    identifier              {bootmgr}
    description             Windows Boot Manager
    locale                  en-US
    inherit                 {globalsettings}
    default                 {default}
    displayorder            {default}
                            {6e737190-a04c-11ea-82c6-001583eeba66}
    toolsdisplayorder       {memdiag}
    timeout                 30
    
    Windows Boot Loader
    -------------------
    identifier              {6e737190-a04c-11ea-82c6-001583eeba66}
    device                  ramdisk=[boot]\x86\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    path                    \windows\system32\boot\winload.exe
    description             Windows 10 Setup (32-bit)
    locale                  en-US
    inherit                 {bootloadersettings}
    osdevice                ramdisk=[boot]\x86\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    systemroot              \windows
    bootmenupolicy          Legacy
    detecthal               Yes
    winpe                   Yes
    ems                     No
    
    Windows Boot Loader
    -------------------
    identifier              {default}
    device                  ramdisk=[boot]\x64\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    path                    \windows\system32\boot\winload.exe
    description             Windows 10 Setup (64-bit)
    locale                  en-US
    inherit                 {bootloadersettings}
    osdevice                ramdisk=[boot]\x64\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    systemroot              \windows
    bootmenupolicy          Legacy
    detecthal               Yes
    winpe                   Yes
    ems                     No
    
    Windows Memory Tester
    ---------------------
    identifier              {memdiag}
    device                  boot
    path                    \boot\memtest.exe
    description             Windows Memory Diagnostic
    locale                  en-US
    inherit                 {globalsettings}
    
    EMS Settings
    ------------
    identifier              {emssettings}
    bootems                 No
    
    Debugger Settings
    -----------------
    identifier              {dbgsettings}
    debugtype               Serial
    debugport               1
    baudrate                115200
    
    Global Settings
    ---------------
    identifier              {globalsettings}
    inherit                 {dbgsettings}
                            {emssettings}
    
    Boot Loader Settings
    --------------------
    identifier              {bootloadersettings}
    inherit                 {globalsettings}
                            {hypervisorsettings}
    
    Hypervisor Settings
    -------------------
    identifier              {hypervisorsettings}
    description             Hypervisor Settings
    hypervisordebugtype     Serial
    hypervisordebugport     1
    hypervisorbaudrate      115200
    
    Device options
    --------------
    identifier              {7619dcc8-fafe-11d9-b411-000476eba25f}
    ramdisksdidevice        boot
    ramdisksdipath          \boot\boot.sdi
    Here is the same file but with a switch that displays the output with all the guids enumerated:

    Code:
    Windows Boot Manager
    --------------------
    identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}
    description             Windows Boot Manager
    locale                  en-US
    inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
    default                 {7619dcc9-fafe-11d9-b411-000476eba25f}
    displayorder            {7619dcc9-fafe-11d9-b411-000476eba25f}
                            {6e737190-a04c-11ea-82c6-001583eeba66}
    toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}
    timeout                 30
    
    Windows Boot Loader
    -------------------
    identifier              {6e737190-a04c-11ea-82c6-001583eeba66}
    device                  ramdisk=[boot]\x86\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    path                    \windows\system32\boot\winload.exe
    description             Windows 10 Setup (32-bit)
    locale                  en-US
    inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
    osdevice                ramdisk=[boot]\x86\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    systemroot              \windows
    bootmenupolicy          Legacy
    detecthal               Yes
    winpe                   Yes
    ems                     No
    
    Windows Boot Loader
    -------------------
    identifier              {7619dcc9-fafe-11d9-b411-000476eba25f}
    device                  ramdisk=[boot]\x64\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    path                    \windows\system32\boot\winload.exe
    description             Windows 10 Setup (64-bit)
    locale                  en-US
    inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
    osdevice                ramdisk=[boot]\x64\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
    systemroot              \windows
    bootmenupolicy          Legacy
    detecthal               Yes
    winpe                   Yes
    ems                     No
    
    Windows Memory Tester
    ---------------------
    identifier              {b2721d73-1db4-4c62-bf78-c548a880142d}
    device                  boot
    path                    \boot\memtest.exe
    description             Windows Memory Diagnostic
    locale                  en-US
    inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
    
    EMS Settings
    ------------
    identifier              {0ce4991b-e6b3-4b16-b23c-5e0d9250e5d9}
    bootems                 No
    
    Debugger Settings
    -----------------
    identifier              {4636856e-540f-4170-a130-a84776f4c654}
    debugtype               Serial
    debugport               1
    baudrate                115200
    
    Global Settings
    ---------------
    identifier              {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
    inherit                 {4636856e-540f-4170-a130-a84776f4c654}
                            {0ce4991b-e6b3-4b16-b23c-5e0d9250e5d9}
    
    Boot Loader Settings
    --------------------
    identifier              {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
    inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
                            {7ff607e0-4395-11db-b0de-0800200c9a66}
    
    Hypervisor Settings
    -------------------
    identifier              {7ff607e0-4395-11db-b0de-0800200c9a66}
    description             Hypervisor Settings
    hypervisordebugtype     Serial
    hypervisordebugport     1
    hypervisorbaudrate      115200
    
    Device options
    --------------
    identifier              {7619dcc8-fafe-11d9-b411-000476eba25f}
    ramdisksdidevice        boot
    ramdisksdipath          \boot\boot.sdi
      My Computers


  2. Posts : 4,192
    Windows 11 Pro, 22H2
    Thread Starter
       #2

    I got responses to this but I've found an excellent workaround. I'm posting it here only in case anyone is interested...

    First, a little background on what I was attempting to accomplish.

    I'll omit a lot of detail here to keep this brief, but I was looking for a way to regenerate BCD files on the fly from within a batch file or program without the need to keep external copies of those BCD files.

    So, it turns out that BCD files are actually registry hives. You can take a BCD file, load it into the registry editor, and then save it back out as a .reg file. Since a .reg file is plain text, that can be easily incorporated within a program. To generate the BCD files on the fly, you can them perform these steps:

    Create an empty "template" registry hive by running the "bcdedit /createstore" command.
    Load this hive into the registry editor.
    Run the regini tool to modify the permissions on that registry hive.
    Use the contents of the .reg file or a batch file / program with that incorporated to modify the registry hive.
    Save out the registry hive (this commits the changes to what was the template making it the final product).
    Unload the registry hive.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:41.
Find Us




Windows 10 Forums