Customizing Windows PE



Similar documents
Creating a custom WinPE Boot.wim

book.book Page 1 Tuesday, August 19, :01 PM Dell OptiPlex FX160 Re-Imaging Guide

Microsoft Diagnostics and Recovery Toolset 7 Evaluation Guide

Windows 7 hard disk recovery Quick implementation overview

Technical Note Creating a Windows PE Recovery CD

Planning and Managing Windows 7 Desktop Deployments and Environments

NE-6294A Planning and Managing Windows 7 Desktop Deployments and Environments

McAfee Endpoint Encryption for PC 6.2

University of Rochester Sophos SafeGuard Encryption for Windows Support Guide

MS Planning and Managing Windows 7 Desktop Deployment and Environments

Intel NUC. Installing Microsoft Windows* 7 from USB Flash Drives onto USB 3.0 Computers

Planning and Managing Windows 7 Desktop Deployments and Environments

Paragon Boot Media Builder

How to Integrate SmartDeploy with Windows Deployment Services

Windows Embedded Standard 7 Technical Overview

Full Disk Encryption Emergency Recovery Reference

This user guide describes features that are common to most models. Some features may not be available on your computer.

Planning and Managing Windows 7 Desktop Deployments & Environments Version 7

How to Make a USB Bootable

Paragon Recovery Media Builder

This user guide describes features that are common to most models. Some features may not be available on your computer.

EHCI Removal from 6 th Generation Intel Core Processor Family Platform Controller Hub (PCH)

A+ Guide to Software: Managing, Maintaining, and Troubleshooting, 5e. Chapter 3 Installing Windows

HP Compaq Thin Client Imaging Tool HP Compaq Thin Client t5000 Series

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Intelligent disaster recovery. Dell DL backup to Disk Appliance powered by Symantec

v4: How to create a BartPE Rescue CD for Macrium Reflect

Administering Windows-based HP Thin Clients with System Center 2012 R2 Configuration Manager SP1

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 16 Fixing Windows Problems

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

Installation Guide. . All right reserved. For more information about Specops Deploy and other Specops products, visit

The (Nearly) Perfect Forensic Boot CD. Windows Forensic Environment

Avira Rescue System. HowTo

Understanding Backup and Recovery Methods

Booting Live Backup Disaster Recovery over the Network

Updates Click to check for a newer version of the CD Press next and confirm the disc burner selection before pressing finish.

MS 50292: Administering and Maintaining Windows 7

McAfee Endpoint Encryption for PC 7.0

Installing and Upgrading to Windows 7

Windows 7 Portable Command Guide: MOTS , and MCITP

Microsoft Exchange 2003 Disaster Recovery Operations Guide

ALTIRIS Deployment Solution 6.8 Preboot Automation Environment

Installation Instruction STATISTICA Enterprise Small Business

Windows 10 and Enterprise Mobility

Cloning Utility for Rockwell Automation Industrial Computers

Acronis Backup & Recovery 10 Advanced Server SBS Edition. Installation Guide

Dell NetVault Bare Metal Recovery User s Guide

Acronis Backup & Recovery 10 Server for Windows. Installation Guide

Installing and Upgrading to Windows XP

Southern Maine Community College Computer Technology Professor Howard Burpee. Installing Windows 7

How To Encrypt A Computer With A Password Protected Encryption Software On A Microsoft Gbk (Windows) On A Pc Or Macintosh (Windows Xp) On An Uniden (Windows 7) On Pc Or Ipa (Windows 8) On

NovaBACKUP. User Manual. NovaStor / May 2014

Universal Management Service 2015

Paragon Recovery Media Builder

Quick Start Guide. Version R91. English

Windows Server 2008 R2 Essentials

User Guide Max Secure Recovery CD/USB creation

1. System Requirements

Table of Contents. Online backup Manager User s Guide

Course: WIN310. Student Lab Setup Guide. Summer Microsoft Windows Server 2003 Network Infrastructure (70-291)

PC Angel. Recovery. Page 1

Acronis Backup & Recovery 10 Server for Windows. Installation Guide

Getting Started with VMware Fusion

DriveClone Server. Users Manual

For most Windows users, system startup is an uneventful,

C. Implementing, Managing and Troubleshooting Hardware Devices and Drivers

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

Activation Key usage and Windows 7 Professional installation guide

SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

How to Integrate SmartDeploy Enterprise with System Center Configuration Manager

Preparing Hyper-V Templates for Windows Server 2008 in HC

SafeGuard Enterprise Tools guide

Exchange Server Backup and Restore

Quick Start Guide. User Manual. 1 March 2012

How To Install And Configure Windows Server 2003 On A Student Computer

NTLDR is missing. Below are the full error messages that may be seen when the computer is booting.

NSS Volume Data Recovery

Citrix XenConvert Guide

Unleashing the Power of vflash

Microsoft s SBS 2003 Best Practice Guide

Symantec Ghost Solution Suite (GSS) and Vista Frequently Asked Questions

Windows BitLocker and Paragon s Backup Solutions

Server Configuration and Deployment (part 1) Lotus Foundations Essentials

TrustPort, a.s. TrustPort Antivirus 2014 WindowsPE Plugin. User Manual. TrustPort, a.s.

Implementing and Supporting Microsoft Windows XP Professional

Cloning Utility for VersaView Industrial Computers

InventoryControl for use with QuoteWerks Quick Start Guide

Planning and Managing Windows 7 Desktop Deployments and Environments

User Guide. Laplink Software, Inc. Laplink DiskImage 7 Professional. User Guide. UG-DiskImagePro-EN-7 (REV. 5/2013)

How to Install Microsoft Windows Server 2008 R2 in VMware ESXi

How To Write A Board Support Package For Kontron Kontropton Kontran Kontronsa

How To Manage Hard Disk Partitioning In Windows (Windows 8) (Windows 7) (Powerbook) (For Windows 8) And Windows 8 (Pro) (Winstone) (Probation) (Perl

IBM Rapid Restore PC powered by Xpoint - v2.02 (build 6015a)

Cristie Automated Disaster Recovery. User Guide

Understanding Backup and Recovery Methods

Windows 7 USB/DVD download tool

BSDI Advanced Fitness & Wellness Software

Recovering Encrypted Disks Using Windows Preinstallation Environment. Technical Note

HP Softpaq Download Manager and HP System Software Manager

Transcription:

Customizing WinPE Page 1 of 11 Customizing Windows PE Abstract WinPE is the Windows Preinstallation Environment. Windows PE 2.0 is the core deployment foundation for Windows Vista and is available to all Windows Vista customers. It is a minimal Win32 subsytem and it is based on the Windows kernel running in protected. WinPE is easily configured and extended using ImageX. Windows PE enables users to inject drivers, configure Windows Vista offline, provide recovery solutions as well as diagnose and troubleshoot system problems. WinPE is designed to make large-scale, customized deployments of the new Windows Vista operating system notably easier. It is ideal for the following scenarios: Booting a computer that does not have an operating system Creating and formatting partitions on a hard disk Installing Windows from a network share Booting a computer with a corrupted operating system Objectives This lab covers the following activities: Customize components included in WinPE Automating tasks in WinPE Creating a bootable WinPE iso image Updating a Windows Deployment Server (WDS) to include a WinPE boot image. Scenario In response to growing frustrations as a result of your organization s existing solutions for booting new machine builds, and a need to provide a simple & robust platform for resolving issues with Windows XP, Vista and servers, you have been given the responsibility for creating a solution. Discussions with the desktop build team have revealed that their primary issue is locating DOS drivers for network cards. They have also asked for the ability to create and format partitions with NTFS. Support for scripting was also mentioned as being highly desirable. The support teams have requested a tool that will allow them to recover machines that have suffered issues such as corrupted boot sectors & partition tables, or damaged operating system files, as well as to perform maintenance tasks such as defragmenting volumes and running virus scans. After reviewing the information gathered from the various teams, WinPE has been identified as the ideal solution. In this lab you will use the tools from the Windows Automated Installation Kit (Windows AIK) to create and modify a WinPE image that will fulfill the needs of the teams in your organization. Background Information

Customizing WinPE Page 2 of 11 The following virtual machines will be used to complete this lab: VistaLabs_DC1: Domain Controller running Windows Server 2003 VistaLabs_Client1: Windows Vista client machine Prerequisites You should be familiar with the following products or technologies before you begin this lab. Experience working with Windows device drivers Ability to analyze command line commands and understand syntax Familiarity with scripting using WSH and VBScript. Duration 60 Minutes For More Information http://www.microsoft.com/technet/windowsvista/deploy/winpe.mspx Microsoft BCD FAQ http://tinyurl.com/naasp Support Information This lab is built and supported by HynesITe, Inc. See what s possible at www.hynesite.biz.

Customizing WinPE Page 3 of 11 Exercise 1 Build a custom WinPE image Microsoft Windows Pre-installation Environment (Windows PE) 2.0 is a bootable tool that provides operating system features for installation, troubleshooting, and recovery. With an average size of 130Mb for an x86 build, WinPE can be booted from removable media such as USB keys, CDR or used as part of a PXE (F12) boot solution. In this exercise you will create a WinPE image by extracting the source files to the local disk of your workstation, modify the standard components included in the build to provide support for the needs of the build team by including additional device drivers and support for scripting, and support for the support teams by including the Recovery tool package. Once this is done you will then prepare the build files and generate a Windows Image (WIM) file that can then be used to create a series of boot solutions. Note: All tasks should be performed using the DC1 virtual machine Use ImageX.exe to extract the contents of a WIM file to a folder In this task you will create the basic folder structure required for building WinPE images and then extract the contents of WinPE.wim file that is provided with the Windows Automated Installation Kit (WAIK) 1. Log on to DC1 as administrator@contoso.com with a password of P@ssw0rd. 2. Using Windows Explorer, create the following folders: C:\winpebuild C:\winpe\sources C:\winpe\boot 3. Open a Command Prompt, change to the C:\Program Files\Windows AIK\Tools\x86 directory. 4. In the Command Prompt, type the following command and then press ENTER. ImageX /info "C:\Program Files\Windows AIK\Tools\PETools\x86\winpe.wim" Review the details of the image contained in the WIM file and confirm that it is a WinPE image and that it has been compiled for use on an x86 platform. You can find this information in the <NAME> section of the output approximately 3 lines from the top. WinPE is available for both 32bit (x86) and 64bit (x64) platforms. 5. Open a Command Prompt, type the following command and then press ENTER. ImageX /apply "C:\Program Files\Windows AIK\Tools\PETools\x86\winpe.wim" 1 C:\winpebuild

Customizing WinPE Page 4 of 11 Note: In the preceding command, you are applying the winpe.wim file to the c:\winpebuild directory you created earlier. The 1 in the command is the index number of the image within this WIM file. A single WIM file can contain multiple images, so we use an index number to differentiate between them. 6. Using Windows Explorer, browse to the C:\winpebuild folder and confirm that the following folders have been created: C:\winpebuild\Program Files C:\winpebuild\Users C:\winpebuild\Windows Explore the WinPE image using the PEimg.exe utility Now that the source files have been extracted, the PEimg.exe tool can be used to modify the components that are included in the WinPE image. In this task you will use the /list option to discover the packages that are available in the WinPE build you extracted in the previous task. 7. In the Command Prompt, change to the C:\Program Files\Windows AIK\Tools\PETools directory. 8. Enter the following command to list the components that are available for installation. peimg c:\winpebuild\windows /list 9. Review the output and notice the names of the packages included in this WinPE image. You will refer to these names in the next step. Note: In the output, the + or symbol in the Ins column indicates the installation flag on the package. + indicates the package will be installed, - indicates it will not be installed. Enable components in the WinPE image After reviewing the packages available, you have decided to include the HTA, SRT and scripting packages. The HTA package provides support for HTML Applications (HTA) which will allow the build teams to display HTML content during the build process that will be used to provide users with information on the new environment. The SRT (Server Recovery Tools) package will provide the support teams with the recovery tools that can be used to repair failed installations, while the Scripting package supports the use of VBscript to automate tasks in the WinPE environment. 1. In the Command Prompt enter each of the following as separate commands to install the specified packages: peimg c:\winpebuild\windows /install=winpe-hta-package peimg c:\winpebuild\windows /install=*srt* peimg c:\winpebuild\windows /install=winpe-scripting* 2. Once the previous task has been completed, enter the following command to confirm that the packages have been successfully installed:

Customizing WinPE Page 5 of 11 peimg c:\winpebuild\windows /list Note: A + next to a package indicates that it is included in the build Install an additional device driver offline In this task you will use the PEIMG.EXE utility to inject a driver into the WINPE build. This will result in the driver being permanently added to the build. For scenarios where you would like to test a new driver with out permanently adding it to the build, the DRVLOAD.EXE tool could be used once WINPE has booted to load a device driver for the duration of the session 1. In the Command Prompt, type the following command and then press ENTER Peimg /inf="e:\sources\out-of-box Drivers\wireless\w29n51.inf" c:\winpebuild\windows 2. Review the output from the command and confirm the operation has been completed successfully. Capture the WinPE build prior to prepping the image Now that the image has been modified, you are ready to prepare the image for capture. As part of this process, the image will no longer be able to be modified, so it is recommend that you create a copy of the build directories so that they can be restored if required. One of the simpler methods to do this is to use the ImageX.exe tool and save it as a WIM file. The following task will capture the existing WinPE build directory and store it in a WIM file. 1. Open a Command Prompt, and change to the C:\Program Files\Windows AIK\Tools\x86, folder and type the following command and then press ENTER. ImageX /boot /compress maximum /capture c:\winpebuild c:\customwinpe.wim Custom WinPE image 2. In a typical environment, you would let this process complete and then archive the customwinpe.wim for future reference. Because this process will take approximately 15 minutes in this lab environment, press CTRL + C to abort the image creation process. Prepping a WinPE build In this exercise you will examine the size of the unprepared image, prepare the image, and then compare the size of the final image. 1. In the Command Prompt, type the following commands and then press ENTER. Dir c:\winpebuild /s >c:\unprepped.txt Notepad c:\unprepped.txt 2. When notepad opens, scroll to the end of the file and take note of the total number of files and the file size. When you are finished, close Notepad. 3. In the Command Prompt, change back to the C:\Program Files\Windows AIK\Tools\PETools directory and type the following command and then press ENTER.

Customizing WinPE Page 6 of 11 Peimg c:\winpebuild\windows /Prep /F Note: The /F switch is used to remove the prompt confirming that you wish to prepare the image. 4. Repeat steps one and two to compare the total number of files and bytes of the directory once the image has been Prepped Building a WinPE image Once the WinPE build has been customized and prepped, it is now ready to be captured and stored as a WIM file. In the following task you will use IMAGEX.EXE to create a WIM file that can then be used with OSCDIMG.EXE utility to create a bootable CD, added to a WDS server for use with PXE boot services or added to the local machine as a boot option. 1. In the Command Prompt, switch back to the C:\Program Files\Windows AIK\Tools\x86 directory and type the following command and then press ENTER. ImageX /boot /compress maximum /capture c:\winpebuild c:\winpe\sources\boot.wim Custom WinPE Boot image Note: The above should be entered as a single command and will take approximately 5 minutes to complete. 2. Once the BOOT.WIM file has been successfully created, create a folder named E:\SOURCES\CUSTOM and copy the BOOT.WIM file from C:\WinPE\sources into it. Building a bootable CD image. In this task you will use the OSCDIMG.EXE utility to create a bootable CD image. Once the ISO file has been created, it can then be burned to physical media, 1. In the Command Prompt, enter the following command to copy the contents of the c:\program Files\Windows AIK\Tools\x86\Boot folder to the C:\winpe\boot folder. xcopy "c:\program files\windows aik\tools\petools\x86\boot" c:\winpe\boot /cherky 2. Copy c:\program Files\Windows AIK\Tools\PETools\x86\Bootmgr to the c:\winpe folder 3. Confirm that the boot.wim file is located in the c:\winpe\sources folder 4. Change back to the C:\Program Files\Windows AIK\Tools\PETools directory and then enter the following command OSCDIMG n b"c:\program files\windows aik\tools\petools\x86\boot\etfsboot.com" c:\winpe e:\sources\winpe.iso Note: There is a space after n, but there is NOT a space after b. In this command the n is being used to allow long file names, the b is being used to specify the El Torito boot sector file as the path\etfsboot.com, and we are creating an ISO file called winpe.iso that will be created in the E:\Sources directory.

Customizing WinPE Page 7 of 11 5. Using Windows Explorer, confirm that the E:\sources\winpe.iso file has been successfully created. Note: This ISO file can now be burned onto a CD using CD burning software, and your workstations can now be booted using this new CD-ROM.

Customizing WinPE Page 8 of 11 Exercise 2 Booting from a Custom WinPE WIM File Now that you have created the BOOT.WIM file, you will use a Windows Vista Client to test the WinPE image. By using a Windows Vista client, it is possible to copy the WIM file to the local hard disk and then boot from it, thereby removing the need to build an ISO file and burn it to a CD or to upload the image to a WDS server in order to PXE boot. This can result in significant time savings when a build is undergoing development and testing. The ability to boot from a WIM file in Windows Vista is provided by the new boot manager application, the BCD. The Boot Configuration Data store, stores the configuration entries for the various operating systems that are installed on the machine and replaces the BOOT.INI file that has been used in previous versions of Windows. As an administrator, you can use the BCDEDIT.EXE utility to view and modify the BCD entries on Windows Vista or later. Alternatively, you can develop your own tools to manage the BCD store by using the BCD WMI provider interface. Note: All tasks should be performed using the Client1 virtual machine Copy support files from DC1 to CLIENT1 In this task you will copy the BOOT.WIM file created in Exercise 1 from DC1 to Client1 so that it can then be used to boot WinPE on Client1 as well as the wireless driver files for use in this lab 1. Log on to CLIENT1 as administrator@contoso.com with a password of P@ssw0rd. 2. Click on the Start menu and in the Start Search box type cmd and then press ENTER. 3. Type md c:\winpe to create a folder named C:\WinPE 4. Type copy \\dc1\sources\custom\boot.wim c:\winpe to copy the BOOT.WIM file from \\DC1\Sources\Custom to C:\WinPE 5. Type md c:\winpe\wireless to create a wireless directory. 6. Type copy \\dc1\sources\out-of-box Drivers\Wireless C:\winpe\Wireless to copy the contents of the Wireless folder from \\DC1\Sources\Out-of-Box Drivers to C:\Winpe\Wireless Creating a RAMDISK option in the BCD database. As part of the WinPE boot process, a ramdisk will be created that will be used to store the WinPE files. In this task you will use the BCDEDIT.EXE tool to create BCD entries that will define the standard parameters for the RAMDISK 1. Open a Command Prompt and type each of the following commands. bcdedit /create {ramdiskoptions} /d "Ramdisk options" bcdedit /set {ramdiskoptions} ramdisksdidevice partition=c: bcdedit /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi

Customizing WinPE Page 9 of 11 2. In Command Prompt, type the following command to create a new boot application bcdedit /create /d "WinPE Full" /application OSLOADER 3. The output will contain a new guid value for the boot application entry and appear similar to the following: The entry {YourGUID} was successfully created. You must use the new guid in the remaining Bcedit commands. To copy your GUID in the Command Prompt, right click the Command Prompt window and click Mark. Highlight your GUID and then press enter. You can then right click the Command Prompt window and click paste to reuse your GUID. 4. In Command Prompt, type the following commands to configure the parameters for the WinPE boot entry. There are six commands to enter; the longer commands appear on two lines because they are wrapped to fit the page. When you have finished typing each command, press ENTER. Where you see {putyourguidhere} you should insert your GUID from the previous step. To do this in a Command Prompt window, right click and click paste. bcdedit /set {putyourguidhere} device ramdisk=[c:]\winpe\boot.wim,{ramdiskoptions} bcdedit /set {putyourguidhere} path \windows\system32\winload.exe bcdedit /set {putyourguidhere} osdevice ramdisk=[c:]\winpe\boot,{ramdiskoptions} bcdedit /set {putyourguidhere} systemroot \windows bcdedit /set {putyourguidhere} winpe yes bcdedit /set {putyourguidhere} detecthal yes 5. In Command Prompt, type the following command to add WinPE to the boot menu. When you have finished typing the command press ENTER. bcdedit /displayorder {putyourguidhere} /addlast At this point, your machine has the new entry WinPE Full in the boot menu. 6. Copy Boot.sdi file from \\DC1\C$\Program files\windows AIK\tools\PETools\x86\boot\ to C:\boot by typing in the Command Prompt window xcopy \\dc1\c$\program files\windows AIK\tools\PETools\x86\boot\boot.sdi c:\boot and then press Enter. 7. Reboot Client1 and notice the WinPE Full entry from the boot menu. Do not select it as the rest of this lab will be done from within Windows Vista. Hint: To reboot client1 click the arrow next to the lock on the start menu. If Press any key to boot from CD or DVD prompt appears, ignore this message and DO NOT PRESS any key.

Customizing WinPE Page 10 of 11 Exercise 3 Customizing the WinPE Startup In this exercise you will configure an Unattend.XML file to configure startup actions to occur once Windows PE has been booted. For this exercise, the startup action will utilize the HTML Application (HTA) functionality you added to your WinPE build in Exercise 1 to launch a welcome screen. This welcome screen could be used to run custom actions, or display information to the end user. Note: All tasks should be performed using the Client1 virtual machine Open Windows PE for modification using ImageX In this task you will use IMAGEX.EXE to mount the BOOT.WIM file so that you can add the UNATTEND.XML file to the image. 1. Log on to Client1 as administrator@contoso.com with a password of P@ssw0rd. 2. Click on Start, point to All Programs, point to Accessories, and then click Command Prompt. 3. In the Command Prompt, change to the C:\Program Files\Windows AIK\Tools\x86 directory. 4. In the Command Prompt, type each of the following commands and then press ENTER. Md c:\mountpe ImageX /mountrw c:\winpe\boot.wim 1 c:\mountpe 5. Copy the WINPE-UNATTEND.XML file from \\DC1\SOURCES\WINPE to the C:\MOUNTPE folder and rename it to UNATTEND.XML 6. Using Notepad, create a new file and save it as C:\MOUNTPE\WELCOME.HTM 7. In Notepad, add the following line of text and then save and close the file <h1>welcome to Windows PE</h1> 8. Using Notepad, open the C:\MOUNTPE\UNATTEND.XML file. 9. In the UNATTEND.XML file, locate the <Path> node and replace the text InsertTextHere with MSHTA x:\welcome.htm 10. Locate the <Description> node and replace the text InsertTextHere with Welcome to Windows PE 11. Save the document and then close Notepad. 12. In the Command Prompt, change to the C:\Program Files\Windows AIK\Tools\x86 directory. 13. In the Command Prompt type the following command and then press ENTER.

Customizing WinPE Page 11 of 11 ImageX /Commit /UnMount c:\mountpe Note: The IMAGEX /Commit /Unmount task is used to save the changes made to the BOOT.WIM file and then dismount the file. 14. In a production environment when you restart your machine and select the WinPE FULL boot entry, the welcome screen is launched when WinPE starts.