Recovering Windows 10 EFI Bootloader after Installing Linux

Abstract: Restores Windows 10 EFI bootloader after Linux installation by mounting the ESP and running bcdboot to fix dual-boot access.

Created: 2026-10-16 by

Recovering the Windows 10 EFI bootloader after a Linux installation requires mounting the EFI System Partition and using bcdboot to restore the boot files. This process ensures that the UEFI firmware can locate the Windows Boot Manager again, allowing you to dual-boot both operating systems without losing access to your primary Windows environment.

Understanding the EFI Structure

When you install Linux on a system with an existing Windows 10 setup, the installer typically modifies the EFI System Partition (ESP). This partition is a FAT32 formatted drive that stores bootloader code for all installed operating systems. The Linux installer often creates its own directory or overwrites the existing \EFI\Microsoft\Boot folder, which causes the system to fail when trying to start Windows directly from the UEFI menu.

The key to recovery lies in understanding that the ESP contains separate folders for each OS. For Windows, this is located at \EFI\Microsoft\Boot. For GRUB, it might be at \EFI\ubuntu or \EFI\debian. When the Windows boot files are missing or corrupted in their designated folder, the UEFI firmware cannot find the necessary binaries to launch the Windows kernel. Restoring these files does not affect your Linux installation; it simply places the correct Windows boot components back into their expected location within the shared partition.

Accessing the Recovery Environment

To begin the repair process, you need access to a Windows command prompt with administrative privileges. If your system no longer boots into Windows, you must create a Windows 10 installation media using another computer. Use the Media Creation Tool from Microsoft to write the ISO to a USB drive. Boot your affected PC from this USB drive by selecting it in the UEFI boot menu.

Once the Windows Setup screen appears, select your language preferences and click Next. Instead of clicking Install Now, look for the link in the bottom left corner labeled Repair your computer. Navigate to Troubleshoot, then Advanced options, and finally Command Prompt. This opens a specialized environment where you have access to the low-level tools required to manipulate the EFI partition. If you are already booted into a working Windows session, open the Start menu, type cmd, right-click Command Prompt, and select Run as administrator.

In some cases, users may prefer to use a Linux live USB to perform the initial file inspection before switching to Windows tools. However, using the native Windows recovery environment is generally safer for writing the bcdboot commands, as it ensures compatibility with the Windows Boot Manager structure. This step is crucial because incorrect manual edits to the EFI variables can render both operating systems unbootable. For more complex software issues, refer to our comprehensive troubleshooting guide for additional diagnostic steps.

Identifying the Correct Drives

Before running any repair commands, you must identify which drive letter corresponds to your EFI System Partition and which drive letter represents your Windows installation. In the recovery environment, drive letters often differ from those in a normal Windows session. The EFI partition usually does not get a drive letter automatically assigned, so you must assign one manually.

Type diskpart and press Enter to launch the DiskPart utility. Inside DiskPart, type list vol to display all volumes. Look for a volume that is approximately 100-500 MB in size and has a file system of FAT32. This is your EFI System Partition. Note its volume number. Then, type select vol X (replacing X with the volume number) and assign letter=S to give it the temporary letter S. Type exit twice to close DiskPart and return to the command prompt.

Next, identify the Windows partition. It is typically the largest NTFS volume. You can verify this by checking the drive letters. Let us assume your Windows partition is assigned the letter C: and your newly assigned EFI partition is S:. These identifiers are critical for the next step. If you are unsure about the exact layout, consult our article on recovering GRUB EFI for dual boot setups to understand how partitions interact in a mixed environment.

Restoring the Boot Files

With the correct drive letters identified, you can now regenerate the Windows boot files. The most reliable method uses the bcdboot utility, which copies the necessary boot files from the Windows system directory to the EFI partition and creates a new boot store entry.

Type the following command exactly:

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

Here, C:\Windows points to your Windows installation directory, /s S: specifies the target EFI partition, and /f UEFI forces the creation of UEFI-compatible boot files. If your Windows installation is on a different drive letter, adjust the path accordingly. After executing this command, you should see a message stating "Boot files created successfully."

This action restores the \EFI\Microsoft\Boot\bootmgfw.efi file and updates the NVRAM entries. It effectively tells the motherboard's UEFI firmware where to find the Windows bootloader again. Once completed, type exit to close the command prompt and restart your computer. Remove the installation USB if you are still booted from it.

Verifying and Setting Defaults

After rebooting, enter the UEFI setup utility (usually by pressing F2, Del, or F12 during startup). Check the boot order to ensure that "Windows Boot Manager" is listed. If it is not visible, the EFI partition may not have been mounted correctly, or there may be a deeper issue with the partition table. If you want Linux to be the default boot option, you can change the priority in the UEFI settings or use the efibootmgr command from a Linux terminal.

If you successfully restored Windows but lost your GRUB menu, you can reinstall GRUB from a Linux live USB. Mount the EFI partition and copy the Ubuntu or Debian folder back if it was accidentally deleted. For guidance on setting the default EFI entry after such reboots, see our guide on setting default EFI after rebooting Windows.

Frequently Asked Questions

Will restoring the Windows bootloader delete my Linux installation?

No, using bcdboot only writes files to the EFI System Partition and does not touch the Linux root partition or data. Your Linux files remain intact. However, the GRUB bootloader configuration might need to be updated separately if it was overwritten during the initial Windows repair process.

What if I cannot see the EFI partition in DiskPart?

If the EFI partition is hidden, ensure you are looking for the FAT32 volume with a small size (typically 100-500 MB). If it still does not appear, the partition might be marked as inactive or corrupted. In such cases, you may need to use third-party partition managers or check the disk integrity with chkdsk before attempting repairs.

Can I use the Linux terminal to fix the Windows bootloader?

While you can manually copy files, it is highly recommended to use the Windows bcdboot tool. Manually creating the BCD store from Linux is complex and error-prone. Using the native Windows tool ensures that the boot manager entries are registered correctly in the UEFI NVRAM.

Why does my system still boot into GRUB after fixing Windows?

This is likely due to the UEFI boot order prioritizing the Linux bootloader over Windows Boot Manager. You can change this in your BIOS/UEFI settings by moving "Windows Boot Manager" to the top of the boot priority list. Alternatively, you can configure GRUB to chainload Windows.

Is it safe to run bcdboot multiple times?

Yes, running bcdboot multiple times is safe. It will overwrite existing boot files with fresh copies and update the boot store. This is useful if previous attempts failed or if the boot files were partially corrupted. Always ensure you are pointing to the correct source Windows directory and target EFI partition.

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