KB5028997: Microsoft updates KB5034441/KB5034440 "0x80070643 - ERROR_INSTALL_FAILURE" fix

Update May 2 2024: Microsoft also slightly tweaked the instructions for manually resizing the Windows Recovery partition. This update was made right around the same time when the company announced it had failed to automate the KB5034441 "0x80070643 - ERROR_INSTALL_FAILURE" fix.

The updated instructions are given below.

Update July 21 2024: Microsoft recently published an update on the KB5034441 / KB5034440 WinRE installation bug and has posted requirements for the update.

Following that, the tech giant has also modified the instructions for manually resizing the Windows Recovery partition as well as details about the nature of the issue. Information related to system events has been added in the summary section.

The updated instructions and the summary of the bug are given below.


If you have noticed WinRE (Windows Recovery Environment) updates failing recently on your Windows 11 PC, there may be a reason. Microsoft published a guidance article recently explaining why it is happening and has also detailed how to deal with the issue.

The company says it has changed the way it delivers WinRE updates as they are being deployed via monthly cumulative updates through the Windows Update (WU) and the Windows Server Update Services (WSUS). As such sufficiently large Recovery Partition is required for this and in the case the partition does not have enough room, the update will fail and display the following error message "Windows Recovery Environment servicing failed." The tech giant writes:

Summary

Microsoft has changed how it updates PCs that run the Windows Recovery Environment (WinRE). WinRE will be updated using the monthly cumulative update. This change only applies to PCs that get updates from Windows Update (WU) and Windows Server Update Services (WSUS). This change starts on June 27, 2023, for the Windows 11, version 22H2 cumulative update.

Some PCs might not have a recovery partition that is large enough to complete this update. Because of this, the update for WinRE might fail. You will receive the error message, "Windows Recovery Environment servicing failed.”

As mentioned above, a step-by-step guide has also been provided by Microsoft though it may not be the easiest one to follow for an average user.

You can view the amount of recovery partition in your PC by running the Disk Management console (run "diskmgmt"):

The guide below will help boost the recovery partition capacity by 250 MB:


Manually resize your partition by 250 MB

  • Open a Command Prompt window (cmd) as admin.
  • To check the WinRE status, run reagentc /info. If the WinRE is installed, there should be a “Windows RE location” with a path to the WinRE directory. An example is, “Windows RE location: [file://%3f/GLOBALROOT/device/harddisk0/partition4/Recovery/WindowsRE]\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE.” Here, the number after “harddisk” and “partition” is the index of the disk and partition WinRE is on.
  • To disable the WinRE, run reagentc /disable.
  • Shrink the OS partition and create a new recovery partition.
    • To shrink the OS, run diskpart.
    • Run list disk.
    • To select the OS disk, run sel disk. This should be the same disk index as WinRE.
    • To check the partition under the OS disk to find the OS partition, run list part.
    • To select the OS partition, run sel part.
    • Run shrink. Desired=250 Minimum=250.
    • To select the WinRE partition, run sel part.
    • To delete the WinRE partition, run delete partition override.
    • To create a new partition, run create partition primary.
    • To format the primary partition, run format quick fs=ntfs label=”Windows RE tools”
  • Set the partition to be a Recovery partition.
    • To check if your disk is MBR or GPT, run detail part. If you get a GUID like, "Type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" below Partition 3, your disk is GPT. Otherwise, it is MBR.
      • For MBR disk, the command should be set id=27
      • For GPT disk, the command should be set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
      • gpt attributes=0x8000000000000001
  • To confirm that the WinRE partition is created, run list vol.
  • To exit from diskpart, run exit.
  • To re-enable WInRE, run reagentc /enable.
  • To confirm where WinRE is installed, run reagentc /info.

Note If creation failed or you did not want to extend the WinRE partition, run reagentc /enable to re-enable WinRE.


Updated instructions, May 2 2024:

Manually resize your partition by 250 MB

  • Open a Command Prompt window (cmd) as admin.
  • To check the WinRE status, run reagentc /info. If the WinRE is installed, there should be a “Windows RE location” with a path to the WinRE directory. An example is, “Windows RE location: [file://%3f/GLOBALROOT/device/harddisk0/partition4/Recovery/WindowsRE]\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE.” Here, the number after “harddisk” and “partition” is the index of the disk and partition WinRE is on.
  • To disable the WinRE, run reagentc /disable
  • Shrink the OS partition and prepare the disk for a new recovery partition.
    • To shrink the OS, run diskpart
    • Run list disk
    • To select the OS disk, run sel disk This should be the same disk index as WinRE.
    • To check the partition under the OS disk and find the OS partition, run list part
    • To select the OS partition, run sel part
    • Run shrink desired=250 minimum=250
    • To select the WinRE partition, run sel part
    • To delete the WinRE partition, run delete partition override
  • Create a new recovery partition.
    • First, check if the disk partition style is a GUID Partition Table (GPT) or a Master Boot Record (MBR). To do that, run list disk. Check if there is an asterisk character (*) in the “Gpt” column. If there is an asterisk character (*), then the drive is GPT. Otherwise, the drive is MBR.
      • If your disk is GPT, run create partition primary id=de94bba4-06d1-4d40-a16a-bfd50179d6ac followed by the command gpt attributes =0x8000000000000001
      • If your disk is MBR, run create partition primary id=27
    • To format the partition, run format quick fs=ntfs label=”Windows RE tools”
    • If your disk is MBR, run set id=27
  • To confirm that the WinRE partition is created, run list vol
  • To exit from diskpart, run exit
  • To re-enable WinRE, run reagentc /enable
  • To confirm where WinRE is installed, run reagentc /info

Note If creation failed or you do not want to extend the WinRE partition, run reagentc /enable to re-enable WinRE.


Updated instructions and summary of the issue, July 21 2024:

Summary

Microsoft has changed how it updates PCs that run the Windows Recovery Environment (WinRE). WinRE will be updated using the monthly cumulative update. This change only applies to PCs that get updates from Windows Update (WU) and Windows Server Update Services (WSUS). This change starts on June 27, 2023, for the Windows 11, version 22H2 cumulative update.

Some PCs might not have a recovery partition that is large enough to complete this update. Because of this, the update for WinRE might fail. If you see a system event with an ID of 4502 triggered in C:\Windows\System32\winevt\logs\system.evtx, it is likely an error due to insufficient space on the recovery partition that contains the WinRE. The details of this system event should show, "Windows Recovery Environment servicing failed." with an ErrorPhase of 2.

Manually resize your partition by 250 MB

  • Open a Command Prompt window (cmd) as admin.

  • To check the WinRE status, run reagentc /info. If the WinRE is installed, there should be a “Windows RE location” with a path to the WinRE directory. An example is, “Windows RE location: [file://%3f/GLOBALROOT/device/harddisk0/partition4/Recovery/WindowsRE]\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE.” Here, the number after “harddisk” and “partition” is the index of the disk and partition WinRE is on.

  • To disable the WinRE, run reagentc /disable

  • Shrink the OS partition and prepare the disk for a new recovery partition.

    • To shrink the OS, run diskpart

    • Run list disk

    • To select the OS disk, run sel disk This should be the same disk index as WinRE.

    • To check the partition under the OS disk and find the OS partition, run list part

    • To select the OS partition, run sel part

    • Run shrink desired=250 minimum=250

    • To select the WinRE partition, run sel part

    • To delete the WinRE partition, run delete partition override

  • Create a new recovery partition.

    • First, check if the disk partition style is a GUID Partition Table (GPT) or a Master Boot Record (MBR). To do that, run list disk. Check if there is an asterisk character (*) in the “Gpt” column. If there is an asterisk character (*), then the drive is GPT. Otherwise, the drive is MBR.

      • If your disk is GPT, run create partition primary id=de94bba4-06d1-4d40-a16a-bfd50179d6ac followed by the command gpt attributes =0x8000000000000001

      • If your disk is MBR, run create partition primary id=27

    • To format the partition, run format quick fs=ntfs label=”Windows RE tools”

    • If your disk is MBR, run set id=27

  • To confirm that the WinRE partition is created, run list vol

  • To exit from diskpart, run exit

  • To re-enable WinRE, run reagentc /enable

  • To confirm where WinRE is installed, run reagentc /info

Note If creation failed or you do not want to extend the WinRE partition, run reagentc /enable to re-enable WinRE.

You can find the support article here on Microsoft"s official website.

Report a problem with article
Next Article

Microsoft has announced it will retire Azure Lab Services, but not in a while

Previous Article

Microsoft Weekly: butt-shaped Xbox controllers and 9 million broken Windows PCs