Windows has many tools that you can utilize to deploy an image of the operating system into other computer systems without having to do them manually one by one. However, at times, things might not go as smooth and you stumble on an error message that says ‘Failure when Attempting To Copy Boot Files’. This happens when you are trying to apply bcdboot on a new image. Some of you might face the issue while trying to dual boot.
Bcdboot is a command-line utility that can be used to configure the boot files of the operating system. You can set up partitions on your hard disk or even repair damaged boot files. The cause of the error message is the inactive status of the system partition. When you get the said error message, your operating system will not boot up and all you can do is stare at the error message. However, that is not entirely true, as we will be showing you how to get rid of the issue with a simple solution.
What causes the Error Message Failure when Attempting To Copy Boot Files?
The error message seems to be caused by one primary reason i.e the system partition is set as inactive. If you are deploying an image into different computers at once, you will have to make sure that the system partition is set as active or else the bcdboot command will prompt you the error message. There are also chances that the error message might be due to corrupt or damaged boot files but the possibility is pretty slim. Nonetheless, we will be showing you how to deal with that as well.
Marking the Partition as Active
To fix your issue, make sure you have a Windows installation DVD or USB drive. After that, follow the given steps:
- Insert the Windows installation DVD or USB drive into your system and boot into it.
- Once the Windows installation window appears, click the Repair your computer option.
- Afterward, navigate to Troubleshoot > Advanced Options and then finally open up a command prompt.
- After the command prompt loads up, type in diskpart to open up the DiskPart utility.
- Then, type select disk 0 (assuming you only have one hard disk attached to your system). If you are using multiple disks, select the disk where the Windows files reside.
- Type list partition.
- Afterward, type select partition X (X being the partition where Windows is installed).
- To mark the partition as active, simply type active.
- Exit the DiskPart utility by typing exit.
- Finally, enter the bcdboot command again, for example:
In case this doesn’t work for you, then the boot files might be damaged or corrupted. In such a case, you will have to rebuild it using the bootrec command. Here’s how to do it:
- Access a command prompt using the installation media as shown above.
- Type in, cd C:\EFI\Microsoft\Boot (C being the drive where Windows is installed).
- Delete the bootsect.exe file by typing ‘del bootsect.exe’.
- Then, enter the following commands one-by-one:
Bootrec /fixboot Bootrec /fixmbr Bootrec /rebuildbcd
Once done, restart your system.