原文有两部分,上半部分主要介绍SCCM2007下的驱动管理,下半部分为MDT2008的驱动管理
I am often asked what the best way is to manage drivers with both BDD/MDT and ConfigMgr. With this in mind I thought I would create two blog posts dealing with this topic. The first
post covered ConfigMgr and the second (this post) BDD/MDT driver management.
我常常被问到如何在BDD、MDT和SCCM中如何管理驱动。基于这个建议我写了两篇blog来阐述这个问题。第一篇是关于ConfigMgr,第二篇则是BDD、MDT中的驱动管理
Please note this is not the only way to manage drivers, there are many different ways to manage drivers. However this is an approach that I have used many times with much success.
尽管我使用这种发放成果部署非常多次,但请注意这并不是唯一的管理驱动方法,事实上有许多不同的方法来管理驱动。
Before I get into the details I would like to provide a quick overview of driver management.
The first thing we must understand is the type of drivers that you need to manage. I place drivers into two categories:
在正式开始之前,我想先大致介绍一下驱动管理。第一个我想阐述的是不同种类的驱动。我将驱动分为两类:
1. NICE Drivers - Drivers that install using an INF file.
好驱动,使用INF既能安装
2. BAD Drivers - Drivers that must be "installed" - This could be a Bluetooth driver, finger print reader software or even DVD software that is specific to a particular model type. I also refer to these drivers as "Hardware based applications".
坏驱动,必须使用程序进行安装的驱动,比如蓝牙驱动、指纹扫描等等
Next we need to understand where drivers are used during the deployment process. There are two areas where they are used:
我们需要知道在部署过程中有两个地方需要使用驱动程序
1. Host OS - These are drivers that are installed on the Host OS.
安装操作系统的时候
2. Boot p_w_picpaths - These are drivers that are required by the MDT Windows PE boot p_w_picpaths to enable OS deployment. The key driver types required are network and mass storage drivers.
使用引导镜像的时候。在使用PE进行引导时需要使用驱动,尤其是网卡和存储驱动
Finally we need to understand the options MDT 2008 provides for installing drivers:
最后我们需要明白MDT 2008为安装驱动提供的选择
1. Out-of-Box Drivers - Drivers are imported into the Deployment Workbench. During OS deployment MDT performs a PnP scan of the computer and chooses which drivers to install from all available drivers. You can filter drivers using groups. These tell MDT to only consider certain drivers when deploying an OS.
Out-of-Box Drivers——在Deployment Workbench中引入的驱动,在部署过程中系统执行PNP扫描并选择安装所有可用的驱动。你可以使用驱动组来过滤驱动,将使得MDT只考虑某些驱动而不是全部。
2. DRIVERPATHS - This is an option that is specified in the MDT deployment point rules. It specifies a path to a folder containing all of the drivers you would like to deploy to the computer. During OS deployment all files within that path are copied to the computer. No PnP scan is performed on the drivers contained in
the folder.
Driverpaths——在MDT部署分发点规则中可以添加此项选择。它指向一个含有所有需要部署的驱动的文件夹。在部署操作系统中,所有这个路径里的文件都会被拷贝到目标电脑中,并不会执行PNP扫描安装。
So now that I have covered the basics lets discuss how I manage drivers.
现在我已经介绍了基础部分,该进入正题
I do not use out-of-box drivers to install "NICE" drivers on clients, I use the DRIVERPATHS method. I like the way that driver groups work but there is one scenario that driver groups does not cover. Devices that aren’t found by a PnP scan such as USB devices, multi level drivers and devices not enabled during deployment (like Bluetooth) will not be installed using the Out-of-Box installation method. You could use a combination of these methods to deploy drivers but I prefer to use one method that covers all drivers.
我并不使用out-of-box drivers来安装那些“好”驱动,而是使用Driverpaths属性的方法。我喜欢为驱动分组,但有一个方案并不驱动分组并不包含。那些无法被PNP扫描识别的设备,像USB设备,在Out-of-Box安装中并不会被识别并安装。你可能需要使用多种方法组合来实现安装所有驱动,不过我更喜欢使用另一种方法
However I do use Out-of-Box drivers (with driver groups) to manage two key areas:
尽管如此,在下面两种情况中我使用Out-of-Box Drivers(使用了驱动分组)来管理
1. Drivers that must be added to Windows PE boot p_w_picpaths (Network and Mass storage drivers) - MDT will dynamically inject these drivers into your Windows PE boot p_w_picpaths.
必须被添加至PE中的驱动(网卡和存储驱动),MDT会把他们自动加入PE盘中
2. Mass storage drivers that will be injected during p_w_picpath creation - MDT will dynamically inject mass storage drivers into client during p_w_picpath creation.
Mass storage驱动会在镜像产生过程中,自动加入客户端
I create an application for each of the "BAD" drivers. These applications are then assigned with the correct hardware type using MDT database or deployment point rules. This allows me to selectively install the applications based on hardware type.
我使用应用程序来安装那些“坏”驱动。这些应用程序可以被添加到部署进程中
So now that you know how I manage drivers lets look at how I configure MDT to support this process.
The following steps must be followed to prepare the MDT infrastructure for driver management:
一下步骤用于MDT架构下的驱动管理,必须遵守?
1. Create and a share folder on the deployment server. This folder will contain the drivers for each hardware type. I usually create a folder called models and share it as models$.
在部署服务器上建立一个共享文件夹,文件夹里包含每一个硬件的驱动,我常常建立文件夹models并共享为models$
2. Create a driver group for mass storage drivers - I call this group "MassStorageDrivers"
为存储驱动建立一个驱动组,我常称之为“massstoragedrivers”
3. Update the deployment point rules to assign the driver group to the StorageDriverSysPrepGroup property
[Default]
StorageDriverSysPrepGroup=MassStorageDrivers
Note - All mass storage drivers in this group will be injected into the computer before running sysprep, so the drivers can be picked up after reboot. This can only be used when creating an p_w_picpath.
Updata分发点,并把StorageDriverSysPrepGroup参数指向刚才建立的驱动组
例如: [Default]
StorageDriverSysPrepGroup=MassStorageDrivers
注意:所有的存储驱动会在运行Sysprep前被加入到电脑中,所以驱动在重启后就可以被识别,这仅仅用于生成一个镜像时
4. Create a driver group for Windows PE p_w_picpaths - I call this group "WinPE"
为Windows PE镜像创建一个驱动组,我称之为“winpe”
5. Assign the Window PE driver group in the Windows PE tab of the Deployment Point.
把Windows PE驱动组加入Windows PE配置表中(如图)
Note - This ensures that only drivers in this group are injected into the Windows PE boot p_w_picpath. This option is not available in LAB distribution points. It is important to note that LAB deployment points should only be used for creating p_w_picpaths not deploying p_w_picpaths.
注意: 这确保只有驱动组里的驱动才会被加入到windows pe引导镜像中。这个选项在LAB分发点中并不可用。注意LAB分发点仅仅用于生成镜像,而不应用于分发镜像,这非常重要。
5. Create a driver group that contains no drivers - I call this group "NoDrivers"
创建一个驱动组不包含任何驱动,我称之为“Nodrivers”
6. Ensure that the "NoDrivers" driver group is the only one selected in the driver groups tab of the Deployment Point.
确认“Nodrivers”驱动组是唯一一个选中的驱动组
Note - This will ensure that only drivers that are specified using the DRIVERPATHS property are installed
注意:这将确保只有使用Driverpaths属性的驱动才会被安装
6. Update the deployment point rules to specify the DRIVERPATHS property
[Default]
DRIVERPATHS1=\\SERVERNAME\SHARE\%Model%
修改分发点规则的driverpaths属性
[Default]
DRIVERPATHS1=\\SERVERNAME\SHARE\%Model%
Note - %Model% will be replaced by the WMI value gather during the MDT deployment process. All drivers for each hardware type will be stored in a folder corresponding to this value.
注意:MDT部署过程中使用WMI获取%Model%值,硬件的的驱动会被存储在相应的目录中
Now that we have prepared MDT for driver management lets look at how these settings are used.
现在我们已经准备好了,接下来就看看如何使用。
I find the simplest way to describe how I manage drivers is by example. The example I will use I perhaps the most common scenario in OS deployment, adding support for a new hardware model.
The process involves the following steps:
我发现描述问题的最简的方法就是举例子。接下来的例子中我将使用我最常用的方案,提供对新硬件的支持。
1. Create a folder for the new hardware type in the models folder. The models folder name must match the model value returned by WMI. I have found the simplest way to determine this value this is via a WMIC query.
在Models文件夹中为新硬件建立一个文件夹。名称必须和WMI返回的model值相同。我发现查询这个值得最简单的方法就是使用一个WMIC查询
The following steps detail how to perform a WMI, ensure that these steps are run on the new hardware NOT the server:
接下来的步骤阐述如何使用WMI,确认是使用在新硬件上而不是服务器上
a. Open a Command Prompt
打开一个命令行
b. Type WMIC
输入WMIC
c. To determine the Model, type CSProduct Get Name
为了确定Model,输入CSProduct Get Name
2. Gather together all of the required "GOOD" drivers for this hardware type and place them in the new folder. I usually create a sub folder for each driver type. For example "Model\NIC" or "Model\Audio"
获取所有这个新硬件的“好”驱动,并把它们放到一个新文件夹中,我常常建立诸如”Model\NIC”这样的文件夹
3. Create an MDT application for each "BAD" driver that must be installed
为“坏”驱动创建应用程序用于安装
4. Associate the applications with the model using the MDT database or rules
把建立的应用程序加入到MDT中
5. If Required - Import mass storage drivers into the deployment workbench. Add these drivers to the "MassStorageDrivers" group during the import process.
如果需要,把存储驱动加入到MDT的“MassStorageDrivers"组中
6. If Required - Import network/mass storage drivers required for Windows PE. Add these drivers to the "WinPE" group during the import process.
如果需要,把网卡驱动加入到“WINPE”组中
Note - The version of Windows PE used by MDT is based on Windows Vista. This means that you must to import Vista drivers to support Windows PE.
注意:MDT使用的PE版本源于Vista,供PE使用的驱动必须是Vista下可用的
7. Update the deployment point
升级分发点.
Note - If you have multiple deployment points then ensure that they are all updated.
如果你有多个分发点,确认所有都升级
8. Update any Windows PE boot p_w_picpaths on WDS servers or DVD/CD media
升级WDS、DVD、CD的PE
Mass Storage drivers can be particularly troublesome to manage when deploying Windows XP and Windows 2003. The most recent release of MDT (March 2008) now includes support for injecting mass storage drivers before running sysprep, so the drivers can be picked up after reboot. This is a great new feature of MDT but it can only be used when creating an p_w_picpath. MDT CAN NOT inject drivers into an p_w_picpath that has already been syspreped.
在部署XP和2003时存储驱动会带来不少的麻烦。最新版本的MDT 2008已经支持在运行Sysprep前就将存储驱动加入到系统中,所以重启后驱动就能使用,这是一个非常好的特性,但仅仅能在生成镜像时使用,MDT不能把驱动加入到一个已经Sysprep过的镜像里!
So what does this really mean? If you have a new hardware type that requires a mass storage driver not currently supported by your p_w_picpath then you will need to recreate your p_w_picpath :(.
这意味着什么?如果你有一个新硬件需要使用存储驱动,而并不被你原有的镜像支持,那么你只有重新生成镜像
Note - ConfigMgr can inject drivers into an existing p_w_picpath.SCCM2007可以把驱动加入到已有镜像中
Note - MDT will inject Vista and Windows 2008 mass storage drivers Vista和2008不存在这个问题
So that's how I manage drivers .... simple :)