Advertisement
FocusedWolf

Windows 10: Fix update fails with 0x80070643 for KB5034441

Jan 19th, 2024 (edited)
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.20 KB | Help | 0 0
  1. SOURCE: https://support.microsoft.com/en-us/topic/kb5028997-instructions-to-manually-resize-your-partition-to-install-the-winre-update-400faa27-9343-461c-ada9-24c8229763bf
  2. SOURCE: https://www.bleepingcomputer.com/news/microsoft/windows-10-kb5034441-security-update-fails-with-0x80070643-errors/
  3. SOURCE: https://www.tenforums.com/tutorials/106215-factory-recovery-create-custom-recovery-partition-8.html
  4. Online Post: https://pastebin.com/4z64XKeg
  5.  
  6. NOTE: Its useful to have [Start > Create and format hard disk partitions] open in a side window for a visual representation of what is happening to the drive while issuing commands.
  7.  
  8. Manually resize the Recovery Partition to be 250 MB larger to fix error 0x80070643 for KB5034441:
  9. 1. Open a Command Prompt window (cmd) as admin.
  10.  
  11. 2. Check the WinRE status: $ reagentc /info
  12.  
  13. If the WinRE is installed, there should be a "Windows RE location" with a path to the WinRE directory.
  14. For example: "Windows RE location: [file://%3f/GLOBALROOT/device/harddisk0/partition4/Recovery/WindowsRE]\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE."
  15. Examining "\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE", the number after "harddisk" and "partition" is the index of the disk and the partition WinRE is on.
  16.  
  17. 3. Disable the WinRE: $ reagentc /disable
  18.  
  19. WARNING: If you skip [$ reagentc /disable] then later when you run [$ reagentc /enable] you will get "REAGENTC.EXE: The Windows RE image was not found".
  20. SOURCE: https://www.youtube.com/watch?v=hlNtLcFqfOo
  21. The reason this happens is [$ reagentc /disable] moves a file called Winre.wim from the recovery partition to C:\Windows\System32\Recovery\ for safe keeping.
  22. And [$ reagentc /enable] moves Winre.wim from C:\Windows\System32\Recovery\ to the recovery partition.
  23. If you delete the Recovery partition without disabling reagentc then you have work to do to extract a copy of Winre.wim from a Windows ISO.
  24.  
  25. 1. Mount the Windows ISO.
  26. NOTE: IDK if it matters if the Windows ISO is not the exact same version as the OS you have installed according to $ winver.
  27. But if this happened to me i would use https://files.rg-adguard.net/ to find the name of the iso with the matching version
  28. and download it from the internet.
  29.  
  30. 2. Go to the sources folder and locate "install.esd" e.g. D:\sources\install.esd.
  31. 3. cmd as administrator:
  32. NOTE: In the next steps, replace "D:\sources\install.esd" with the path to your install.wim file and /Index:1 with the appropriate index number. C:\mount is the directory where the image will be mounted.
  33.  
  34. A. Use the following command to list the indices within the install.esd file:
  35. $ dism /Get-WimInfo /WimFile:D:\sources\install.esd <-- Remember the index number that matches your OS.
  36.  
  37. B. Create an install.wim from the install.esd:
  38. NOTE: This step takes a while. If you click the cmd prompt, then it will pause progress. Press enter if that happens to unpause.
  39. $ dism /Export-Image /SourceImageFile:D:\sources\install.esd /SourceIndex:3 /DestinationImageFile:C:\install.wim /Compress:max /CheckIntegrity
  40.  
  41. C. Create a mount directory:
  42. NOTE: This step takes a while. If you click the cmd prompt, then it will pause progress. Press enter if that happens to unpause.
  43. $ mkdir C:\mount
  44.  
  45. D. Confirm that in the created C:\install.wim that your OS index is now 1, i.e. it only contains your selected OS at index 1:
  46. $ dism /Get-WimInfo /WimFile:C:\install.wim
  47.  
  48. E. Mount C:\install.wim at the desired index:
  49. $ dism /Mount-Image /ImageFile:C:\install.wim /Index:1 /MountDir:C:\mount
  50.  
  51. F. Locate and Copy Winre.wim to C:\Windows\System32\Recovery\:
  52. $ copy C:\mount\Windows\System32\Recovery\Winre.wim C:\Windows\System32\Recovery\
  53.  
  54. G. Unmount the image and cleanup:
  55. NOTE: This step takes a while.
  56. $ dism /Unmount-Wim /MountDir:C:\mount /Discard
  57. $ rmdir C:\mount
  58. $ del C:\install.wim
  59.  
  60. 4. [$ reagentc /enable] should work now without error.
  61.  
  62. 4. Shrink the OS partition and prepare the disk for a new recovery partition.
  63.  
  64. A. Shrink the OS: $ diskpart
  65.  
  66. B. Run $ list disk
  67.  
  68. C. Select the OS disk: $ sel disk <OS disk index>
  69. This should be the same disk index with the recovery partition.
  70.  
  71. D. Select the WinRE partition: $ sel part <WinRE partition index>
  72.  
  73. -----
  74.  
  75. E. Note the type of the partition before we delete it: detail partition
  76.  
  77. F. Delete the WinRE partition: $ delete partition override
  78.  
  79. -----
  80.  
  81. G. Find the partition index of the OS partition: $ list part
  82. It will be the partition before the recovery partition on a standard Windows install.
  83.  
  84. H. Select the OS partition: $ sel part <OS partition index>
  85.  
  86. I. Shrink the OS partition by 250 MB run $ shrink desired=250 minimum=250
  87.  
  88. -----
  89.  
  90. J. For SSDs you should have unallocated space after the recovery partition for wear leveling.
  91. I like to use 50 GB (51200 MB) but the amount is up to you.
  92. To shrink the OS partition by an additional 50 GB run $ shrink desired=51200 minimum=51200
  93.  
  94. K. Check if the drive is GPT (GUID Partition Table) or MBR (Master Boot Record):
  95. $ list disk <-- If you see '*' in in the "Gpt" column then its GPT, otherwise its MBR.
  96.  
  97. NOTE: The default recovery partition size for Windows 10 is 522 MB.
  98. For Windows 11 its size is 768 MB (+246 MB larger).
  99. Microsoft instructions suggest making a +250 MB larger partition,
  100. so the new recovery partition size will be: 522 MB + 250 MB = 772 MB.
  101.  
  102. NOTE: Microsoft instructions do not specify a size, but we will because it prevents
  103. the new recovery partition from taking up all the unallocated space at the end of the drive,
  104. which we want to keep unallocated for SSD wear leveling reasons.
  105.  
  106. L. Create a new recovery partition:
  107.  
  108. For GPT drives:
  109.  
  110. $ create partition primary id=de94bba4-06d1-4d40-a16a-bfd50179d6ac size=772
  111.  
  112. $ gpt attributes=0x8000000000000001 <-- WARNING: Do not forget to do this.
  113. --- --- -- This changes "Required: No" to "Required: Yes" in [$ detail partition].
  114. If you skip this step then [Start > Create and format hard disk partitions]
  115. will ONLY display the size of the Recovery partition,
  116. and will NOT display "Healthy (Recovery Parititon)".
  117. WARNING: ^-- Do not forget to do this.
  118.  
  119. NOTE: If "Healthy (Recovery Parititon)" isn't shown in Start > Create and format hard disk partitions
  120. then try this to mark the selected partition as a recovery partition:
  121.  
  122. $ detail partition <-- What does the type indicate that is causing this issue?
  123. $ set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
  124. $ detail partition <-- Should see type: de94bba4-06d1-4d40-a16a-bfd50179d6ac
  125.  
  126. You should now see "Healthy (Recovery Parititon)" in Start > Create and format hard disk partitions.
  127.  
  128. Or
  129.  
  130. For MBR drives:
  131.  
  132. $ create partition primary id=27 size=772
  133.  
  134. NOTE: If "Healthy (Recovery Parititon)" isn't shown in Start > Create and format hard disk partitions
  135. then try this to mark the selected partition as a recovery partition:
  136.  
  137. $ detail partition <-- What does the type indicate that is causing this issue? NOTE: I got "type: 07" every time i tried this on a MBR system for some reason:
  138. 07 = Windows NT NTFS
  139. 17 = Hidden
  140. 27 = OEM Recovery
  141. $ set id=27
  142. $ detail partition <-- Should see type: 27
  143.  
  144. You should now see "Healthy (Recovery Parititon)" in Start > Create and format hard disk partitions.
  145.  
  146. M. Format the recovery partition:
  147.  
  148. $ format fs=ntfs quick <-- TODO: Not sure why M$ instructions added [label="Windows RE tools"] here when the original recovery partition had no label.
  149.  
  150. 5. Exit from diskpart: $ exit
  151.  
  152. 6. Enable WinRE: $ reagentc /enable
  153.  
  154. 7. Confirm WinRE is enabled: $ reagentc /info <-- If you get the error message "REAGENTC.EXE: The Windows RE image was not found" then re-read step 3 for the fix.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement