Boot

Failure when attempting to copy boot files on Windows 10

Failure when attempting to copy boot files on Windows 10

If you receive an error message - Failure when attempting to copy boot files, then this post may be able to help you fix the problem. BCDBoot is a command-line utility that is used to configure boot files, so when you turn on the computer, it knows where to boot from or where Windows is located. The tool is also used to repair system partition or repair boot menu and also set up a computer to boot from a virtual hard disk.

Failure when attempting to copy boot files

There are known multiple ways to fix the problem, and sometimes the problem could be because of UEFI or BIOS difference. Make sure this is followed by someone who knows how to manage things technically on the computer-

  1. Set Partition as Active
  2. Check if you have BIOS or UEFI
  3. Fix MBR or Rebuild it

The scenario here is that you are trying to copy the boot files to either the active partition on the primary hard drive or trying to create boot entries on a USB flash drive or a partition. Doing that, it is failing. If there is anything else that is causing the problem, then using the repair command is a better option.

1] Set Partition as Active

The partition on which the file will be copied has to be active. When the computer starts, it first looks for an active partition and then locates the boot files. Use the following command to set the partition as active using the diskpart tool. You can use this command from Advanced Recovery or from Windows itself when doing it for a USB drive.

diskpart select disk 0 list partition select partition Z  active exit

When you execute the list partition command, note the partition number where Windows is installed.  In the above command, Z is the partition where the Windows is available. Then execute the bcdboot command to copy the files.

2] heck if you have BIOS or UEFI

A lot of things depend on whether you have UEFI or BIOS. When you boot into advanced recovery, the command is by default set to work with it. So if you boot into BIOS but are mentioning UEFI in the command, then it will result in the said error.

A lot of us simply copy the command and run it, but these are minor things that are important.  So if there is a confusion, and you are not sure if the computer, i.e., UEFI or Legacy, use the following command.

bcdboot c:\windows /s Z: /f ALL

Here Z is the volume letter of the system partition, and /s has to be used for that.  The option /f is for firmware type. You can use BIOS or EFI if you are sure.

3] Fix MBR and Rebuild BCD

If you are facing this all of a sudden, and you did nothing but turned on the laptop, then its probably the boot record that needs a fix. You can fix the MBR and Rebuild BCD to fix the problem. This can be done by booting into the advanced recovery using a Windows 10 Bootable media.

When in Advanced Recovery, choose to Troubleshoot > Advanced > Command Prompt. And execute the following one after the other. It will self-repair, and let Windows boot normally.

bootrec /fixmbr  bootrec /fixboot  bootrec /scanos  bootrec /rebuildbcd 

We will also suggest to backup MBR or creates a System Recovery Disk. In case something similar happens, you don't have to run for the Windows Recovery Disk. To create a system recovery drive in Windows, search for “RecoveryDrive.exe” and follow the wizard.

MBR Backup & HDHacker are two freeware that can help you backup and restore the MBR & Boot Sector.

I hope the post was easy to follow, and you were able to resolve the problem with an error message.

Top 5 produse ergonomice pentru mouse de calculator pentru Linux
Utilizarea prelungită a computerului vă provoacă dureri la încheietura mâinii sau la degete? Suferați de articulații rigide și trebuie să vă dați mâin...
How to Change Mouse and Touchpad Settings Using Xinput in Linux
Most Linux distributions ship with “libinput” library by default to handle input events on a system. It can process input events on both Wayland and X...
Remap your mouse buttons differently for different software with X-Mouse Button Control
Maybe you need a tool that could make your mouse's control change with every application that you use. If this is the case, you can try out an applica...