The “Could not locate efi\boot\bootx64.efi” error is one of those really frustrating boot issues. Basically, your UEFI firmware can’t find the bootloader files it needs to kickstart Windows. This usually pops up when you’re trying to install or repair Windows from bootable media, and it’s often caused by a mismatch in the partition style (GPT vs MBR), improper USB formatting, or Secure Boot restrictions that block the loader from running. Kind of weird, but these little incompatibilities cause most headaches here.
If you’ve run into this, chances are your system is either set to Legacy mode instead of UEFI, or your boot media isn’t formatted correctly—like an MBR disk on a UEFI-only system. The goal is to make sure your drive is properly formatted, your BIOS settings match your partition style, and your bootable USB is set up right. Once everything lines up, that error should disappear, and Windows will start installing or repairing without fuss.
How to Fix the EFI Boot Error in Windows
Check if your BIOS is Legacy or UEFI from Windows
- If your system uses Legacy mode (sometimes called Compatibility Support Module or CSM), it’s kinda stuck in old-school BIOS mode and often uses MBR partition style.
- If UEFI is enabled, your system should be using GPT partitions, which are more modern and support secure boot features.
- Press Windows + S and search for “System Information”.
- Open it, then look for BIOS Mode in the System Summary. If it says UEFI, you’re good to go on that front; if it says Legacy, you might need to switch modes or convert your disk.
On some setups, you might notice that the BIOS mode is set to Legacy even on newer machines, which can cause the serviceable boot files to be misplaced. Double-checking here helps confirm what needs changing later.
Verify Your Hardware and Partition Style
- Reboot your PC and repeatedly hit the Del, F2, or ESC key (depends on your mobo) to get into BIOS/UEFI settings.
- Navigate to the Boot or Advanced tab and find options related to UEFI or Legacy boot modes.
- If UEFI is listed, your hardware supports it. If not, your system might only support legacy BIOS mode, limiting options for GPT and Secure Boot.
Check if Your Disk is GPT or MBR
- Hit Windows + S, type Disk Management, and open it.
- Right-click your primary disk (probably drive C: or the one labeled “System”) and select Properties.
- Go to the Volumes tab and look at Partition Style. If it says GUID Partition Table (GPT), you’re in UEFI territory. If it’s Master Boot Record (MBR), you might need to convert it if your system supports UEFI.
The reason this matters: the boot files the system looks for differ depending on the partition style. MBR disks are usually meant for BIOS, GPT for UEFI. Mismatched styles can cause the boot file location error.
Convert MBR to GPT (WARNING: All data will be erased)
This sounds scarier than it is, but making sure your disk is GPT is key for UEFI booting. If you’re comfortable wiping the drive, here’s what to do:
- Boot into Windows *while still in Legacy mode* (you can’t convert the disk if Windows won’t boot in UEFI mode afterward).So, don’t switch UEFI on just yet.
- Open Command Prompt as admin. Type Win + S, search for “cmd”, then right-click and pick Run as administrator.
- Run these commands in sequence:
diskpart list disk select disk X (replace X with your disk number) clean convert gpt
- Before you do this, back up everything because the clean command wipes all data and partitions. No backup? Maybe skip this step or clone the drive first.
After that, you can switch UEFI mode on in BIOS, boot in UEFI, and the errors *should* go away.
Enable UEFI Mode & Set Boot Priority
Now, to actually make the system recognize the GPT and boot files, you need to set UEFI mode. Sometimes, BIOS switches happen automatically once the disk is GPT, but more often, you gotta check manually:
- Enter BIOS by pressing Del, F2, or whatever your motherboard uses.
- Navigate to Boot or Boot Options.
- Look for a setting like Boot Mode or UEFI/Legacy Boot.
- Change it to UEFI. If there’s a combined option like UEFI/Legacy, pick UEFI.
- Save changes and reboot.
Keep in mind some systems automatically switch based on disk type, but verifying never hurts. Because of course, Windows has to make it harder than necessary.
Create a Clean Bootable USB from Official Media
Sometimes the issue is with the boot media itself. Downloading ISO files from unofficial sites can cause corruption, or the USB might not be properly prepared. The best bet is to grab the latest Windows Media Creation Tool from Microsoft’s official page (here) and redo the USB. This process ensures you get an official, bootable drive with the correct files.
- Run the Media Creation Tool, accept the license, then select “Create installation media”.
- Pick your language, architecture, and edition—match these to your system’s specs.
- Select “USB flash drive” and make sure your USB has no important data (it’ll be wiped).
- The tool downloads the ISO and copies all required files onto the USB. It might take a bit, but once done, reboot and try booting from this freshly created media.
What if the Error Still Won’t Go Away?
If you’ve converted everything, set BIOS correctly, and re-created the media, but still get the error, double-check UEFI support. Sometimes you need to disable Secure Boot temporarily to allow the bootloader. Or, try switching UEFI and Legacy modes back and forth—on some systems, this toggling has weird side effects.
Another one to try is disconnecting other drives during the install, just in case the system picks the wrong boot partition. Oh, and always verify the boot order in BIOS to prioritize your USB or SSD properly.
Because, honestly, on some setups, this fails the first time, then magically works after a reboot or a BIOS reset. Not sure why it works, but it’s just what happens sometimes.
Summary
- Check BIOS mode: UEFI vs Legacy
- Verify partition style: GPT vs MBR
- Convert MBR to GPT if needed—backup first!
- Enable UEFI boot mode in BIOS
- Recreate your Windows bootable USB using the official Media Creation Tool
- Adjust Secure Boot settings if necessary
Wrap-up
Getting rid of this EFI boot error mainly boils down to making sure your disk style matches your BIOS mode, and your boot media is legit. It’s kind of a pain, but once everything is aligned, the thing just works. Hopefully, this shaves off a few hours for someone. Just remember, take your time, back up your stuff, and double-check your BIOS settings—sometimes the tiniest change makes all the difference.