Issues repairing broken offline windows image

Page 1 of 3 123 LastLast

  1. Posts : 17
    Debian GNU/Linux
       #1

    Issues repairing broken offline windows image


    I have a broken Windows 10 image, possibly caused by a failed update. It currently goes into an automatic repair look. The logfile C:\WINDOWS\System32\Logfiles\Srt\SrtTrail.txt ends with:

    Test Performed:
    ---------------------------
    Name: Check for installed LCU
    Result: Completed successfully. Error code = 0xc1
    Time taken = 8375 ms


    I note that the folder C:\Windows\servicing\LCU contains the folders:

    Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1052.1.13
    Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.985.1.6


    If I remove those two folders and attempt to boot again, the folders are re-created.

    So I suspect that something is wrong with one of these two packages.

    This is where I run into difficulties. I thought I should be able to use sfc and/or dism to remove the packages of otherwise check abd repair my offline image. I put the hard drive into a different computer running Windows 10 and tried everything I could think of, but neither sfc nor dism seems to work. Some examples:

    >dism /image=e:\ /get-features

    Deployment Image Servicing and Management tool
    Version: 10.0.19041.844

    Image Version: 10.0.19041.1052


    Error: 87

    The get-features option is unknown.
    For more information, refer to the help by running DISM.exe /?.

    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log


    >sfc /offbootdir=e:\ /offwindir=e:\windows /scannow

    Windows Resource Protection could not start the repair service.


    The last command also brings up a pop-up window (not copy-pastable - thanks Microsoft) complaining about api-ms-win-base-util-l1-1-0.dll in a temporary folder under AppData.

    Anyway I'd appreciate any suggestions about repairing this image, other than reinstalling Windows or otherwise losing all my installed Applications.
      My Computer


  2. Posts : 5,330
    Windows 11 Pro 64-bit
       #2

    Uninstall last installed and pending Windows updates offline using Dism command,


    Please boot your computer with Windows Installation Media and from Windows Recovery Environment start the Command Prompt.

    Displays information about all packages that are installed by executing below command.


    Code:
    Dism /image:C:\  /Get-Packages
    Found all Windows updates which you can identify by their KB number and take note of the Package Identity entry update (Package) name you want to uninstall. Also take note of the installation date of the update you want to uninstall.

    For example, execute the following command to uninstall the KB4053577 update:

    Code:
    dism  /image:C:\   /Remove-Package  /PackageName:Package_for_KB4053577~31bf3856ad364e35~amd64~~10.0.1.0

    Please replace partition letter C: with Windows installed partition letter. When the computer boots into Windows Recovery Environment (WinRE) environment, the drive letter assign to Windows partition may not be C: drive letter because Windows 7, 8 , 8.1 and 10 creates a separate system partition when it's installed from scratch. The system partition contains boot files WinRE assigns the system partition the C: drive letter and the Windows installed partition will be assigned any other drive letter, usually D: drive letter is assign to Windows installed partition. The Bcdedit /enum | find "osdevice" command can be used to find out the drive letter of the Windows installed partition, the output of the Bcdedit command is similar to this osdevice partition=D:. The drive letter after partition= is the drive letter of the Windows partition.
      My Computer


  3. Posts : 17
    Debian GNU/Linux
    Thread Starter
       #3

    That is what I was hoping to be able to do. But when I try Dism /image:C:\ /Get-Packages I get the same result as when I tried previously. That is, error 87 the get-packages option is unknown.

    Is there possibly something wrong with the installation at C:\ that prevents these tools (sfc, dism) from working? How could I fix that?
      My Computer


  4. Posts : 18,432
    Windows 11 Pro
       #4

    What you want is:
    dism.exe /image:E:\ /cleanup-image /revertpendingactions
      My Computer


  5. Posts : 17
    Debian GNU/Linux
    Thread Starter
       #5

    NavyLCDR said:
    What you want is:
    dism.exe /image:E:\ /cleanup-image /revertpendingactions
    I get the same nonsense: The cleanup-image option is unknown.
      My Computer


  6. Posts : 5,330
    Windows 11 Pro 64-bit
       #6

    avidscavenger said:
    I get the same nonsense: The cleanup-image option is unknown.
    The real cause of this issue is typing wrong commands into the command prompt.
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #7

    FreeBooter said:
    The real cause of this issue is typing wrong commands into the command prompt.

    I agree. They need to make sure they use the correct slashes . . .

    dism.exe /image:E:\ /cleanup-image /revertpendingactions
      My Computer


  8. Posts : 17
    Debian GNU/Linux
    Thread Starter
       #8

    Paul Black said:
    I agree. They need to make sure they use the correct slashes . . .

    dism.exe /image:E:\ /cleanup-image /revertpendingactions
    Thanks for the vote of confidence. But just not to make a fool of myself I went and checked one more time. I'm not going to waste time with photos of screens and the like but I promise you the command I typed was dism.exe /image:C:\ /cleanup-image /revertpendingactions and the response the same old error 87 The cleanup-image option is unknown.
      My Computer


  9. Posts : 18,432
    Windows 11 Pro
       #9

    Are you at the C:\Windows\System32> prompt when you run dism? If not, that is likely your problem. If yes, what is the result of:
    Code:
    dism /?
    Example:

    Code:
    Microsoft Windows [Version 10.0.22000.168]
    (c) Microsoft Corporation. All rights reserved.
    
    C:\Windows\system32>dism /?
    
    Deployment Image Servicing and Management tool
    Version: 10.0.22000.1
    
    
    DISM.exe [dism_options] {Imaging_command} [<Imaging_arguments>]
    DISM.exe {/Image:<path_to_offline_image> | /Online} [dism_options]
             {servicing_command} [<servicing_arguments>]
    
    DESCRIPTION:
    
      DISM enumerates, installs, uninstalls, configures, and updates features
      and packages in Windows images. The commands that are available depend
      on the image being serviced and whether the image is offline or running.
    
    
    FFU COMMANDS:
    
      /Capture-Ffu            - Captures a physical disk image into a new FFU file.
      /Apply-Ffu              - Applies an .ffu image.
      /Split-Ffu              - Splits an existing .ffu file into multiple read-only
                                split FFU files.
      /Optimize-Ffu           - Optimizes a FFU file so that it can be applied to storage
                                of a different size.
    
    WIM COMMANDS:
    
      /Apply-CustomDataImage  - Dehydrates files contained in the custom data image.
      /Capture-CustomImage    - Captures customizations into a delta WIM file on a
                                WIMBoot system. Captured directories include all
                                subfolders and data.
      /Get-WIMBootEntry       - Displays WIMBoot configuration entries for the
                                specified disk volume.
      /Update-WIMBootEntry    - Updates WIMBoot configuration entry for the
                                specified disk volume.
      /List-Image             - Displays a list of the files and folders in a
                                specified image.
      /Delete-Image           - Deletes the specified volume image from a WIM file
                                that has multiple volume images.
      /Export-Image           - Exports a copy of the specified image to another
                                file.
      /Append-Image           - Adds another image to a WIM file.
      /Capture-Image          - Captures an image of a drive into a new WIM file.
                                Captured directories include all subfolders and
                                data.
      /Get-MountedWimInfo     - Displays information about mounted WIM images.
      /Get-WimInfo            - Displays information about images in a WIM file.
      /Commit-Wim             - Saves changes to a mounted WIM image.
      /Unmount-Wim            - Unmounts a mounted WIM image.
      /Mount-Wim              - Mounts an image from a WIM file.
      /Remount-Wim            - Recovers an orphaned WIM mount directory.
      /Cleanup-Wim            - Deletes resources associated with mounted WIM
                                images that are corrupted.
    
    GENERIC IMAGING COMMANDS:
    
      /Split-Image            - Splits an existing .wim file into multiple
                                read-only split WIM (SWM) files.
      /Apply-Image            - Applies an image.
      /Get-MountedImageInfo   - Displays information about mounted WIM and VHD
                                images.
      /Get-ImageInfo          - Displays information about images in a WIM, a VHD
                                or a FFU file.
      /Commit-Image           - Saves changes to a mounted WIM or VHD image.
      /Unmount-Image          - Unmounts a mounted WIM or VHD image.
      /Mount-Image            - Mounts an image from a WIM or VHD file.
      /Remount-Image          - Recovers an orphaned image mount directory.
      /Cleanup-Mountpoints    - Deletes resources associated with corrupted
                                mounted images.
    
    IMAGE SPECIFICATIONS:
    
      /Online                 - Targets the running operating system.
      /Image                  - Specifies the path to the root directory of an
                                offline Windows image.
    
    DISM OPTIONS:
    
      /English                - Displays command line output in English.
      /Format                 - Specifies the report output format.
      /WinDir                 - Specifies the path to the Windows directory.
      /SysDriveDir            - Specifies the path to the system-loader file named
                                BootMgr.
      /LogPath                - Specifies the logfile path.
      /LogLevel               - Specifies the output level shown in the log (1-4).
      /NoRestart              - Suppresses automatic reboots and reboot prompts.
      /Quiet                  - Suppresses all output except for error messages.
      /ScratchDir             - Specifies the path to a scratch directory.
    
    For more information about these DISM options and their arguments, specify an
    option immediately before /?.
    
      Examples:
        DISM.exe /Mount-Wim /?
        DISM.exe /ScratchDir /?
        DISM.exe /Image:C:\test\offline /?
        DISM.exe /Online /?
    
    
    
    C:\Windows\system32>
      My Computer


  10. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #10

    Hello @avidscavenger,

    avidscavenger said:
    Thanks for the vote of confidence. But just not to make a fool of myself I went and checked one more time.

    There was NO malice or detriment attached to my post.

    I have used the wrong slashes loads of time when I have NOT been concentrating or I have been in a rush for example. It is EASILY done. That is why I keep a Notepad file with ALL the Commands in. That way, I can just adapt them if necessary.

    Last edited by Paul Black; 03 Sep 2021 at 12:54.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:16.
Find Us




Windows 10 Forums