Ask a questionAsk a question
 

QuestionDISM trashed itself - how to repair it?

  • Friday, July 03, 2009 8:32 PMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Hi all,

    Bit of a strange one. I seem to have borken DISM in a really bad way and I cannot recover.

    I had been working with a WIM. When I mounted it with DISM, it reached 100% and then hung. Now for the bad part - *all* attempts at using DISM now result in the same fault. I've tried:
    Uninstalling/reinstalling the WIM filter driver
    Different WIMs
    Cleaning the temp directory
    Deleting HKLM\Software\Microsoft\WimMount
    (and all sorts of combinations of the above!)

    Here is the relevant extract from the WIM log:
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: <----- Starting Dism.exe session ----->
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: 
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Host machine information: OS Version=5.1.2600, Running architecture=x86, Number of processors=2
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Executing command line: "c:\docume~1\admini~1\locals~1\temp\winpe\tools\dism.exe"  /mount-wim /index:1 /mountdir:"c:\docume~1\admini~1\locals~1\temp\winpe\WIMMount" /wimfile:"c:\docume~1\admini~1\locals~1\temp\winpe\CDFiles\sources\tempboot.wim"
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Loading Provider from location c:\docume~1\admini~1\locals~1\temp\winpe\tools\WimProvider.dll - CDISMProviderStore::Internal_GetProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Connecting to the provider located at c:\docume~1\admini~1\locals~1\temp\winpe\tools\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Loading Provider from location c:\docume~1\admini~1\locals~1\temp\winpe\tools\FolderProvider.dll - CDISMProviderStore::Internal_GetProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Connecting to the provider located at c:\docume~1\admini~1\locals~1\temp\winpe\tools\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Provider has not previously been encountered.  Attempting to initialize the provider. - CDISMProviderStore::Internal_GetProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Loading Provider from location c:\docume~1\admini~1\locals~1\temp\winpe\tools\CompatProvider.dll - CDISMProviderStore::Internal_GetProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Connecting to the provider located at c:\docume~1\admini~1\locals~1\temp\winpe\tools\CompatProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: WimManager.
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
    2009-07-03 21:18:37, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Getting Provider WimManager - CDISMProviderStore::GetProvider
    2009-07-03 21:18:37, Info                  DISM   DISM Provider Store: PID=636 Provider has previously been initialized.  Returning the existing instance. - CDISMProviderStore::Internal_GetProvider
    2009-07-03 21:24:47, Error                 DISM   DISM WIM Provider: PID=636 Failed to mount the image. - CWimImageInfo::Mount(hr:0xc142011a)
    2009-07-03 21:24:48, Error                 DISM   DISM WIM Provider: PID=636 e:\win7rc\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:999 - CWimManager::InternalOpMount(hr:0xc142011a)
    2009-07-03 21:24:48, Error                 DISM   DISM WIM Provider: PID=636 e:\win7rc\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:2247 - CWimManager::InternalCmdMount(hr:0xc142011a)
    2009-07-03 21:24:48, Error                 DISM   DISM WIM Provider: PID=636 Error executing command - CWimManager::InternalExecuteCmd(hr:0xc142011a)
    2009-07-03 21:24:48, Error                 DISM   DISM WIM Provider: PID=636 e:\win7rc\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:516 - CWimManager::ExecuteCmdLine(hr:0xc142011a)
    2009-07-03 21:24:48, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.
    2009-07-03 21:24:48, Info                  DISM   DISM.EXE: 
    2009-07-03 21:24:48, Info                  DISM   DISM.EXE: <----- Ending Dism.exe session ----->
    2009-07-03 21:24:48, Info                  DISM   DISM.EXE: 
    2009-07-03 21:24:48, Info                  DISM   DISM Image Session: PID=636 Disconnecting the provider store - CDISMImageSession::Final_OnDisconnect
    2009-07-03 21:24:48, Info                  DISM   DISM Provider Store: PID=636 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
    2009-07-03 21:24:48, Info                  DISM   DISM Provider Store: PID=636 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
    2009-07-03 21:24:48, Info                  DISM   DISM Provider Store: PID=636 Found the OSServices.  Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2009-07-03 21:24:48, Info                  DISM   DISM Provider Store: PID=636 Disconnecting Provider: Compatibility Manager - CDISMProviderStore::Internal_DisconnectProvider
    2009-07-03 21:24:48, Info                  DISM   DISM Provider Store: PID=636 Releasing the local reference to DISMLogger.  Stop logging. - CDISMProviderStore::Internal_DisconnectProvider
    
    Really beating my head off the wall now. I'm sure there must be an easy solution - but I can't find it....

    This version of DISM is from the RC WAIK.

    Suggestions welcomed!

    Cheers,
    Mike

All Replies

  • Friday, July 03, 2009 10:07 PMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Doh,

    I forgot to include the output from the command line when it crashes:

    C:\Documents and Settings\Administrator\Local Settings\Temp\winpe\Tools>dism /mo
    unt-wim /index:1 /mountdir:c:\wimtest /wimfile:..\cdfiles\sources\tempboot.wim
    
    Deployment Image Servicing and Management tool
    Version: 6.1.7100.0
    
    Mounting image
    [==========================100.0%==========================]
    
    Error: 0xc142011a
    
    Imagex timed out while waiting for the wimmount extractor process to initialize.
    
    
    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

    And that leads to the crash and log as detailed in the above message.

    Cheers,
    Mike
  • Friday, July 03, 2009 10:33 PMLawrence GarvinMVP, AnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I don't know much about DISM, so take that with the grain of salt it richly deserves....

    But I can't help notice this line in the logfile.. which seems pretty straightforward.

    Error                 DISM   DISM WIM Provider: PID=636 Failed to mount the image.

    The question would then seem to be WHY? did the image fail to mount.

    I'm a bit confused about the syntax in this command. Maybe my confusion is an indication of where the issue might be?

    dism /mount-wim /index:1 /mountdir:c:\wimtest /wimfile:..\cdfiles\sources\tempboot.wim

    My gut tells me that the target of /wimfile: needs to be an absolute pathname.

    Also, I found this 5 minute screencast on Technet.
    http://technet.microsoft.com/en-us/windows/dd320284.aspx
    Lawrence Garvin, M.S., MCITP:EA, MCDBA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2009)
  • Friday, July 03, 2009 10:37 PMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks for that, but I have tried fully qualified WIMs.

    The strange thing is it all used to work until it just randomly hung on this single mount. And since then all bets are off :-(

    It's like DISM seems to have an internal state stored someplace that needs reset. I'm suspecting that *something* has corrupted *something* in the registry related to DISM or the WIM Filter. But there is nothing obvious....

    Cheers,
    Mike
  • Friday, July 03, 2009 10:45 PMLawrence GarvinMVP, AnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The other thing that occurs to me.. this tool is designed for use on VistaSP1.. so there has to be *production* support services .. blogs, forums, etc. somewhere. I'm searching through to see if I can find a resource -- but that might be the best option other than these Win7 pre-release forums.
    Lawrence Garvin, M.S., MCITP:EA, MCDBA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2009)
  • Friday, July 03, 2009 10:47 PMLawrence GarvinMVP, AnswererUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    btw, i did find confirmation.. the /wimfile value must be an absolute pathname, including the explicit naming of the *.WIM file.
    http://technet.microsoft.com/en-us/library/dd744382(WS.10).aspx

    Here's the example from that page:
    Dism /Get-WimInfo /WimFile:C:\test\offline\install.wim /index:1

    Lawrence Garvin, M.S., MCITP:EA, MCDBA
    Principal/CTO, Onsite Technology Solutions, Houston, Texas
    Microsoft MVP - Software Distribution (2005-2009)
  • Friday, July 03, 2009 11:05 PMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ok, I'm coming to the conclusion that DISM just hates me.

    I've been using fully qualified names without any success. So eventually I gave up and down-leveled to imagex. Everything worked. I then ran DISM. Everything worked (!!!!!). I ran DISM again - and the darn thing has hung again.

    This is pointing to some form of DISM internal state issue. ImageX seems to be able to "reset" it, but that's not really a solution.

    Cheers,
    Mike
  • Friday, July 03, 2009 11:06 PMVistaGuyRay Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Did you try mounting the WIM file using imagex.exe? Does that give you the same error?

    Are you able to mount the WIM file on another system? It could be that the file is corrupt.
    Ray
  • Friday, July 03, 2009 11:09 PMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The WIM is fine and works fine on other systems :-)

    ImageX works fine (so far), but MS have pointed out that ImageX is deprecated in favour of DISM. That's all well and fine but if the tool doesn't work then it's not possible to move :-(

    Cheers,
    Mike
  • Friday, July 03, 2009 11:14 PMVistaGuyRay Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Good that you are able to access the WIM file.

    Where did you read that Micrososft deprecated imagex?

    ImageX still is the only tool able to capture and apply WIM files. I don't think it is gonna leave us soon. The only advantage of DISM for mounting WIM files is that it is part of the operating system and built in Windows PE while ImageX is part of the AIK.
    Ray
  • Friday, July 03, 2009 11:18 PMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Yup - something in the new "WIM server" is definitely busted.

    ImageX Tool for Windows
    Copyright (C) Microsoft Corp. All rights reserved.
    Version: 6.1.7100.0

    Mounting: [C:\Documents and Settings\Administrator\Local Settings\Temp\winpe\CDF
    iles\sources\tempboot.wim, 1] -> [c:\wimtest2]...

    [ 100% ] Mounting progress

    Error mounting image.

    Imagex timed out while waiting for the wimmount extractor process to
    initialize.

    That happens after DISM trashes the setup (but before a reboot).

    So
    Reboot->ImageX->DISM=Ok
    Reboot->DISM=Hang
    Reboot->ImageX->DISM->ImageX=Hang

    As soon as DISM has run "once" succesfully, all bets are off. Also, once DISM throws its toys out the pram the WIMSERV.EXE process is unusable. Cant kill it via task manager, taskkill, pskill. Its seriously zombified even though it's running in user space.

    As WIMSERV is the interface, it looks like DISM is stomping on it and nothing else can touch it. If you reboot ImageX can play nicely. Then DISM can play nicely (once). And then DISM craps in the cornflakes and no-one wants to eat there any more.

    I'm not liking DISM ;-)

    Cheers,
    Mike
  • Friday, July 03, 2009 11:22 PMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ray,

    Apologies, imagex is not deprecated. Quite a few of the other older tools are i.e.  pkgmgr, PEImg, and IntlConfg

    http://msdn.microsoft.com/en-us/library/dd371719%28VS.85%29.aspx

    Cheers,
    Mike
  • Friday, July 03, 2009 11:32 PMVistaGuyRay Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Then I would say, use ImageX on this system until you rebuild it with RTM.

    Something definitely went wrong with DISM on this system, but I think you will have a hard time finding the issue. I would use System Restore to get it back to its state before the issue first occurred. Or did you experience this behavior of DISM on other systems also?
    Ray
  • Saturday, July 04, 2009 9:35 AMUncle Mike Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I've not tried DISM on other systems yet. Rebuild is currently not an option but I will down-level to ImageX. I've always hated the idea of rebuilds because the root cause is unsolved :-)

    I'll try another machine on Monday and see if I can replicate this issue.

    Cheers,
    Mike