15.3 C
New York
Friday, September 29, 2023
spot_img

How to rebuild BCD in Windows

If Windows’ BCD (boot configuration data) store is missing, corrupted, or not configured correctly, Windows will not be able to boot and you will see a “BOOTMGR is Missing” error or a similar error message during the boot process.

The simplest solution to the BCD problem is to simply rebuild it, which you can do automatically with the bootrec command (fully explained below).

Don’t worry if this guide is too long. There are some commands to run and a lot of output on the screen, but rebuilding the BCD is an extremely simple process. Just follow the instructions exactly and everything will be fine.

Note: These instructions apply to Windows 10, Windows 8, Windows 7, and Windows Vista. Similar problems can exist in Windows XP, but since the boot configuration information is stored in the boot.ini file and not the BCD, fixing XP with boot data is a completely different process.

How to rebuild BCD in Windows 10, 8, 7 or Vista

Rebuilding BCD in Windows only takes about 15 minutes:

1. Open Advanced Startup Options if you are using Windows 10 or Windows 8 and System Recovery Options if you are using Windows 7 or Windows Vista.

Open Advanced Startup Options or System Recovery Options

2. In Windows 10/8, Select Troubleshoot > Advanced options.

Chọn Troubleshoot > Advanced options

3. Select the Command Prompt button to launch it.

Tip: Command Prompt will not start immediately. The computer will briefly display the “Preparing” screen when the computer is ready.

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

Select Command Prompt button to launch it

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

bootrec /rebuildbcd

Type the bootrec command

The bootrec command will search for Windows installations that are not in the BCD and then ask you if you want to add one or more settings to it.

5. You will 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:

Bạn sẽ thấy một trong các thông báo sau tại dòng lệnh

  • If you see Option 1: go to Step 7. This result most likely means that Windows installation data in the BCD store exists, but bootrec cannot find any additional Windows installations on your computer to add to BCD. You will only need to take a few extra steps to rebuild the BCD.
  • If you see option 2: type Y or Yes in the question “Add installation to boot list?”, then you will see the message “The operation completed successfully”, followed by a blinking cursor at the prompt. Finish with Step 10 at the bottom of the tutorial.

6. Since the BCD store exists and lists Windows installations, you’ll have to remove it manually first and then try to build again. At the prompt, execute the command bcdedit and then press Enter:

bcdedit /export c:bcdbackup

Execute bcdedit command

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

The operation completed successfully.

7. At this point, you need to adjust some file properties for the BCD store to be able to manipulate it. At the prompt, execute the attrib command exactly like this:

attrib c:bootbcd -h -r -s

Execute the attrib command exactly like this

What you just did with the attrib command removed the hidden, read-only, and system attributes from the bcd file. Those attributes restricted the actions that you could perform on the file. Now that they are gone, you can manipulate files more freely (namely, rename files).

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

ren c:bootbcd bcd.old

Now, BCD store has been renamed. You should be able to rebuild it successfully, as you tried to do in step 6.

BCD store has been renamed

Note: You can delete the BCD file completely because you are going to create a new file. However, renaming the existing BCD accomplishes the same thing as it’s not currently available for Windows, plus it gives you another layer of backup, aside from the export done in Step 5, if you decide to undo his actions.

9. Try rebuilding BCD again by doing the following, then pressEnter:

bootrec /rebuildbcd

Try to rebuiling BCD again

The command will produce this in the 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:

The command will produce this in the Command Prompt

This means that the BCD store rebuild is progressing as expected.

10. At the question Add installation to boot list?, type Y or Yes, and then press Enter.

You should see this on the screen, indicating that the BCD rebuild is complete:

The operation completed successfully.

indicating that the BCD rebuild is complete:

11. Restart the computer. Assuming that the problem with the BCD store is the only problem, Windows will boot, as expected.

Important Note: Depending on whether you start Advanced Startup Options or System Recovery Options, you may need to remove the disk or flash drive before restarting.

If rebuilding the BCD doesn’t solve the problem you’re having, continue to troubleshoot any specific issues that are preventing Windows from starting properly.

Good luck!

Related Articles

Stay Connected

99FansLike
89FollowersFollow
200SubscribersSubscribe
- Advertisement -spot_img

Latest Articles