Introduction
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 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
remove
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, shown above, I removed the SYSTEM, READ ONLY and HIDDEN attributes from it before renaming it to bcd.old and then 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
wpeutil reboot
I hope you found this useful, if you do please leave a comment and share this with others
cheers
niall
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.
thanks !
I second porsche95turbo
Very helpful guide. Thank you.
thanks Ed !
I wished I had came across your post earlier. I spent countless hours to fix my bcd but your guide just resolved all issues I was facing which all guides were Legacy based, but didn’t mention clearly.
I’m happy it helped ! thanks for posting
I have followed the steps found the bcd renamed it and applied rebuild command but still get the same error: 0 windows installations.
hi, you must have done something wrong or differently then, please post or email some photos of the output so I can see what you’ve tried
Finally, something that worked! The callout for the EFI volume and navigating to boot there was the thing most other guides were missing. Thank you so much.
I’m glad it helped !
Thank you!
I had three computers in front of me with the same issues, and everything in this post worked like a charm.
NO other website or post on reddit was able to help me but this.
awesome !
Thank you so much!
You saved me from panic.
thanks for replying !
You truly are the 🐐
thank you !
you rock bro 👊
thanks !
Thank you – this has absolutely saved me today after upgrading to an NVME drive and getting a series of seemingly arcane errors. The bootrec access denied error in particular was one I couldn’t get round.
I’m happy it helped Tom, thanks for the positive feedback
I tried and followed all the steps but it still didn’t detect my windows installation. Any idea how to help?
i’d suggest you re-read the entire article to verify you haven’t missed a step or mis-read it, if it’s still failing then feel free to email me detailed photos of the steps you carried out along with the results seen, make sure to capture the screen clearly
email to niall at windowsnoob dot com
cheers
niall
To anyone else still struggeling, i had to format the system volume for fat32, and then run:
bcdboot C:\Windows /s Z: /f UEFI
And then:
diskpart
select partition X
set id=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
exit
Restarted, and Windows boot manager was visible.
This is as far as I can get. https://imgur.com/a/anaFwtc I presume the partitions should have a file system other than RAW, but I’m not having any luck figuring out how to change it. Paid for AOMEI Partition Assistant and it can’t even see the hard drive. It only sees the flash drive it’s on.
this blog was aimed at fixing invalid boot partitions, not recovering data on faulty hdd’s which is what your’s sounds like, can you give me some more info on your scenario here please
Fixing it is what I was trying to do. I was hoping to avoid the hassle and frustration of reformatting and reinstalling or replacing the hard drive. Essentially, yesterday my computer froze and was unresponsive for minutes, so I hard reset it. When I turned it back on it blue screened with the error as “UNMOUNTABLE_BOOT_VOLUME”. Your blog and some other websites are what I’ve been using to try and fix the MBR. I was wrong about what the partition assistant could see. It could see the hard drive, but believed it had 0 kb on it. Using it to rebuild the MBR (as it was advertised as doing) did nothing at all. It would complete immediately and nothing would change. I suspect there’s no rescuing it, but I commented hoping that you might know of some other fix for my problem that I’ve yet to try. Thanks.
is your drive a spinning disk, if so what make/model ? so you hard powered off when the computer was hanging and now it fails to boot with unmountable boot volume… some more info about your hardware (hdd/ssd/nvme) would be helpful here