Note: This article is more than one year old.

  • Windows Update, recovery-partition, and WinRE requirements change with KB articles and newer builds. Follow the relevant KB and Microsoft's current official instructions first.
  • Deleting files or changing partitions as described here can cause data loss. Make a backup before proceeding.
  • Disk layouts, including OEM recovery arrangements, differ between machines. Check the manufacturer's precautions too.

The KB5034441 security-update error for Windows 10 Version 22H2 had been appearing for what felt like forever.

Microsoft had published the following instructions.

I doubt many people read them and immediately thought, "That solves it!"

Why were they so difficult to read?

None of the words were sinking in.

...

After solving the problem, I looked back and realized: wait, it says the same thing.

https://support.microsoft.com/ja-jp/topic/kb5028997-winre-%E6%9B%B4%E6%96%B0%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E3%83%91%E3%83%BC%E3%83%86%E3%82%A3%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E3%82%B5%E3%82%A4%E3%82%BA%E3%82%92%E6%89%8B%E5%8B%95%E3%81%A7%E5%A4%89%E6%9B%B4%E3%81%99%E3%82%8B%E6%89%8B%E9%A0%86-400faa27-9343-461c-ada9-24c8229763bf

https://oa-center.co.jp/2024/04/22/windowskb5034441/

I had ChatGPT read them and explain the instructions more clearly.

You might try that too.

This could break your system, so proceed at your own risk.

It did work on my machine, but please take responsibility for your own setup.

This article explains the cause clearly.

Apparently, the Windows Recovery Environment (WinRE) partition did not have enough space.

https://oa-center.co.jp/2024/04/22/windowskb5034441/

Trying the fix

Open Command Prompt as administrator. Right-click Start and choose Command Prompt (Admin) or Windows PowerShell (Admin). My environment is shown below. The problem was Partition 4, the 552MB recovery partition after the 930GB partition. Adjust these instructions to your actual environment.

DISKPART> list part

Partition ### Type Size Offset

------------- ------------------ ------- -------
Partition 1 システム 100 MB 1024 KB 
Partition 2 予約 16 MB 101 MB 
Partition 3 プライマリ 930 GB 117 MB 
Partition 4 回復 552 MB 930 GB
------------- ------------------ ------- ------

1. Open Command Prompt as administrator

Right-click Start and choose Command Prompt (Admin) or Windows PowerShell (Admin).

2. Check WinRE status

reagentc /info

3. Disable WinRE

reagentc /disable

4. Use diskpart to manage disk partitions

diskpart

5. List disks

list disk

6. Select the OS disk

Use the following command to select the OS disk, for example disk 0.

select disk 0

7. List partitions

list part

8. Select the OS partition

Mine was Partition 3, the 930GB primary partition, so I ran:

select part 3

9. Shrink the OS partition

Shrink it by 250MB.

shrink desired=250 minimum=250

10. Select the WinRE partition

Mine was Partition 4, the 552MB recovery partition, so I ran:

select part 4

11. Delete the WinRE partition

delete partition override

12. Create a new recovery partition

First, check the disk's partition style with the following command. An asterisk in the Gpt column means GPT; otherwise, it is MBR. Mine was GPT.

list disk

13. Create the partition

For a GPT disk:

create partition primary id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
gpt attributes=0x8000000000000001

For an MBR disk:

create partition primary id=27

14. Format the new partition

format quick fs=ntfs label="Windows RE tools"

Additional setting for an MBR disk:

set id=27

15. Confirm that the new WinRE partition exists

list vol

16. Exit diskpart

exit

17. Re-enable WinRE

reagentc /enable

18. Check WinRE's location

reagentc /info

Following these steps should provide the recovery-partition space needed to install KB5028997 and re-enable WinRE. Run Windows Update again and try installing the update. Adios!