标题: 『原文照抄』VISTA_PE_V2.0白皮书(windows AIK) [打印本页] 作者: 八宝菜 时间: 2006-11-15 10:02 标题: 『原文照抄』VISTA_PE_V2.0白皮书(windows AIK) 从微软站点下载了BDD2007,安装后找到了这个白皮书,希望对想了解PE2的制作和使用的朋友有帮助。
加有颜色的字体是我自己加的,主要是把一些重要的操作标记出来。
红色部分就是制作PE2启动光盘的详细指南。 Getting Started with the
Windows Automated Installation Kit (Windows AIK)
Last Updated: May 2006
Applies to: IT Professionals
Abstract: This document covers a basic end-to-end deployment scenario. This document demonstrates how to create, capture, and deploy an installation in a network environment.
This information applies to the following operating systems:
Windows Vista™
Introduction 1
Deployment Scenario 1
Requirements 1
Build a Lab Environment 2
Build an Answer File 2
Build a Master Installation 5
Create an Image 6
Deploy an Image 8
Summary 9
Introduction
The Windows Automation Installation Kit (Windows AIK) is designed to help corporate IT professionals deploy Windows Vista onto new hardware.
This document covers a basic end-to-end deployment scenario, specifically how to create, capture, and deploy an installation in a network environment. This document demonstrates one example of a deployment. For a comprehensive description of all the tools and deployment methods, see the Windows Automated Installation Kit User’s Guide (Waik.chm).
Deployment Scenario
In this example, you will implement basic image-based deployment, illustrated below.
This process includes:
1. Building a lab environment.
2. Creating an answer file by using Windows System Image Manager (Windows SIM).
3. Building a master installation by using the product DVD and your answer file.
4. Creating an image of the master installation by using the Windows Presinstallation Environment (Windows PE) and ImageX technologies.
5. Deploying the image from a network share onto a destination computer using Windows PE and ImageX technologies.
At the end of this example, you will have a working lab environment that includes a technician computer, a valid answer file, a bootable Windows PE CD, and your first custom Windows image. You will have a basic understanding of how to use the Windows AIK tools to deploy a new installation. You can go back and modify your answer file to include additional customizations. You can also automate parts of the process by scripting some of the manual steps in this example.
For more information on the tools and different deployment techniques, see the Windows Automated Installation Kit User’s Guide (Waik.chm).
Requirements
To complete this scenario, you need the following:
• Window Vista product DVD.
• Windows AIK Download.
• A technician computer.
• A master computer.
• Network connectivity to simulate deployment.
• Floppy disk or Universal Flash Device (UFD), such as a USB memory key.
• One blank CD-R/RW disc.
The technician computer is the computer in your lab on which you install the Windows AIK. The technician computer can be any computer running Windows XP, Windows Server 2003, or Windows Vista. This computer requires a DVD-ROM drive and CD-R/RW-capable drive, or a combo drive that supports both.
A master computer, sometimes called a reference computer, is a fully assembled computer on which you install a customized installation using the Windows product DVD and your custom answer file. Once installed, you capture and store an image of the installation on a network share. There are no software requirements for this computer. Both technician and master computers require a network card and working network environment.
Note For the purposes of this example, the master computer will serve as your master and destination computer. The master/destination computer represents the computer you are about to deploy. After you build a master installation, you will capture and store an image of that installation on a network share. You will then reformat the hard drive, returning it to a blank state. The computer now becomes your destination computer. You will then deploy the image from the network share back onto the same computer. This process simulates an image-based deployment.
Build a Lab Environment
A lab environment is where you define and build your installation. A lab environment consists of two computers: a technician computer and a master computer.
To build a technician computer
• On your designated technician computer, download and install the Windows AIK. The Setup program will automatically start. Follow the online instructions.
To build a master computer
• Assemble the new computer. The computer must have a DVD-ROM drive, network card, and a floppy disk drive or USB support. There are no preinstalled software requirements.
Build an Answer File
The first step in creating a custom installation is to build an answer file. An answer file stores the custom settings that are applied during Windows Setup. The primary method for creating an answer file is to use Windows SIM.
The basic process includes:
1. Creating a new answer file.
2. Adding a component or package to an answer file.
3. Changing the value of a setting in an answer file.
4. Validating an answer file.
5. Saving an answer file to floppy disk or UFD.
After you have successfully created a basic answer file, you can build a master installation.
To create a new answer file
In this step, you will build a catalog and then a new blank answer file. A catalog (.clg) is a binary file that contains the state of all of the settings and packages in a Windows image.
1. From your technician computer, insert the Windows Vista product DVD into the local DVD-ROM drive.
2. From your desktop, navigate to the \sources directory on your DVD-ROM drive. Copy install.wim from the product DVD to a location on your technician computer.
3. Open Windows SIM. From your desktop, click Start, point to Programs, point to Microsoft Windows AIK, and then click Image Manager.
4. On the File menu, click Select Windows Image.
5. In the Select a Windows Image dialog box, navigate to the location where you saved install.wim, and then click Open.
6. In the Select an Image dialog box, select the appropriate version of Windows Vista, and then click OK.
7. On the File menu, click New Answer File.
Note A warning will appear that a catalog does not exist. Click OK to create a catalog. You must create a catalog for each version of Microsoft Windows Vista.
To add and configure Windows settings
In this step, you will define basic disk configuration and Windows Welcome options.
1. In Windows SIM, in the Windows Image pane, expand the Component node to display available settings.
2. From the expanded list of components, add the following components to your answer file by right-clicking the component and then selecting the appropriate configuration pass. This action will add the component to your answer file in the specified configuration pass. A configuration pass is a phase of Windows installation. Different parts of the Windows Vista operating system are installed in different configuration passes. You can specify settings to be applied in one or more configuration passes.
Note Expand the component list until you see the lowest setting listed above, and then add that setting to your answer file. This shortcut will add the setting and all parent settings to your answer file in one step.
3. All the settings you added should appear in the Answer File window pane. Select and configure each setting as specified below.
Component Value
Microsoft-Windows-Setup\DiskConfiguration WillShowUI = OnError
Microsoft-Windows-Setup\DiskConfiguration\Disk DiskID = 0
WillWipeDisk = true
Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition Extend = false
Order = 1
Size = 20000 (Note: This example creates a 20-GB partition.)
Type = Primary
Microsoft-Windows-Setup \DiskConfiguration\Disk\ModifyPartitions\ModifyPartition Active = true
Extend = false
Format = NTFS
Label = OS_Install
Letter = C
Order = 1
PartitionID = 1
Microsoft-Windows-Setup\ImageInstall\OSImage\ WillShowUI = OnError
Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo DiskID = 0
PartitionID = 1
Microsoft-Windows-Setup\UserData AcceptEula = true
The settings above outline a basic unattended installation; no user input is required during Windows Setup.
To validate and save settings
In this step, you will validate the settings in your answer file and then save them to a file.
1. In Windows SIM, click Tools, and then click Validate Answer File. The setting values in the answer file are compared with the available settings in the Windows image.
2. If the answer file validates successfully, a “success” message appears in the Messages pane; otherwise, error messages appear in the same location.
3. If an error occurs, double-click the error in the Messages pane to navigate to the incorrect setting. Change the setting to fix the error, and then revalidate.
4. On the File menu, click Save Answer File. Save the answer file as Autounattend.xml.
5. Copy Autounattend.xml to the root of a floppy disk or UFD.
You now have a basic answer file that automates Windows Setup. For more information on building answer files, see “Phase 3: Preinstallation Customization”, in Waik.chm.
Build a Master Installation
A master computer is a customized installation of Windows that you plan to duplicate onto one or more destination computers. By using the Windows product DVD and an answer file, you can create a master installation.
The basic process includes:
1. Assembling new hardware.
2. Installing Windows from a Windows product DVD and answer file.
3. Verifying installation and customizations.
4. Shutting down the computer when the installation is complete.
To install Windows from the Windows product DVD
1. Turn on the new computer.
2. Insert removable media containing the answer file (Autounattend.xml) and Windows Vista product DVD into the new computer.
3. Restart the computer (CTRL+ALT+DEL).
This example assumes the hard drive is blank. Windows Vista Setup (Setup.exe) will begin automatically. By default, Windows Setup will search all removable media for an answer file called Autounattend.xml.
4. After Setup finishes, validate that all customizations were applied.
5. Reseal (generalize) and shut down the computer. From a command prompt, type: c:\windows\system32\sysprep\sysprep.exe /oobe /generalize /shutdown.
Sysprep will prepare the image for capture by cleaning up various user and machine settings and log files. The master installation is complete and ready to be imaged.
Create an Image
After you build a master installation, you can deliver the new computer to a user, and then repeat the previous steps for each new computer. However, it is more efficient to capture an image of the master installation and then deploy that image onto other new computers. The primary tools for completing this process are ImageX and Windows PE. ImageX is a command-line tool that enables you to capture, modify, and apply file-based disk images. Windows PE provides an environment from which you can capture and deploy an image.
In this example, ImageX is used in a Windows PE environment. For more information on these tools, see “Deployment Tools Technical Reference” in Waik.chm.
The basic process includes:
1. Creating a bootable Windows PE media.
2. Booting the master installation by using Windows PE media.
3. Capturing the installation image by using ImageX.
4. Storing the image on a network share.
To create bootable Windows PE media
In this step, you will create a bootable Windows PE RAM CD. You will use this CD to capture an image of your master computer and later deploy that image onto your destination computer.
1. From your technician computer, run the copype.cmd script to create a local Windows PE build directory. For example, from a command prompt, type:
cd Program Files\Windows AIK\Tools\PETools\
copype.cmd <arch> <destination>
Where <arch> can be x86, amd64, or ia64 and <destination> is a path to local directory. For example,
copype.cmd x86 c:\winpe_x86
2. Copy additional tools like ImageX into your Windows PE build directory. For example,
copy “c:\program files\Windows AIK\Tools\x86\imagex.exe” c:\winpe_x86\iso\
3. Optionally, create a configuration file called wimscript.ini using any text editor, for example Notepad. The configuration file will instruct ImageX to exclude certain files during the capture operation. For example,
[ExclusionList]
ntfs.log
hiberfil.sys
pagefile.sys
"System Volume Information"
RECYCLER
Windows\CSC
[CompressionExclusionList]
*.mp3
*.zip
*.cab
\WINDOWS\inf\*.pnf
4. Save the configuration file to the same location as ImageX as specified in the previous step. For example:
c:\winpe_x86\iso\
ImageX will automatically detect wimscript.ini if located in the same location.
5. Create an image (.iso) file by using the Oscdimg tool. For example, from a command prompt, type:
cd program files\Windows AIK\Tools\PETools\
oscdimg -n –bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso
6. Burn the image (winpe_x86.iso) to a CD-ROM.Windows AIK does not include CD-ROM burning software. Use any third-party software to burn the image to a CD-ROM.
You now have a bootable Windows PE RAM CD with ImageX. For more information on customizing Windows PE, see the Windows Preinstallation Environment (Windows PE) User’s Guide (Winpe.chm).
To capture and store the installation onto a network share
In this step, you will capture image of your master computer using Windows PE and ImageX. You will then store that image onto a network share.
1. On your master computer, insert your Windows PE media and restart the computer.
Windows PE will start and launch a command-prompt window.
Note When you boot your master computer, you must override the boot order to boot from the CD/DVD-ROM drive. During initial boot, select the appropriate function key to override the boot order.
2. Capture an image of the master installation by using ImageX located on your Windows PE media. For example, from the command-prompt window, type:
d:\tools\imagex.exe /compress fast /capture c: c:\myimage.wim "my Vista Install" /verify
3. Copy the image to a network location. Windows PE provides network support. For example, from the command-prompt window, type:
net use y: \\network_share\images
copy c:\myimage.wim y:
If necessary, provide network credentials for appropriate network access.
Deploy an Image
After you have an image of your master installation, you can deploy the image onto new hardware by using ImageX and Windows PE.
The basic process includes:
1. Assembling new hardware.
2. Booting new hardware using Windows PE media.
3. Formatting the hard drive.
4. Connecting to your network share and copying the custom image down to your local hard drive.
5. Applying the image by using ImageX.
To deploy a custom image from a network share
In this step, you will use DiskPart to format the hard drive, and then copy an image down from the network share. For this example, use your master computer as your destination computer.
1. On your destination computer, insert your Windows PE media and restart the computer.
Windows PE will start and launch a command-prompt window.
Note Because this was your master computer, the hard drive contains an active partition. You must override the boot order to boot from the CD/DVD-ROM drive. During initial boot, select the appropriate function key to override the boot order. If this is a newly assembled computer, the hard drive would be unformatted and this step could be skipped.
2. Format the hard drive to reflect the required disk configuration requirements by using DiskPart. For example, from a command prompt, type:
diskpart
select disk 0
clean
create partition primary size=20000
select partition 1
active
format
exit
Note You can script this information by saving this information to a text file and storing it in the same location as your image. To run the script from a Windows PE command prompt, type diskpart /s scriptname.txt
3. Copy the image from the network share to your local hard drive. For example, from the command prompt, type:
net use y: \\network_share\images
copy y:\myimage.wim c:
If necessary, provide network credentials for appropriate access.
4. Apply the image to the hard drive using ImageX located on your Windows PE media. For example, from the command-prompt window, type:
d:\tools\imagex.exe /apply c:\myimage.wim 1 c:
Your custom image is now deployed onto your destination computer. The computer is ready for customer delivery. You can repeat the previous steps for each additional machine you want to ship.
Summary
You have now completed a basic end-to-end deployment scenario using an image-based deployment method. You have successfully created a lab environment, your first answer file, a bootable Windows PE CD, and your first custom Windows image. You have a basic understanding of how to use Windows SIM and the ImageX and Windows PE technologies.
The next step is to make additional customizations to your answer file and expand your knowledge of the deployment tools. You can automate parts of the deployment process by scripting the Windows PE sections in this example. For a comprehensive description of the tools and other deployment methods, see the Windows Automated Installation Kit User’s Guide (Waik.chm).