Solved Messed up BCD, Error 0xc000000f. Unable to '/rebuildBCD'

redcairn

New member
Local time
12:23 PM
Messages
5
I have an asus n56vz laptop that is a couple years old. I replaced the HDD with a SSD when I bought it and put a clean win7 install on it. Today, I decided to swap the blu-ray drive with a HDD caddy and put the original HDD back in. I think my mistake started because I never wiped the original disc.

So on first boot, Windows wouldn't load. It just hung on the black screen with the windows logo. I tried to boot again and it gave checkdisk warnings which I skipped. I was able to get to my desktop but when I went to open my computer everything went black. I then removed the new drive from the caddy slot and rebooted and went into windows repair. The automated repair checker found a problem with the boot info and proposed a change. I tried to accept it but got an error saying "Failed to save startup options."

At this point, I did some googling and (maybe) incorrectly assumed my registry had been screwed up because the system tried to boot of the original drive instead of the SSD. I tried to restore the registry hive files manually in the repair command prompt tool. I backed up the hive files in /system32/config and copied the ones in from /system32/config/regback.

This is where it went really sour. On boot, I got the exact 0xc000000f error mentioned here. (\EFI\MICROSOFT\BOOT\BCD)

I was able to get into recovery using a usb key but I received an error within the recovery tool when I click repair says "This version of System Recovery Options is not compatible with the version of Windows you are trying to repair". I think this is because of UEFI because I'm sure it was the right version and 64bit. I've tried this with a dedicated repair ISO and a full win7 home premium iso, both on USB.


I was still able to get into the command prompt in RE using shift+f10. First, I reversed the changes I made the registry by copying the backups back into /system32/config. Next, I tried the following commands:

bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildBCD --> errored out with "the requested device cannot be found". Some googling around told me this is might be because Windows RE doesn't work 100% when using a usb-key on a usb3.0 port. See this link for info on usb3.0 issue. Unfortunately the laptop does not have any usb2.0 ports...

I also ran DISKPART from the cmd line. It showed the SSD drive with three partitions. 100mb, 124mb, and ~240gb. None of the partitions were marked "active".


Okay so let's try a DVD and /rebuildBCD again. I reinstalled the original Blu-ray drive. Then I burned a full Win7 Home Prem 64bit install disc. I can't get the machine to boot from the disc! I've tried many combinations in the bios with no success. Every time I boot from the disc it just errors and says something like: insert bootable media or chose another boot device. I also tried a dedicated Win7 repair ISO burned to DVD and had the same problem. Arg.... it's possible the Blu-ray drive isn't working properly.


I have no idea what to do now. I consider myself decent at troubleshooting but I think I might be causing myself more harm than good by googling and trial-and-erroring.

Is there any alternative way to run the /rebuildBCD command outside of windows RE? Maybe a 3rd party bootable usb?
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit
Computer type
Laptop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Home Premium 64bit
None of those commands pertain at all to UEFI (Unified Extensible Firmware Interface) - Install Windows 7 with - Windows 7 Forums if that's what you have as indicated by the EFI error code.

Reboot into BIOS setup to make sure you have CSM enabled since you may have both a UEFI install on one hard drive and Legacy on another. What are the exact settings choices for Secure Boot, UEFI, CSM or Legacy BIOS, and the BIOS boot priority order - these normally are on the Advanced, Boot and Security tabs. Pictures will help. Screenshots and Files - Upload and Post in Seven Forums - Windows 7 Forums

If necessary put things back as they were when it would boot and provide a screenshot of Disk Management - Post a Screen Capture Image so we can see the exact configuration. If you can get it to boot with the HDD in the caddy that will help spot problems.

You can tell if you have a UEFI install as shown in the tutorial at top, or by the presence of an EFI System partition vs. a System Reserved partition on either drive. There are also no Active partitions pointing to the intended System partition on a UEFI install. You can view your drives from boot mode if it won't start using Partition Wizard boot CD, burn to CD with Windows Image Burner on another PC.
 
Reboot into BIOS setup to make sure you have CSM enabled since you may have both a UEFI install on one hard drive and Legacy on another. What are the exact settings choices for Secure Boot, UEFI, CSM or Legacy BIOS, and the BIOS boot priority order - these normally are on the Advanced, Boot and Security tabs. Pictures will help. Screenshots and Files - Upload and Post in Seven Forums - Windows 7 Forums


  • Secure Boot: All devices are unlocked at boot. My bios only has passwords & IO interface security (all are unlocked)
  • UEFI: Boot Menu - UEFI Boot = enabled
  • CSM or Legacy BIOS: Boot Menu - Option for "Launch PXE OpROM" (controls the execution of UEFI and Legacy PXE OpRom) = Disabled. Legacy UBS Support is enabled under the Advanced menu.
  • Boot priority order: #1 - Windows Boot Manager, #2 0 KingstonDataTraveler
Pics

I got back in on the usb drive, here are the pics from diskpart showing the partitions.
Diskpart pics
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit
Computer type
Laptop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Home Premium 64bit
Both the disk and UEFI settings appear to be supporting UEFI install to GPT disk, so I dont' know if the MBR disks commands which were written messed it up or not.

Normally there would be a CSM or Legacy BIOS setting to allow use of an MBR data or boot drive too. Do you happen to know if the old HD is MBR format?

You can see the Kingston Stick is not showing as a UEFI device meaning it can't repair or reinstall the UEFI install. You'll need to format the stick using Option One in UEFI Bootable USB Flash Drive - Create in Windows to try again to boot it as a UEFI device, run Startup Repair or rescue your files to Clean Reinstall Windows 7 deleting all partitions during booted install.

Can you put it back the way it was and try to boot the SSD now? Reset the BIOS to defaults to see if that helps, and what settings are then.
 
I included a link to an imgur album with pics of the BIOS. bios - Imgur

Thanks for the help, this is killing me. I think if I could get into RE in UEFI boot then I'd be ok. Unfortunately the machine won't read the win7 dvd from the blu-ray.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit
Computer type
Laptop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Home Premium 64bit
Is there a way to create a uefi bootable usb from ubuntu or osx? This is my only windows machine.
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit
Computer type
Laptop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Home Premium 64bit
I gave you the steps to format the Kingston stick to boot to repair or reinstall to UEFI. It is now showing as a Legacy drive so it won't work for UEFI.
 
Took me a while to create a bootable usb key in linux:

  1. Use gparted format to delete all partition. Then go to Device->create partition table, select GPT. Then create a fat16 partition of at least 4gb
  2. Use the following command: sudo winusb --install /path/to/win/iso /dev/sdbx (the command will give a subdirectory error, it's okay)
  3. In the root of the newly minted USB drive there is the \efi\microsoft\boot directory. Copy this directory one level up so the files also reside under \efi\boot
  4. Use 7-zip to find bootmgfw.efi from your flash drive in the sources\install.wim\1\Windows\Boot\EFI archive
  5. Extract the bootmgfw.efi file to \efi\boot, and rename it to bootx64.efi.
The USB drive booted up right away. Repair is no longer showing the compatibility error. The repair wizard identified issues with startup procedures and fixed them. I'm now restoring...

<edit> This solved everything. Thanks to gregrocker for pointing me in the right direction.
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 64bit
Computer type
Laptop
Computer Manufacturer/Model Number
Asus
OS
Windows 7 Home Premium 64bit
Back
Top