ONLY FOR UEFI GPT BOOT DISKS!
I cloned a Surface Pro 1st gen hdd to a USB drive to transfer to a Surface Book and Windows would not boot. I tried the following commands to repair the boot partition:
bootrec /fixmbr (this completed successfully)
bootrec /fixboot (this said Access Denied)
bootrec /rebuildbcd (this said Element not found)
- You can also try (this finally worked for me after trying a lot of things on one occasion):
What I finally did that worked was this on a separate occasion:
- list disk
- select disk 0
- list partition
- select partition 1 (your system partition)
- detail partition (EFI partition ID is C12A7328-F81F-11D2-BA4B-00A0C93EC93B)
- delete partition override
- create partition efi size=100 (Change the size to fit)
- create partition msr size=128 (Change the size to fit)
After doing that process I ran the bootrec commands from the first part of this post and all completed successfully. Windows now boots.
If that still does not work then try this:
Boot a UEFI USB stick with Windows 10 (Also works with server 2019 and Hyper-V 2019) and go through the wizard to install windows
I selected the partition with my data and got an error stating the current windows folder will be renamed windows.old
Continue past that error and then as soon as it is done copying system files click the X to cancel the installation (You may be able to even unplug the computer at that moment if you want.)
DON’T LET IT CONTINUE INSTALLATION CANCEL IT AFTER THE FIRST STEP IN THE INSTALLATION PROGRESS WINDOW! Clicking the X worked for me.
Once done try the bootrec and bcdboot commands above