September 14, 2011

BCDboot - Failure when attempting to copy boot files

I was deploying a W2K8 R2 image on a ML350 G5 some time ago and was unable to make the system partition bootable. Never thought of writing about this but the issue reappeared lately on a G7 so here it goes..

Running “bcdboot.exe c:\windows /l en-usreturned a “Failure when attempting to copy boot files” error. And yes, I did check if the partition was active and it was. I heard that this issue was resolved by some by destroying the array, rebuilding it and installing the image again. I did so but with no further luck – unfortunately a huge waste of time over iLO and a slow connection (you probably know what I mean).

Turns out that the command which finally worked correctly was “bcdboot c:\Windows /s c: /l en-us” while running it from the WinPE drive.

The “/s” option according to the manual “Specifies an optional volume letter parameter to designate the target system partition where boot environment files are copied. The default is the system partition identified by the firmware.”

I guess the default system partition could not be properly identified thus all the fuss. Weird, I haven't found a reason for this. Didn't look deeper since I found a fix. Anyway, hope this helps!

92 comments:

  1. dude you rock- thanks

    ReplyDelete
  2. FYI I know why this is likely to occur. With HP and DELL servers we all know they come preconfigured with the OS. They also come with a recovery partition and usually support the new EFI model which is replacing BIOS. One of the advantages EFI has over BIOS is that it supports GPT disks which don't use an MBR. Long story short - the boot up process is completely different to what you are used to. On a GPT disk there is always another partition specially for EFI called the EFI system partion which is the active partition. What this means is that your Windows 7 system partition isn't the boot/active partition. EFI boots this special partition which then loads Win 7 system partition (which is not active). This is why the recovery gets confused as it is trying to do a windows boot "repair" on the EFI partition which of course doesn't contain the boot files. I have also wrote a similar article on which covers the Boot/BCD 0xc000000f Error

    ReplyDelete
  3. Thanx a ton!!! was trying to fix a friend's system after same issue...was playin with loads of commands, but this one got the bull's eye!!!

    ReplyDelete
  4. Wow this was just what I was looking for, thanks

    ReplyDelete
  5. Cool, glad that this could be of help.

    @Graham, thank you for the full explanation, the link to your site was a great read! Although (AD your comment) in my case all servers are specifically ordered without the OS so they are just plain blank drives. By factory build they were always shipped with a RAID 0 config (usually 2 drives with the rest not added to the array) so always needed to destroy the array first and build a new one (usually RAID 5 unless it was for a DB or app server). I also played around with the active partitions and the config was always correct. It wouldn't work unless the "/s" option was added to bcdboot.

    Thanks again for your input, much appreciated!

    ReplyDelete
  6. Damn man thank you very much i spend my day trying to solve that bcd problem and you just solve it THANK YOU!

    ReplyDelete
  7. This doesn't work, these people have no idea

    ReplyDelete
  8. What did not work? Please be more descriptive so that we can provide an answer.

    ReplyDelete
  9. You are a hero amongst men.

    ReplyDelete
  10. I believe the reason it works is because without the /s
    you are trying to create the command to the PE device, not the C drive.
    Adding the /s tells it to apply to the C drive, not your PE disk.

    ReplyDelete
    Replies
    1. Indeed but the command without "/s" worked flawlessly in previous deployments. Something must have changed but cannot see exactly how and what as this error showed up randomly in the same server hardware configurations and for the same OS deployment.

      Delete
  11. Saved my work laptop. Thanks for posting this!!

    ReplyDelete
  12. Saved my laptop too... nothing else worked...
    Thank you sooo much

    ReplyDelete
  13. thank you for providing the only solution which quickly worked

    ReplyDelete
  14. this hasn't worked i'm trying to recover a Hp pavilion and thus far i cant get past the error saying the disc isn't accessible, is there anyway to recover individual files from such a drive if it comes to such?

    ReplyDelete
    Replies
    1. Hey EJ, is this somehow related to the bdcboot error? As for recovery of individual files, this is completely different matter but yes, there is plenty of software available online which deals with file recovery. If you have a serious HDD issue I would suggest Spin Rite. For device specific issues I would suggest to maybe check on HP forums for details or others with similar problems.

      Delete
  15. still giving me same error

    ReplyDelete
  16. As EJ i'm dealing with a HP Pavillion dv8 1010el and this isn't working. Please help, is there a solution?

    ReplyDelete
    Replies
    1. As mentioned above in a reply to EJ, is this related to the bcdboot error? Please provide some details, error description, in which circumstances does it appear etc..

      Delete
  17. Thanks a million dude!!!!! worked like magic

    ReplyDelete
  18. I cannot thank you enough. You are the man

    ReplyDelete
  19. I add to your well deserved kudos. Thanks!

    ReplyDelete
  20. this helped fix dell laptop, thank you. i have bookmarked this page for reference in case i run into this issue again

    thanks for posting

    ReplyDelete
  21. I'm trying to boot a vhd drive and its still not copying the boot files?

    ReplyDelete
  22. Hi I am getting BFSVC: Unable to load MUI file for BCD strings (2).
    Googling gives NO results at all for that error message, even without quote marks :/
    Any help appreciated!!

    ReplyDelete
    Replies
    1. James, I am getting over 16K results on "unable to load mui file for bcd strings". Please see the following suggestions from MSFT:

      http://social.technet.microsoft.com/Forums/en/w7itproinstall/thread/94ac7b9c-8581-4907-b2f3-10b67d070ebc

      Delete
    2. Thanks for the quick reply, will try it tomorrow when I get to work. Something went *very* wrong with Google at work today then...

      Delete
    3. Sorry I don't follow how to use bcdboot in this case. The examples are for creating other bootable drives?

      Delete
    4. James, the examples are for a different issue than the one you are seeing. This thread is for the "Failure when attempting to copy boot files" error with BCDBoot. Not sure how to fix your issue though.

      Delete
    5. OK Thanks at least for the quick replies. I tried every which way, along with the startup repair -> reboot many times. I hope these guys are good!!

      Delete
  23. It really did work.
    diskpart
    sfc /scannow
    and finally
    bcdboot /s
    3+ hours of maniacism

    ReplyDelete
  24. so i am running to a problem.
    i have typed in bcdboot c:\windows /s c: /l en-us and i'm still getting a message saying "failure when attempting to copy boot files". is there an alternative to fix this issue?

    ReplyDelete
  25. I have had the same.
    I am a really amateur and trying to fix my computer.
    I have tried everything and i have typed in bcdboot c:\windows /s c: /l en-us and i'm still getting a message saying "failure when attempting to copy boot files". is there an alternative to fix this issue?

    HELP

    ReplyDelete
  26. Hi guys,
    im trying to have w server 2012 installed in vhd but the bcdboot keep failing
    downloaded the vhd copy from microsoft site , extracted it , attached it but cant seems to create the boot.
    below is a link of the steps i followed http://prntscr.com/13v2z9
    i also tried bcdboot i:\windows /s i:

    ReplyDelete
    Replies
    1. Hi Geni,
      Have you marked the partition active?

      Delete
  27. I had cloned an about-to-die disk but Windows 8 could not boot from new disk. After the command you suggested, everything is working now. I am using the new disk, safely replacing my data in time. Thank you very much.

    ReplyDelete
  28. Man you are awesome. You solved my problem. Thanks for your help

    ReplyDelete
  29. I was getting "BCDboot - Failure when attempting to copy boot files" after running "bcdboot c:\Windows /s c:".It wasn't until I ran "bcdboot c:/Windows /s c: /l en-us" that it worked for me. Any idea why that it? And thanks a ton for the info! You really saved my butt!

    ReplyDelete
    Replies
    1. Hi Matthew, thanks for the feedback! Be sure to check out the first comment by Graham and the post on his blog where he analyzes the issue indepth: http://think-like-a-computer.com/2012/04/17/boot-bcd-0xc000000f-windows-7/

      Delete
  30. I found the SOLUTION!!!
    You got this Message when you open the Commandline without Administrator rights.
    Just Right-click on the CMD-ICon and chooose "running as administrator" that it is. Type the command agian and it will work.

    ReplyDelete
    Replies
    1. This might indeed be the case when already running a full edition of Windows. In my cas this was run on WinPE already as admin. Might vary greatly based on what you're running the command from. If you're trying to run this command without admin rights you're most likely bound to fail.

      Delete
    2. You were RIGHT! Once I was running CMD as ADMINISTRATOR . . .
      bcdboot c:\windows /s c:
      . . . it worked! Thank you!

      Delete
  31. Hi, followed everything says boot files succesfully created, run the mgr and boot command
    But still doesnt start !

    ReplyDelete
  32. Thank you SO MUCH!
    Been trying to fix this problem for 2 hours. Had an issue with windows freezing so I ran system repair from windows disk which effectively ruined my MBR!
    Atleast, now Im back to square one. :P

    ReplyDelete
  33. Just ran into this issue on an HP 8300 elite. I had captured and image and successfully deployed it to over a dozen other 8300 elite workstations. Got a new shipment in today of the same model but started running into this error. I've used the /s switch in the past with success but it wasn't working this time, still receiving unable to copy boot files error. I ended up disabling all the EFI boot devices in my BIOS which resolved the issue. Not sure exactly why as all my boot devices appeared both in EFI boot device list and Legacy boot device list but after disabling all EFI boot devices and leaving the legacy devices I was able to copy the boot files without error or even the need for the /s switch.

    ReplyDelete
  34. Great solution. It fixed my problem right up, thanks!

    ReplyDelete
  35. Solution didn't work for me. Using Dell Latitude 10.

    ReplyDelete
  36. I realize that this is a bit old, but one other case I found where I got this message was when I was trying to install Windows 8 to a USB drive. In this case, I received this same error message because I somehow accidentally did not run the command prompt as an Administrator. Make sure you have the permissions you need!

    ReplyDelete
  37. Inspite of all that I still got "Failure when attempting to copy boot files". I used the /v (verbose) swtich and saw it complained about a read error on the source (C:\windows).

    Turns out the file system was corrupt and I had to do a chkdsk /f first
    Really wasn't apparent at all because everything showed up just fine in command prompt.

    ReplyDelete
  38. My problem fixed after I run cmd as ADMINISTRATOR

    ReplyDelete
  39. Hi Rafal, I have a situation a bit unique. I just received the latest Mac Pro black cylinder and I'm having a very difficult problem installing Windows 8.

    It started off with the error "Windows coud not update the computer's boot configuration".

    I ran command prompt with the following:

    diskpart (hit enter)
    list volume (hit enter)
    select volume X (where X is the number of your EFI partition) (hit enter)
    assign letter=B (hit enter)
    exit (hit enter)
    bcdboot C:\Windows /l en-US /s B: /f ALL

    And finally I'm getting the error:
    BFSVC Error: Unable to load MUI file for BCD strings (2).

    And this is where I'm stuck.

    It might be hard for you to really understand what I'm talking about so here's the discussion I posted on the Apple forum that has detailed steps and screenshots.

    https://discussions.apple.com/message/24640704#24640704

    I will really appreciate if you could help me out. I'm comfortable running the command prompt but I just can't figure out how to make further progress without outside help.

    Thank you very much in advance!

    Alejandro

    ReplyDelete
  40. Awesome! Thank you dude! Turns out, although my Windows Disk was "C:/" it is recognized as "D:/" inside the Command Prompt.

    ReplyDelete
  41. Was having this issue with SCCM 2012 and Windows 7 deployment. After days of googling I finally came across this post and disabling the EFI boot devices worked for me. Thanks SO much!

    ReplyDelete
  42. It worked! You saved me a lot of time. Thanks a lot, great article :)

    ReplyDelete
  43. Thanks for your efforts :). Saved me a ton of time.

    ReplyDelete
  44. Just wanted to say this saved me from losing a large amount of work put into imaging and testing several devices for our company. Would have been a disaster without this fix. Thank you very much after all these years since your original post.

    ReplyDelete
  45. I Found the solution, go to another pc that has a normal boot with a MBR drive (not EFI and not GUID) and run the bcdboot command it will work without any errors

    ReplyDelete
  46. My laptop SONY VIAO was not booting and further to my investigation i found that this is due to the BCD issues.. I recovered the BCD FILES thru the steps mentioned http://superuser.com/questions/628038/boot-bcd-status-0xc000000f-error

    Then next step was trying to recover the BOOTFILE using the bcdboot command.. i was getting the error message "failure when attempting to copy boot files " when using the bcdboot c:\windows.
    i was executing this command from C:\
    then i found there is another command from this site. ... "bcdboot c:\Windows /s c: /l en-us". i was still getting the error message with the previous bcdboot command.. I checked my primary partition is active or not.. its active.. i used the DISKPART utility to check the partition detials.


    please help me..

    ReplyDelete
  47. Thanks Buddy, this worked!
    I had this issue before and it too me AGES to find a solution after many had failed! I ended up using a utility to get inside and manually copy a new BCD file, a bit of a nightmare really. This really help, well done!

    ReplyDelete
  48. Thanks a lot! Messed up BCD from dualbooting and this worked perfectly in a RAID system!!

    ReplyDelete
  49. bcdboot D:\Windows /s D: /l en-us

    ReplyDelete
  50. "bcdboot c:\Windows /s c: /l en-us" worked for me. Previously I was trying "bcdboot c:\Windows" without success. Many thanks.

    ReplyDelete
  51. Thanks, was running this on WinPE on a bootable USB and all the other info I found was mainly for creating the image and how to fix the problem with that - not on the post-imaging client end.

    ReplyDelete
  52. This comment has been removed by the author.

    ReplyDelete
  53. Thanks, it was very helpful.
    My problem solved

    ReplyDelete
  54. Thank you very much, saved me a lot of trouble

    ReplyDelete
  55. For me the problem turned out to be related to the boot order of the hard drives in the BIOS. The system had 2 hard drives, and they were plugged in such that their data-only drive was plugged into a lower numbered SATA port than the OS drive. I suspect that at one point that data drive had an OS on it and therefore had boot code in the boot sector. This seemed to be making windows REALLY REALLY want to use that drive for bootable information. Using the /s parameter for bcdboot caused that command to successfully run, but it still wouldn't boot and bootrec /rebuildbcd would still return "element not found". A temporary workaound involved swapping the boot order in the BIOS - at this point, everything magically worked. After that confirmation, I physically plugged the boot drive into SATA 0 so even after a BIOS reset (I suspect this happened to trigger the problem to begin with) it will use the correct drive as the primary bootable one.

    ReplyDelete
  56. "Bcdboot c:\windows /s c:" worked perfectly. I was about to throw my gf's computer out the window, thank you.

    ReplyDelete
    Replies
    1. this worked for me. ty.

      in 2017 -_-

      Delete
  57. wow this worked perfect!!! THanks

    ReplyDelete
  58. Thank you Rafal
    I did have this issue when using specific USB 3 device to install custom Image.
    Using -bcdbot c:\windows /s c:
    Worked perfect

    ReplyDelete
  59. Phewww thought I had lost it.. Thx! This worked like a charm :) Windows 10 x64 Pro.

    ReplyDelete
  60. The command was successful with /S switch, Still the Boot problem is not solved. I disconnected all HDs, except one. "Reboot and Select proper Boot device" message pops up.

    ReplyDelete
  61. I accidentally powered off, while pc was going to sleep. Drive is intact, did run chkdsk. My system is 64bit, but getting error "This version of System Recovery Option is not compatible..."with my repair disk. had to use hiren's boot disk 15.2 which is win7 (32 bit). all suggestions are welcome...!

    ReplyDelete
  62. Just a random passerby here.

    THANK YOU. I was following the solution posted here, but couldn't figure out why it didn't work:
    https://social.technet.microsoft.com/Forums/en-US/c831869f-c8a4-46c8-a101-9fb1fb617e0a/msconfig-boot-is-blank-but-still-boots-need-to-remove-a-boot-menu-entry?forum=w7itprogeneral

    I guess this happened because I removed any spare windows partitions and only left Windows 7. I basically was going to dual boot Slackware Linux, and only had 3 partitions: Win 7, Slackware, swap.

    Basically what you and Graham said was the solution!

    ReplyDelete
  63. "Turns out that the command which finally worked correctly was “bcdboot c:\Windows /s c: /l en-us” while running it from the WinPE drive."

    "...while running it from the WinPE drive"

    Do you mean running it from WinPE's X:\Windows\System32\bcdboot c:\Windows /s c: /l en-us

    - or - from the new C: ( where C is the C: partition where my image was newly applied to, ie- dism /apply-image /imagefile:I:\images\myimage.wim /index:1 /ApplyDir:C:\ )

    so,

    cd C:
    cd windows\system32
    bcdboot c:\Windows /s c: /l en-us

    Or does it not matter if you run bcdboot from X: or C: ?

    Thanks! -Keith

    ReplyDelete
    Replies
    1. I believe it doesn't matter where you run it from as long as the destination option is correct and the source has the bcdboot executable.

      Delete
  64. For some, this may be helpful...

    WinPE / BCDBOOT: Failure when attempting to copy boot files (Solution)
    http://killputer.blogspot.com/2013/08/winpe-bcdboot-failure-when-attempting.html

    "Sometimes it will work and sometimes it won't work seemingly random."

    "The trick I found out was HOW I was getting into WinPE or PXE. If I am doing a LEGACY boot of the USB (WINPE), BCDBOOT would work successfully. If I am doing a UEFI/EFI boot WinPE environment, it would not work!

    Basically what happens:
    If you boot your WinPE drive via UEFI interface/options, BCDBOOT will default to try working with GPT and EFI firmware. With an EFI reserve partition missing, because it wasn't created you get: Failure when attempting to copy boot files.

    If you boot your WinPE thumb-drive via BIOS/LEGACY options, BCDBOOT will default to try working with MBR and BIOS firmware."

    ReplyDelete
  65. thanks man it works thank you so much you save my life !!!

    ReplyDelete
  66. As in the cafe scene from When Harry Met Sally:

    YES, YES, YES, YESSSSSS!

    Man you won't believe the anguish I had over this and your page has fixed it for me. Thank you so much. I'm a composer for TV programmes, and I've got a deadline this weekend, so now I can deliver to the client on time.

    ReplyDelete
  67. Thank you very much Sir, you are GOD the almighty.

    ReplyDelete
  68. Here it's January 2017 and your post is the gift that keeps on giving. Thanks so very much!!!!

    ReplyDelete
  69. Turn off unnecessary programs like this - there's usually a menu option buried deep or you can get help online or, if you're brave, you can manually tweak yourmsconfig file.
    Win10Tips.Net

    ReplyDelete
  70. This comment has been removed by the author.

    ReplyDelete
  71. Can you tell me that how to install this software thanks :) Recover my Files 5.21

    ReplyDelete
  72. I am getting "Failure when attempting to copy boot files " someone pls help me

    ReplyDelete
  73. Thanks worked first time after spending so long trying to fix the laptop

    ReplyDelete