[SOLVED] BCD is gone and won't rebuild ?

Sep 24, 2024
8
0
10
Earlier today, I found out that my Dell laptop tried to update sometime while I wasn't using it and it gave me a green screen. I can't remember what the error said exactly as I was half asleep, but I know it had "boot" in it. For the past 4-5 or so months, my laptop has been unsuccessfully trying to install a Windows 11 system update that kept failing and reverting so many times that I would ignore the prompt. For more context, my laptop was originally running Windows 10 but I decided to upgrade to Windows 11 last year and even that installation wasn't without problems due to the problematic graphics drivers that my laptop came with (Intel Iris Xe). I had to remove them entirely just to upgrade and reinstalled them afterwards.

The Dell SupportAssist OS Recovery hardware scan was uneventful but the repair scan told me that there was something wrong with my partition table and boot files. I've run this test several times and sometimes it says the partition table is fine, and then sometimes it says there is an error…

I booted into Debian via USB and all of my files seem intact. If I had to do a full backup, I would need to purchase a 1TB drive to keep everything.

I have an installation media USB with Windows 11 on it that I booted into to use "Repair your computer" but any BCD commands in the RE just aren't working.

When I'm in DiskPart, I see a singular Disk, Partition, and Volume: the 16GB USB stick I am using (D:\).

bootrec /fixmbr is successful but doesn't do anything
bootrec /scanos and /rebuildbcd give me "Total identified Windows installations: 0”
bootrec /fixboot gives me "Access is denied"
bcdboot gives me "Failure when attempting to copy boot files"
bcdedit gives me "The boot configuration data could not be opened"

I have tried going into D:\EFI\Microsoft\Boot and using bootrec

I've read about other people's registries becoming corrupted after an update and I think that could be my case, although I sadly don't have any registry backups.

It's currently almost 3 am for me, but I would appreciate anything although I won't be able to reply quickly until tomorrow afternoon. Thank you.
 
Welcome to the forums, newcomer!

For more context, my laptop was originally running Windows 10 but I decided to upgrade to Windows 11 last year and even that installation wasn't without problems due to the problematic graphics drivers that my laptop came with (Intel Iris Xe). I had to remove them entirely just to upgrade and reinstalled them afterwards.
You're advised to manually format and reinstall Windows 11 after you've upgraded to Windows 11 using the internal upgrade path from Windows 10, it helps root out any issues during the migration.

I booted into Debian via USB and all of my files seem intact. If I had to do a full backup, I would need to purchase a 1TB drive to keep everything.
I would do so, since you seem to have mission critical data on it and any further tinkering might result in said data loss. In fact that is what I'd suggest, to backup your data and reinstall the OS, after recreating your bootable USB installer for Windows 11, then installing the OS in offline mode.

You should also download necessary drivers for your laptop from your laptop's support portal. Install said drivers in an elevated command and then connect to the internet after you've installed all drivers pertaining to your laptop.
 
I can't remember what the error said exactly as I was half asleep, but I know it had "boot" in it.
Please show screenshot with error, you're getting, when trying to boot into windows.
(upload to imgur.com and post link)
The Dell SupportAssist OS Recovery hardware scan was uneventful but the repair scan told me that there was something wrong with my partition table and boot files. I've run this test several times and sometimes it says the partition table is fine, and then sometimes it says there is an error…
We'd like to see screenshots of error messages. Your descriptions are too vague and not detailed enough.
When I'm in DiskPart, I see a singular Disk, Partition, and Volume: the 16GB USB stick I am using (D:\).
That means - windows recovery/preinstallation environment didn't detect your OS drive.
It's detecting USB flash drive only.
You can't fix OS drive, if it's not even being detected.
Either Installation media is missing some drivers required by your specific hardware or your OS drive has failed.
Please list full specs of your hardware (model name of your laptop).
bootrec /fixmbr is successful but doesn't do anything
bootrec /scanos and /rebuildbcd give me "Total identified Windows installations: 0”
bootrec /fixboot gives me "Access is denied"
bcdboot gives me "Failure when attempting to copy boot files"
bcdedit gives me "The boot configuration data could not be opened"

I have tried going into D:\EFI\Microsoft\Boot and using bootrec
All those commands are pointless, if your drive is not being detected.
BTW - bootrec command is mostly useless in UEFI environment. You shouldn't use it.

How long ago was windows 11 installation media created?
Create a new windows installation media with most recent windows 11 version.
 
I would do so, since you seem to have mission critical data on it and any further tinkering might result in said data loss. In fact that is what I'd suggest, to backup your data and reinstall the OS, after recreating your bootable USB installer for Windows 11, then installing the OS in offline mode.
I'm now working on copying my files. Thank you for your advice. I'll reformat as well.

Please show screenshot with error, you're getting, when trying to boot into windows.
(upload to imgur.com and post link)

We'd like to see screenshots of error messages. Your descriptions are too vague and not detailed enough.

That means - windows recovery/preinstallation environment didn't detect your OS drive.
It's detecting USB flash drive only.
You can't fix OS drive, if it's not even being detected.
Either Installation media is missing some drivers required by your specific hardware or your OS drive has failed.
Please list full specs of your hardware (model name of your laptop).

All those commands are pointless, if your drive is not being detected.
BTW - bootrec command is mostly useless in UEFI environment. You shouldn't use it.

How long ago was windows 11 installation media created?
Create a new windows installation media with most recent windows 11 version.
When I power on, it just puts me in the RE. I only got the green screen once and haven't seen it again after the first restart.
This is as much as the Dell repair scan will tell me.
I have a 2020 Dell Inspiron 7506 2-in-1 with i7 and 16GB memory.
The installation media was created yesterday with the media creation tool. My laptop is on 10.0.26100.1 and the USB has 10.0.22621.2861.
 
Does recovery environment detect your OS drive?
Execute following and show screenshot.
diskpart
list disk
select disk 0
list partition
list volume
detail disk
Code:
DISKPART> list disk

There are no fixed disks to show.

DISKPART> list part

There is no disk selected to list partitions.
Select a disk and try again.

DISKPART> list vol

There are no volumes.
I took out any USBs I was using.
 
I turned off RAID and selected the other storage option (AHCI/NVMe) and tried powering on, and it said "Undoing changes made to your computer" and "Preparing Automatic Repair" and it put me into RE where clicking "Continue" just looped through this again.
The other option was to disable all integrated storage devices.
I changed it back to RST and I can now see my OS drive under Use a device in the recovery environment and it just loops back when I select it although there are more options available in the RE now. Doing "list disk" does now show my OS drive…!
Code:
Microsoft Windows [Version 10.0.26058.1000]
(c) Microsoft Corporation. All rights reserved.

X:\Windows\System32>diskpart

Microsoft DiskPart version 10.0.26058.1000

Copyright (C) Microsoft Corporation.
On computer: MININT-PBSA6N7

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          953 GB    15 MB        *
  Disk 1    Online         7502 MB  7496 MB

DISKPART> sel disk 0

Disk 0 is now the selected disk.

DISKPART> list part

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    System             150 MB  1024 KB
  Partition 2    Reserved           128 MB   151 MB
  Partition 3    Primary            936 GB   279 MB
  Partition 4    Recovery          1376 MB   937 GB
  Partition 5    Recovery            14 GB   938 GB
  Partition 6    Recovery          1370 MB   952 GB

DISKPART> list vol

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C   OS           NTFS   Partition    936 GB  Healthy
  Volume 1         ESP          FAT32  Partition    150 MB  Healthy    Hidden
  Volume 2     E                NTFS   Partition   1376 MB  Healthy    Hidden
  Volume 3         Image        NTFS   Partition     14 GB  Healthy    Hidden
  Volume 4         DELLSUPPORT  NTFS   Partition   1370 MB  Healthy    Hidden
  Volume 5     D                       Removable   4768 KB  Unusable

DISKPART> detail disk

Intel Optane H10 with SSD 1TB
Disk ID: {4015EF60-3447-4AF8-ABE7-34540F74F94B}
Type   : RAID
Status : Online
Path   : 0
Target : 0
LUN ID : 0
Location Path : PCIROOT(0)#PCI(0E00)#RAID(P00T00L00)
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C   OS           NTFS   Partition    936 GB  Healthy
  Volume 1         ESP          FAT32  Partition    150 MB  Healthy    Hidden
  Volume 2     E                NTFS   Partition   1376 MB  Healthy    Hidden
  Volume 3         Image        NTFS   Partition     14 GB  Healthy    Hidden
  Volume 4         DELLSUPPORT  NTFS   Partition   1370 MB  Healthy    Hidden
Also, I can't open my OS drive in Debian now and it just says it is mountable.
 
Oh. You have Intel Optane H10 1TB drive.
That is completely different "can of worms".

If I was asked to deal with this, I'd just get rid of it completely and
replace with a regular NVME dive instead.

Anyway ...
to fix bootloader execute following:
diskpart
list disk
select disk 0
(select 1TB drive)
list partition
select partition 1
(select 150MB system partition)
assign letter=H
exit
bcdboot C:\windows /s H:
( C: - 936GB windows OS partition, H: - 150MB bootloader partition)
Double check drive letters. Those can change in recovery environment.
 
Fl53Dvf.jpeg

This is what I got.
 
The first time I wasn't in Safe Mode and somehow I was suddenly able to boot pretty normally, but I decided to power off again to check and when I powered on, there was a brief 30ish seconds of an Automatic Repairs message on the black startup screen. When I powered off/on again I was then in RE and had to select Vol 3 to boot but it seemed entirely fine otherwise.

I am now in Safe Mode, though.
 
It seems normal now 🙂
I had a prompt to "Choose an operating system" but I quickly found out that it can be disabled easily. Sincerely, thank you so much for your help!