SAFE_OS, REPLICATE_OC errors upgrading Windows 10

3

I've discovered that a PC is running Windows 10 Pro version 1709 which has been out of support since 2019/04/09 so I'm trying to upgrade it but it keeps failing.

Attempting up upgrade via Windows Update fails with error A current driver on your PC may be better than the driver we're trying to install. We'll keep trying to install..

Attempting to upgrade via installation media fails with the following errors:

0x8007001F - 0x20006
The installation failed in the SAFE_OS phase with an error during REPLICATE_OC operation

enter image description here

Thus far, I have tried everything that I can find online and more:

  1. Ensured that the system drive has sufficient storage space available.
  2. Run the Windows Update Troubleshooter as admin which reportedly found and fixed the following problems:
    • Potential Windows Update Database error detected
    • Windows Update components must be repaired
    • Check for pending updates
  3. Run the following commands as admin:
    3a. net stop wuauserv
    3b. net stop bits
    3c. ren c:\windows\SoftwareDistribution SoftwareDistribution.old
    3d. net start wuauserv
    3e. net stop bits
  4. Stopped the Windows service cryptsvc, moved all files from %systemroot%\system32\catroot2\ to %systemroot%\system32\catroot2.old, and re-started the service.
  5. .old-ed the folder C:\$WINDOWS.~BT\.
  6. Deleted the folder C:\Windows10Upgrade\ and re-run the Windows 10 Update Assistant.
  7. Run the command sfc /scannow as admin which reported no problems:

    Beginning system scan.  This process will take some time.
    
    Beginning verification phase of system scan.
    Verification 100% complete.
    
    Windows Resource Protection did not find any integrity violations.
    
  8. Run the command dism /online /cleanup-image /scanhealth as admin which reported no problems:

    Deployment Image Servicing and Management tool
    Version: 10.0.16299.15
    
    Image Version: 10.0.16299.431
    
    [==========================100.0%==========================] No component store corruption detected.
    The operation completed successfully.
    
  9. Run the command DISM /online /Cleanup-Image /RestoreHealth as admin which reported no problems:

    Deployment Image Servicing and Management tool
    Version: 10.0.16299.15
    
    Image Version: 10.0.16299.431
    
    [==========================100.0%==========================] The restore operation completed successfully.
    The operation completed successfully.
    
  10. Run the command chkdsk /scan as admin which reported no problems:

    The type of the file system is NTFS.
    
    Stage 1: Examining basic file system structure ...
      2055168 file records processed.
    File verification completed.
      12866 large file records processed.
      0 bad file records processed.
    
    Stage 2: Examining file name linkage ...
      26874 reparse records processed.
      2699910 index entries processed.
    Index verification completed.
      0 unindexed files scanned.
      0 unindexed files recovered to lost and found.
      26874 reparse records processed.
    
    Stage 3: Examining security descriptors ...
    Security descriptor verification completed.
      322372 data files processed.
    CHKDSK is verifying Usn Journal...
    Usn Journal verification completed.
    
    Windows has scanned the file system and found no problems.
    No further action is required.
    
    233916415 KB total disk space.
    185713784 KB in 1632128 files.
        724380 KB in 322373 indexes.
             0 KB in bad sectors.
       2138943 KB in use by the system.
         65536 KB occupied by the log file.
      45339308 KB available on disk.
    
          4096 bytes in each allocation unit.
      58479103 total allocation units on disk.
      11334827 allocation units available on disk.
    
  11. Downloaded an official ISO of Windows 10 v1909 64-bit, mounted it, and run setup.exe.

  12. Downloaded an official ISO of Windows 10 v1903 64-bit, mounted it, and run setup.exe.
  13. Found that device drivers were up to date.
  14. Updated the BIOS firmware to the latest version.
  15. Used the method documented at https://errortools.com/windows/how-to-fix-safe_os-phase-error-during-replicate_oc-operation-error-in-windows-10/ to remove the files \Windows\System32\mcupdate_GenuineIntel.dll from the installation media.

I've now run out of ideas, out-of-band management isn't available, and physical access is risky due to Coronavirus / COVID-19.

Can anyone help?

 

Update 2020/05/04 17:05:

In answer to Ramhound's comment #1:
1. No, all user profiles are solely on the system drive (C:).
2. I downloaded and ran SetupDiag v1.6 (latest) from https://docs.microsoft.com/en-us/windows/deployment/upgrade/setupdiaghttps://go.microsoft.com/fwlink/?linkid=870142 which reported the following:

Matching Profile found: OptionalComponentOpenPackageFailed - 22952520-EC89-4FBD-94E0-B67DF88347F6
SetupDiag version: 1.6.0.0
System Information:
    Machine Name = [REDACTED]
    Manufacturer = FUJITSU
    Model = ESPRIMO E410
    HostOSArchitecture = 2057
    FirmwareType = PCAT
    BiosReleaseDate = 20150422000000.000000+000
    BiosVendor = BIOS Date: 04/22/15 12:46:17 Ver: 04.06.05
    BiosVersion = V4.6.5.3 R1.30.0 for D3120-A1x
    HostOSVersion = 10.0.16299
    HostOSBuildString = 16299.431.amd64fre.rs3_release_svc_escrow.180502-1908
    TargetOSBuildString = 10.0.17134.1 (rs4_release.180410-1804)
    HostOSLanguageId = 
    HostOSEdition = Professional
    RegisteredAV = Webroot SecureAnywhere
    FilterDrivers = FileInfo
    UpgradeStartTime = 04/05/2020 10:47:29
    UpgradeEndTime = 04/05/2020 12:30:10
    UpgradeElapsedTime = 01:42:41
    CV = xaR0eqEoHEKd2Og6
    ReportId = 


Error: SetupDiag reports Optional Component installation failed to open OC Package.
Last Phase: Safe OS 
Last Operation: Gather Optional Component status
Package Name: Foundation
Error: 0x8007001F

Refer to "https://support.microsoft.com/en-us/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness" for possible remediation information.
Recommend you check the "Windows Modules Installer" service (Trusted Installer) is started on the system and set to automatic start, reboot and try the update again.  Optionally, you can check the status of optional components on the system (search for Windows Features), uninstall any unneeded optional components, reboot and try the update again.

Last Setup Phase:
Phase Name: Safe OS
    Phase Started: 04/05/2020 12:30:01
    Phase Ended: 01/01/0001 00:00:00
    Phase Time Delta: 00:00:00
    Completed Successfully? False


Last Setup Operation:
Operation Name: Gather Optional Component status
    Operation Started: 04/05/2020 12:30:02
    Operation Ended: 01/01/0001 00:00:00
    Operation Time Delta: 0:00:00:00.0000000
    Completed Successfully? False

Interestingly, I opened appwiz.cplTurn Windows features on or off to see what optional components are instaled and it simply doesn't load anything:

enter image description here

This led me to https://support.microsoft.com/en-gb/help/947821/fix-windows-update-errors-by-using-the-dism-or-system-update-readiness so I ran the following PowerShell commands:

PS C:\WINDOWS\system32> Dism /Mount-Image /ImageFile:C:\Windows10v1909\sources\boot.wim /index:1 /MountDir:C:\Users\$Env:userName\Desktop\Mount

Deployment Image Servicing and Management tool
Version: 10.0.16299.15

Mounting image
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32> Dism /Online /Cleanup-Image /RestoreHealth /Source:C:\Users\$Env:userName\Desktop\Mount\windows /LimitAccess

Deployment Image Servicing and Management tool
Version: 10.0.16299.15

Image Version: 10.0.16299.431

[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.
PS C:\WINDOWS\system32>

The upgrade to v1909 failed in the same way, though.

In answer to Ramhound's comment #2: I'm unsure how I didn't happen across that post during my research but, in any case, I used my file Windows_10_EnglishUK_1803_April2018Update_64bit.iso to attempt a direct-path upgrade which failed in the same way:

enter image description here

In answer to John's comment: I tried using MediaCreationTool1909.exeUpgrade this PC now but that failed in the same way.

In answer to JW0914's comment:
1. The file C:\Windows\Logs\CBS\CBS.log has the following new entries in it (there were actually ~48 of the lines App1: but I couldn't fit them all in):

2020-05-04 15:50:42, Info                  CBS    Failed to find a matching version for servicing stack: C:\WINDOWS\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.16299.428_none_1704c21831ffb4a8\ [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
2020-05-04 15:50:42, Info                  CBS    Failed to find servicing stack directory in online store. [HRESULT = 0x80070490 - ERROR_NOT_FOUND]
2020-05-04 15:50:42, Info                  CBS    Loaded Servicing Stack v10.0.16299.428 with Core: C:\WINDOWS\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.16299.428_none_1704c21831ffb4a8\cbscore.dll
2020-05-04 15:50:42, Info                  CBS    Failed to internally open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:50:42, Info                  CBS    Failed to create open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:50:42, Info                  CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]
2020-05-04 15:50:42, Info                  CBS    Session: 30810659_1653900665 initialized by client WindowsUpdateAgent, external staging directory: (null), external registry directory: (null
2020-05-04 15:50:42, Info                  CBS    Failed to internally open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:50:42, Info                  CBS    Failed to create open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:50:42, Info                  CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]
2020-05-04 15:50:45, Info                  CBS    WU creates the package, AppID:Dynamic Update, UpdateID:{33D6CF13-224E-459B-AD4F-AF8C5E3CC469}, revision: 202
2020-05-04 15:50:45, Info                  CBS    Session: 30810659_1685496589 initialized by client WindowsUpdateAgent, external staging directory: (null), external registry directory: (null
2020-05-04 15:50:46, Info                  CBS    WU creates the package, AppID:Dynamic Update, UpdateID:{CAEF987D-2E08-49D8-8C68-5D6FA9F801E2}, revision: 200
2020-05-04 15:50:46, Info                  CBS    Session: 30810659_1690150083 initialized by client WindowsUpdateAgent, external staging directory: (null), external registry directory: (null
2020-05-04 15:50:46, Info                  CBS    Appl: detect Parent, Package: Package_for_KB4497165~31bf3856ad364e35~amd64~~10.0.4.1, Parent: Microsoft-Windows-WinPE-Package~31bf3856ad364e35~amd64~~10.0.18362.1, Disposition = Detect, VersionComp: EQ, BuildComp: EQ, RevisionComp: EQ, Exist: present
2020-05-04 15:50:46, Info                  CBS    Appl: detectParent (exact match): Parent: Microsoft-Windows-WinPE-Package~31bf3856ad364e35~amd64~~10.0.18362.1, parent state: Absent
2020-05-04 15:50:46, Info                  CBS    Appl: Evaluating package applicability for package Package_for_KB4497165~31bf3856ad364e35~amd64~~10.0.4.1, applicable state: Absent
2020-05-04 15:52:19, Info                  CBS    Session: 30810659_2621054062 initialized by client Setup360, external staging directory: (null), external registry directory: (null
2020-05-04 15:52:20, Info                  CBS    Session: 30810659_2633102031 initialized by client OCLib, external staging directory: (null), external registry directory: (null
2020-05-04 15:52:20, Info                  CBS    Not able to find an installed package package from moniker: @Foundation [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:52:20, Info                  CBS    Failed to resolve package from moniker [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:52:20, Info                  CBS    Failed to create open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:52:20, Info                  CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]
2020-05-04 15:53:00, Info                  CBS    Session: 30810659_3031483361 initialized by client WinMgmt, external staging directory: (null), external registry directory: (null
2020-05-04 15:53:00, Info                  CBS    Not able to find an installed package package from moniker: @Foundation [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:53:00, Info                  CBS    Failed to resolve package from moniker [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:53:00, Info                  CBS    Failed to create open package. [HRESULT = 0x800f0805 - CBS_E_INVALID_PACKAGE]
2020-05-04 15:53:00, Info                  CBS    Failed to OpenPackage using worker session [HRESULT = 0x800f0805]
2020-05-04 15:55:00, Info                  CBS    Trusted Installer is shutting down because: SHUTDOWN_REASON_AUTOSTOP
2020-05-04 15:55:00, Info                  CBS    TiWorker signaled for shutdown, going to exit.
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: ExecutionEngineFinalize
2020-05-04 15:55:00, Info                  CBS    Execution Engine Finalize
2020-05-04 15:55:00, Info                  CBS    Execution Engine Finalize
2020-05-04 15:55:00, Info                  CBS    Ending the TiWorker main loop.
2020-05-04 15:55:00, Info                  CBS    Starting TiWorker finalization.
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: ManifestCacheFinalize
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: ExecutionEngineFinalize
2020-05-04 15:55:00, Info                  CBS    CBS Engine already deativated
2020-05-04 15:55:00, Info                  CBS    CBS Engine already deativated
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: ComponentAnalyzerFinalize
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: PackageTrackerFinalize
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: CoreResourcesUnload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: SessionManagerFinalize
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: CapabilityManagerFinalize
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: PublicObjectMonitorFinalize
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: Enter vCoreInitializeLock
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: WcpUnload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: DrupUnload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: CfgMgr32Unload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: DpxUnload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: SrUnload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: CbsEsdUnload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: CbsTraceInfoUninitialize
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: CbsEventUnregister
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: AppContainerUnload
2020-05-04 15:55:00, Info                  CBS    CbsCoreFinalize: WdsUnload, logging from cbscore will end.
2020-05-04 15:55:00, Info                  CBS    Ending TiWorker finalization.
2020-05-04 15:55:00, Info                  CBS    Ending the TrustedInstaller main loop.
2020-05-04 15:55:00, Info                  CBS    Starting TrustedInstaller finalization.
2020-05-04 15:55:00, Info                  CBS    Ending TrustedInstaller finalization.

The recommendations for fixing error 0x800f0805 - CBS_E_INVALID_PACKAGE seems to be resetting Windows Update components which I've already tried.

 
2. I ran the commands (output below - I'm unsure what's up with that 20 %) and tried again but the upgrade failed in the same way.

PS C:\WINDOWS\system32> DISM /Online /Cleanup-Image /StartComponentCleanup

Deployment Image Servicing and Management tool
Version: 10.0.16299.15

Image Version: 10.0.16299.431

[===========                20.0%                          ]
The operation completed successfully.
PS C:\WINDOWS\system32> DISM /Online /Cleanup-Image /RestoreHealth

Deployment Image Servicing and Management tool
Version: 10.0.16299.15

Image Version: 10.0.16299.431

[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.
PS C:\WINDOWS\system32> SFC /ScanNow

Beginning system scan.  This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection did not find any integrity violations.
PS C:\WINDOWS\system32>

In answer to Ramhound's comment #3: To determine whether KB3022345 was installed, I tried:

  • Running CMD command wmic qfe list brief /format:texttablewsys | find "KB3022345" but it reported No Instance(s) Available.
  • Running PowerShell command Get-Hotfix but it outputted absolutely nothing.
  • Running CMD command systeminfo.exe but it outputted Hotfix(s): N/A, among everything else.
  • Using regedit.exe to search all keys, values, and data for KB3022345 but nothing was found.
  • As per https://www.sysnative.com/forums/threads/windows-seven-cant-update.30365/post-286650, running administrative CMD command reg load HKLM\COMPONENTS C:\WINDOWS\SYSTEM32\CONFIG\COMPONENTS which completed successfully then using Farbar Recovery Scan Tool 64-bit version 03-05-2020 (latest) to search the registry for KB3022345 which outputted the following:

    Farbar Recovery Scan Tool (x64) Version: 03-05-2020
    Ran by <username> (04-05-2020 16:50:19)
    Running from C:\Users\<username>\Desktop
    Boot Mode: Normal
    
    ================== Search Registry: "KB3022345" ===========
    
    
    ====== End of Search ======
    

 

Update 2020/05/07 15:52:

In answer to JW0914's comment: I mounted my file Windows_10_EnglishUK_1909_November2019Update_64bit.iso and ran the recommended commands which outputted the following:

PS C:\WINDOWS\system32> DISM /Get-WIMinfo /WIMfile:D:\sources\install.esd

Deployment Image Servicing and Management tool
Version: 10.0.16299.15

Details for image : D:\sources\install.esd

Index : 1
Name : Windows 10 S
Description : Windows 10 S
Size : 15,717,444,845 bytes

Index : 2
Name : Windows 10 S N
Description : Windows 10 S N
Size : 14,651,579,555 bytes

Index : 3
Name : Windows 10 Home
Description : Windows 10 Home
Size : 15,528,886,602 bytes

Index : 4
Name : Windows 10 Home N
Description : Windows 10 Home N
Size : 14,465,481,381 bytes

Index : 5
Name : Windows 10 Home Single Language
Description : Windows 10 Home Single Language
Size : 15,531,153,450 bytes

Index : 6
Name : Windows 10 Education
Description : Windows 10 Education
Size : 15,719,400,830 bytes

Index : 7
Name : Windows 10 Education N
Description : Windows 10 Education N
Size : 14,648,998,694 bytes

Index : 8
Name : Windows 10 Pro
Description : Windows 10 Pro
Size : 15,719,526,598 bytes

Index : 9
Name : Windows 10 Pro N
Description : Windows 10 Pro N
Size : 14,649,755,740 bytes

The operation completed successfully.
PS C:\WINDOWS\system32> DISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:D:\sources\install.esd:8 /LimitAccess

Deployment Image Servicing and Management tool
Version: 10.0.16299.15

Image Version: 10.0.16299.431

[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.
PS C:\WINDOWS\system32>

The upgrade to v1909 failed in the same way again.

In answer to Ramhound's comment: I found that Webroot SecureAnywhere:

  1. Is not listed in appwiz.cpl.
  2. Cannot be uninstalled via administrative command "C:\Program Files (x86)\Webroot\WRSA.exe" -uninstall because all it does is cause a wordless warning window to prompt asking yes or no and neither option works.
  3. Is not detected by Revo Uninstaller.
  4. Cannot be repaired (installed over) using http://anywhere.webrootcloudav.com/zerol/wsainstall.exe, https://anywhere.webrootcloudav.com/zerol/wsasme.exe, or https://anywhere.webrootcloudav.com/zerol/wsasme.msi as the EXEs simply cause the UI to open and the MSI did fix the appwiz.cpl listing but nothing else.

I think I'm just going to have to reinstall Windows.

windows-10
windows-10-upgrade
asked on Super User May 4, 2020 by mythofechelon • edited May 7, 2020 by mythofechelon

2 Answers

0

I manually flattened the installation of Windows 10 v1709 and installed Windows 10 v1909 with no issues at all.

answered on Super User May 10, 2020 by mythofechelon
-1

I had the same issue while upgrading Windows 7 to 10 through local extracted ISO file placed on network. It turned out to be some missing drivers on intel chip-set. Install all drivers and error will disappear.

answered on Super User Aug 7, 2020 by Imran Jabbar

User contributions licensed under CC BY-SA 3.0