Boot Recovery - Corrupt or Missing Second Hard Drive in Windows

For reasons above my paygrade, Windows likes to tuck away boot files on your second hard drive whenever you install Windows and there are two hard drives present.

When the second hard drive goes missing or is corrupted, your computer won’t boot, or your computer can become very sluggish, particularly during login.

Before we begin, it’s best to remove extra hard drives so as to eliminate the possibility of human error, and to reduce the number of possible corrupt drives down to as few moving parts as possible.

Preceding this guide, we have already burned Windows Installer onto a USB using the Microsoft Media Creation Tool. That is to say, we clicked the “Download Now” button located under “Create Windows 11 Installation Media”. Don’t worry, the Media Creation Tool also allow you to download Windows 11 as part of its wizard, so you don’t need to download the .ISO separately (but you can if you’re feeling fancy, or perhaps you just want a copy lying around in case the world ends here shortly).

Use the entirety of this guide at your own risk, and remember to always back up your data, as some of these operations are a bit sketch.

We Begin

Prompt: how do I enter command prompt when booting from a windows usb flash drive

To open Command Prompt when booting from a Windows USB flash drive, press Shift + F10 on the initial Windows Setup screen (or Shift + Fn + F10 on some laptops).

Method 1: Keyboard Shortcut (Fastest)

  1. Boot your PC from the Windows USB drive until you reach the purple/blue Windows Setup screen asking for your language and keyboard layout.
  2. Press Shift + F10 (if your laptop’s function keys default to media/brightness controls, press Shift + Fn + F10).
  3. An Administrator Command Prompt window (X:\Sources>) will open immediately.

Method 2: Through the Repair Menu

If the keyboard shortcut does not respond:

  1. On the initial Windows Setup screen, click Next.
  2. Click Repair your computer in the bottom-left corner (do not click Install now).
  3. Select Troubleshoot.
  4. Select Command Prompt.

Important Tip When Running Commands from USB

When you boot from a USB drive, Windows runs inside a temporary recovery environment (X:\Sources>), and your normal Windows drive may not be assigned the letter C:.

Before running repair commands like sfc, DISM, or chkdsk, find your actual Windows drive letter:

  1. Type diskpart and press Enter.
  2. Type list volume and press Enter.
  3. Look for the large partition where Windows is installed (check its size and label) and note its drive letter (for example, D:).
  4. Type exit and press Enter to return to Command Prompt.

(Use that drive letter in offline repair commands, such as sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows or DISM /Image:D:\ /Cleanup-Image /RestoreHealth.)

Would you like the exact offline DISM and sfc commands formatted for using the Windows USB itself as the clean repair source?

ok, and remind me the command to repair boot?

To repair the Windows bootloader from the USB Command Prompt, use the bootrec commands followed by bcdboot if needed.

  1. Standard Bootrec Commands

Run these commands in order inside the Command Prompt (X:\Sources>):

  • bootrec /fixmbr — Writes a new Master Boot Record to the system partition.
  • bootrec /fixboot — Writes a new boot sector to the system partition.
  • bootrec /scanos — Scans all disks for Windows installations not currently in the Boot Configuration Data (BCD).
  • bootrec /rebuildbcd — Rebuilds the BCD store; press Y (or A for All) if it prompts you to add an installation to the boot list.
  1. If bootrec /fixboot Says “Access is Denied” (Common on UEFI/GPT Systems)

On modern UEFI systems, bootrec /fixboot frequently returns an Access is denied error. Instead, recreate the boot files directly using bcdboot:

  1. Find your Windows drive letter (e.g., C: or D:) using diskpart → list volume → exit.
  2. Run bcdboot pointing to your Windows folder (replace C:\Windows with your actual Windows drive letter if different):

cmd

bcdboot C:\Windows

Use code with caution.

3.(If bcdboot C:\Windows fails to locate the EFI partition automatically, use diskpart to assign a drive letter like S: to the small ~100MB FAT32 EFI System Partition, exit diskpart, and run bcdboot C:\Windows /s S: /f UEFI.)*

  1. Restart

Once complete, type exit, unplug the USB flash drive, and restart your PC.

If you get an “Access is denied” error or no Windows installations found, let me know the exact output from list volume in diskpart and I can give you the exact bcdboot command for your partition layout.

bcdboot C:\Windows failure when attempting to copy boot files

The “Failure when attempting to copy boot files” error happens because either C:\Windows is not your actual Windows drive letter in the recovery environment, or bcdboot cannot locate/write to your hidden EFI System Partition (ESP).

Follow these steps to verify your drive letters, manually mount the EFI partition, and rebuild the boot files.

  1. Identify Your Partitions in Diskpart

  2. Type diskpart and press Enter.

  3. Type list disk and press Enter (note whether there is an asterisk * under the Gpt column for your main drive—almost all modern Windows 10/11 PCs are GPT/UEFI).

  4. Type select disk 0 (replace 0 with your main Windows disk number if you have multiple drives) and press Enter.

  5. Type list volume and press Enter.

Look at the output and identify two specific volumes:

  • Your Windows OS Partition: The large NTFS partition (usually hundreds of GBs). Note its Ltr (drive letter)—it is often D: or E: in WinRE instead of C:.
  • Your EFI System Partition: A small FAT32 partition, typically 100 MB to 500 MB in size, usually labeled System or having no drive letter. Note its Volume ###.
  1. Assign a Drive Letter to the EFI Partition

Still inside diskpart:

  1. Type select volume X (replace X with the volume number of the small FAT32 EFI partition) and press Enter.

  2. Type assign letter=S: and press Enter.

  3. Type exit and press Enter.

  4. Run bcdboot Explicitly

Now run bcdboot specifying both your actual Windows drive letter and the S: EFI partition (replace D: below if your Windows volume had a different letter):

cmd

bcdboot D:\Windows /s S: /f UEFI

Use code with caution.

You should see: Boot files successfully created.

(Note: If you checked list disk earlier and your drive did not have an asterisk under Gpt, your system uses Legacy BIOS/MBR instead—use /f BIOS instead of /f UEFI, pointing /s to your small “System Reserved” NTFS partition.)

  1. If It Still Fails (Corrupted EFI File System)

If bcdboot still fails after assigning S:, the FAT32 file system on the EFI partition itself may be corrupted. You can reformat just that small EFI partition (assuming S: is confirmed to be the ~100MB–500MB FAT32 partition):

  1. Run format S: /FS:FAT32 and press Y to confirm.
  2. Re-run bcdboot D:\Windows /s S: /f UEFI.

Once it succeeds, type exit, remove the USB drive, and reboot.

If you’re still getting an error, paste or type the output of list volume from diskpart and I’ll give you the exact commands for your specific drive letters.

no efi is listed

If no EFI partition is listed in diskpart, either your drive uses Legacy BIOS/MBR instead of UEFI/GPT, or the EFI partition was deleted/is RAW.

Check your disk layout in diskpart to determine which situation applies and fix it accordingly.

  1. Check Partition Style & Partition List

Run these commands in Command Prompt:

  1. diskpart
  2. list disk — Look at the far-right Gpt column for your Windows drive:
  • No asterisk (*) under Gpt: Your drive is MBR (Legacy BIOS), which does not use an EFI partition. Skip to Scenario A.
  • Asterisk (*) under Gpt: Your drive is GPT (UEFI), meaning the EFI partition is either formatted as RAW or missing. Skip to Scenario B.
  1. select disk 0 (replace 0 with your main Windows disk number)
  2. list partition — Check all partitions on the disk, even those hidden from list volume.

Scenario A: Your Drive is MBR (No * under Gpt)

On Legacy/MBR disks, Windows uses a small NTFS “System Reserved” partition (typically 50 MB–500 MB) instead of FAT32/EFI, or boots directly from the main C:/D: Windows partition.

  1. In diskpart, run list volume and note the drive letter of your Windows partition (e.g., D:) and any small System Reserved NTFS partition.
  2. If there is a small System Reserved partition without a letter, select it (select volume X) and run assign letter=S:.
  3. Type exit to leave diskpart.
  4. Run bcdboot targeting BIOS instead of UEFI (replace D: with your Windows letter, and S: with your System Reserved letter—or use D: for both if no System Reserved partition exists):

cmd

bcdboot D:\Windows /s S: /f BIOS

Use code with caution.


Scenario B: Your Drive is GPT (* under Gpt), but EFI is Missing or RAW

Look at the list partition output from Step 1:

Case 1: A ~100 MB–500 MB “System” or “Unknown” partition exists, but showed as RAW or didn’t show in list volume

Its FAT32 file system is corrupted, so list volume hides it or marks it RAW.

  1. In diskpart, select that ~100 MB–500 MB partition: select partition X (replace X with its partition number).
  2. Assign it a letter: assign letter=S:
  3. Type exit to leave diskpart.
  4. Format it as FAT32: format S: /FS:FAT32 (press Y to confirm).
  5. Rebuild the boot files:

cmd

bcdboot D:\Windows /s S: /f UEFI

Use code with caution.

6.(Replace D: with your actual Windows OS drive letter.)*

Case 2: No EFI partition exists at all, and you have ~100 MB–260 MB of Unallocated Space

If the EFI partition was accidentally deleted and unallocated space is available on the disk:

  1. In diskpart (with disk 0 selected), create and format a new EFI partition:

cmd

create partition efi size=100
format quick fs=fat32 label="System"
assign letter=S:
exit

Use code with caution.

  1. Rebuild the boot files (replace D: with your actual Windows drive letter):

cmd

bcdboot D:\Windows /s S: /f UEFI

Use code with caution.

(Note: If your drive is GPT, has no EFI partition, and has 0 MB of unallocated space, you cannot create an EFI partition without shrinking an existing partition first—or you may be looking at the wrong disk number in list disk.)

Could you share the output of list disk and list partition (especially whether Gpt has an asterisk and what partitions appear)? That will let me give you the exact command sequence to run.

the drive originally was mated to another drive at time of installation which is now wished to be stand-alone

That makes complete sense. When Windows is installed while a second drive is connected, the Windows installer often puts the EFI System Partition (bootloader) onto the other drive. Once that original drive is removed, the remaining Windows drive has the OS files (\Windows), but no bootloader partition of its own.

To make this drive standalone, shrink your main Windows partition slightly to create ~100–260 MB of free space, create a new EFI partition on this drive, and copy the boot files to it.

(Assuming your drive is GPT/UEFI, which is standard for Windows 10/11. If list disk showed no * under Gpt, let me know before running this, as MBR uses a slightly different partition command.)

  1. Shrink the Main Partition & Create a New EFI Partition

Open Command Prompt from the Windows USB (Shift + F10) and run these commands in diskpart:

  1. diskpart

  2. list disk

  3. select disk 0 (confirm 0 is your standalone Windows drive, not your USB stick)

  4. list partition — Identify your large Primary Windows partition (e.g., Partition 1 or Partition 2).

  5. select partition X (replace X with your large Windows partition number)

  6. shrink desired=200 minimum=100 — Carves out 200 MB of unallocated space safely without erasing your files.

  7. create partition efi size=100 — Creates a brand-new EFI System Partition in that unallocated space.

  8. format quick fs=fat32 label="System" — Formats it properly for UEFI boot.

  9. assign letter=S: — Temporarily mounts it so bcdboot can write to it.

  10. list volume — Check the Ltr column to confirm what drive letter your large Windows partition currently has (often C: or D:).

  11. exit

  12. Install the Standalone Bootloader

Now copy the boot files from your Windows installation onto the newly created S: EFI partition (replace C: below with your actual Windows drive letter from Step 10):

cmd

bcdboot C:\Windows /s S: /f UEFI

Use code with caution.

You should see: Boot files successfully created.

  1. Reboot Standalone

  2. Type exit to close Command Prompt.

  3. Unplug the Windows USB flash drive.

  4. Restart your PC—your drive now has its own self-contained bootloader and will boot independently.

If shrink gives an error (such as unmovable files at the end of the volume) or if your drive turned out to be MBR instead of GPT, share the exact message and I’ll walk you through the workaround.

“msr and efi partitions are only supported on GPT disks. Convert the selected disk to GPT and try again.”

Your drive is using MBR (Legacy BIOS) rather than GPT (UEFI). Because the shrink step already succeeded, you have ~200 MB of unallocated space ready—you just need to create a standard MBR primary partition, mark it active, and install the BIOS bootloader instead.

(Note: Do not run convert gpt in diskpart, as that command will erase your entire drive.)

  1. Create an Active System Partition (MBR)

Inside diskpart (with your standalone Windows disk still selected via select disk 0), run these commands:

  1. create partition primary size=100 — Uses the unallocated space to create a standard MBR system partition.

  2. format quick fs=ntfs label="System Reserved" — Formats it as NTFS (required for MBR bootloaders, unlike FAT32 for UEFI).

  3. active — Marks the partition as bootable for the motherboard BIOS.

  4. assign letter=S: — Temporarily mounts it so bcdboot can write to it.

  5. list volume — Check the Ltr column to confirm your main Windows partition’s drive letter (e.g., C: or D:).

  6. exit

  7. Install the Legacy BIOS Bootloader

Now copy the boot files to S: using the /f BIOS flag (replace C: below with your actual Windows drive letter from Step 5):

cmd

bcdboot C:\Windows /s S: /f BIOS

Use code with caution.

You should see: Boot files successfully created.

(Optional safety step: Run bootsect /nt60 S: /mbr afterward to ensure the Master Boot Record and boot sector code on the drive are completely updated.)

  1. Reboot Standalone

  2. Type exit to close Command Prompt.

  3. Unplug the Windows USB flash drive.

  4. Restart your PC. (If your motherboard was previously set to UEFI-only mode, make sure Legacy / CSM boot support is enabled in BIOS so it can boot from an MBR disk.)

If you later decide you want to convert this drive to GPT/UEFI without losing data (for example, if you’re on Windows 11 or want Secure Boot), let me know and I can share the non-destructive mbr2gpt steps once Windows boots.

More Cool Stuff

what commands would repair a system that takes forever to log in / boot into windows?

To repair a system that hangs or takes an unusually long time to boot and log in, run chkdsk, DISM, and sfc /scannow from an Administrator Command Prompt to fix file system delays and corrupted startup services, followed by checking disk health and startup tasks.

(Note: Since you recently separated this drive from another drive, Windows may also be stalling while searching for missing network shares, orphaned drives, or corrupted user profile/boot files.)

  1. Fix File System & Bad Sector Delays (chkdsk)

A drive stalling at the spinning dots or login screen is frequently waiting on timed-out read requests from bad sectors or file system errors.

  1. Open Command Prompt as Administrator (or run from your USB Command Prompt, adjusting C: to your Windows drive letter).
  2. Run:

cmd

chkdsk C: /f /r

Use code with caution.

  1. Press Y when prompted to schedule the scan on the next restart, then reboot and let it finish completely.

  2. Repair Corrupted Windows Services & System Files (DISM & sfc)

Corrupted system binaries or broken Windows Update states often cause services to hang during boot and sign-in. Run these in order inside an Administrator Command Prompt:

  1. Repair the component store:

cmd

DISM /Online /Cleanup-Image /RestoreHealth

Use code with caution.

  1. Repair protected OS and login files:

cmd

sfc /scannow

Use code with caution.

  1. Restart your PC if either command reports repairs.

  2. Check Drive Health & Reset Search/Update Caches

If the commands above finish cleanly, run these checks to rule out failing storage or stuck background services:

  • Check Drive Status:

cmd

wmic diskdrive get model,status

Use code with caution.

(If Status shows anything other than OK—such as Pred Fail—the drive itself is failing and causing the I/O stalls.)

  • Clear Stuck Windows Update & Delivery Optimization Caches:

cmd

net stop wuauserv
net stop bits
rd /s /q C:\Windows\SoftwareDistribution
net start wuauserv
net start bits

Use code with caution.

  1. Isolate Slow Login vs. Slow Boot

Depending on where the delay happens, check one of these built-in tools once logged in:

  • Stalls before the login screen (black screen / spinning dots): Press Win + R, type msconfig, go to the Services tab, check Hide all Microsoft services, and click Disable all to test if a third-party driver or background service is hanging during startup.
  • Stalls after entering your password (“Welcome” screen / black desktop): This points to a corrupted user profile, heavy startup apps (Ctrl + Shift + Esc → Startup apps), or mapped drives/shortcuts pointing to the old second drive that was removed.

If you let me know which stage hangs longest (before the login screen, or after entering your password) and whether this is an SSD or HDD, I can give you targeted commands to isolate the exact bottleneck.

I noticed my ssd is getting slammed, it’s always at 100%, and particularly my antimalware is running the most

When an SSD sits at 100% active time with Antimalware Service Executable (MsMpEng.exe) at the top, it usually means Windows Defender is stuck scanning a massive/corrupted file, scanning its own directory, or the SSD is struggling with bad blocks/TRIM/controller stalls.

Run these targeted commands and checks in an Administrator Command Prompt (or PowerShell as Administrator) to stop the scan loop and relieve the disk bottleneck.

  1. Stop the Defender Self-Scan Loop (PowerShell as Admin)

By default, Windows Defender sometimes repeatedly scans its own folders, causing runaway 100% disk spikes. Open PowerShell as Administrator and add an exclusion for Defender’s own folder:

powershell

Add-MpPreference -ExclusionPath "C:\ProgramData\Microsoft\Windows Defender"

Use code with caution.

(You can also check if a full scan is currently stuck by running Get-MpComputerStatus | Select-Object FullScanAge, QuickScanAge, RealTimeProtectionEnabled.)

  1. Force TRIM & Optimize the SSD (Command Prompt as Admin)

Because you recently shrank partitions and separated this drive, unmapped blocks or missing TRIM maintenance can cause severe SSD write/read stalls:

cmd

defrag C: /L

Use code with caution.

(The /L flag forces a manual TRIM / Retrim pass on an SSD—it does not defragment it—and clears stalled blocks so the SSD controller can recover speed.)

  1. Check If Storage Drivers / StorAHCI Bug Are Causing 100% Disk

On some Windows systems, a buggy MSI (Message Signaled Interrupts) mode in the storahci.sys driver causes 100% disk spikes even with very low MB/s transfer rates:

  1. Open Task Manager (Ctrl + Shift + Esc) → Performance tab → click your SSD.
  2. Look at Active time vs. Read/Write speed and Average response time:
  • 100% Active time with 0–2 MB/s read/write and high response time (>500 ms): Points to a controller/driver stall, full DRAMless SSD cache, or failing SSD hardware.
  • 100% Active time with high MB/s read/write (100+ MB/s): Defender is actively scanning large archives, game folders, or virtual machine images.
  1. Temporarily Pause Real-Time Protection to Confirm

To verify whether Defender is the cause or just a symptom of an overloaded SSD:

  1. Open Windows Security → Virus & threat protection → Manage settings.
  2. Toggle Real-time protection Off temporarily (it automatically turns back on later).
  3. Watch Task Manager for 30 seconds:
  • If disk usage drops immediately to 1–5%: Defender is choking on specific files (such as large .zip/.iso files, torrent folders, or Steam/game directories—add those folders to Exclusions in Windows Security).
  • If disk usage stays at 100% even with Defender off: Another process (like System, SearchIndexer.exe, or TiWorker.exe Windows Update) is pegging the drive, or the SSD is near full / failing.