What does BCDEdit do?
Solution 1
To break down the commands you are looking at:
bcdedit /export C:\BCD_Backup
** Export the current BCD (Boot Configuration Data) to C:\BCD_BackupC:
** Change current working drive to the C: drivecd 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.
Solution 2
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.
![Stephen Rauch](https://i.stack.imgur.com/13Fpq.png?s=256&g=1)
Comments
-
Stephen Rauch almost 2 years
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 C: 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
toBCD_Backup
, and then make abcd.old
copy? Isn't it the same thing?