CMTrace32

MDT Tutorial Part 6: Customizing Boot Media

Living Table of Contents

 

Today’s Agenda:

  • Adding Files to Boot Media
  • Adding a Cool/Corporate Background
  • Adding Features to Boot Media

Although you can deploy an image with this boot media and so some basic tasks, we can add some additional, and very useful, functionality with ease.

Adding Files to Boot Media

In Part 5 we verified the changes we made to the Bootstrap.ini by not only experiencing it, as in the case of missing authentication prompt and the text customization, but also by viewing the BDD.log in notepad.  For most people that log might as well have looked like this:

If I said it would get easier with a little practice I wouldn’t be lying, but fortunately for us we can have access to a log viewer that’ll make the log viewing process a breeze.

To start, I recommend creating a folder structure to store all the files you want to add and I strongly urge you to separate between architectures.

If you’re remote:

mkdir \\MDTServer\DeploymentShare$\Boot\ExtraFiles\x64\Windows\System32
mkdir \\MDTServer\DeploymentShare$\Boot\ExtraFiles\x86\Windows\System32

If you’re on the MDT Server:

mkdir C:\DeploymentShare\Boot\ExtraFiles\x64\Windows\System32
mkdir C:\DeploymentShare\Boot\ExtraFiles\x86\Windows\System32

The reason is that the 64-bit WinPE media can only run 64-bit EXE’s and not 32-bit EXE’s.  Attempting to run a 32-bit EXE will result in an error similar to the following:

AddFiles-001

Be mindful of that when you select the files you want to bake into your boot media so you’re not bitten by the “Bitness Bug”!  Also, don’t go crazy because the more files you add, the larger the boot media.  Add just enough so you have what you need, not what you might need.

So just carve out the folder structure you want and drop the files wherever you need them to be.

CMTrace

These days CMTrace is the default go-to log viewer and is available publically:

  1. System Center 2012 R2 Configuration Manager Toolkit
  2. SCCM Evaluation ISO in
    1. SMSSETUP\TOOLS directory
    2. SMSSETUP\OSD\bin\I386
    3. SMSSETUP\OSD\bin\x64

However, as pointed out by Johan Arwidmark although the tool is ‘freely available’ it is not free as the EULA licensing states:

INSTALLATION AND USE RIGHTS. You may install and use any number of copies of the software on your devices running validly licensed copies of Microsoft System Center 2012 or later.

While disappointing, it is free to use during your evaluation.  So to quote Cathy Moya:

For anyone just using MDT, hey, install the eval copy and see what you’re missing with Config Manager. 🙂

That said once you have your eval setup you can move on with grabbing the EXE.  It’s probably easiest to grab it from the SCCM Evaluation ISO in the SMSSETUP\OSD\bin directories: I386 for x86 or 32-bit version and x64 for the 64-bit version.  If you’re using the toolkit hower:

  1. Download the MSI
  2. Run the installer (or perform an administrative installation)
  3. Copy the CMTrace.exe in the ClientTools folder
  4. Paste it in \\MDTServer\DeploymentShare$\Boot\ExtraFiles\x86\Windows\System32

This nets you the 32-bit version of CMTrace which is good for 32-bit boot media, but what about the 64-bit executable?  If you’re on a 64-bit machine you can:

  1. Run the CMTrace.exe in the ClientTools folder
  2. Open Task Manager
  3. Go to the Processes tab
  4. Sort by Apps and look for CMTrace_amd64.exe
  5. Secondary mouse click it and select ‘Open file location
  6. It will take you to %Temp% and point you to a file named TRAXXXX.tmp where XXXX are four random characters like 9644 or 1CD7.
  7. Copy the file, for example, TRA9644.tmp
  8. Paste it in \\MDTServer\DeploymentShare$\Boot\ExtraFiles\x64\Windows\System32
  9. Rename TRA9644.tmp to CMTrace.exe

Note: The above step works on Windows 10 and Server 2016; should work on Windows 8 and Server 2012 R2; if not use Process Explorer (or Process Monitor) to figure out where it’s running from.

Open the Deployment Workbench, go to your Deployment Share properties and click on the ‘Windows PE’ tab which will take you to the ‘General’ subtab.  Near the bottom look for ‘Extra directory to add’ next to an empty field where you can point to a location that contains the extra files you wish to add.  Type or browse to the path you created above and click Apply.

AddFiles-002.PNG

Once you finish with x86, at the top of the properties window just under the ‘Windows PE’ tab is a ‘Platform’ drop down.  Click it, select x64 and repeat your change there as well.

Adding a Cool/Corporate Background

While you’re on Extra Files tab, let’s add a Cool/Corporate background to the media!
This is totally optional but many do find it useful.

On the same ‘General’ subtab of the ‘Windows PE’ tab of the Deployment Share properties is a ‘Custom background bitmap file’ field that’s already filled in.  Just substitute that bitmap with one of your own.

AddBackground-001.PNG

Remember to also add the image to your x64 boot media via the ‘Platform’ drop down!

Adding Features to Boot Media

The WinPE boot media is lacking some key features we’re going to want to use so we need to fix that by adding some Optional Components.

Up until now we’ve been working in the ‘General’ subtab of the ‘Windows PE’ tab of the Deployment Share properties and we’re now going to move to the ‘Features’ subtab under the same ‘Windows PE’ tab.

AddFeatures-001

The Features available in this list are pulled from supported .CABs in

  • C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs
  • C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs
  • C:\DeploymentShare\Tools\x64
  • C:\DeploymentShare\Tools\x86

Just like before when adding files, add only what you need, and I recommend:

Software Assurance Subscribers Only

If you have an active SA subscription you can download MDOP and add DaRT to your boot media.

  1. Download the MDOP ISO
  2. Mount the ISO
  3. Go into the DaRT\DaRT 10\Installers\Language (e.g.: en-us)
  4. Go into the appropriate architecture subfolder and run the MSI (or perform an administrative installation)
  5. Go into C:\Program Files\Microsoft DaRT\v10
  6. Copy the two Tools .CAB files and place them into the appropriate architecture directory in C:\DeploymentShare\Tools (i.e.: Toolsx64.cab into C:\DeploymentShare\Tools\x64)
  7. Go back to the ‘Windows PE’ tab of your your Deployment Share properties
  8. Go into the ‘Features’ subtab and check ‘Microsoft Diagnostics and Recovery Toolkit (DaRT)’
  9. Repeat for the x64 platform

Updating Boot Media

Once you’ve finished customizing your boot media, it’s time to update the boot media, so whip out your PowerShell code you pulled from before and run it in an elevated PowerShell console or PowerShell ISE.


Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "C:\DeploymentShare"
update-MDTDeploymentShare -path "DS001:" -Verbose

From there, boot your updated ISO and you will see all of your changes:

UpdateBootMedia-001.PNG

  1. PowerShell is present
  2. Storage cmdlets present
  3. CMTrace is present
  4. Cool Background
  5. SA Subscribers: DaRT is present

In Closing

You now have feature rich bootable media that you can leverage to your advantage for various tasks related to OSD.

Good Providence to you!

Advertisements