[SOLVED] Windows 10 Bootrec /rebuildbcd and /ScanOS say 0 Windows Installations detected.

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2

Don't worry about the camera noise.
I had multiple Linux distro installed beside windows 10 and after deleting their partitions and deleting those folders from the EFI fat32 System partition I ran those commands as seen above.
Its perhaps also important that grub was installed and removed as above described.

Issue is that, for both ScanOS and rebuildbcd it says
Search for Windows Installations was successful,
Total identifiable Windows Installations: 0
The process was successful. (translated)

As side-context: I can boot into Windows 10 properly (perhaps slow) but when I do stuff with Linux or older Windows bootable drives I get an boot error for "/Boot/Bcd". There's definitely an issue with bcd, regardless whether I can boot.

This is what my...
...Disks

... Partition :

... Volume:

(Ignore the Win7 partition, nothing on it)
("Fehlerfrei" means healthy/no issues, "Versteckt" at the end means hidden)
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
That's a common problem with removing multiboots. Windows likes to nag a lot when it is pushed to the second line at boot order. We'll rebuild the boot configuration data manually.

First step, mounting the EFI partition. I deduce that that's Volume 2 for you, a 100-200 MB FAT32 hidden partition tagged "SYSTEM". In diskpart issue these commands (confirm volume number again first):
select vol 2
assign letter V:


Now that we have mounted it on V: we can work on it. Exit diskpart, navigate to the volume (cd /d v:) and type dir. You want to see any of those folders:
EFI
Boot
ESD

The first is most likely. Navigate further into it (EFI\Microsoft\Boot) and when you dir again you should see the BCD file, that's your problem over there. Change its attributes so you can rename it with attrib BCD -s -h -r and rename it to something else as a backup with ren BCD BCD.bak and you can rebuild the BCD now. In case anything happens you can always rename the .bak one back to normal.

Now, we're at the big command. Issue bcdboot C:\Windows /l de-DE /s v: /f ALL (replace C:\Windows with your OS drive that has the Windows folder, de-DE to en-US if your installation is in English, ALL to UEFI if you have an UEFI installation.

Reboot, and it should go straight into Windows.

(Edit: It's not a K, it's a V. My bad.)
 
Last edited:
Also since you can boot into windows you can use the free version of easyBCD to rewrite MBR/boot sector to get rid of grub and rebuild the BCD store, you can add all the different OSes you have as well.
You can also re write the bootblock with commands if you prefer.
 

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
Also since you can boot into windows you can use the free version of easyBCD to rewrite MBR/boot sector to get rid of grub and rebuild the BCD store, you can add all the different OSes you have as well.
You can also re write the bootblock with commands if you prefer.
I always skipped these programs because of how much of a bad rep their names have / being obvious spy-ware, ad-ware, Malware.
 

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
That's a common problem with removing multiboots. Windows likes to nag a lot when it is pushed to the second line at boot order. We'll rebuild the boot configuration data manually.

First step, mounting the EFI partition. I deduce that that's Volume 2 for you, a 100-200 MB FAT32 hidden partition tagged "SYSTEM". In diskpart issue these commands (confirm volume number again first):
select vol 2
assign letter V:


Now that we have mounted it on V: we can work on it. Exit diskpart, navigate to the volume (cd /d v:) and type dir. You want to see any of those folders:
EFI
Boot
ESD

The first is most likely. Navigate further into it (EFI\Microsoft\Boot) and when you dir again you should see the BCD file, that's your problem over there. Change its attributes so you can rename it with attrib BCD -s -h -r and rename it to something else as a backup with ren BCD BCD.bak and you can rebuild the BCD now. In case anything happens you can always rename the .bak one back to normal.

Now, we're at the big command. Issue bcdboot C:\Windows /l de-DE /s k: /f ALL (replace C:\Windows with your OS drive that has the Windows folder, de-DE to en-US if your installation is in English, ALL to UEFI if you have an UEFI installation.

Reboot, and it should go straight into Windows.
Hi thank you for taking the time and writing that down.
I tried everything uo until the last command since the latest commenter said the command is doomed to fail.

Still doesn't rebuildbcd, or at least Windows still says there are 0 installations.
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
That's me being a dummy. I meant V:. Oops. That last command is pretty crucial since it will be the one to initialize the BCD. You also don't need to run rebuildbcd after it. Windows usually can't autofind installations in multiboot scenarios (at least, this is what happened with my last 3 variations of multiboot attempts) and it will not do anything. That command explicitly says "look, it's right here, don't look at anywhere else".

Also, EasyBCD is pretty legitimate. Never used it personally but seen it be recommended by people that know better than me. I at least know the dev's other tools and pretty helpful articles.
 

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
Thank you EasyBCD for destroying now both OS.
I can't boot into Windows now and sadly I haven't backed up my Windows Key and (new) data.
I will use another PC to Flash 1703 and try to repair BCD, perhaps this total destruction removed the issue as well.
What are my options beside reinstalling (seriously, I hate that most solutions are reinstalling windows instead of trying others, perhaps advanced things)
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
Eh? That's very strange. I have never seen it reacting that bad.
But we've backed up the BCD, remember? You should be able to mount the EFI, rename the BCD.bak back to BCD, and restart. That should at least get you back to the start.
One more thing, try to do a boot override on UEFI (from the boot options, you should be able to specifically choose what bootloader you'll use for that boot effectively bypassing the EFI boot sequence) and that should boot you to Windows albeit it's not a full solution.

Also, BCD being destroyed is not world's end, your data is safe on the drive, at the worst case you can image it (and run LicenseCrawler on it to retrieve the key).

We'll look at what we can after that.
 
Reactions: ikernelpro4

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
That's me being a dummy. I meant V:. Oops. That last command is pretty crucial since it will be the one to initialize the BCD. You also don't need to run rebuildbcd after it. Windows usually can't autofind installations in multiboot scenarios (at least, this is what happened with my last 3 variations of multiboot attempts) and it will not do anything. That command explicitly says "look, it's right here, don't look at anywhere else".

Also, EasyBCD is pretty legitimate. Never used it personally but seen it be recommended by people that know better than me. I at least know the dev's other tools and pretty helpful articles.
Rebuildbcd detected one windows install. Add install to the start list? I can press J, N, A. Which one?
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
Well damn, thought this adventure would end here. Let's just try to explicitly fit that BCD entry ourselves.

Follow the drill, boot into a recovery console, use diskpart to find where windows is installed, mount the EFI volume at V:
and issue (assuming: C is Windows and V is EFI)
bcdboot C:\Windows -s V:


and this should explicitly write the entry.
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
IF even that fails to work, why not nuke the entire ESP and rewrite it. If that one fails, you're free to do a reinstall.

Try these as a last ditch (the drill again, boot to recovery, don't mount ESP this time, I assume C is Windows, disk x is where all the stuff is, partition y is the ESP, you can diskpart your way to these, pull up diskpart), issue in cmd:

diskpart
select disk x
select partition y
delete partition override
create partition EFI
format fs=FAT32 quick
assign letter=V
exit
bcdboot C:\Windows /s V: /f ALL
exit


and this series of commands will nuke and remake the EFI system partition.

(Edit: Glad that explicitly punching in the entry worked for you. I'm keeping this one just in case someone in the next ten years need this solution.)
 
Last edited:

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
Well damn, thought this adventure would end here. Let's just try to explicitly fit that BCD entry ourselves.

Follow the drill, boot into a recovery console, use diskpart to find where windows is installed, mount the EFI volume at V:
and issue (assuming: C is Windows and V is EFI)
bcdboot C:\Windows -s V:


and this should explicitly write the entry.
When I tried that and rebooted it didn't work, it still showed BCD broken etc...
But then I noticed that another boot entry was added which does bring me into Windows.
Issue is that (I have a broken Windows boot entry) when I try to insert a Windows 7 install medium I see the BCD corrupted etc... error.
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
uh, I am definitely running out of ideas, but at the very least, the setting we've punched in seems to work. Try removing the other options from msconfig through windows, so that the only boot option is that one.
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
Hold up. That's Windows 7's boot manager. Do you have a Windows 7 USB connected right now? Or is it the one that comes at the boot? If no USB is there you should nuke the EFI and rebuild FROM a W10 USB. That also may be why we had the scans problem.
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
Hold on, forget about the last post. Try disabling Secure Boot. A Microsoft article on the code says "On UEFI based systems, you need to disable UEFI Secure Boot in order to use Windows 7."
 

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
Hold up. That's Windows 7's boot manager. Do you have a Windows 7 USB connected right now? Or is it the one that comes at the boot? If no USB is there you should nuke the EFI and rebuild FROM a W10 USB. That also may be why we had the scans problem.
I like your signature.
I think SecureBoot is already off but I'll check again.

The image you just saw appears when I boot normally (remember I have 2 windows boot manager entries in my boot menu now) and when I use the Windows 7 Install USB.
I just flashed Win10 1703 on the usb stick since 1703 fixes most recovery command problems and something worked. I was able to fixmbr, fixboot and enter rebuildbcd. It said that it detected 1 windows 10 installation, I entered yes and instead of the path issue error it said something like added to entries.
After that I ran scanos just for fun and to my suprise it showed 0 Windows Installations.
Obviously I was confused and ran rebuildbcd again and it suddenly said 0 windows installations found. I suppose it means new installations so I just ignored it.

I can boot into windows with the second entry but the BCD is still broken and I additionally can't install Win7 or I suppose maybe even linux.
To call this fixed is false, I actually made it worse (second win boot entry):LOL:
 

howtobeironic

Reputable
Jun 16, 2018
352
23
5,015
68
Well, I'll be damned if that worked. Still though, it seems like you need to disable secure boot to get the Win7 part running too. Damn MS, not even backporting a feature this important to one of the most used versions.

I hope that last shot works. I'll be busy for a while now, so I probably won't be able to reply for some time. Good luck.
 

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
Well, I'll be damned if that worked. Still though, it seems like you need to disable secure boot to get the Win7 part running too. Damn MS, not even backporting a feature this important to one of the most used versions.

I hope that last shot works. I'll be busy for a while now, so I probably won't be able to reply for some time. Good luck.
Secure boot is off. I hate windows and I especially hate Windows 10.
I wish we'd be back in the Windows XP times where everything was much easier and stable. In fact XP is so stable, I don't have any bad memories of it crashing n' errors. Aside from the countless selection of Malware of course :)
 
Reactions: howtobeironic

ikernelpro4

Commendable
Aug 4, 2018
57
5
1,545
2
I guess it's got so messed up that just making a new one is the best option. You may want to try that nuking option I was talking about, if that fails, oh well.
Completely formated the EFI partition and rebuild it. I can boot into Windows 10,installed Linux, yet when I try to install Windows 7 it says the BCD error on boot (booting into the Win 7installation medium, not the normal Windows 10 boot)

EDIT :I tried to install Windows 7 before linux
 

ASK THE COMMUNITY

TRENDING THREADS