I bought a second hand replacement laptop for a mis-behaving Surface Pro 4 (jittery screen) and to save my time (the computer wasn’t mine) I decided to image it. Anyway, long story short, after I restored 82GB of data on the target laptop (HP 830 G5), I tried to boot it but got a HP bios error stating something like no operating system found, please reinstall the operating system.
So I booted from some usb based Windows installation media and checked the partitions, all the data was there, Windows was there, it all looked good but obviously the boot loader was broken.
I googled and found the following suggestions.
Bootrec /fixmbr Bootrec /fixboot (Note: If this fails with access denied try BOOTSECT /NT60 SYS and then issue the command again) Bootrec /scanos Bootrec /rebuildbcd
The problem however, is that after issuing Bootrec /rebuildbcd it stated
“Total identified Windows installations: 0”
which of course, didn’t leave me feeling super confident that this would work. The value should be 1 at a minimum.
Another quick google and the advice out there all stated something like the following…
bcdedit /export C:\BCD_Backup C: cd boot
But that gave me the following error
“The system cannot find the path specified”
because there was no C:\boot folder. This folder doesn’t exist as this computer (Windows 10) is UEFI based and not legacy based as I guess the gazillion guides out there assumed.
Due to the format change (legacy versus UEFI) this computer uses an EFI partition to store the boot files, but that partition doesn’t have a drive letter and the path to the BCD is different to all the guides out there, so how do you fix that ?
To find the efi partition, boot to your Windows setup screen and choose
Boot from the Windows installation disc, and select Install. Next click on Repair your computer then select ->Advanced Options ->Troubleshoot ->Command Prompt.
Once done, launch diskpart and then select the disk on your computer (most likely disk 0) like so
diskpart sel disk 0 list vol
that will show you the partitions on your computer. Then I selected each of the two SYSTEM partitions, and assigned a drive letter to them so I could view the files on them using
sel vol x (where x is the volume number) assign
After assigning a drive letter and exiting diskpart I could browse that drive and view the files on it. I did this a few times to identify the correct drive, after I was done with that drive I removed the drive letter using
Once I identified the EFI partition I navigated to where the bcd files were located, and that path was D:\EFI\Microsoft\Boot as shown below, note your EFI partition may end up on a different drive letter using the ASSIGN command.
Now that I found the bcd, I renamed it and rebuilt the BCD.
attrib bcd -s -h -r ren bcd bcd.old bootrec /RebuildBcd
And that was it , all I had to do before rebooting was to un assign the drive letter using the remove command.
and finally, reboot the computer cleanly using
I hope you found this useful
Thank you so much! I searched all over the internet for a guide that actually worked and finally found yours.
I’d like to highlight that this line right here seems to have made all of the difference: Bootrec /fixboot (Note: If this fails with access denied try BOOTSECT /NT60 SYS and then issue the command again). If like me you overlooked this part, the odds are good that the changes won’t stick.