Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm dual booting Linux Mint and Windows 7, and windows 7 is having a "device inaccessible" error preventing it from booting. I'm using grub for my MBR.

From what I understand, the BCD is what manages the boot process for Windows 7 after the MBR has passed off control to the OS (which is currently only a logical partition). Is this correct?

So would using this command:

bootrec /RebuildBcd

make any changes to the MBR or any of the partition tables on the harddrive? Basically, is rebuilding the BCD something localized to the system drive, or does it actively change the hard-drive structure (or set any partitions active with the boot flag)?

Thanks!

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

The BCD is a file, named BCD, which lives in the Boot folder on the 100MB partition Windows makes before the main system partition during install (it's also possible you may have a Boot folder on your C:\ drive).

It's a registry hive. It's mounted in the registry at HKLM\BCD00000000.

bootrec /RebuildBCD only rebuilds this BCD file.

Other bootrec options can modify the MBR:

  • /FIXMBR: The /FIXMBR switch writes an MBR to the system partition.
  • /FIXBOOT: The /FIXBOOT switch writes a new boot sector onto the system partition.
  • /SCANOS: The /SCANOS switch scans all disks for Windows installations and displays entries currently not in the BCD store.
  • /REBUILDBCD: The /REBUILDBCD switch scans all disks for Windows installations and provides a choice of which entries to add to the BCD store.
share|improve this answer
    
Thanks. I got it all working! For future reference, how exactly does /FIXBOOT work? I get all the other options, but I'm not exactly sure how a new boot sector relates to the mbr/partition tables? –  Nathan Jul 29 '13 at 2:42
    
The PC BIOS loads the first sector of the hard drive and then hands control to the code it finds there. /FIXBOOT puts this code back. Sector 0 is 512 bytes, the MBR lives in the last 64 of those, the boot code lives in the other bytes. /FIXMBR only writes the MBR part of that. –  ultrasawblade Jul 29 '13 at 3:24
    
Does GRUB write over the boot sector or just the MBR? What does the code that /FIXBOOT places actually do? –  Nathan Jul 29 '13 at 3:52
    
GRUB doesn't alter the MBR when installed. The code that /FIXBOOT places is the 1st stage bootloader which loads the actual, 2nd stage bootloader (NTLDR on XP, GRUB or LILO on Linux, winload.exe on Vista and higher) –  ultrasawblade Jul 30 '13 at 2:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.