`
izuoyan
  • 浏览: 8911599 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

从新版MDT、WAIK和OPK谈Windows 7的部署技术

阅读更多

不得不说微软是一个非常善于创造英文缩写的公司:-) MDT、WAIK和OPK的全称如下:
MDTMindows Deployment Tookkit,最新版本是2010版;
WAIKWindows Automated Installation Kit的缩写,最新版本是针对Windows 7 beta的;
OPKOEM Preinstallation Kit,目前有For Vista SP1版的,Windows 7版本的尚未公开。

MDT MDT2010 是已经开始公开测试的微软部署解决方案加速器的最新版本。这个用于操作系统大批量部署的解决方案加速器有一系列的工具、文档和最佳实践方案组成,它的前身 是BDD和MDT2008。MDT2010的新功能有:硬件驱动管理更加灵活、部署流程的处理更加优化、增加对网络共享的访问功能等。 MDT 2010可以在微软的connect站点提供下载,用户需要注册成为conenct站点的用户,并选择加入MDT 2010测试项目。
WAIK WindowsAutomated Installation Kit (Windows AIK or WAIK)是用于进行Windows操作系统部署的文档和工具集。适用WAIK,管理员可以进行Windows的自动部署、用ImageX捕捉镜像、用 DISM对操作系统镜像进行离线编辑。同时,WAIK中的WinPE和USMT也有广泛的应用。 针对Windows 7 beta版本的WAIK已经可以下载,下面是英语、德语和日语版本WAIK的下载地址:
WAIK (English) WAIK (German)
WAIK (Japanese)
OPK OEMPreinstallation Kit (OPK)是微软提供给计算机厂商的OEM预安装工具,使用OPK可以对Windows进行定制,增加厂商信息、应用程序等,同时也可以制作类似 ThinkPad隐藏分区之类的Windows还原镜像,并可以植入与BIOS特征相匹配的免激活密钥。 OPK的应用主要针对OEM厂商。


WAIK for Windows 7 beta我们先从目前比较容易获得的Windows 7 WAIK下手,看看其中包含了些什么新功能。官方网站上下载的Windows 7版本的WAIK有1.4Gb左右,比Vista时的800M大了不少,用虚拟光驱加载ISO后进行安装,界面如下:

安 装路径下的STEPBYSTEP_ITPRO.HTM文件,是一个简单明了的上手指南,除此之外,安装完成后的WAIK.CHM是一个非常完整的WAIK 技术文档,相当全面的涉及了所有的命令和配置参数。另外,WAIK的安装界面中还介绍了两个强大的工具,ACT和MAP(不好意思,又是缩写)。ACT是 Microsoft Application Compatibility Toolkit 5.0,MAP是Microsoft Assessment and Planning Toolkit,这两个宝贝的具体功能大家看网页吧,我这里不展开了,否则就要离题万里了。
安装大概需要5分钟左右,安装完成后的WAIK主要包括三部分内容,文档库、部署工具命令行和Windows System Image Manager:

强烈建议Windows 7的爱好者仔细阅读Documentation文件夹下的Windows Automated Installation Kit User's Guide,这个CHM文件涉及了大量的Windows 7新功能的技术细节,比如VHD Native Boot、Windows 7的Boot Loader、WinPE 3.0和大量新的命令行工具,即使不做WAIK的试验,阅读这个文档也会收获多多,宝库啊!

好,罗嗦了这么多,终于进入正题了,Windows 7 beta版的WAIK主要有以下的更新和新功能加入:
新 的Deployment Image Servicing and Management tool (DISM)Deployment Image Servicing and Management tool (DISM)是新的Windows镜像(WIM文件)的离线编辑工具,使用这个工具可以:

  • 添加或者删除驱动程序,32位和64位都可以
  • 添加或者删除语言包
  • 启用或者禁用Windows的功能(Windows features)
  • 添加或者配置Windows更新

新的DISM工具替代了之前WAIK版本中的很多工具,比如Pkgmgr.exe(用于镜像打包管理)、Intlcfg.exe(进行国际化设置)、 PEImage.exe(用于WinPE命令行)等工具,如果你习惯了使用之前这些命令,可能还需要些时间适应一下新的DISM,没关系,WAIK的文档 有详细的命令参数和例子。
适 用User State Migration Tool迁移用户信息MicrosoftWindows User State Migration Tool(USMT)已经成为WAIK的标准安装组件。在大规模操作系统迁移时,适用USMT4.0工具可以方便的自动迁移用户的账户信息和数据。 USMT可以导出旧计算机上的用户账号、用户配置文件、操作系统配置、应用程序配置,并把这些设定批量倒入回新的计算机。USMT可以进行大量的自定义和 批处理,具体的请看WAIK中的USMT文档(Usmt.chm)。
新的Windows默认分区结构大家安装Windows 7 6801的时候可能已经注意到了,在裸机安装情况下,Windows7的默认分区是一个200M系统分区加上后面的操作系统启动分区。这是Windows 7中的新分区标准,200M的小分区用于保存Windows 7引导程序、恢复工具、WindowsBitlocker需要的文件等,接下来的大分区才是用于安装操作系统的。建议大家习惯这样的新分区标准,这对于今 后配置多系统启动、启用Bitlocker加密都非常有帮助。

在部署时改变Windows的版本用DISM中的镜像更新工具(Image Upgrade tool)可以减少管理员维护的操作系统镜像数量,DISM支持向现存的镜像加入新的Windows版本的功能。
优化Windows PE镜像DISM.exe /Apply-Profile 可以压缩和减少Windows PE镜像的尺寸,使其仅支持需要的应用程序。(别急,关于新的WinPE 3.0,后续段落会有详细内容)
部 署可启动的VHD文件在Windows 7中,系统可以从VHD之上直接启动,而不需要任何的虚拟机环境存在。Windows 7的磁盘管理工具、Diskpart命令等可以用来创建和管理VHD文件。WIM镜像文件可以被灌入VHD文件,并配置Windows 7的Boot Manager从VHD直接启动。
一些被淘汰的工具下面这些命令行工具已经在新版的WAIK中被淘汰,如果你有用这些命令做的的脚本,那么你需要用新的DISM命令来修改这些脚本。这是一些大家都比较熟悉的命令了,我就不花时间翻译他们的命令描述了(再说这些工具已经被淘汰了,翻译了也没什么)。

  • Intlcfg.exe.The International Settings Configuration Tool (Intlcfg.exe) is used tochange the language and locale, fonts, and input settings to a Windowsimage. In Windows 7 and Windows Server 2008 R2, the functionality ofthis tool is included as part of the DISM tools. This release of theWindows AIK includes the Intlcfg.exe tool to enable the configurationof Windows Vista and Windows Server 2008 installations only.
  • PEimg.exe.The command-line tool for creating and modifying Windows PE images. Thefunctionality of this tool is included as part of the DISM tools. Thistool is not available with this release of the Windows AIK.
  • Pkgmgr.exe.Package Manager is used offline to install, remove, or update Windowspackages. The functionality of this tool is included as part of theDISM tools. Package Manager is included in all Windows installationsand you can continue to use existing scripts that call Package Manager.However, we recommend for all Windows 7 installations that you updateyour environment to support DISM.
  • PostReflect.exe.PostReflect.exe is used to reflect all boot-critical device drivers outof the driver store in an offline image. The functionality of this toolis built into the Sysprep command. This tool is not available with this release of the Windows AIK.
  • VSP1CLN.exe.The Windows Vista® Service Pack 1 (SP1) Files Removal Tool(VSP1CLN.exe) is used to remove the files that are archived afterWindows Vista SP1 is applied to a Windows Vista RTM image. This tool isno longer required. This tool is not available with this release of theWindows AIK.

不得不说的Windows PE 3.0WinPE一直以来都是大家 非常喜欢的Windows工具之一。新版WAIK中的WinPE版本是3.0,同时包括32位、64位和安腾平台,加起来的尺寸大概有1GB。如果你还对 WinPE不是很了解,那我先来一段扫盲的介绍。简单的说,WinPE就是一个超强版的Win98启动盘(这个你总有印象吧)。从网上引用了一段对 WinPE的介绍:
WinPE的全称是Windows Preinstallation Environment(Windows预安装环境),它是带有有限服务的最小Win32子系统,它基于以受保护模式运行的Windows内核,它包括运 行Windows安装程序、从网络共享安装操作系统、自动化基本过程,以及执行硬件验证所需的最基本功能。
Windows PE 提供了以下特性:

  • 作为一种基于x86体系结构的硬件独立的Windows环境,对可引导媒体和内存的占用量都不大
  • 具备Win32应用程序编程接口(API) 的子集、能运行批处理文件的命令行接口(Cmd.exe),并且支持用于创建自定义OEM工具或脚本的Windows 脚本主机(WSH)、HTML 应用程序(HTA)和ActiveX数据对象(ADO)
  • 支持网络访问和标准Windows网络驱动程序,可用于通过 TCP/IP 从网络复制映像和测试套件,可以轻松地在Windows PE 自定义版本中添加或删除网络驱动程序
  • 支持所有使用Windows驱动程序的大量存储驱动程序。当新设备可用时,可以很容易地删除不必要的驱动程序或将其他驱动程序合并到Windows PE 的自定义版本中
  • 对创建、删除、格式化和管理 NTFS 文件系统分区提供内置支持
  • 硬件诊断程序可以加载和测试特定的硬件驱动程序
  • 支持PXE 协议,如果计算机支持PXE 启动,那么计算机可以从远程安装服务器 (RIS) 上的Windows PE 映像自动启动,Windows PE 映像不会自动安装到计算机的硬盘上

WinPE 3.0的新功能如下:

  • Optimize Windows PE image:/apply-profiles DISM的这个命令参数可以进一步压缩WinPE的尺寸,是WinPE仅支持目前提供的应用程序,是WinPE的减肥利器
  • /prep: PEImg.exe工具已经退休了,这个大家熟悉的/prep参数也不复存在了。取而代之的,还是DISM
  • System drive letter: 可以自由的给WinPE的系统分区分配盘符
  • DISM.exe: DISM已经多次提到了,这是WinPE 3.0中的万能兵器,综合了之前几个工具的功能,一定好好好学习之。
  • UpdateBootInfo命令包含了新的功能,可以在系统启动时判断WinPE的运行环境,并有选择性的加载特定的应用程序
  • WaitForRemoveableStorage,在WinPE启动时,等待USB设备就绪
  • 可以直接使用
  • Shutdown命令执行关机操作。(谁还记得之前应该用哪一个命令?)
  • 可以保存自定义的用户配置信息
  • WinPE-SRT-Package可以对一个离线的Windows进行修复,这个工具可能会在正式发布时从WinPE移走。
  • BCDboot 是Windows 7下的一个无比强大的启动管理工具。下一段有详细解释。
  • 包含了SDK。
  • Windows PE Lifetime serviceability: Images can be serviced throughout their lifetimes. (说实话,这一句没太看懂,不译了,留给大家去参透)
  • 你可以根据WAIK中的标准流程创建你自己的WinPE,加入你平常适用的工具、加入你特定的驱动程序等等。下图是一个WinPE构建的流程,别紧张,其实一点都不复杂,按照WAIK的文档一步步往下操作就行。

    BCDBootBCDBoot这个工具太强大了,因此我不得不为这个工具专门起一个段落。以下是BCDBoot这个工具的官方介绍,一字不差的挪到了这里。不管你英语有多差,也请你完整的把下面的内容读完,我向保证,你一定会像[url=viewthread.php?tid=397741]这位朋友[/url]一样欣喜若狂。
    BCDbootis a tool used to quickly set up a system partition, or to repair theboot environment located on the system partition. The system partitionis set up by copying a *** set of Boot Configuration Data (BCD)files to an existing empty partition。
    BCDboot is included with Windows 7 in the %WINDIR%\System32 folder. BCDboot is also available in the Windows OPK and Windows Automated Installation Kit (AIK) under the %Program Files%\(Windows OPK or AIK)\Tools directory.
    BCDbootcopies a *** set of BCD files from a Windows image that is alreadyon the computer. BCDboot can copy BCD files from images of Windows XPService Pack 2 (SP2), Windows Server 2003, Windows Vista, WindowsServer 2008, or Windows 7. For information on applying a Windows imageto a system, see Deploying Windows Using ImageX.
    BCDbootuses the BCD-Template in the %WINDIR%\System32\Config folder of theoperating system image to create a new BCD store and initialize the BCDconfiguration on the system partition. The tool also copies the bootenvironment files from the operating system image %WINDIR%\boot folder and %WINDIR%\System32 folder to the system partition.
    BCDbootcopies files to the default system partition identified by thefirmware. You can create this partition by using a partitioning toolsuch as DiskPart. You do not have to assign a drive letter to thispartition for BCDboot to locate it. For more information, see theDiskPart Help from the command line.
    • OnBIOS-based systems, the system partition is the active partition ondisks using the Master Boot Record (MBR) disk format. BCDboot createsthe \Boot directory on the system partition and copies all required boot environment files to this directory.
    • OnUnified Extensible Firmware Inte***ce (UEFI)-based systems, the EFIsystem partition is the system partition on disks using the GUIDPartition Table (GPT) disk format. BCDboot creates the \Efi\Microsoft\Boot directory and copies all required boot environment files.
    BCDboot Command-line OptionsThe following command-line options are available for BCDboot.exe.
    BCDBOOT source [/l locale] [/s volume-letter]

    ExamplesThis example initializes the system partition using files from the operating system image installed on the C: volume.
    BCDBOOT C:\WindowsThis example sets the default BCD locale to Japanese, and copies BCD files to a system partition that was assigned a volume letter S: using DiskPart.BCDBOOT C:\Windows /l ja-jp /s S:看看BCDBoot配合VHD启动的内容,你就知道BCDBoot有多强大了。我们有一个网友在论坛中语无伦次的表达了他对BCDBoot的敬佩,大 家可以去感受一下:-)
    分享到:
    评论

    相关推荐

    Global site tag (gtag.js) - Google Analytics