Accidentally Deleted EFI and MSR Partitions: A Potential Disaster

Abstract: Recover an unbootable Windows system by recreating deleted EFI and MSR partitions using DiskPart in the Windows Recovery Environment.

Created: 2026-08-27 by

Deleting the EFI System Partition (ESP) and Microsoft Reserved (MSR) partition can render a Windows system unbootable. However, you can recover by booting from installation media and using command-line tools to recreate these essential structures without reinstalling the operating system.

Understanding the Critical Partitions

Before diving into the repair process, it is crucial to understand why these partitions exist. Modern Windows installations use the GUID Partition Table (GPT) rather than the older Master Boot Record (MBR). GPT relies on specific hidden partitions to function correctly. The EFI System Partition stores the bootloader files, including the firmware interface that starts the operating system. Without it, the computer cannot locate or launch Windows. The MSR partition is a small, reserved area that prevents conflicts between the data partition and the system files. If you accidentally delete these via Disk Management or third-party tools, the system loses its ability to start. This issue often arises when users attempt to resize drives or convert disk formats. For context on partition errors, see our guide on Windows 10 Partition Error Fixes.

Preparation and Boot Media

To fix this disaster, you need access to the Windows Recovery Environment (WinRE). You cannot perform these repairs while booted into the broken Windows installation. Create a bootable USB drive using the Media Creation Tool from another working computer. Download the latest version of Windows 10 or 11 ISO from Microsoft’s official website. Burn this ISO to a USB flash drive with at least 8GB of storage. Once created, insert the USB into the affected machine and restart. Enter the BIOS or UEFI settings (usually by pressing F2, Del, or F12 during startup) and set the USB drive as the primary boot device. Save changes and exit. The system will load the Windows Setup screen instead of the normal desktop. From here, select your language and keyboard preferences, then click "Repair your computer" in the bottom left corner. Navigate to Troubleshoot > Advanced options > Command Prompt. This environment provides the necessary administrative privileges to rebuild the partition structure safely.

Identifying the Correct Drive

Once in the Command Prompt, you must identify which physical disk contains your Windows installation. Type diskpart and press Enter to launch the DiskPart utility. Then type list disk to display all connected storage devices. Look for the disk that matches the size of your main hard drive or SSD. Note the disk number (e.g., Disk 0, Disk 1). It is vital to select the correct disk because subsequent commands will modify the partition table. Typing select disk X (replace X with your disk number) ensures you target the right hardware. Verify the selection by typing detail disk. This command shows detailed information about the selected disk, confirming its model and capacity. Be extremely cautious not to select external drives or secondary disks that do not contain the OS. Incorrect selection could lead to data loss on unrelated volumes.

Recreating the EFI Partition

The next step involves creating the missing EFI System Partition. In DiskPart, type create partition efi size=100. This command creates a new partition formatted for the EFI system, allocating 100 megabytes of space. Although some systems may require slightly more space, 100MB is standard for most modern Windows versions. After creation, you need to assign a drive letter temporarily so you can format it. Type select partition Y (where Y is the number of the newly created EFI partition, visible in the list). Then type assign letter=S to assign the letter S. Now, format the partition with the FAT32 file system, which is required for EFI compatibility. Type format fs=fat32 quick. Once formatting completes, remove the temporary drive letter by typing remove letter=S. This keeps the partition hidden from the operating system but accessible to the firmware.

Recreating the MSR Partition

With the EFI partition established, create the Microsoft Reserved partition. Type create partition msr size=16. This allocates 16 megabytes for the reserved area, preventing future allocation conflicts. Unlike the EFI partition, the MSR partition does not need a drive letter or formatting. It is automatically recognized by Windows as a reserved system area. You can verify both partitions now exist by typing list partition. You should see two small partitions at the beginning of the disk: one marked as "System" (EFI) and one as "Reserved" (MSR). If they appear correctly, you can exit DiskPart by typing exit.

Restoring Boot Files

The final technical step is ensuring the boot files are correctly placed. While DiskPart creates the structure, it does not copy the bootloader files if they were deleted. Use the bcdboot command to restore them. Assuming your Windows installation resides on the C: drive (which may be labeled differently in WinRE), type bcdboot C:\Windows /s S: /f ALL. Replace C: with the actual drive letter of your Windows folder if different. The /s S: flag points to the EFI partition we just created. The /f ALL flag ensures both UEFI and legacy boot files are written. If the command succeeds, you will see a message stating that the boot files were successfully created. Exit the Command Prompt and remove the USB drive. Restart the computer. It should now boot normally into Windows.

Verification and Cleanup

After rebooting, open Disk Management to confirm the partitions are intact. Ensure no other operating systems have been corrupted. Run a quick system check using sfc /scannow in an elevated Command Prompt to ensure system integrity. If you encounter issues related to partition conversion or splitting, refer to resources on GPTMBR Conversion Issues. Regular backups of your system image are recommended to prevent such disasters in the future.

Frequently Asked Questions

Can I recover deleted partitions without reinstalling Windows?

Yes, you can rebuild the EFI and MSR partitions using the Windows Recovery Environment and DiskPart commands. This method preserves your existing user data and applications, provided you do not overwrite the main C: drive.

What happens if I format the wrong partition during recovery?

Formatting the wrong partition, especially the main data volume, will result in permanent data loss. Always double-check the partition size and label before executing any format commands in DiskPart.

Do I need to change the BIOS settings after fixing the partitions?

No, you typically do not need to change BIOS settings after the repair. The EFI partition restores the correct boot entry, allowing the UEFI firmware to find Windows automatically upon restart.

Is it safe to use third-party partition managers for this repair?

While third-party tools offer graphical interfaces, using built-in Windows tools like DiskPart is safer and more reliable for critical system partitions. These native tools are less likely to introduce compatibility issues with the bootloader.

How much space should the EFI partition be?

A size of 100MB to 500MB is standard for the EFI partition. Microsoft recommends at least 100MB, but larger sizes provide buffer space for multiple operating systems or firmware updates.

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