Windows: Reinstall Bootloader After Deleting Boot Partition

Abstract: Restores Windows UEFI bootloader after deleting the boot partition using bcdboot via Windows installation media.

Created: 2026-09-18 by
To reinstall the Windows bootloader after deleting the boot partition, you must use the Windows Installation Media to access the Command Prompt. This process involves identifying the correct drive letters for your system and recovery partitions, then using bcdboot to copy the necessary boot files from the Windows directory to the EFI System Partition. This method restores the ability of UEFI firmware to locate and launch the operating system without requiring a full OS reinstallation or third-party repair tools.

Accessing the Recovery Environment

The first step in repairing a missing bootloader is gaining access to a command-line interface that can interact with your disk structures. Since the operating system cannot boot normally, you cannot use built-in Windows utilities like bootrec.exe from within the desktop environment. Instead, you must utilize the Windows Setup environment. Insert a bootable Windows installation USB drive into your computer. Restart the machine and enter the BIOS/UEFI settings to ensure the USB drive is set as the primary boot device. Once the Windows Setup screen appears, do not proceed with installing Windows. Click on "Repair your computer" located in the bottom-left corner of the window. Navigate through the menu by selecting "Troubleshoot," then "Advanced options," and finally choosing "Command Prompt." This action opens a black window where you can execute low-level disk commands. It is crucial to verify that you are running these commands with administrative privileges, which is the default state in this environment. If the prompt does not show C:\Windows\System32>, you may need to navigate to the correct directory, but usually, the setup environment provides direct access to the required tools.

Identifying Drive Letters

One of the most challenging aspects of manual bootloader repair is mapping drive letters correctly. In the Windows Setup environment, drive letters often differ from those assigned in the installed operating system. For example, your main Windows partition might appear as D: instead of C:, and the EFI System Partition (ESP) might not be assigned a letter at all initially. You must identify these partitions accurately before attempting to write boot files. Open the Command Prompt and type diskpart to launch the DiskPart utility. Once inside, type list vol to display all volumes on the system. Look for a small volume (typically 100MB to 500MB) formatted as FAT32; this is your EFI System Partition. Note its volume number. Next, look for the largest volume, which likely contains your Windows installation. It will typically be formatted as NTFS. Assign a temporary drive letter to the EFI partition so you can reference it easily. Type select vol X (replace X with the volume number of the EFI partition), then type assign letter=S. You can choose any available letter, but S is commonly used to avoid conflicts. Similarly, if your Windows partition does not have a standard letter, select it and assign it C or another convenient letter. Type exit to close DiskPart and return to the regular Command Prompt. Verify your assignments by typing dir C: and dir S: to ensure they point to the correct data.

Rebuilding the Boot Configuration Data

With the correct drive letters identified, you can now regenerate the boot files. The primary tool for this task is bcdboot, which copies the boot files from the Windows installation to the target partition and creates a new boot configuration store. This command effectively reinstates the bootloader entries that were lost when the boot partition was deleted. Assuming your Windows folder is on C: and your EFI partition is on S:, execute the following command: bcdboot C:\Windows /s S: /f ALL. The /s S: flag specifies the target system partition (the EFI partition). The /f ALL flag ensures that boot files are created for both UEFI and Legacy BIOS modes, providing maximum compatibility. If your system uses only UEFI, you can use /f EFI instead. After executing the command, check the output. A successful execution will display messages indicating that the startup files were created successfully. If you encounter errors such as "File not found" or "Access denied," double-check your drive letter assignments. Ensure that the path to the Windows folder is correct and that the EFI partition is indeed formatted as FAT32. If the command fails, you may need to manually format the EFI partition using DiskPart before retrying, though this should rarely be necessary if the partition still exists.

Verifying and Finalizing

Once the bcdboot command completes successfully, you should remove the temporary drive letter assignment to keep the system clean. Re-enter DiskPart by typing diskpart, then run select vol X (selecting the EFI partition again) and remove letter=S. Exit DiskPart and close the Command Prompt. Restart your computer by removing the installation media. The system should now boot directly into Windows. If it does not, enter the BIOS/UEFI settings and ensure that the Windows Boot Manager is listed as the first boot option. If you have a dual-boot setup involving Linux or other operating systems, you may need to adjust the boot order or update the GRUB configuration to recognize the newly restored Windows bootloader. For more complex scenarios involving dual-boot systems, consider reviewing guides on regenerating Windows boot files in EFI dualboot setups.

Frequently Asked Questions

What if my EFI partition is not FAT32?

The EFI System Partition must be formatted as FAT32 to store boot files correctly. If your partition is NTFS or exFAT, the bcdboot command will fail. You can reformat the partition using DiskPart, but be aware that this erases existing data on that specific partition. Always backup important data before formatting.

Can I use bootrec.exe instead of bcdboot?

bootrec.exe is primarily designed for fixing legacy MBR-based boot issues and may not work reliably for modern UEFI systems with deleted ESP contents. bcdboot is the recommended tool for UEFI because it explicitly copies the necessary firmware boot files and creates a fresh BCD store. Use bootrec only if bcdboot fails and you suspect deeper corruption.

Why did my drive letters change in the recovery environment?

The Windows Setup environment assigns drive letters dynamically based on the order partitions are detected during boot. This differs from the installed OS, which uses persistent labels and registry entries. Always rely on list vol and partition sizes/formats to identify drives rather than assuming standard letters like C or D.

Will this process delete my personal files?

No, reinstalling the bootloader using bcdboot only affects the EFI partition and the boot configuration data. Your user files, applications, and the Windows installation itself remain untouched on the main NTFS partition. However, always maintain backups to protect against unexpected hardware failures or accidental deletions.

What if I still cannot boot after running bcdboot?

If the system fails to boot, check your BIOS/UEFI settings to ensure Secure Boot is enabled if required by your hardware, and verify that Windows Boot Manager is the primary boot entry. Additionally, ensure that the time and date settings in BIOS are correct, as incorrect dates can sometimes prevent secure boot validation.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More