Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My new Windows 7 installation fails to boot. At Microsoft support page, I found this howto (using the Windows 7 Recovery Disc):

 bcdedit /export C:\BCD_Backup
 cd boot
 attrib bcd -s -h -r
 ren C:\boot\bcd bcd.old
 bootrec /RebuildBcd

I did not tried this yet, because I want to understand it first. Why would I have to export bcd to BCD_Backup, and then make a bcd.old copy? Isn't it the same thing?

share|improve this question

migrated from Aug 22 '11 at 20:58

This question came from our site for professional and enthusiast programmers.

To break down the commands you are looking at:

bcdedit /export C:\BCD_Backup
** Export the current BCD (Boot Configuration Data) to C:\BCD_Backup

** Change current working drive to the C: drive

cd boot
** change the current working directory to the hidden "boot" directory on the current drive (C:)

attrib bcd -s -h -r
** remove the SYSTEM, HIDDEN and READ-ONLY attributes from the file "bcd" (where boot configuration data is stored)

ren c:\boot\bcd bcd.old
** rename the "bcd" file to "bcd.old" (backing it up)

bootrec /RebuildBcd
** actually rebuild the "bcd" file, from scratch

As noted on this Microsoft help page

The /RebuildBcd option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, this option lets you select the installations that you want to add to the BCD store. Use this option when you must completely rebuild the BCD.

Basically you are backing up then removing the Boot Configuration Data and then forcing a full rebuild of it.

share|improve this answer

BCDEdit stands for Boot Configuration Data Editor, which is basically the successor to the boot.ini file. According to the Docs:

  • bcdedit /export C:\BCD_Backup exports your BCD to a file.
  • C: should make sure you're in the root directory of C:.
  • cd boot changes the directory to C:\boot
  • attrib bcd -s -h -r removes the System, Hidden, and ReadOnly attributes of the bcd file.
  • ren C:\boot\bcd bcd.old Renames the bcd to bcd.old. To answer your question, I believe they're two different formats of the same thing.
  • bootrec /RebuildBcd will (duh) rebuild the bcd.
share|improve this answer

Why would I have to export bcd to BCD_Backup, and then make a bcd.old copy? Isn't it the same thing?

The KnowledgeBase articles (There are two that contain these instructions. This is the newer Windows NT 6.1 one.) aren't telling you to make a copy. The ren command does not copy files. They're telling you to rename the old file out of the way, and to start from scratch with no BCD database file at all. The bcd.old file will not necessarily be the same as the BCD_Backup file, as the latter is created by reading the existing database and writing out a new database with the same records.

Yes, the duplication may seem superfluous. But it is only so if the BCD database is not corrupted. The KB article is addressing the situation where it is, remember. In which case bcd.old is the database file as it is, and BCD_Backup is whatever content bcdedit can successfully retrieve from it for exporting.

share|improve this answer

You must log in to answer this question.