none
bcdboot: failed to create a new system store

    Question

  • Hi,

     

    I'm in the process of deploying a standard7 wim image to a vhd and booting on this vhd natively.

    When I'm using the bcdboot tool from winpe to copy the boot environment to the system partition, bcdboot returns the following message:

    BFSVC: Failed to create a new system store. Status = [c000003a]

     

    The following command was used:

    x:\windows\system32\bcdboot.exe d:\windows /s s:

     

    Here is the volume mapping of the platform:

    S: primary partition (system partition)

    C: primary partition (data partition containing the vhd file)

    E: USB dongle used to boot winpe

    D: VDISK (mounted vhd file)

    X: winpe boot drive

     

    I have already deployed the embedded standard7 wim image on the vdisk.

    This image was captured on a working platform with imagex on winpe (same USB dongle).

     

    Any help will be greatly appreciated,

     

    Thibault.

    Friday, July 2, 2010 3:34 PM

Answers

  • Hi Thibault,

    I checked my laptop and it is capable of running UEFI. However this option is disabled by default. I don't have the spare disk at the moment, but as soon as I get one, I'll sure try to make it work with UEFI.

    Anyway, I checked UEFIGuide.docx from
    http://www.microsoft.com/whdc/system/platform/firmware/uefiguide.mspx

    The way to go is

    Copy "C:\Windows\System32\config\BCD-Template" to let's say:
    C:\Tmp\mybcd

    mybcd is file, not folder.

    Then run

    bcdedit /import mybcd

    This should import mybcd to system store and you should have an example BCD store. It will probably not work, but at least you will have something to start with.

    There's also command:

    bcdedit /export whatever-bcd

    I would use export command on my master computer to save the BCD store.

    When image is applied, I would use import command to import BCD settings to BCD system store.

    IOW, perhaps it would be easier to start fresh.

    1. I would install just the basic OS

    2. I would then save BCD store with

    bcdedit /export masterBCD

    3. I would then copy masterBCD file to a safe place (to a folder with the image).

    4. run sysprep /generalize etc

    5. Run Imagex /capture etc.

    6. Clean the drive

    7. Create and format partitions as per UEFI instructions

    8. Imagex /apply image

    9. bcdedit /import masterBCD

    There's more info in the UEFIGuide.docx I mentioned at the beginning.

    Tuesday, July 6, 2010 3:45 PM

All replies

  • Please refer the following blog to create native VHD boot system.

    Windows 7 – VHD Boot – Setup Guideline - knom's developer corner - Site Home - MSDN Blogs


    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. ”
    Monday, July 5, 2010 7:16 AM
    Moderator
  • Hi Arthur,

     

    This blog entry works for a one shot system.

    My goal is to test a deployment procedure usable for production so this does not match my requirements.

    I need to use script-able tools like bcdboot to obtain a bootable windows 7 system.

     

    By the way, the procedure I'm using is the one described in the user guide of the WAIK for windows 7, the chapter is labeled:

    "Walkthrough: Deploy a virtual hard disk for native boot".

    If you do not recommend bcdboot to install the windows boot manager, which tool would you use ?

     

    Thank you for your reply,

    Thibault

    Monday, July 5, 2010 8:18 AM
  • Hi Thibault,

    I use simple batch file for (most of) my deployments.

    Here it is. It is named r7.cmd

    ++++++++++++++++

    diskpart /s w7disk.cfg
    bootsect /nt60 C: /mbr
    imagex /apply M58a.wim 1 D:\
    bcdboot d:\Windows
    pause
    wpeutil reboot

    ++++++++++++++++

    The first command partitions the disk.
    Here is the contents  of w7disk.cfg

    +++++++++++++++++

    select disk 0
    clean
    create partition primary size=100
    select partition 1
    active
    assign
    format quick
    create partition primary
    select partition 2
    assign
    format quick

    ++++++++++++++++++

    Let's go back to r7.cmd

    Line 2 writes boot sector.

    Line 3 applies image

    Line 4 creates BCD Environment.
    Please note some differences between "your way" and "my way".

    1. I don't have fixed assigned letters, I use "next available" letter. Still, it works for me reasonably well. In WinPE, my "Service" partition is assigned letter "C:" and "Windows" partition is assigned letter "D:". However, after system completes mini setup, "Service" partition is hidden and "Windows" partition is "C:".
    2. I create BCD boot environment after applying image and I create it from the Windows folder of applied image, I don't neet to mount vhd.

    Few more things

    I use MapNetworkDrive.vbs script that is "burned" into my WinPE image (drive X:).
    This script maps drive letter W: to a share on my deployment server. R7.cmd and w7disk.cfg are on the network share. All the operator has to do is type
    W: <Enter>
    r7 <Enter>

    Since scripts are on a network share, I can vary them as I like.

    My mechanism works when booting from CD/DVD media. If I boot from UFD, it gets slightly complicated because UFD occupies letter C: when it boots into WinPE.

    I also noticed that my script fails to apply image if during the boot into WinPE, the disk was blank, ie no partitions defined. However, simple reboot clears the problem because on the next reboot, the two partitions will already have been created.

    I also have an "HTA" template that I can apply if I have to create an image solution for those "squirmish" of using command line tools.

    Monday, July 5, 2010 9:39 AM
  • Hi Les52,

     

    Thanks a lot for your script, that is the kind of process I need.

    The last difficulty I have to overcome is the windows boot manager install.

    You are using "bootsect" which I have tried on our target platforms.

    As our target platforms are EFI based, the bootsect tool always ends with the following message:

    "This tool can only be run on systems booted using a PC/AT BIOS. This system was booted using EFI or some other firmware type".

    Perhaps someone can direct me to the right procedure to install the windows boot manager on EFI based systems ?

     

    Thanks for your replies,

    Thibault.

    Monday, July 5, 2010 9:56 AM
  • Try to omit bootsect command.

     

    Monday, July 5, 2010 10:51 AM
  • Les52,

     

    First, thanks for your support.

     

    I have reproduced your install procedure on one of my target systems without using a native vhd (just to be sure I've used your exact same test conditions).

    I have tried without the bootsect command (it still ends up with the same error message).

    I'm still stuck on the bcdboot command which ends with:

    "Failure when attempting to copy boot files."

    If I use "bcdboot d:\windows /s c:", it ends with:

    "BFSVC: Failed to create a new system store. Status = [c000003a]"

     

    I have then tried different combinations of drive letters and I have also tried to specify the exact location of the bcdboot exec on x:\windows\system32 without any success.

    I'm wondering if a tool like bootsect exists for EFI systems.

    Has someone any experience with installing the windows boot manager on EFI systems in a script-able way ?

     

    Thanks for you replies,

    Thibault.

    Monday, July 5, 2010 12:39 PM
  • Thibault,

    Bootsect and BcdBoot are two different tools.

    BootSect writes boot sectors; MBR and partition boot sectors on. Like you noticed, it works for MBR disks.

    BcdBoot creates Boot Configuration Data (BCD). BCD is similar in functionality what Boot.ini did in the past for WinXP and Win 2003.

    My bcdboot syntax is different than yours. I use:

    bcdboot d:\Windows

    This creates BCD structure on "Service" partition, not on "Windows" partition. My command only specifies source of the BCD structure, which is in D:\Windows (as visible from the WinPE). I do not specify target. The target is determined by the command by default, I believe that if I don't specify target, the command searches for active partition and creates BCD structure on active partition.

    If BcdBoot does not work for you, perhaps you can try with BcdEdit. It is more complicated, but I'd say it's more powerfull command than bcdboot.

    I'm sorry, I don't have any experience with EFI, but I'm eager to know.

    Monday, July 5, 2010 1:18 PM
  • Thibault,

    Is it possible that you are trying to apply image made on MBR disk to UEFI system?

    I'm not saying that it is impossible. But if it is the case, I would reinstall and reimage using UEFI system and see where the differences are between MBR and UEFI systems.

    Monday, July 5, 2010 1:41 PM
  • Les52,

     

    The image was captured on the same system that I'm trying to reinstall on.

    After having installed a standard 7 embedded system on this platform, I have captured the windows partition with imagex.

    Then I have wiped out the disk and now I'm trying to make an automated install on the same platform (native vhd is a bonus, I'm trying without for now).

    Currently I'm trying to get any clues on how an EFI system is supposed to boot windows 7 and what is the official microsoft boot manager install procedure for an EFI platform.

     

    I have also difficulties to find howtos about making a system bootable while using dynamic disk and/or GPT.

    For now, I'm still trying to have a bootable platform with a basic disk but I'm wondering if GPT is a "must have" when using an EFI platform (GPT is part of the EFI specification).

    I guess Microsoft has designed some tools accordingly but I cannot find documentation about this particular area. A short howto would be really helpful.

     

    The right way to boot on an EFI platform is normally to add an entry in the nvram of the platform which should be pointing to the bootmgr EFI code.

    It was configured this way when I first installed the platform but I cannot find the tool that Microsoft is using to modify nvram entries.

     

    Thibault.

    Monday, July 5, 2010 2:04 PM
  • Perhaps this helps. It references Windows Vista SP1 and Windows Server 2008, but I hope it applies to Win 7.

    http://www.microsoft.com/whdc/system/platform/firmware/uefiguide.mspx

    Monday, July 5, 2010 2:11 PM
  • I did browse thru my WAIK User Guide. It does have information about UEFI systems.

    AIUI, Microsoft implementation requires that EFI partitions are on GPT disks, although Wiki says "Whether a disk contains an EFI System Partition is unrelated to the partition table scheme (GUID or MBR) that it uses". http://en.wikipedia.org/wiki/EFI_System_partition

    From what I've read:

    • You must have GPT disk
    • There must be at least three partitions on the GPT disk
      EFI partition (FAT or FAT32)
      Microsoft Reserved (MSR) partition (no File System)
      Windows Partition (NTFS)
    • You must capture
      EFI partition
      Windows partition
    • You configure BCD store using BCDEdit command.
    Monday, July 5, 2010 2:54 PM
  • Hi Les52,

     

    I'm currently reading and testing a few procedures described in the document you send me.

    I will tell you back the outcome of my experiments.

     

    Thanks a lot,

    Thibault.

    Monday, July 5, 2010 4:03 PM
  • Hi,

     

    I'm still struggling with bcdedit.

    I have partitionned the target platform this way:

     

     

    DISKPART
     SELECT DISK 0         // Select the first hard drive.
     CLEAN           // Wipe the disk.
    
    
     CONVERT GPT          // Convert disk to GPT.
    
    
     CREATE PARTITION EFI SIZE=100     // Create the EFI System Partition
     FORMAT QUICK FS=FAT32 LABEL="System"   // and format it using FAT32.
     ASSIGN LETTER="S"        //
     
    
     CREATE PARTITION MSR SIZE=128     // Create the MSR Partition.
    
    
     CREATE PARTITION PRIMARY      // Create the Windows partition
     FORMAT QUICK FS=NTFS LABEL="Windows"   // that fills the remainder 
     ASSIGN LETTER="C"        // of the disk.
    EXIT

     

     

    Then I have deployed the windows image on the "Windows" partition and the ESP image on the "System" partition.

     

    From WinPE, bcdedit ends with the following message:

    "The boot configuration data store could not be opened.

    The system cannot find the file specified."

     

    Using "bcdedit /enum FIRMWARE" shows the same message.

    Using intel drivers needed to access the firmware (used by intel syscfg and firmware update procedure) do not change anything.

     

    If I try to create a new data store with bcdedit /createstore, I face a BSOD telling that a problem has been detected and that windows has been shut down to prevent damage.

    Tech info is: STOP: 0x0000001E (0xFFFFFFFFC0000005, 0X000000008E3F8D1C, 0x00000000000000008, 0x000000008E3F8D1C)

     

    I have also tried to use easyBCD under WinPE but to no avail as I need a 64bit version which I cannot find on Neosmart Technologies' site.

     

    As usual any help is greatly appreciated,

    Thibault

    • Edited by Thibault Hild Tuesday, July 6, 2010 3:35 PM forgot a step
    Tuesday, July 6, 2010 1:28 PM
  • Hi Thibault,

    I checked my laptop and it is capable of running UEFI. However this option is disabled by default. I don't have the spare disk at the moment, but as soon as I get one, I'll sure try to make it work with UEFI.

    Anyway, I checked UEFIGuide.docx from
    http://www.microsoft.com/whdc/system/platform/firmware/uefiguide.mspx

    The way to go is

    Copy "C:\Windows\System32\config\BCD-Template" to let's say:
    C:\Tmp\mybcd

    mybcd is file, not folder.

    Then run

    bcdedit /import mybcd

    This should import mybcd to system store and you should have an example BCD store. It will probably not work, but at least you will have something to start with.

    There's also command:

    bcdedit /export whatever-bcd

    I would use export command on my master computer to save the BCD store.

    When image is applied, I would use import command to import BCD settings to BCD system store.

    IOW, perhaps it would be easier to start fresh.

    1. I would install just the basic OS

    2. I would then save BCD store with

    bcdedit /export masterBCD

    3. I would then copy masterBCD file to a safe place (to a folder with the image).

    4. run sysprep /generalize etc

    5. Run Imagex /capture etc.

    6. Clean the drive

    7. Create and format partitions as per UEFI instructions

    8. Imagex /apply image

    9. bcdedit /import masterBCD

    There's more info in the UEFIGuide.docx I mentioned at the beginning.

    Tuesday, July 6, 2010 3:45 PM
  • Les52,

     

    I've done everything from scratch and it has succeeded :).

    So deploying with UEFI is possible.

     

    Thanks a lot for your support, the latest procedure you gave me worked.

     

    Thibault.

    Friday, July 9, 2010 4:09 PM