OS イメージに対して、オフラインで更新プログラムを適用する際の注意事項について/Important notice of applying update program to OS image offline

こんにちは Windows Platform サポートチームです。

Sysprep を実行する際に、応答ファイルで PersistAllDeviceInstalls=True を指定した場合、
Sysprep 実行前のデバイス情報が保持されるため、初回の OS 起動時にドライバのインストールが
最小限になり、その分だけ早く起動処理を完了させることができます。

上記オプションを使用した OS イメージに対して、DISM コマンドを用いて更新プログラムを
オフラインで適用することが可能です。しかしながら、適用する更新プログラムにドライバーの
更新が含まれている場合、注意が必要です。

先述のとおり、応答ファイルで PersistAllDeviceInstalls=True が指定されたイメージは、
初回起動時にドライバーのインストールが行われません。本動作に伴い、オフラインで
適用した更新プログラムにドライバー ファイルが含まれている場合、当該ファイルは更新されず、
Sysprep 実行時に使用していた古いバージョンのドライバーが継続して使用されます。
(※ 例外として Boot critical device のドライバーは更新されます)

このため、オフラインで更新プログラムを適用する場合には、後述の手順で Boot critical device
ではないドライバー (Non boot critical driver) が含まれているか、事前に確認してください。
Non boot critical driver を含む更新プログラムであれば、オフラインで適用しないようにします。
(ただし、この現象が発生した場合でも、DISM コマンドにてドライバー ストア内に更新バージョンの
ドライバー ファイルが配置されるため、OS 起動後、デバイス マネージャーから対象のデバイスについて、
ドライバーの更新を行うことで、ファイルの更新を完了させることが可能です。)

補足 : Boot critical device について
OS の起動に不可欠なデバイスとしてあらかじめ規定されているデバイス群があり、これらを
Boot critical device と呼びます。上述の例外事項として記載しているとおり、Boot critical device の
ドライバーは PersistAllDeviceInstalls=True が設定されている OS イメージであっても、
初回起動時に必ずインストールが行われます。このようなデバイス群は上述の問題の影響を受けません。
今回の問題は以下の一覧に含まれていないドライバー (Non boot critical driver) を適用する際に発生します。

- Boot critical device 一覧
Class GUID                               Device Class
{4D36E97D-E325-11CE-BFC1-08002BE10318}  "System"
{4D36E966-E325-11CE-BFC1-08002BE10318}  "Computer"
{50127DC3-0F36-415E-A6CC-4CB3BE910B65}  "Processor"
{4D36E96B-E325-11CE-BFC1-08002BE10318}  "Keyboard"
{4D36E96F-E325-11CE-BFC1-08002BE10318}  "Mouse"
{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}  "HIDCass"
{4D36E978-E325-11CE-BFC1-08002BE10318}  "Ports"
{4D36E96A-E325-11CE-BFC1-08002BE10318}  "HDC"
{4D36E97B-E325-11CE-BFC1-08002BE10318}  "SCSIAdapter"
{4D36E967-E325-11CE-BFC1-08002BE10318}  "DiskDrive"
{4D36E965-E325-11CE-BFC1-08002BE10318}  "CDROM"
{4D36E980-E325-11CE-BFC1-08002BE10318}  "FoppyDisk"
{4D36E969-E325-11CE-BFC1-08002BE10318}  "fdc"
{36FC9E60-C465-11CF-8056-444553540000}  "USB"
{6BDD1FC1-810F-11D0-BEC7-08002BE2092F}  "1394"
{C459DF55-DB08-11D1-B009-00A0C9081FF6}  "Enum1394"
{71A27CDD-812A-11D0-BEC7-08002BE2092F}  "Voume"
{72631E54-78A4-11D0-BCF7-00AA00B7B32A}  "Battery"
{4D36E977-E325-11CE-BFC1-08002BE10318}  "PCMCIA"
{D48179BE-EC20-11D1-B6B8-00C04FA372A7}  "SBP2"

 

[対処策]
更新プログラムに Non boot critical driver が含まれているかを確認し、除外する方法について

===========
作業の流れ
===========
1. 更新プログラムを展開し (※後述の手順をご参考ください)、ドライバーファイルと共に同梱されている
inf ファイルを確認します。

2. inf ファイルに記載されている Class GUID の値と、上記 Boot critical device 一覧に記載された
Class GUID と一致するものがあるか確認します。

3. 一致する GUID が存在しない場合、そのドライバーは Non boot critical driver となり、上記の問題が発生する
更新プログラムとなるため、オフラインでの適用から除外します。

 

- 更新プログラムの展開方法について (例として Windows Update カタログ サイトから入手した
KB3133977 をコマンド プロンプトで展開する方法を記載いたします)

1. 以下のコマンドで Windows Update カタログ サイトから入手した KB3133977 のインストールファイルである
.msu ファイルを展開します

expand AMD64-all-windows6.1-kb3133977-x64_7c11a96b02a1800067ce6772f6a316021cac2bfb.msu -f:* <展開先フォルダパス>

2. 続いて 1. で抽出した .cab ファイルを展開します (展開先フォルダパスは上記と同一で構いません)

expand Windows6.1-KB3133977-x64.cab -f:* <展開先フォルダパス>

3. 確認する必要がある inf ファイルは以下のフォルダにあります
(どちらのフォルダの inf ファイルでも確認すべき値は同じです)

amd64_tpm.inf_31bf3856ad364e35_6.1.7601.19146_none_0a2a4c4e1dddf592
amd64_tpm.inf_31bf3856ad364e35_6.1.7601.23346_none_0ab3eaff36fb9283

4. 上記フォルダの inf ファイルを開き、Class GUID の値を確認します

// 以下例になります
========================================
;
; Copyright (c) Microsoft Corporation, All Rights Reserved
;
; TPM.INF  -- This file contains descriptions of the general purpose
;             TPM driver
;

[Version]
Signature   = "$WINDOWS NT$"
Class       = SecurityDevices
ClassGuid   = {d94ee5d8-d189-4994-83d2-f68d7d41b0e6}   <<<<<<<<<< ここの値を確認します
Provider    = %MSFT%
PnpLockdown = 1
DriverVer=06/21/2006,6.1.7601.19146

5. 先の一覧に一致する GUID ではないため、このドライバーは Non boot critical driver となります。
この場合には、オフラインでの適用から除外して下さい。

 

以下、上記内容の英語表記になります。
======================================================================

Title: Important notice of applying update program to OS image offline 

 

Configuring PersistAllDeviceInstalls= True within answer file, results speeding up the booting process because device information stored before running Sysprep is used and driver installation is minimized.

Within the OS image with above option applied, DISM command must be used to install updates offline. However, if any kind of driver is included within update, need to be careful as the following.

As stated, with the "PersistAllDeviceInstalls=True" is initially selected on the OS image, drivers within update will not be installed at the first boot. This is since old version of drivers, stored while initial run of Sysprep, are decided to be used by the system. (* only exceptions are Boot critical device driver)

If you need to install any type of updates offline, please be sure to follow the guideline below, to see any Non boot critical driver is included within an update. Update with Non boot critical driver can be installed offline, though user need to install manually by clicking update driver within device manager.

Quick Memo: Some devices are defined as essential for booting OS, and these group are named as Boot critical devices.

These device will be installed even if " PersistAllDeviceInstalls=True " is configured. Issue above will only rise within Non boot critical device which are NOT included within the following list.

- Boot critical device list
Class GUID                               Device Class
{4D36E97D-E325-11CE-BFC1-08002BE10318} "System"
{4D36E966-E325-11CE-BFC1-08002BE10318} "Computer"
{50127DC3-0F36-415E-A6CC-4CB3BE910B65} "Processor"
{4D36E96B-E325-11CE-BFC1-08002BE10318} "Keyboard"
{4D36E96F-E325-11CE-BFC1-08002BE10318} "Mouse"
{745A17A0-74D3-11D0-B6FE-00A0C90F57DA} "HIDCass"
{4D36E978-E325-11CE-BFC1-08002BE10318} "Ports"
{4D36E96A-E325-11CE-BFC1-08002BE10318} "HDC"
{4D36E97B-E325-11CE-BFC1-08002BE10318} "SCSIAdapter"
{4D36E967-E325-11CE-BFC1-08002BE10318} "DiskDrive"
{4D36E965-E325-11CE-BFC1-08002BE10318} "CDROM"
{4D36E980-E325-11CE-BFC1-08002BE10318} "FoppyDisk"
{4D36E969-E325-11CE-BFC1-08002BE10318} "fdc"
{36FC9E60-C465-11CF-8056-444553540000} "USB"
{6BDD1FC1-810F-11D0-BEC7-08002BE2092F} "1394"
{C459DF55-DB08-11D1-B009-00A0C9081FF6} "Enum1394"
{71A27CDD-812A-11D0-BEC7-08002BE2092F} "Voume"
{72631E54-78A4-11D0-BCF7-00AA00B7B32A} "Battery"
{4D36E977-E325-11CE-BFC1-08002BE10318} "PCMCIA"
{D48179BE-EC20-11D1-B6B8-00C04FA372A7} "SBP2"

[Walkthrough]
How to confirm and exclude non critical drivers.

===========
Steps
===========

  1. Expand update programs (how-to are written below) and check for the "ini" file.
  2. Check if there is same "Class GUID" in the list above.
  3. If there is no match, that program is non boot critical driver, so please exclude it from offline update.

 

- How to expand programs.

Ex) Expanding KB3133977 from Windows Update catalog site by command prompt.

  1. Expand "msu" file of KB3133977 with command as below.

expand AMD64-all-windows6.1-kb3133977-x64_7c11a96b02a1800067ce6772f6a316021cac2bfb.msu -f:* < Destination folder path >

  1. Next, expand "cab" file with command as below as well.

expand Windows6.1-KB3133977-x64.cab -f:* < Destination folder path >

  1. "inf" files which needs to be confirmed are in the folder named as below.

 amd64_tpm.inf_31bf3856ad364e35_6.1.7601.19146_none_0a2a4c4e1dddf592
amd64_tpm.inf_31bf3856ad364e35_6.1.7601.23346_none_0ab3eaff36fb9283

  1. Open "inf" file, and check for the Class "GUID".

// Below is sample
========================================
;
; Copyright (c) Microsoft Corporation, All Rights Reserved
;
; TPM.INF -- This file contains descriptions of the general purpose
;             TPM driver
;

[Version]
Signature   = "$WINDOWS NT$"
Class       = SecurityDevices
ClassGuid   = {d94ee5d8-d189-4994-83d2-f68d7d41b0e6}   <<<<<<<<<<<<<<< Please check the following GUID
Provider   = %MSFT%
PnpLockdown = 1
DriverVer=06/21/2006,6.1.7601.19146

  1. The GUID of this program is not on the list, so this is a non boot critical driver.

In this case, exclude this program from offline installation.