Rebuild the BCD in Windows - WindowsTips.net - Windows Tips and Tricks with Geek

Saturday, July 3, 2021

Rebuild the BCD in Windows

 

 Rebuild the BCD in Windows 10, 8, 7, or Vista

Rebuilding the BCD in Windows should only take around 15 minutes:

  1. On Windows 10 or Windows 8: Start Advanced Startup Options. On Windows 7 or Windows Vista: Start System Recovery Options.

    Troubleshoot button in Advanced Startup Options
  2. In Windows 10/8, select Troubleshoot > Advanced options.

    Advanced options button in Troubleshoot screen
  3. Select the Command Prompt button to start it.

    Command Prompt button in Advanced options

    Tip: Command Prompt won't start immediately. Your computer will show a "Preparing" screen for a short time while it readies the computer.

    Note: You may need to choose your account name and enter your password to get to the Command Prompt.

  4. At the prompt, type the bootrec command as shown below, and then press Enter:

    bootrec /rebuildbcd
    
    bootrec /rebuildbcd command in Console

    The bootrec command will search for Windows installations not included in the BCD and then ask you if you'd like to add one or more to it.

  5. You should see one of the following messages at the command line.

    Option 1

    Scanning all disks for Windows installations. Please wait, since this may take a while... Successfully scanned Windows installations. Total identified Windows installations: 0 The operation completed successfully.
    

    Option 2

    Scanning all disks for Windows installations. Please wait, since this may take a while... Successfully scanned Windows installations. Total identified Windows installations: 1 [1] D:\Windows Add installation to boot list? Yes/No/All:
    
    Successfully scanned Windows installations message in Console

    If you see Option 1: Move on to Step 7. This result most likely means that Windows installation data in the BCD store exists but bootrec couldn't find any additional installations of Windows on your computer to add to the BCD. That's fine; you'll just need to take a few extra steps to rebuild the BCD.

    If you see option 2: Enter Y or Yes to the Add installation to boot list? question, after which you should see The operation completed successfully, followed by a blinking cursor at the prompt. Finish up with Step 10 toward the bottom of the page.

  6. Since the BCD store exists and lists a Windows installation, you'll first have to remove it manually and then try to rebuild it again. At the prompt, execute the bcdedit command as shown and then press Enter:

    bcdedit /export c:\bcdbackup
    
    bcdedit /export c:\bcdbackup command in Console

    The bcdedit command is used here to export the BCD store as a file: bcdbackup. There's no need to specify a file extension. The command should return the following on screen, meaning the BCD export worked as expected:

    The operation completed successfully.
    
  7. At this point, you need to adjust several file attributes for the BCD store so you can manipulate it. At the prompt, execute the attrib command exactly like this:

    attrib c:\boot\bcd -h -r -s
    
    attrib c:\boot\bcd -h -r -s command in Console

    What you just did with the attrib command was remove the hidden, read-only, and system attributes from the file bcd. Those attributes restricted the actions you could take on the file. Now that they're gone, you can manipulate the file more freely (specifically, rename it).

  8. To rename the BCD store, execute the ren command as shown:

    ren c:\boot\bcd bcd.old
    
    ren c:\boot\bcd bcd.old command in Console

    Now that the BCD store is renamed, you should now be able to successfully rebuild it, as you tried to do in Step 6.

    Note: You could delete the BCD file entirely since you're about to create a new one. However, renaming the existing BCD accomplishes the same thing since it's now unavailable to Windows, plus provides you with another layer of backup, in addition to the export you did in Step 5, if you decide to undo your actions.

  9. Try rebuilding the BCD again by executing the following, followed by Enter:

    bootrec /rebuildbcd 
    
    bootrec /rebuildbcd command in Console

    It should produce this in Command Prompt:

    Scanning all disks for Windows installations. Please wait, since this may take a while... Successfully scanned Windows installations. Total identified Windows installations: 1 [1] D:\Windows Add installation to boot list? Yes/No/All:
    
    Total identified Windows installations: 1 [1] D:\Windows Add installation to boot list? Yes/No/All: response in Console

    This means the BCD store rebuild is progressing as expected.

  10. At the Add installation to boot list? question, type Y or Yes, followed by the Enter key.

    You should see this on the screen to show that the BCD rebuild is complete:

    The operation completed successfully.
    
    Add installation to boot list? request in Console
  11. Restart your computer. Assuming that an issue with the BCD store was the only problem, Windows should start as expected.

    Important: Depending on how you started Advanced Startup Options or System Recovery Options, you may need to remove a disc or flash drive before restarting.

No comments:

Post a Comment