Update Boot Code failure when trying to reinstall W10

Chris Dee 20 Reputation points
2025-09-20T01:23:03.57+00:00

I am trying to reinstall Windows 10 (in order to be able to install Windows 11). I consistently get "Windows 10 installation failed" messages near the end of the process. W10 is working just fine otherwise.

My self-assembled machine had a previous windows installation on a hard drive which is no longer connected; the error messages I get suggest that the installer is still seeing two boot records (the current one and the old one) and can't decide which one to execute.

This is the output of SetupDiag.exe:

QUOTE

<SetupDiag xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://docs.microsoft.com/en-us/windows/deployment/upgrade/setupdiag">

<Version>1.6.0.0</Version>

<ProfileName>FindAbruptDownlevelFailure</ProfileName>

<ProfileGuid>55882B1A-DA3E-408A-9076-23B22A0472BD</ProfileGuid>

 

<LogErrorLine>2025-09-19 13:22:12, Error SP Operation failed: Update Boot Code. Error: 0x80004005[gle=0x000000b7]</LogErrorLine>

 

<FailureData>Error: SetupDiag reports abrupt down-level failure.Last Operation: FinalizeError: 0x80004005 - 0x50016</FailureData>

 

<FailureData>LogEntry: 2025-09-19 13:22:12, Error SP Operation failed: Update Boot Code. Error: 0x80004005[gle=0x000000b7]</FailureData>

 

<FailureData>Refer to "https://docs.microsoft.com/en-us/windows/desktop/Debug/system-error-codes" for error information.</FailureData>

 

<FailureDetails>ErrorCode = 0x80004005, ExCode = 0x50016, Oper = Finalize</FailureDetails>

 

<SetupPhaseInfo>

<PhaseName>Finalize</PhaseName>

<PhaseStartTime>9/19/2025 1:22:09 PM</PhaseStartTime>

<PhaseEndTime>1/1/0001 12:00:00 AM</PhaseEndTime>

<PhaseTimeDelta>0:00:00:00.0000000</PhaseTimeDelta>

<CompletedSuccessfully>false</CompletedSuccessfully>

</SetupPhaseInfo>

<SetupOperationInfo>

<OperationName>Update Boot Code</OperationName>

<OperationStartTime>9/19/2025 1:22:12 PM</OperationStartTime>

<OperationEndTime>1/1/0001 12:00:00 AM</OperationEndTime>

<OperationTimeDelta>0:00:00:00.0000000</OperationTimeDelta>

<CompletedSuccessfully>false</CompletedSuccessfully>

</SetupOperationInfo>

</SetupDiag>

UNQUOTE

I don't want to poke around in the register unless I'm certain what I want to change. Can anyone suggest how to find and delete the reference to the old boot record? (I have tried all the usual fixes. The SSD has no flaws per HDTunePro.) Thanks for any help you can give me.

Windows for home | Windows 10 | Install and upgrade
0 comments No comments
{count} votes

Answer accepted by question author
  1. Ramesh Srinivasan 173.4K Reputation points Volunteer Moderator
    2025-09-21T14:51:45.26+00:00

    Glad it's sorted.

    Can anyone suggest how to find and delete the reference to the old boot record?

    Sort of, yes. You were right. Deleting and rebuilding the EFI partition was the ticket.


    I'm a volunteer here. So, I don't have a boss. :-) But I guess CET might go through some of the user feedback.

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Ramesh Srinivasan 173.4K Reputation points Volunteer Moderator
    2025-09-20T01:50:26.0866667+00:00

    1] Please open Disk Management and maximize it. Adjust the column widths in the top pane to make all the entries visible. Post a screenshot.

    2] Launch msinfo32.exe, and click System Summary. Resize the columns in the right pane to make the entries visible, and post a screenshot.

    3] Open the admin Command Prompt and run:

    bcdedit
    diskpart
    list disk
    select disk 0
    list part
    list vol
    exit
    reagentc /info
    

    Post the output.


  2. Ramesh Srinivasan 173.4K Reputation points Volunteer Moderator
    2025-09-20T16:34:21.94+00:00

    After creating the USB setup disk, boot the subject computer using it. To do so, you may need to change the boot order in the BIOS/UEFI settings. Consult your system or motherboard manual to learn how to access the UEFI settings for your model.

    On the Windows Setup language selection screen, press Shift + F10 to enter Windows RE Command Prompt.

    In the WinRE Command Prompt, type the following commands:

    diskpart
    
    select disk 0
    
    list part
    
    select part 1
    
    assign letter=Y
    
    list vol
    
    exit
    

    Take photos of the output screen using your phone and share the images here. Don't quit WinRE yet. A few more commands need to be run.

    0 comments No comments

  3. Chris Dee 20 Reputation points
    2025-09-20T16:55:17.4333333+00:00

    IMG_3868

    IMG_3869


  4. Ramesh Srinivasan 173.4K Reputation points Volunteer Moderator
    2025-09-20T17:33:21.98+00:00

    Ok.

    Assuming you haven't closed the WinRE screen, please run these commands now.

    xcopy /h Y:\EFI\Microsoft\Boot\BCD C:\
    
    format Y: /fs:FAT32 /q
    

    Note: When you run the format command, you'll be prompted to type the volume label. Type EFI and press Enter.

    Once done, run the final command.

    bcdboot  C:\Windows /s Y: /f UEFI
    

    Post the screenshot(s).


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.