setting up new bcd store at a "specific directory" for win7 RRS feed

  • Question

  •      Original question-

    Setting up new BCD Store (or stores) at specific directory(ies) for win 7

    NOTE: this question/discussion is moved from, after it was suggested this may be the more relevant forum for such a question. Also additional info is supplied due to initial comments as indicated:

    My aim is to set up several BCD stores at different folders such as:

    where each "boot" folder contains a specific bcd store for an OS (such as Win 7, Winxp, and Linux), instead of setting up a "single" BCD store at "D:\boot" (at the root of a drive) with Osloaders for each of the 3 OS configurations.

    I used Visual BCD Editor to inspect BCD store details and found that there are 2 elements that I can add and configure for {bootmgr}, namely:
    1. BcdDevice
    2. BcdFilePath

    which indicates (perhaps falsely) that, the bcd store could be located at a specific/custom folder such as "D:\newConfig\Boot" where the bcd store would be located, and bootmgr will be located at "D:\newConfig".
    Unfortunately, bcd store related documentation is very limited. I found an old Vista bcdstore description document (dated 2008), and some hardware testing using bcdstore configuration options, but none of them give anyt indication or examples of how the above 2 elements could be configured/used.

    Does anyone have any information on these elements and their use, or suggestions if I am trying to attempt something that is not possible?

    Thanks and regards,



        BOYANS answered-

    1. Boot manager (bootmgr) is always in root of active partition. BCD is always in \boot directory of active partition. 

    2. BcdDrive and BcdFilePath are only effective after you select a boot menu entry and then cancel it (for example you type F8 and then cancel to return to main boot menu). I think at this point the BCD store specified by BcdDrive and BcdFilePath is loaded by bootmgr replacing ORIGINAL store loaded from \boot\BCD at initial boot.

    Boot sequence for NT6 is:Boot code in MBR loads PBR from active partition which loads bootmgr from active and bootmgr reads \boot\BCD from active. bootmgr does not know what is inside BCD before loading it from \boot\BCD.



         Daremo additional info-

    Thank you for the info. I was being parsimonious with some details, as I thought them not relevant, but here's the info:

    I usually set 1st primary partition of the first HD as active. I use grub4dos as initial bootloader, and the various entries are configured that direct the booting of different OS on different partitions and drives. For ex: I have 2 HDs configured as follows-
    (HD0,0) pri, act: (fat32 or NTFS) grubldr installed on the MBR, with grub menu entries pointing to partitions on 2nd HD

    HD1 consist of 1 pri, and 1 extended partition, divided into 4 logical units-
    (hd1,0) - pri - Winxp (ntfs)
    (hd1,4) - 1st log drive (as per grubdos drive sequencing) - Win 7 (ntfs)
    (hd1,5) - 2nd log - linux distro 1 (ext3)
    (hd1,6) - 3rd log - data (linux ext3)
    (hd1,7) - 4th log - data (ntfs)

    So my entries in Grub4dos point to:
    #1 --> (hd1,4)\bootmgr with (hd1,4)\boot\bcd
    #2 --> (hd1,5)\bootmgr with (hd1,5)\boot\bcd
    #3 --> (hd1,6)\bootmgr with (hd1,6)\boot\bcd

    What I wanted to do was (in a shorthand description):
    #1 --> (hd0,0)\xp\bootmgr with (hd0,0)\xp\boot\bcd [where bcdstore is located]
    #2 --> (hd0,0)\Win7\bootmgr with (hd0,0)\Win7\boot\bcd [where bcdstore is located]
    #3 --> (hd0,0)\linux\bootmgr with (hd0,0)\linux\boot\bcd [where bcdstore is located]

    As long as each bcdstore is stored in their specific subfolder such as (hd0,0)\xp\boot\bcd, and bootmgr is placed in (hd0,0)\xp the relative folder structure is maintained with respect to bootmgr and bcd store.
    Also grub4dos can specify for an entry:
    root (hdx,x)\<somefolder>
    chainloader (hdx,x)\<somefolder>\bootmgr

    When the pc is booted, bootmgr is found and loaded, but then gives an error regarding "boot\bcd"

    I tried using the bcddrive, bcdfilepath in the bcd stores I have setup, but they don't seem to take effect when grubldr passes the control to bootmgr.

    The info you supplied in iem-2 is interesting... in that, if I setup an initial <root>\boot\bcd with bcddrive and bcdfilepath elements pointing to another bcd store located at a specific subfolder, it might work. But the question, besides testing it and see if it works, is that, this desig limits the use of different bcd stores located at different subfolders. You can only point to one specific subfolder location, because these elements are located in the {bootmgr}. The only way around is setting up a daisy chain.

    1. <c:>\boot>\bcd (dummy but valid bcd store, and bcddrive, bcdfilepath points to <x:>\config1\boot\bcd)
    2. <x:>\config1\boot\bcd (config1 to load OS1, bcddrive, bcdfilepath points to <x:>\config2\boot\bcd, so that if f8, cancel is used, it loads the next bcd store in the chain)
    3. <x:>\config2\boot\bcd (config2 to load OS2, bcddrive, bcdfilepath points to <x:>\config3\boot\bcd so that if f8, cancel is used, it loads the next bcd store in the chain)
    4. <x:>\config3\boot\bcd (config3 to load OS2, bcddrive, bcdfilepath points to <c:>\boot\bcd so that if f8, cancel is used, it loads the next bcd store in the chain, which in this instance back to the starting bcd store in "1")

    This idea may work if the bootmgr really loads a new (and the bcddrive, bcdfilepath specified) bcd store when F8 - cancel is used!!!

    I really would like to see a more in depth documentation on bcd store from MS, which will be very useful to deal with unusual situations, and to create some out-of-the-box solutions!

    Hmmm... more testing.... it will take a lot of time since hyper-v doesn't boot grub4dos! Back to free vmserver or virtualbox??? to set up a test bed...

    By the way how reliable is info in item-2 ?!?!?


    So here it is...

    1. is it possible to configure separate bcd stores at different folders, and feed the bcd store location perhaps with the help of bcddrive, and bcdfilepath elements in the {bootmgr} section of a bcd store?

    2. what and how are bcddrive, bcdfilepath elements are used? They are available, but without further info, documentation it is unclear why and how they can be used!!! Anyone have any solid info or documentation? As I mentioned the only available bcd store documentation is in the vista bcd store reference docs, and is dated 2008, and no explanation is available aside from repeating what the element's name indicate.... and that document is definitely out of date.

    Thanks in advance,


    Monday, May 13, 2013 6:57 PM

All replies

  • Hi Daremo,

    Please check my answer as below:

    1.Create the {ramdisktoptions} object in your BCD store by specifying the following. Drive should be the drive that contains the image.
    bcdedit /create {ramdiskoptions} /d "Ramdisk options" 
    bcdedit /set {ramdiskoptions} ramdisksdidevice partition= Drive
    bcdedit /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi 

    Please refer the following article
    2. Please refer the following article


    Kevin Ni

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Wednesday, May 15, 2013 9:14 AM
  • I'm sorry but I don't see the relevance between your answer and my question or what I aim to do.

    Instead of having too many entries in one bcdstore for various OS, I want to have separate BCD stores placed in specific folders (folders that are not necessarily located at the root of a drive/partition).

    Plus, I already have the ramdiskoptions configured for each of the BCD stores on the different subfolders, with the correct/corresponding path to boot.sdi --> eg (for the example-2, win7 configuration):

    (hd0,0)\Win7\bootmgr with (hd0,0)\Win7\boot\bcd [where bcdstore is located, and bootmgr is located at (hd0,0)\win7]

    then I have the following for ramdiskoptions:

    bcdedit /set {ramdiskoptions} ramdisksdidevice partition= C:
    bcdedit /set {ramdiskoptions} ramdisksdipath win7\boot\boot.sdi

    Each bcdstore in different subfolder has been carefully and manually configured. In addition, for testing purposes the bcdstores are also copied to a test partition, and placed in the standard folder structure "<root-drive>\boot" folder, and the contents are modified to reflect the test-partition specifications, one-by-one. They are successfully tested to boot the pc to the specific OS. So, the point is, if the bcdstore is placed in a folder other than <root>\boot, it fails to boot the OS, despite the modifications to the BCD store reflecting the different paths, and using the different BCD elements (as explained in my original post). I am trying to figure out what the specific elements of BCD store, namely BCDdevice, and PCDFilePath, are used for or how they are used for, and if there are elements that can be used to point bootmgr to a bcd store located in a specific path.

    Saturday, May 25, 2013 4:02 PM