# MDT Tutorial Part 11: Troubleshooting Part 6: Unable to mount the WIM, so the update process cannot continue

## What These Guides Are Not: A guide to fix all issues you’re going to encounter.

We’re going to role-play a bunch of scenarios and try to work through them.  Remember in math where you had to show your work?  Well, what follows is like that which is why this post is [more than] a [little] lengthy.

## Unable to mount the WIM, so the update process cannot continue

When updating your deployment share it fails almost immediately with error Unable to mount the WIM, so the update process cannot continue.

This slideshow requires JavaScript.

Error Text:


=== Making sure the deployment share has the latest x86 tools ===

=== Processing LiteTouchPE (x86) boot image ===

Building requested boot image profile.
Determining if any changes have been made in the boot image configuration.
No existing boot image profile found for platform x86 so a new image will be created.
Calculating hashes for requested content.
Changes have been made, boot image will be updated.
Windows PE WIM C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\en-us\winpe.wim will be used.
Unable to mount the WIM, so the update process cannot continue.

=== Completed processing platform x86 ===

=== Making sure the deployment share has the latest x64 tools ===

=== Processing LiteTouchPE (x64) boot image ===

Building requested boot image profile.
Determining if any changes have been made in the boot image configuration.
No existing boot image profile found for platform x64 so a new image will be created.
Calculating hashes for requested content.
Changes have been made, boot image will be updated.
Windows PE WIM C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim will be used.
Unable to mount the WIM, so the update process cannot continue.

=== Completed processing platform x64 ===

=== Processing complete ===



You might try a variety of things like:

• Use DISM to get-wiminfo to confirm the WIMs are OK
• Bounce the MDT machine
• Perform a repair installation of the ADK
• Use DISM to mount the WIM manually and you get an error 577

# Copypasta Closing

Hopefully these examples will help give you an idea of the overall troubleshooting process.  Most of the time the problems you’ll encounter will be caused by a typso, order of operations or a ‘known issue’ that requires a specific process to be followed.

As you make changes to your environment, here’s what I recommend:

• Be diligent about keeping a change log so you can easily backtrack
• Backup your CS.INI or Bootstrap.ini before you make any changes
• Backup your ts.xml or unattend.xml (in DeploymentShare\Control\TaskSequenceID) before you make any changes
• Introduce small changes at time with set checkpoints in between and set milestones markers where you backup core files (e.g cs.ini bootstrap.ini ts.xml unattend.xml etc) to help minimize frustration troubleshooting.

And if when you do run into some turbulence, upload relevant logs (at least smsts.log but be prepared to submit others depending on the issue) to a file sharing service like OneDrive, post on TechNet then give a shout to your resources on Twitter.

Good Providence to you!

# Today’s agenda: Install Software

• Install the Windows Assessment & Deployment Kit (ADK)
• Install the Microsoft Deployment Toolkit (MDT)

If you read my last post I recommended running the ADK installation and selecting the option to download the files locally in preparation for the installation.  The reason for that is due to the nature of the ADK installation: The bits are retrieved on demand and it takes a while.  It’s very much as game of Hurry Up and Wait!

Run the ADK installation & optionally change the installation path

Decide whether you want to share statistics

Read over the EULA and if you agree, click accept

When you get to the feature selection stage, everything will be checked.  Uncheck everything except

1. Deployment Tools
2. Windows Preinstallation Environment (Windows PE)

I personally also recommend checking:

1. Imaging and Configuration Designer (ICD)
2. Configuration Designer
3. User State Migration Toolkit (USMT)

If you downloaded it locally, the installation should move at a decent clip and finish swiftly.  Stand up, stretch, take a quick walk & grab some water.

## Known Issue

There’s a known issue with the Windows Assessment & Deployment Kit (ADK) where the following prompt is displayed on systems due to two files being signed with an older certificate.

This is a well documented bug:

Fortunately this is easily fixed by applying the patch and instructions and code are included:


xcopy ".\amd64\wimmount.sys" "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\DISM\wimmount.sys"

xcopy ".\x86\wimmount.sys" "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\x86\DISM\wimmount.sys"

xcopy ".\arm64\wimmount.sys" "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\arm64\DISM\wimmount.sys"



Or you can use the workaround suggested by Michael Niehaus.

# MDT Installation

This is a straightforward installation with few options to configure since you can leave the defaults.

Run the installer & click next

You can leave the default options and optionally change the installation location.

Click next to start the installation and let it run for a few minutes to completion.

# Milestone Reached!  A congratulations is in order!

In the next post we’ll crack open the Deployment Workbench and start setting ourselves up for imaging.

For now, I bid you Good Providence!

# MDT Tutorial: Prologue & Requirements

I met someone recently who is in a similar IT position looking for some advice with respect to Operating System Deployments (OSD) – both bare metal and upgrades – and application packaging & deployments.  I recommended leveraging the Microsoft Deployment Toolkit (MDT) for imaging and combining it with the PowerShell App Deployment Toolkit (PSADT) to help accomplish his goals.  Although he had used MDT, he wasn’t as experienced with it as I was and so was looking for some guidance which I was happy to do.

Now, I may not be a world renowned expert like some people (hint: see the Resources page) but I can hold my own, and this was an excellent opportunity for me to go over the basics of image building with my new friend.

So over the next few weeks I’ll be going over the basics of building an MDT imaging lab.

# One more thing…

I don’t think there’s anything new here.  In fact, this is mostly a consolidation of well known & documented steps in addition to popular or leading practices recommended by those who share a passion for imaging.  So aside for compiling some of these ideas I can’t possibly take all the credit.  Because lots of these steps are now ingrained in my process, I may not be able to cite references to where the original idea came from.  Not trying to steal thunder or take credit away from anyone where it’s due; I just didn’t necessarily catalog the URL or Tweet of every process, tip or trick I’ve come across for the last 5 or so years.

If you’re a seasoned MDT Guru, you’re probably going to find this a little ho-hum elementary.  So while you’re welcome to read on, please curb your expectations. 🙂

# Prerequisites

## Hardware

### Preferred Configuration

Ideally you want a beefy machine to spin up some VM’s, and it doesn’t have to be a Dell R730xd.  In fact, before I got a dedicated machine, I used a laptop with 8GB of RAM and a ~200GB or so SSD.  These days it’s not uncommon for a machine to have 12-16GB of RAM and 256GB SSD so I’m thinking that’s a realistic and achievable goal.  Just remember: Can’t have too much RAM but on the storage front if SSD is a premium, put your VM’s on the SSD and the OS and Deployment Share on mechanical/spindle disks.  You could get creative by using USB drives (thumb or external) or even SD cards.  Go Nuts!

### Acceptable Minimum for Educational Purposes

While you can use physical assets for testing, it’s not leading practice and will require some extra work with drivers.  That said, if you don’t have access to beefy hardware for creating Virtual Machines, but have a handful of physical assets at your disposal, grab a few machines and get them setup on a gigabit switch with network access.

## MDT Server

Be it a physical or virtual machine, install the OS of your choice on your designated MDT server.  At this time, OS selection doesn’t matter so it could be a licensed or evaluation copy of Server 2012 R2, Server 2016 or Windows 10.  Once you install the OS on the MDT server, install .NET 3.5, rename it to something appreciable, like MDTServer, create a workgroup and patch the machine.

## All Set!

Once you have everything all setup, you’re ready to move forward!

Good Providence to you as you get this all setup!

# Applying Hotfix 3143760 for Windows ADK v1511

Although I’m moving full-steam-ahead with PowerShell, I regularly fall back on batch for really simple things mostly because I’m comfortable with the ‘language.’   (A little too comfortable maybe.)

I needed to apply hotfix KB3143760 on a handful of machines so I pulled the instructions from the KB, put them into a batch file and executed from the central repository since I had already previously downloaded the files.

@echo off
rem can be amd64 or x86
Set _Arch=x86
Set _WIMPath=%ProgramFiles(x86)%\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\%_Arch%\en-us\winpe.wim
Set _MountPoint=%SystemDrive%\WinPE_%_Arch%\mount
Set _ACLFile=%SystemDrive%\WinPE_%_Arch%\AclFile

if /i [%_Arch%]==[amd64] (Set _Schema=\\path\to\schema-x64.dat)
if /i [%_Arch%]==[x86] (Set _Schema=\\path\to\schema-x86.dat)

if not exist "%_WIMPath%" echo. &amp; echo ERROR: WIM NOT FOUND&amp;&amp;goto end
if not exist "%_Schema%" echo. &amp; echo ERROR: SCHEMA NOT FOUND&amp;&amp;goto end
if not exist "%_MountPoint%" mkdir "%_MountPoint%"
if exist "%_ACLFile%" del /q "%_ACLFile%"
if not exist "%_WIMPath%.ORIG" echo f | xcopy "%_WIMPath%" "%_WIMPath%.ORIG" /V /F /H /R /K /O /Y /J
if %ERRORLEVEL% NEQ 0 echo ERROR %ERRORLEVEL% OCCURRED&amp;&amp;goto end

:mount
dism /Mount-Wim /WimFile:"%_WIMPath%" /index:1 /MountDir:"%_MountPoint%"

:backuppermissions
icacls "%_MountPoint%\Windows\System32\schema.dat" /save "%_ACLFile%"

:applyfix
takeown /F "%_MountPoint%\Windows\System32\schema.dat" /A
xcopy "%_Schema%" "%_MountPoint%\Windows\System32\schema.dat" /V /F /Y

:restorepermissions
icacls "%_MountPoint%\Windows\System32\schema.dat" /setowner "NT SERVICE\TrustedInstaller"
icacls "%_MountPoint%\Windows\System32\\" /restore "%_ACLFile%"

echo. &amp; echo.

:confirm
Set _Write=0
set /p _UsrResp=Did everything complete successfully? (y/n):
if /i [%_UsrResp:~0,1%]==[y] (set _Write=1) else (if /i [%_UsrResp:~0,1%]==[n] (set _Write=0) else (goto confirm))

:unmount
echo. &amp; echo.
if %_Write% EQU 1 (
echo. &amp; echo Unmounting and COMMITTING Changes
dism /Commit-Wim /MountDir:"%_MountPoint%"
dism /Unmount-Wim /MountDir:"%_MountPoint%" /commit
) else (
echo. &amp; echo Unmounting and DISCARDING Changes
)
dism /Cleanup-Wim

:end
if exist "%_ACLFile%" del /q "%_ACLFile%"
Set _Write=
Set _UsrResp=
Set _MountPoint=
Set _WIMPath=
Set _Arch=
pause


Really simple, and it worked brilliantly.

It’s nowhere nearly as elegant or complete as Keith Garner’s solution, but it got the job done for me lickety split.

Good Providence and patch safely!