• Windows 11 22H2 “Recovery Environment servicing failed”

    Home » Forums » AskWoody support » Windows » Windows 11 » Windows 11 version 22H2 » Windows 11 22H2 “Recovery Environment servicing failed”

    • This topic has 16 replies, 5 voices, and was last updated 1 year ago.
    Author
    Topic
    #2630866

    My new Windows 11 22H2 desktop has successfully installed all Cumulative Updates from 2023-03 to 2023-12 (once approved by Susan). Beginning with 2023-08, a single Critical event was logged each month from WinREAgent (ID 4502) indicating the “Windows Recovery Environment servicing failed.”

    After the December update, I ran dism /online /cleanup-image /scanhealth (Image Version: 10.0.22621.2861) and found “No component store corruption detected.” Subsequently, I ran sfc /scannow, and found “Windows Resource Protection found corrupt files and successfully repaired them.” Error lines from the CBS.log file were as follows:

    2023-12-30 13:35:56, Info                         Enter WinREAgent::WinREServicingManager::Load
    2023-12-30 13:35:56, Info                         LogSession: Starting a new log session at [C:\Windows\Logs\WinREAgent]
    2023-12-30 13:35:56, Error                        0x80070490 in WinREAgent::WinREServicingManager::InternalLoad (base\diagnosis\srt\winreagent\dll\winreservicingmanager.cpp:1020): [C:\$WinREAgent\WinREServicingManager.xml] doesn't exist, there is no servicing manager suspended[gle=0x00000002]
    2023-12-30 13:35:56, Error                        0x80070490 in WinREAgent::WinREServicingManager::Load (base\diagnosis\srt\winreagent\dll\winreservicingmanager.cpp:977): Failed to load servicing manager[gle=0x00000002]
    2023-12-30 13:35:56, Error                        0x80070490 in WinREAgent::LoadWinREServicingManager (base\diagnosis\srt\winreagent\dll\winreagent.cpp:98): Failed to load servicing manager
    2023-12-30 13:35:56, Info                  CSI    00000ce8@2023/12/30:18:35:56.323 No WinRE image to commit.

    A second run of sfc /scannow (after a reboot) found “Windows Resource Protection did not find any integrity violations.”

    My Windows Recovery Environment is Enabled, and the Recovery Partition is Disk 0 Partition 4, as per the following:

    C:\Windows\System32>reagentc /info
    Windows Recovery Environment (Windows RE) and system reset configuration
    Information:
    
        Windows RE status:         Enabled
        Windows RE location:       \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE
        Boot Configuration Data (BCD) identifier: 3aeea260-bf8a-11ed-ad9b-e8fb1cf77586
        Recovery image location:
        Recovery image index:      0
        Custom image location:
        Custom image index:        0
    
    REAGENTC.EXE: Operation Successful.
    
    C:\Windows\System32>diskpart
    
    Microsoft DiskPart version 10.0.22621.1
    
    DISKPART> list disk
    
      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          953 GB  7168 KB        *
    
    DISKPART> sel disk 0
    
    Disk 0 is now the selected disk.
    
    DISKPART> list part
    
      Partition ###  Type              Size     Offset
      -------------  ----------------  -------  -------
      Partition 1    System             260 MB  1024 KB
      Partition 2    Reserved            16 MB   261 MB
      Partition 3    Primary            952 GB   277 MB
      Partition 4    Recovery           851 MB   953 GB

    Macrium Reflect (used for backup) tells me that Partition 4 is 851 MB Total Size with 84 MB Free Space.

    My question is, once Susan approves installing the 2024-01 Cumulative Update (KB5034123), should I try to install the update, or should I first follow the steps in KB5028997 to manually increase the size of the Recovery Partition by 250 MB?

    Viewing 8 reply threads
    Author
    Replies
    • #2630869

      My question is, once Susan approves installing the 2024-01 Cumulative Update (KB5034123), should I try to install the update,

      Yes, it’s unlikely to fail.

      1 user thanked author for this post.
    • #2630873

      Mini Tool Partition Wizard will make the resizing easier.

      1 user thanked author for this post.
      • #2631154

        Would you also suggest that I install the 2024-01 Cumulative Update, which I expect to be successful as per previous months, and hope that servicing of the Recovery Environment will now succeed, since the corruption repaired by sfc /scannow dealt with WinREAgent? Or, would you suggest that servicing the Recovery Environment will likely not succeed unless I first manually increase the size of the Recovery Partition?

        • #2631168

          I think you have other problems. In File Explorer, highlight C:, right click and choose Properties.
          Make a screen shot and post here. What I’m interested in is the disk size and free space.

          1 user thanked author for this post.
          • #2631185

            Below is a screen shot of the C Drive Properties:

            C-Drive-Properties

            The HP ENVY All-in-One Desktop came with a 1 TB PCIe NVMe M.2 SSD.

    • #2631173

      I get this same critical error, WinREAgent (ID 4502) indicating the “Windows Recovery Environment servicing failed,” once a month every month immediately after the reboot from installing the monthly cummulative updates, as well; but I just ignore it because my HP Envy 17.3 inch Windows 11 23H2 laptop was shipped to me last summer with a 512 Gb ssd with no spinning hard disk data drive and no Windows recovery environment partition, just an RE tools partition that can be used to remount a saved drive image from an external drive once the system reboots in recovery mode. There is no recovery environment partition on this laptop. Since I save a full disk image every month on removable usb media prior to the monthly cummulative updates, I just assume that that is what I would use to recover from any catastrophic problem or failure.

      2 users thanked author for this post.
    • #2631192

      Make a full disk image backup before you start!
      It appears you do have a Win RE partition and plenty of free disk space.

      You can get information about the Win RE by running this command in an elevated Command Prompt:

      Dism /Get-ImageInfo /ImageFile:\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE\winre.wim /index:1
      

      I would try to update first (when you are ready to do so)
      If it fails, I suggest to download Mini Tool Partition Wizard and shrink Partition 3 (OS) by 512MB (just to be future safe) and extend Partition 4 (Win RE) by 512MB. Then retry the update.
      While you are in MTPW, you can look inside the Win RE partition and see what is there.

      1 user thanked author for this post.
      • #2631194

        See additional command above

        1 user thanked author for this post.
        • #2631210

          I ran the command you provided, which returned the following:

          C:\Windows\System32>Dism /Get-ImageInfo /ImageFile:\\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE\winre.wim /index:1
          
          Deployment Image Servicing and Management tool
          Version: 10.0.22621.2792
          
          Details for image : \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE\winre.wim
          
          Index : 1
          Name : Microsoft Windows Recovery Environment (amd64)
          Description : Microsoft Windows Recover Environment (amd64)
          Size : 3,451,525,869 bytes
          WIM Bootable : No
          Architecture : x64
          Hal : <undefined>
          Version : 10.0.22621
          ServicePack Build : 1
          ServicePack Level : 0
          Edition : WindowsPE
          Installation : WindowsPE
          ProductType : WinNT
          ProductSuite :
          System Root : WINDOWS
          Directories : 4037
          Files : 20212
          Created : 2022-05-07 - 12:53:32 AM
          Modified : 2023-03-10 - 4:23:45 PM
          Languages :
                  en-US (Default)
          The operation completed successfully.
      • #2631212

        I always start the monthly update cycle by creating a full disk image with Macrium Reflect.

        So the plan will be to try the Cumulative Update first. If it’s successful, and the Recovery Environment servicing succeeds, I’m done. If the Update is successful, but the Recovery Environment servicing fails, I’ll expand the Recovery partition, and try again in a month with February’s Update. If the Update fails, I’ll expand the Recovery partition, and then retry the Update.

        I noticed that Susan indicated in her last Newsletter that she used a free partition tool to resize her Recovery partition, and “After it ran, the recovery partition was no longer recognized.” I’ll watch for her follow up posts, to see if there’s anything I should avoid.

    • #2631767

      The DISM command above #2631210 shows that the Recovery Environment has only been updated once, when Windows 11 22H2 was installed. The desktop downloaded the 22H2 Feature Update when initially turned on. The DISM command shows Version 10.0.22621, ServicePack Build 1, Modified 2023-03-10.

      Since the desktop is currently running OS Build 22621.2861 after December’s Cumulative Update, the ServicePack Build in the Recovery Environment should indicate 2861 if servicing was successful.

      Unless the Cumulative Update (now January) is able to automatically adjust the size of the Recovery partition (by shrinking the OS partition), it seems unlikely that servicing of the Recovery Environment will be successful.

    • #2634668

      Following up on this, I installed KB5034123 (2024-01 Cumulative Update). The update seemed to be stuck at 70% installing, and took 30 minutes before it completed and was ready to reboot (never had an Update take that long). Before rebooting, the Event Log was already showing Event ID 4502 – Recovery Environment servicing failed. So the Cumulative Update successfully installed (OS Build is now 22621.3007), but the Recovery Environment servicing again failed. I note that PKCano observed the same behaviour on one of his Win11 22H2 desktops (#2627190).

      I ran dism /online /cleanup-image /scanhealth and sfc /scannow both before and after the Update (no corruption or integrity violations found).

      I checked the Recovery Environment both before and after the Update with reagentc /info, Dism /Get-ImageInfo /ImageFile …, and fsutil volume diskfree … The results were identical before and after the Update completed.

      At this point I will follow PKCano’s advise and resize the Recovery Partition prior to attempting next month’s Cumulative Update (using either Microsoft’s command line method or by learning to use Mini Tool Partition Wizard).

    • #2634895

      Please see follow up post under KB5034123.

    • #2645929

      Following up, prior to installing KB5034765 (February’s Cumulative Update) I resized the Recovery partition, adding 500 MB just to be safe. I resized the partition using the procedure in KB5028997, as I am comfortable with the command line, the procedure allows control of all parameters (like gpt attributes), and a reboot is not required. In addition, reagentc /disable moves the Winre.wim file from the Recovery partition to C:\Windows\System32\Recovery, and reagentc /enable moves it back, so nothing is lost by deleting the partition.

      Prior to the resize of the Recovery partition, I noticed a C:\$WinREAgent folder, with Winre.wim in the Backup subfolder (ServicePack Build 1), and Update.wim in the Scratch subfolder (ServicePack Build 3000). As Recovery Environment servicing had failed each month, Winre.wim matched the date when Windows 11 22H2 was installed (and the Winre.wim found in the Recovery parition), and the Update.wim matched the date of the successful install of KB5034123 (January’s Cumulative Update).

      KB5034765 installed successfully (with a single reboot), and, for the first time, Recovery Environment servicing did NOT fail. Afterwards, the C:\$WinREAgent folder was gone, and Winre.wim in the Recovery parition had been updated to ServicePack Build 3000. As the OS Build is now 22621.3155, it’s curious that the Recovery Environment ServicePack Build does not match the OS Build. It’s possible that this may have been the result of the failed updates resulting in the C:\$WinREAgent folder. Perhaps with March’s Cumulative Update, they will match.

    • #2667790

      As a final follow up to this post, the only oddity I’ve noticed after resizing the Recovery partition (by shrinking the Windows partition, then deleting and recreating the Recovery partition) is that Macrium Reflect no longer recognizes the disk image as the same backup set. A new backup set is started/created when the next disk image is created.

    Viewing 8 reply threads
    Reply To: Windows 11 22H2 “Recovery Environment servicing failed”

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: