DISM - how to really mount an offline image

Author Johnny Josefsson on March 18, 2011 | Print | Bookmark
You need Windows 7 (x64) with WAIK installed

You need the source of a image, like Windows Server 2008 R2 that this was specifically tested on.


1)
-----------------------------------------------------------------------------------------------------------------
> Open a (elevated) cmd window or preferably the nice Console2 sourceforge application. 
   Which unfortunately don't work in W2k8R2 Core Edition


2)
-----------------------------------------------------------------------------------------------------------------
> Mount the "install.wim" to an offline folder
 dism /Mount-WIM /WimFile:E:\images\windows2k8r2\w2k8r2\sources\install.wim /index:6
 /MountDir:D:\images\windows2k8R2\w2k8r2_dsim   <,
                                                  \this is the dir for the /Image:
  /index6 - Seventh OS image within the Windows Server 2008 R2 ISO image file DATACENTERCOREEDITION
          dism /Get-WimInfo /WimFile:E:\images\windows2k8r2\w2k8r2\sources\install.wim

> Get status of mount
 dism /Get-MountedWimInfo


3)
-----------------------------------------------------------------------------------------------------------------
> Mount the "offline" image and a sandbox/sctrachdir
 dism /Image:D:\images\windows2k8R2\w2k8r2_dsim /scratchdir:E:\images\scratchdir


4a)
-----------------------------------------------------------------------------------------------------------------
> use dism /? to execute those command you like to modify the image
dism /Image:D:\images\windows2k8R2\w2k8r2_dsim /scratchdir:E:\images\scratchdir /Get-Features /Format:Table
 -- list all features and their enable/disable status

dism /Image:D:\images\windows2k8R2\w2k8r2_dsim /scratchdir:E:\images\scratchdir /Disable-Feature
 /FeatureName:ServerCore-WOW64
 -- disable the 32-bit support of the server 

dism /Image:D:\images\windows2k8R2\w2k8r2_dsim /scratchdir:E:\images\scratchdir /Disable-Feature
 /FeatureName:ServerCore-EA-IME
 -- disable the 32-bit support of the server 

dism /Image:D:\images\windows2k8R2\w2k8r2_dsim /scratchdir:E:\images\scratchdir /Enable-Feature
 /FeatureName:TelnetClient
 -- enable the telnet client, always needed in network troubleshooting scenarios....

4b)
-----------------------------------------------------------------------------------------------------------------
> to write your changes to a XML unattended configuration file do this
 dism /image:D:\images\windows2k8R2\w2k8r2_dsim /Apply-Unattend:D:\images\windows2k8R2\w2k8r2_dsim_unattend.xml 

4c)
> if you rellay want to clean up image after changes regarding SP:s
 dism /image:D:\images\windows2k8R2\w2k8r2_dsim /cleanup-Image /spsuperseded


5)
-----------------------------------------------------------------------------------------------------------------
> Commit the offline image
 dism /Commit-Wim /MountDir:D:\images\windows2k8R2\w2k8r2_dsim /scratchdir:E:\images\scratchdir /commit
> Commit and unmount the offline image
 dism /Unmount-WIM /MountDir:D:\images\windows2k8R2\w2k8r2_dsim /Commit
> Discard and unmount the offline image
 dism /Unmount-WIM /MountDir:D:\images\windows2k8R2\w2k8r2_dsim /Discard


6)
-----------------------------------------------------------------------------------------------------------------
> Create ISO again
 oscdimg -n -bE:D:\boot\etfsboot.com D:\images\windows2k8R2\w2k8r2_dsim E:\images\windows2k8R2\w2k8r2_dsim.iso



-----------------------------------------------------------------------------------------------------------------
This article was used to understand this:
http://technet.microsoft.com/en-us/library/dd744342(WS.10).aspx

Was this article helpful?

Yes No

Category: Server 2008 and 2008 R2, dism

Last updated on March 23, 2011 with 1265 views