BOOTREC /FIXBOOT => Element not found
So the other day, there is a post about this here but there have been some developments, I installed Linux Kali to dual boot and messed up the booting of my PC.
After messing around with the boot files I finally got it to boot the Windows 10 partition using this code
menuentry 'Windows 10' {
set root='(hd0,msdos1)'
chainloader +1
}
But it failed and I got a message similar to this.
File: \Boot\BCD
Status: 0xc0000034
Info: The Windows Boot Configuration Data file is missing required information
Yes that is the one for Windows 7, I couldn't find the Windows 10 version. I believe the error code and extra information was different.
To fix the problem I followed these steps found here and here (the BurrWalnut answer)
- Put the Windows installation disc in the disc drive, and then start the computer.
- Press a key when the message indicating "Press any key to boot from CD or DVD …". appears.
- Select a language, a time, a currency, and a keyboard or another input method, and then click Next.
- Click Repair your computer.
- Click the operating system that you want to repair, and then click Next.
- In the System Recovery Options dialog box, click Command Prompt.
- Type BOOTREC /FIXMBR, and then press ENTER.
- Type BOOTREC /FIXBOOT, and then press ENTER.
- Type BOOTREC /REBUILDBCD, and then press ENTER.
The problem is when I enter the command BOOTREC /FIXBOOT
the output is Element not found
and when I enter the command BOOTREC /REBUILDBCD
it scans for operating systems, finds windows, asks if I want to add a boot for it, I enter Y
and then it gives the output Element not found
.
I would really appreciate any help in fixing the problem
Solution 1:
For anybody else that experiences the same problem (completely shot my windows boot partition while installing Linux) and stumbles across this question, I suggest giving the troubleshooting steps from Dell a try. Instructions are for UEFI and GPT only I think.
The command that finally fixed my problem was:
bcdboot c:\Windows /s <boot letter>: /f ALL
For different systems, different variations of the command parameters might be appropriate.
Solution 2:
I found a quite extensive article about recovering from boot problems for almost all Windows versions: https://neosmart.net/wiki/bootrec/
BTW, it also states about the above mentioned bcdboot command, but with the correct parameters
(the line mentioned in an answer above is lacking f.ex. the /f before the ALL, so the complete command would be:
bcdboot C:\Windows /s x: /f ALL
In my case, the Windows system was already detected on C: so instead of x: I just used c: and it worked and recovered.
Solution 3:
I've been battling with this problem for a couple of days after the Windows update - was beginning to thing that I's have to do a clean install of years of applications.
Came across this forum by accident and have to thank Sven Rieke for his solution and comments - brought my system back to the point of the update where it had failed to boot and am now back working again. Can't thank you all enough.
The solution - as described was
Boot Win10 installation - troubleshoot - command prompt logged into drive c: bcdboot c:\windows /v /s c: /f ALL
Using /v gives a good idea of the problems that are on the system - and for me they were legion. I've no lost 2 installations of Linux / Ubuntu from my disk but now have a clean windows - and that is what I was looking for.
Now all I have to do is bring up some YouTube videos on plastering to repair the wall that I've been banging my head against for the last couple of weeks
Cheers
Solution 4:
Check if the partition that you want to boot from is set to active
You can make use of diskpart
in the command prompt to check the partition of the disk