How to fix the Failure when attempting to copy boot files error

Matthew Adams
by Matthew Adams
Windows & Software Expert
0 Comments
Download PDF
Affiliate Disclosure

Some users utilize the Bcdboot command-line utility within WinPE (Preinstallation Environment) to deploy Windows on PCs. However, a “Failure when attempting to copy boot files” error aries for some users when they try to copy boot files. Consequently, users can’t deploy the Windows OS image when WinPE returns that error message.

How can Users Fix the “Failure When Attempting to Copy Boot Files” Error?

1. Copy Both UEFI and BIOS Files to the Disk

Some users have confirmed they’ve fixed the “Failure when attempting to copy boot files” error by copying both UEFI and BIOS files to disk. To do that, enter the ‘bcdboot c:\windows /s s: /f ALL’ command. The ALL at the end of that command ensures that both UEFI and BIOS files get copied.

bcdboot command failure when attempting to copy boot files


2. Set the System Partition As Active

  1. The “Failure when attempting to copy boot files” error can also be due to an inactive system partition. To fix that, users will need to insert a bootable USB flash drive into the laptop or desktop.
  2. Turn on the laptop or desktop.
  3. Click Repair your computer on the Windows Setup window.The Troubleshoot button failure when attempting to copy boot files
  4. Then select Troubleshoot and Advanced Options to open further options.
  5. Select Command Prompt to open the Prompt.
  6. Input ‘diskpart’ in the Command Prompt, and press the Return key.
  7. Enter ‘list disk’ and press Return to display a list of hard drives, which will probably include just one HDD.List disk failure when attempting to copy boot files
  8. Then enter ‘select disk 0’ and press Return if that’s the only hard drive listed. Users with more than one hard drive to select the one that includes the Windows install.
  9. Next, input ‘list partition’ and press Enter to display a list of drive partitions.list partition failure when attempting to copy boot files
  10. Thereafter, select the partition that includes the Windows installation. For example, enter ‘select partition 2’ if partition 2 includes Windows.
  11. Enter ‘active’ and press Return to set the selected partition as active.
  12. Then input ‘exit’ and press Enter to close the DiskPart utility.

Those are two resolutions that can fix the “Failure when attempting to copy boot files” error for users. Users who have fixed the same issue with other resolutions are welcome to share them below.

Was this page helpful?
Thanks for letting us know! You can also help us by leaving a review on MyWOT or Trustpillot.
Get the most from your tech with our daily tips
Tell us why!