Back to all articles
Technology
🐶

When Your Dog Destroys Your Boot Loader: An NVMe Recovery Story

A sudden power loss corrupted my NVMe drive's boot configuration. Here's exactly how I fixed it using Windows recovery tools and manual UEFI repair.

November 28, 2025 8 min read
Share:
CW

Cody Williamson

Senior Software Engineer

A few weeks ago, I finished cloning my old drive to a shiny new NVMe. Everything was working perfectly. I was feeling accomplished. The very next day, my dog decided to chew through the power cord while the PC was running.

Twenty four hours. I got twenty four hours of enjoying my new drive before the universe decided to test my troubleshooting skills. If you are reading this because you searched “NVMe boot failure” at 2 AM, I feel your pain. Let me save you some time.

The result was a corrupted NTFS Volume Bitmap and a destroyed UEFI Boot Configuration Data (BCD). The system would POST just fine, but Windows refused to load. Error 0xc000000f stared back at me, and the built in Startup Repair did absolutely nothing useful except loop endlessly. This is the story of how I fixed it, and more importantly, the mistake I made during the clone that made everything worse.

The Real Problem: Lazy Cloning

Here is the thing. When I cloned the drive using Macrium Reflect, it worked. The system booted, Windows loaded, everything seemed fine. But I did not take the time to rebuild the boot loader properly after the clone. The BCD was pointing to the old drive’s partition GUIDs and the EFI boot entries were essentially held together with hope and residual good luck.

Under normal operation, this works. Windows is surprisingly forgiving about sloppy boot configurations as long as nothing goes wrong. But the moment you have a sudden power cut, all that fragile state gets exposed. The file system corruption from the power loss was fixable. The real pain came from the boot loader being in a half configured state to begin with.

If you are cloning drives, rebuild your boot loader. Do not skip this step. I skipped it because I was lazy and everything worked, and then my dog taught me a lesson about technical debt the very next day. The comedic timing was impeccable. I was not laughing.

Phase One: Creating the Rescue USB (With Complications)

My Linux laptop was the only working machine I had, so I used Ventoy to create a bootable USB with a Windows ISO. Ventoy is great because you just copy the ISO to the drive and it handles the rest. In theory.

In practice, I got impatient. I pulled the USB drive before my laptop had finished writing the Windows ISO. The result was a USB that booted into Ventoy just fine but failed to actually load Windows. It tried to use wimboot mode and just hung. I had to redo the entire USB creation process, this time waiting for the write to actually complete. Lesson within a lesson: do not rush the rescue media creation when you are already stressed about a dead system.

Phase Two: The Vanishing Drive

The first real scare was not the boot error. It was when the NVMe drive completely disappeared from BIOS. One moment it was there in the boot menu, the next it was gone. Not listed anywhere. The board explorer showed nothing.

My initial thought was that the drive itself had died. NVMe drives can enter a protective mode after failed self tests or sudden power events. Before you start pulling hardware, try this: unplug the PC completely, hold the power button for thirty seconds to drain any residual charge, then boot back into BIOS.

After the power cycle, the drive was still missing. The actual problem was subtle. On MSI motherboards, disabling Secure Boot can cause the BIOS to automatically switch to CSM Legacy mode. NVMe drives require UEFI mode to be visible. The drive was not dead. The BIOS just could not see it because it was looking in the wrong place.

Here is the trick that actually worked for me. Instead of disabling Secure Boot entirely, I used Ventoy’s manual key enrollment feature. You boot into Ventoy, select the VTOYEFI key enrollment option, and it adds the Ventoy signing key to your motherboard’s trusted key database. This lets you keep Secure Boot enabled while still booting unsigned ISOs through Ventoy. With Secure Boot on and UEFI mode intact, the NVMe drive was visible again.

Ventoy and Secure Boot

If your NVMe drive disappears when you disable Secure Boot, use Ventoy’s key enrollment instead. Boot Ventoy, enroll the VTOYEFI key, and you can keep Secure Boot enabled. This prevents the BIOS from silently switching to Legacy mode.

Phase Three: File System Repair

With the drive visible again, I booted from the Windows installer USB. Immediately ran into another issue. The installer asked for media drivers, which is a common glitch with USB 3.0 ports or VMD configurations. The workaround is to skip the installer entirely. At the language selection screen, press Shift and F10 to open a command prompt. You do not need to go through the installer UI for repair work.

First step was checking the file system. In the recovery environment, drive letters get reassigned, so my C drive showed up as F. You can use diskpart and list vol to figure out which letter your Windows partition ended up with.

Running chkdsk f: /f /r revealed the damage. The Volume Bitmap had errors, and the Master File Table bitmap attribute was incorrect. These are the internal accounting structures that Windows uses to track which clusters are in use. Corruption here means the file system does not know what space is allocated and what is free. The good news is that chkdsk can fix this. It took a while, but it successfully repaired the file system map.

After chkdsk, I ran the offline system file checker: sfc /scannow /offbootdir=f:\ /offwindir=f:\windows. This scans the Windows system files and replaces any that are corrupted or missing. It found problems and fixed them. At this point, the file system itself was healthy. But the system still would not boot.

Phase Four: The Boot Loader

This is where the real fun began. The BCD was either missing or corrupted beyond what the automatic repair could handle. Running bootrec /fixboot gave me an access denied error, which is frustratingly common and means the standard approach will not work.

The solution is to manually mount the EFI partition and rebuild the boot files from scratch. Open diskpart and list your volumes. Look for the small FAT32 partition, usually around 100MB to 500MB. This is your EFI System Partition. Select it and assign it a drive letter.

diskpart
list vol
sel vol 2
assign letter=S
exit

Once you have the EFI partition mounted, you can use bcdboot to recreate the entire boot configuration. The command takes your Windows directory and creates fresh boot files on the EFI partition.

bcdboot f:\windows /s s: /f UEFI

The /s s: tells it to write to the S drive where we mounted the EFI partition. The /f UEFI forces it to create UEFI boot files specifically. When this command succeeds and tells you boot files were successfully created, you are almost done.

Reboot, and if everything went right, Windows should load. Mine did. No data loss, no reinstall required. Just a few hours of troubleshooting and a newfound appreciation for proper boot loader configuration.

Post Recovery Cleanup

After getting back into Windows, there are a few things to check. If you reset BIOS defaults during troubleshooting, your XMP profile for RAM is probably disabled. Re enable it or your memory will be running at base speeds. You can re enable Secure Boot now if you want, though it is not strictly necessary for normal operation.

Most importantly, run a backup immediately. You just recovered from a close call. Do not tempt fate twice.

The Clone Lesson

If you clone a drive and it boots successfully, take ten more minutes to rebuild the boot loader properly. Run bcdboot c:\windows /s s: /f UEFI after mounting your EFI partition. This ensures the BCD is clean and pointing to the correct partition GUIDs. It takes almost no time and saves you from exactly this situation.

Quick Reference Commands

For anyone who lands here from a search engine in the middle of their own crisis, here are the commands you need.

Check and repair the file system, replacing the drive letter with whatever your Windows partition is assigned in recovery:

chkdsk c: /f /r

Run the offline system file checker:

sfc /scannow /offbootdir=c:\ /offwindir=c:\windows

Mount the EFI partition and rebuild boot files:

diskpart
list vol
sel vol <EFI_PARTITION_NUMBER>
assign letter=S
exit
bcdboot c:\windows /s s: /f UEFI

🎯 What I Learned

  • Always rebuild the boot loader after cloning a drive, even if it boots fine
  • NVMe drives require UEFI mode and will vanish from BIOS if you accidentally switch to Legacy/CSM
  • The bootrec /fixboot access denied error means you need to manually mount the EFI partition
  • Power cycle and BIOS defaults can bring back a 'dead' NVMe that is actually just hidden
  • Keep your power cables away from dogs

The whole incident took longer than it should have because of the sloppy clone. If I had rebuilt the boot loader properly the day before, the power loss would have caused file system corruption that chkdsk could fix in minutes. Instead, I spent hours figuring out why the boot repair tools were not working on a boot configuration that was already half broken.

Lesson learned. And the dog is fine, by the way. Completely unbothered by the chaos she caused. As dogs tend to be.

Enjoyed this article? Share it with others!

Share:

Have a project in mind?

Whether you need full-stack development, cloud architecture consulting, or custom solutions—let's talk about how I can help bring your ideas to life.