Building and Deploying XP Embedded Images

12
3.10.12. Building and Deploy ing XP Embedded Images 1/12 msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx Building and Deploying XP Embedded Images David Reed, John Macintyre, and Stephen Berard Microsoft Corporation June 2003 Applies to: Microsoft® Windows® XP Embedded with Service Pack 1 Summary This white paper is a collection of documentation that will walk embedded developers through the various steps involved with building and deploying Windows XP Embedded with Service Pack 1 run- time images using the Windows Embedded Studio tools. Topics covered include best practices in using the Target Analyzer Probe (TAP.exe) and Target Analyzer (TA.exe) applications, creating hardware macros in Component Designer, and using deployment technologies such as System Cloning, System Deployment Image (SDI), and PreBoot Execution Environment (PXE). Contents Getting Started Best Practices for TAP.exe How to Choose between TA.exe and TAP.exe Creating a Hardware Macro Building the Image Configuring EWF Configuring System Cloning Image Deployment with SDI PreBoot Execution Environment (PXE) Boot Image Deployment Additional Resources Getting Started It all begins with TAP.exe and Windows Preinstallation Environment (WinPE). The best way to start a new Microsoft® Windows® XP Embedded configuration is to boot to a WinPE environment and run TAP.exe to generate a hardware profile for the target system. The first Windows XP Embedded with Service Pack 1 installation disc is a bootable WinPE image. You will be using this version of WinPE for this tutorial. To use WinPE, make sure your target system's basic input/output system (BIOS) supports boot to CD-ROM. Configure the system's BIOS boot device order to boot to the CD-ROM first, then insert the first disc of the Windows XP Embedded with SP1 installation CD-ROM and restart the computer. When prompted by the system BIOS to boot from CD-ROM, do so to start the WinPE setup routine. First, set up your bare metal computer with all of the peripherals you intend the final device to have. Next, insert Windows XP Embedded installation disc 1 into the CD-ROM drive of the target computer and boot to WinPE. When the computer is in the WinPE environment, navigate to the \XPE directory and run TAP.exe with the following parameters to save the devices.PMQ file to a floppy drive: tap /O a:\Kiosk-HW.PMQ

Transcript of Building and Deploying XP Embedded Images

Page 1: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

1/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

Building and Deploying XP EmbeddedImages

David Reed, John Macintyre, and Stephen BerardMicrosoft Corporation

June 2003

Applies to: Microsoft® Windows® XP Embedded with Service Pack 1

Summary

This white paper is a collection of documentation that will walk embedded developers through thevarious steps involved with building and deploying Windows XP Embedded with Service Pack 1 run-time images using the Windows Embedded Studio tools.

Topics covered include best practices in using the Target Analyzer Probe (TAP.exe) and TargetAnalyzer (TA.exe) applications, creating hardware macros in Component Designer, and usingdeployment technologies such as System Cloning, System Deployment Image (SDI), and PreBootExecution Environment (PXE).

Contents

Getting StartedBest Practices for TAP.exeHow to Choose between TA.exe and TAP.exeCreating a Hardware MacroBuilding the ImageConfiguring EWFConfiguring System CloningImage Deployment with SDIPreBoot Execution Environment (PXE) Boot Image DeploymentAdditional Resources

Getting Started

It all begins with TAP.exe and Windows Preinstallation Environment (WinPE). The best way to start anew Microsoft® Windows® XP Embedded configuration is to boot to a WinPE environment and runTAP.exe to generate a hardware profile for the target system. The first Windows XP Embedded withService Pack 1 installation disc is a bootable WinPE image. You will be using this version of WinPE forthis tutorial.

To use WinPE, make sure your target system's basic input/output system (BIOS) supports boot toCD-ROM. Configure the system's BIOS boot device order to boot to the CD-ROM first, then insert thefirst disc of the Windows XP Embedded with SP1 installation CD-ROM and restart the computer.When prompted by the system BIOS to boot from CD-ROM, do so to start the WinPE setup routine.

First, set up your bare metal computer with all of the peripherals you intend the final device to have.Next, insert Windows XP Embedded installation disc 1 into the CD-ROM drive of the target computerand boot to WinPE. When the computer is in the WinPE environment, navigate to the \XPE directoryand run TAP.exe with the following parameters to save the devices.PMQ file to a floppy drive:

tap /O a:\Kiosk-HW.PMQ

Page 2: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

2/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

TAP.exe will then produce a hardware profile (a .pmq file) of the target computer and save theresults of the hardware query to a:\Kiosk-HW.PMQ file on drive A. Next, copy the Kiosk-HW.PMQ fileto your development computer where you have installed the Windows XP Embedded Tools andDatabase.

Best Practices for TAP.exe

TAP,exe is a great tool to ease the Windows XP Embedded development process. However, as withany tool used in the development environment, the tool is only as good as the implementation it isused in. TAP.exe does an excellent job of finding all of the hardware in a system, but it often findsmore devices than are required in the final embedded image.

In situations in which TAP.exe is run on a full desktop system (for example, Windows XP), TAP.exewill find all of the hardware and software components required to operate the system. TAP.exe willeven find devices that were once installed in the system, but were later removed.

For this reason, it is very important that embedded developers using TAP.exe carefully review theresults of an imported PMQ file for erroneous hardware to ensure that they do not include morehardware support than they really require in their final embedded image.

The best way to use TAP.exe is from within the WinPE environment. Running TAP.exe in the WinPEenvironment will usually result in a fairly minimal PMQ or hardware profile of the target system. Oneof the main reasons for this is that WinPE does not load Software Enumerated Devices (swenum)such as wide area network (WAN) miniports and the Kernel Audio subsystem, so the resulting PMQfile is smaller and easier to work with.

The following tables show the differences in the number of devices that TAP.exe will find on variousenvironments:

Full Desktop environment

Typical Windows XP Pro or Windows 2000 Desktop 65–75 devices

Typical Windows XP Pro or Windows 2000 Laptop 90–100 devices

WinPE Environment

Typical Windows XP Pro or Windows 2000 Desktop 35–45 devices

Typical Windows XP Pro or Windows 2000 Laptop 45–55 devices

As you can see, running TAP.exe under the WinPE environment will yield the best results for creatinga minimal configuration run-time image.

What devices does TAP.exe find in a WinPE environment? Just about everything you really need. Itwill find all of the core parent devices such as Peripheral Component Interconnect (PCI) andAccelerated Graphics Port (AGP) devices, the correct system hardware abstraction layer (HAL), diskdrives and CD-ROM drives, system chipsets and critical boot devices required to start the system,and some basic universal serial bus (USB) device support.

How to Choose Between TA.exe and TAP.exe

Target Analyzer (TA.exe) is another tool you can use to query your target hardware and create aminimal footprint hardware profile, but TA.exe lacks the support needed to find many of the childdevices present on most systems. This is because of how TA.exe works.

TA.exe only scans the PCI bus of the target system, and will only locate primary Parent devices itcan find attached to the system's PCI bus, but TAP.exe scans the system's registry to obtain a listof detected devices.

TA.exe will only operate correctly in a Real Mode operating system (such as Microsoft MS DOS®); ithas no way to load or scan a system's registry for devices. TAP.exe on the other hand, is supportedonly on Windows 2000, Windows XP, and Microsoft Windows Server™ 2003, and is not supported onany other Microsoft operating systems.

Page 3: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

3/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

What child devices will TA.exe find? It will only find child devices such as PS/2 mouse devices andkeyboards, and communication and printer ports. TA.exe will not find such devices as the system'sdisk drive, USB peripherals and hubs, floppy disk drives, and advanced configuration and powerinterface (ACPI) devices such as power buttons, fans, and thermal controls.

Running TA.exe on WinPE enables you to create an image faster than running TA on Windows XP,because WinPE does not report many devices that are indexed by Windows XP, and therefore givesyou a smaller .pmq file. This behavior is similar to that of running TAP.exe on WinPE, as opposed torunning it on Windows XP Pro, as stated previously.

A Note About ACPI HALs and TA.exe:

The critical ACPI component—Microsoft ACPI-Compliant System—will not usually be detected byTA.exe and will be missing from your configuration. Be sure to add this component to avoid crashes

during First Boot Agent (FBA)1 setup. You can easily use Filter Manager (within Target Designer) tosearch for all components that have "ACPI" in their display name to easily locate most of the ACPI"stack."

Another critical ACPI component is the specific Integrated Drive Electronics (IDE) BUS MasterController for the chipset that is on your target hardware. Missing or having the incorrect IDE BUSMaster Controller will usually result in a bug check 7b message on the first boot of FBA setup.

Creating a Hardware Macro

This section demonstrates how to make a hardware macro (component) from a PMQ file in

Component Designer2. This is the first step in image building using the Windows Embedded Studio setof tools. After you complete this step, you will have a base operating system (OS) configurationthat supports your target hardware. To do this, start Component Designer, and on the File menu,click Import. Use the Browse option to locate your PMQ file, and then click Next to continue.

Before beginning the import process, you can specify the name and path of a log file for the importerto generate during the import process. Having the import log will help troubleshoot undetected orunsupported devices that may require third-party driver support.

After an import log has been specified, start the PMQ import process. The device look-up procedureusually takes about 10 minutes, but when complete, the importer will produce a hardware macrocomponent of your target hardware.

After the import process has completed, place focus on the new macro component, and view themain properties of the component. You will notice that Target Analyzer is listed as the componentauthor in addition to the component owner. You can remove this if you want and place your ownname in these fields so others in your organization can trace this component back to you if needed.

You can also edit the company name and copyright information with that of your company orproject. The Description field is a great place to keep notes about the hardware macro; you can alsoadd tidbits of information such as the computer's make and model number so you can keep track ofthese details.

To control the footprint, you can also do some device pruning of the imported devices before yousave your hardware macro. If you are not a hardware expert, you can use the Reducing theWindows XP Embedded Run-time Image Size white paper on MSDN® to help remove unneededhardware devices that may impact your final image.

To see what hardware components were found during the import process, click the Component nodeor the Group Dependencies node of your hardware macro, and walk through the devices found duringthe import process. If you do not require sound or modem support in your image, these devicesshould be on the top of your list to remove, if present. In addition, if your design will only need tosupport a PS/2 mouse and keyboard, you can remove all COM and LPT ports while pruning yourmacro. If you do not plan to support floppy disk or CD-ROM access in your final image, you canremove references to these devices as well.

Page 4: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

4/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

This pruning will give you a smaller, more secure image, and will help keep your Windows XPEmbedded image footprint to a minimum.

If you want the macro component to be configurable in Target Designer, you can add the SelectorPrototype component as the prototype of your hardware macro. To do this, navigate to the maincomponent properties page, and click the Browse button on the Prototype field. Navigate to theSoftware | Test & Development category in the database, select the Selector Prototype (R,1507)component, and then click OK to add this component as your prototype.

Now everything is ready to go, and the last thing you must do is release your component so it is in afinal state.

1. Right-click the Kiosk-HW component in the component browser, and then click Releasecomponent. You will be prompted that this action will set the component to a final revision.

2. Click OK, save the SLD file, and close Component Designer.

The next step is to import the SLD file you created, so you need to launch Component

Database Manager3.

1. After Component Database Manager is running, click Import on the main database tab.2. Browse to the location where you saved your SLD file and then select the SLD file for import.

The import process should be fairly quick, and when it is complete, you can close ComponentDatabase Manager.

You are now ready to start the build process, and need to launch Target Designer and start a newSLX file.

1. In the component browser window, you should see your Kiosk-HW component listed. Add thiscomponent to your configuration and then click the Settings node.

2. A dynamic Hypertext Markup Language (DHTML) window will appear, which lists all of thecomponents that your macro will include in your configuration.

Building the Image

Now that the hardware configuration is ready, you can start adding the Windows subsystem supportyou want to your image. You can start by adding the Runtime Quick Start Helper Macro. Thiscomponent is in the Windows XP Embedded with SP1 database under the Software | Test &Development category. Add this component to your configuration and click its Settings node to seeits configurable DHTML settings.

This "helper" macro will resolve the common component dependencies that users encounter whenbuilding a run-time image. You must make one modification to this macro if you want to include

Enhanced Write Filter (EWF)4 support in your final image. Click the Settings node of the HelperMacro, and disable the option for Microsoft Windows NT® Loader so it is not added to the run-timeimage.

If you want Enhanced Write Filter (EWF) support in your image, you must add the EWF component.The EWF component has a component dependency on the version of Windows NT Loader requiredfor EWF support, so you need only add this component to your image and you are ready to go.

You will also need to use the System Cloning tool to prepare your final image for mass distribution,

so search for the System Cloning Tool—Hotfix Q8101445 and add it to your configuration.

You also need to add networking support to the image, so you must include the Transmission ControlProtocol/Internet Protocol (TCP/IP) with the Client For Microsoft Networks macro component.

Now that the hardware and software components are ready, you are ready to perform your firstdependency check. The settings you want to configure for EWF and System Cloning will all beavailable after the first dependency check has completed. Additional settings for User Interface core(shell settings) and Administrator passwords will also need to be configured, so it is best toconfigure everything at one time.

Page 5: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

5/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

Configuring EWF

After your dependency check has completed, you might want to include EWF support in your

Windows XP Embedded runtime. EWF4 allows you to boot your OS from read-only media (such asflash or CD-ROM) or a write-protected hard drive. Before reading the next section, it is stronglyrecommended that you familiarize yourself with EWF and what it can do for your embedded design,so you can decide whether or not you need to implement EWF functionality. You can start with the

EWF product documentation4 and Using the Enhanced Write Filter (EWF) in Windows XP Embedded6.

Types of Overlays

There are two basic types of EWF overlays supported in Windows XP Embedded with SP1. First,there are disk-based overlays, which redirect all writes to a separate partition on a hard disk. Thedata stored on the overlay partition may be committed to the protected volume if desired. Multipledisk overlays can exist for a single volume, and they can be layered. This allows for the creation ofseveral checkpoints of the disk. You can peel back overlay layers to restore to a previous view. Thisis controlled through the EWF Manager Application. Windows XP Embedded with SP1 supports up tonine overlays per volume.

The second type of overlay is a random access memory (RAM-based) overlay. RAM-based overlaysredirect all writes to memory. In general, this data is lost when the computer is shut down orrebooted. Windows XP Embedded with SP1 has the ability to persist this data upon shutdown.However, if the computer is not properly shut down, the data will be lost. Only one RAM overlay maybe configured per volume. Your selection of EWF overlay is dependent on the requirements of yourdevice.

Configuring Disk-based Overlays

The following steps detail how to configure your image to support an EWF disk overlay:

1. In Target Designer, add the Enhanced Write Filter component to your image. If you areprotecting your boot volume, you will also need to include the EWF NTLDR component.

2. Configure the settings for your device, selecting DISK as the overlay type.3. In the EWF Volume Configuration, select the number of protected volumes and overlay levels.

Set the partition size according to the amount of space you want to have in the overlay.Make sure that you enter the disk and partition number for each of the protected volumes,and select the Start EWF Enabled check box.

For a description of all of the fields, see the Windows XP Embedded documentation4.

Typical RAM Overlay Configuration

EWF Volume Configuration

Maximum Number of Protected Volumes 1

Maximum Number of Overlay Levels 1

EWF Partition Size in KBytes 128,000

Start EWF Enabled Yes

Enable Lazy Write No

Disk Number 0

Partition Number 1

Disk Type IDE SCSI IDE

Overlay Type Disk

1. Configure, build, and deploy your image to the device. You will need to partition your drive sothat you have free space available in an extended partition on the drive; this will be used byEWF to store data in the disk overlay, so it needs to be sufficiently large to accommodateyour data. For example, to have 100 megabytes (MB) of overlay available for your protectedvolumes, this partition would have to be at least 100 MB.

Page 6: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

6/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

Note If an extended partition does not exist and you have fewer than fourprimary partitions, you will need to leave unpartitioned space on the drive.

2. Boot your device. During FBA, EWF will configure itself based on the settings in the registry. Itwill create and format the EWF partition.

Configuring RAM-based Overlays

The following steps detail how to configure your image to support an EWF RAM overlay:

1. In Target Designer, add the Enhanced Write Filter component to your image.2. Configure the settings for your device, setting the EWF partition size to 0 and selecting RAM

as your overlay type.3. In the EWF Volume Configuration select the number of protected volumes.4. Set the number of overlay levels to 1 and the partition size to 0. Make sure you enter the disk

and partition number for each of the protected volumes, and select the Start EWF Enabledcheck box. For a description of all of the fields, please consult the Windows XP Embedded

documentation4.

Typical DISK Overlay Configuration

EWF Volume Configuration

Maximum Number of Protected Volumes 1

Maximum Number of Overlay Levels 1

EWF Partition Size in KBytes 0

Start EWF Enabled Yes

Enable Lazy Write No

Disk Number 0

Partition Number 1

Disk Type IDE SCSI IDE

Overlay Type RAM

5. Configure, build, and deploy your image to the device. You will need to partition your drive sothat you have at least 32 KB of free space available in an extended partition on the drive (seefootnote in previous section for more detail). This will be used by EWF to store configurationdata for the RAM overlay between boots.

6. Boot your device. During FBA, EWF will configure itself based on the settings in the registry. Itwill create a minimal EWF partition to store its configuration information.

For additional information about EWF, see Using the Enhanced Write Filter (EWF) in Windows XP

Embedded6.

Configuring System Cloning

There are many techniques you can use to deploy your Windows XP Embedded images. The methodyou choose is dependent on your embedded device requirements. The first method covered in thispaper is System Cloning. The system cloning tool is required for mass deployment of a single image.The core feature of the System Cloning Tool is to generate a unique Security Identification (SID) foreach computer you deploy. If you copied the same image to every device, every device would sharethe same computer SID. This presents a problem because every device running Windows XPEmbedded is required to have a unique computer SID so it is uniquely identified on a network.

Note It is strongly recommended that embedded developers download5 QFE —Q810144 for the System Cloning tool . This System Cloning QFE provides additionalfunctionality currently not available in Windows XP Embedded with SP1.

The System Cloning component has configurable settings that will help you control which aspects ofthe image are altered as part of the cloning process. By default, if you do not configure the SystemCloning component in Target Designer before you build your run-time image, the system cloning toolstarts at phase 12000 of FBA setup, (prior to the final boot of setup | the first user login), and will

Page 7: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

7/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

reset the following system attributes:

Computer SIDComputer NameAutomatic Logon SettingsDomain ParticipationNetwork SettingsUser Specific SettingsMounted Devices (substituted drive letters, etc.)

You configure the System Cloning component through its Advanced properties in Target Designer.The System Cloning component does not have configurable DHTML Settings, so users must edit thecomponent through the Advanced properties option of the component.

The following are some of the common configurable settings you will find in the System CloningTool's advanced properties:

cmiResealPhasecmiRemoveAutologoncmiGenerateComputerNamecmiUnjoinDomaincmiRemoveNetSettingscmiRemoveUserSettingscmiRemoveMountedDevices

The cmiResealPhase flag is one of the most important flags embedded developers need to consider.This flag will determine when the cloning process will start during the setup process. There are onlytwo supported settings for the cmiResealPhase flag: 12000 and 0.

As described earlier, the default setting for the cmResealPhase flag is 12000. This setting will startthe System Cloning tool (fbreseal.exe) at the very end of FBA setup, just prior to the first user login.When the System Cloning tool is started, it will prompt the user to shut down the system anddistribute the image.

When a cloned image is distributed to a target system, the cloning process will initialize and resetthe system SID and user accounts on the first boot of the client. The entire cloning process willoccur on the first boot of the client. System Cloning will never start again on subsequent boots ofthe client, and it is not possible to reseal a system more than once. If you try to use fbreseal.exe ona previously cloned system, expect to see nothing but errors.

If the cmiResealPhase flag is set to 0, this tells FBA not to fire at any phase of setup, but to includethe system cloning tool in the Windows XP Embedded image so it is ready to be used after FBAsetup completes. This is a very useful setting if you plan to install or preconfigure your Windows XPEmbedded image after FBA setup has completed, such as adding applications, joining a domain oradding third-party drivers.

After the image is completely configured and is ready for the cloning process, launch thefbreseal.exe utility from the \Windows\System32 directory. This will spawn the cloning process, andit will prompt the user to shut down the system and distribute the image. There are a number ofcommand-line switches that fbreseal.exe supports:

-keepallWhen specified, keeps all settings listed below during cloning.-keepdomainWhen specified, leaves the currently joined domain during cloning.-keepnetWhen specified, leaves any network settings intact during cloning.-keepuserWhen specified, keeps user specific settings intact during cloning.-keepAutologonWhen specified, preserves the Automatic Logon settings-keepmounted

Page 8: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

8/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

When specified, keeps mounted drive and drive letter setting intact during cloning.

Example syntax: FBRESEAL -keepall

System Cloning Options:

cmiResealPhase (INT)Default setting is 12000.Set to 0 to not clone during FBA setup.cmiRemoveAutologon (BOOLEAN)Set to TRUE to keep the Automatic Logon feature enabled after the cloning process.Set to FALSE to remove Automatic Logon after the cloning process.cmiGenerateComputerName (INT)Default setting is 1. This tells the cloning process to generate a random computer name forthe client. Example: OEM-HUDVHELDDYQSetting to 0 tells the cloning process to preserve the existing computer name.cmiUnjoinDomain (BOOLEAN)Set to TRUE to leave the currently set domain during cloning.Set to FALSE to retain the domain membership after cloning.cmiRemoveNetSettings (BOOLEAN)Set to TRUE to remove all network settings, including network bridges, during cloning.Set to FALSE to retain all network settings after cloning.cmiRemoveUserSettings (BOOLEAN)Set to TRUE to remove all user specific settings, including start menu customizations and mostrecently used file lists, during cloning.Set to FALSE to retain all user specific setting after cloning.cmiRemoveMountedDevices (BOOLEAN)Set to TRUE to remove all references to mounted drives, such as floppy or CD-ROMs, includingchanging drive letters, during cloning.Set to FALSE to retain mounted drive settings after cloning.cmiUnjoinDomain (BOOLEAN)Set to TRUE to remove all references to mounted drives, such as floppy or CD-ROMs, includingchanging drive letters, during cloning.Set to FALSE to retain mounted drive settings after cloning.

For more information about System Cloning, see the Windows XP Embedded documentation7.

Image Deployment with SDI

Overview

In addition to System Cloning, Windows XP Embedded includes the System Deployment Image (SDI)feature, which enables you to manage your run-time images. With SDI you can create file-backedvirtual disk drives that can be used as a staging area for your run-time images. The SDI featuresimulates a storage medium by using a disk image file (.sdi) that is located on an existing file system.SDI gives you another way to deploy your Windows XP Embedded images.

When you install Windows XP Embedded on your development system, SDI loader is installed. Withthis tool you can create, mount, and dismount file-backed virtual disk drives through a graphical userinterface (GUI). The SDI Loader application is well documented in the Windows XP Embedded online

documentation8, and is fairly straightforward to use.

SDIMgr is a command-line tool that manages and manipulates SDI files. The utility SDIMgr.wsf canbe found in the \Program Files\Windows Embedded\utilities directory after installing the Windows XPEmbedded tools. In addition, the first Windows XP Embedded Installation disc of is a bootable WinPEimage, and in the \XPE folder off the root of the disc you can find SDIMGR.wsf.

Actions processed by SDIMgr are controlled by command line switches. These switches can be listedanywhere on the SDIMgr command line by issuing the /Help switches. Most switches, however, are"command" switches that cause SDIMgr to process a command. These switches are processed instrict left-to-right order as they are entered on the command line. Use the "/cmdhelp" switch for

Page 9: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

9/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

detailed help on command switch syntax and operation.

Create a SDI Disk

This SDI disk will be used to deploy a pre-FBA image to the client hardware.

1. Launch SDI Loader and select Add Disk.2. Choose a new sdi file name such as "PreFBA.sdi". Confirm that you would like to create the

new file.3. Select the size of the disk that you would like to create.4. Use "Disk Manager" to initialize the new SDI disk as basic.5. Use "Disk Manager" to create a small primary boot partition. Select the appropriate file system,

such as FAT or NTFS, and be sure to format the SDI disk.6. Use "Disk Manager" to mark the partition as active.

The PreFBA.SDI file is now ready to be used. At this stage, we can use the SDI disk as a virtualdisk, and simply copy embedded run-time images into the SDI disk, or even build directly to the SDIdisk from Target Designer. Once you are done with the SDI file, use SDI Loader to dismount thevirtual SDI disk via the "Remove Disk" option. Once unloaded, PreFBA.SDI is simply a file, and can beeasily moved and distributed.

Deploying the Pre-FBA Image

This section details how to move the built Windows XP Embedded runtime to the target device.There are numerous techniques and mechanisms that could be utilized to accomplish this. In thisexample, the image is deployed from a network share using a WinPE boot disc and SDIMgr.

1. Ensure that the target device and development computer are networked.2. Create a share on the development computer with the name SDI. Make this share accessible

to everyone, with read-only permissions. This is the share that is accessed from the targetdevice.

3. Copy "PreFBA.sdi" to the SDI share.4. Boot the target device using the WinPE boot disc (Windows XP Embedded with SP1 installation

disc 1).5. On the target device, map a network drive to the share that was just created. For example:

Depending on how security was configured on this share, you may have to provide user credentials.

1. On the target device, use SDI Manager to lay down the pre-FBA image. Do this by typing thefollowing at the command prompt:

1. This command will write the SDI disk to the target device. SDI Manager performs a sectorbased copy so tools such as fdisk and format are not required.

2. After SDI Manager is complete (the command prompt returns), reboot the target device. Besure to remove the WinPE boot disk before the system boots into the new Windows XPEmbedded runtime.

Capturing the "Golden" Image

After the image has been customized, configured and resealed, it is necessary to capture this imageso each target device does not have go through FBA or any of the manual customizations. The tool"SDI Manager" is used to capture the final Windows XP Embedded runtime. Because this is the image

net use z: \\mydevmachine\sdi

sdimgr z:\PreFBA.sdi /writedisk:0 /yes

Page 10: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

10/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

that will be applied to all the target devices, it is referred to as the "golden" image.

1. Boot the target device with the WinPE boot disk.2. Map a network drive to the share that was just created. For example:

3. Create a new SDI file by typing:

This command reads the physical disk specified (by number) into a disk blob into the SDI filespecified. For Example:

The target volume is written to a SDI file on the network share. The image is ready for mass-deployment.

Useful SDIMgr commands and sample syntax:

/writepart:DEST

This command writes the contents of a PART (partition) blob to the specified destination. Thedestination must be a logical drive letter followed by a colon, for example "E:".

/readpart:SRC

This command reads the partition specified by a drive letter into a partition blob in the SDI file. Forexample:

/dump

This command displays information about the SDI file specified, including fields in the SDI file headerand information related to the blobs (binary blocks) stored in the SDI file.

/pack[:ALIGN]

This command repacks the SDI file. Free space within the SDI file is compacted, and blobs arerealigned as necessary to meet the specified alignment. The default ALIGN value is 1, whichcorresponds to a 4 kilobyte (KB) alignment. Specify alternate alignments in units of 4 KB. Forexample, use 2 to specify an alignment of 8 KB. Most SDI files use a 4 KB alignment.

To obtain a list of all SDIMgr commands and switches, make your own help files from SDIMgr.wsf.Use the following two commands:

net use z: \\mydevmachine\sdi

sdimgr z:\golden.sdi /new

sdimgr z:\golden.sdi /readdisk:0

sdimgr DriveE.sdi /writepart:e: /yes

sdimgr DriveF.sdi /readpart:f:

Page 11: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

11/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

After they are complete, you should have an SDIMgr_help.txt file that contains SDIMGr's online Helpsystem for your reference.

PreBoot Execution Environment (PXE) Boot ImageDeployment

Yet another way you can deploy your Windows XP Embedded runtimes is by using PXE boottechnologies. This section details a solution for Windows XP Embedded image deployment usingRemote Installation Services (RIS), WinPE and the golden SDI image that was prepared in theprevious section. There are two steps required to set up a Windows XP Embedded image deploymentinfrastructure. The first step is to configure a bootable version of WinPE to deploy SDI images. Thesecond step is to configure RIS to boot the customized version of WinPE.

WinPE and the RIS server will only be used for initial image deployment. After an image has beendeployed to the target device, the device should be able to perform self servicing without requiringWinPE or RIS.

This section details how to configure WinPE to deploy SDI disks to the target devices. WinPE will beutilized for the sole purpose of laying down an SDI image. For more information about WinPE, seeMicrosoft Windows Preinstallation Environment Overview.

Placing a Bootable Version of WinPE on a RIS Server

After WinPE has been customized to deploy the SDI disk image, the bootable version of WinPE mustbe placed on an RIS server. This provides target devices (with PXE support) with the ability to bootWinPE from the RIS server. WinPE will then deploy the SDI disk to the device. This paper does notdetail the process of setting up an RIS server. For more information about how to set up and

configure RIS, see the RIS Installation Guide9.

Using WinPE on a RIS server requires the following:

A Windows XP product disc and a WinPE disc of the same build number.A properly configured Windows 2000 with SP2 installation.The destination computers must have a PXE-enabled network interface card (NIC), or have aNIC that is supported by the RIS boot disk.Windows 2000 RIS Server

To install on a computer running Windows 2000 RIS server, deploy the hotfix referenced in KB article

Q29954110.

To create a RIS image and boot from it:

1. On the RIS server, open a command prompt and run RISetup.exe –add.2. When prompted for a source, point RISetup to the Windows XP product disc.3. Browse to the location where RISetup installed the image, such as:

\\Server_name\Share_name\REMINST\Setup\Language\Images.4. Open the I386 folder in the folder of the image that was just created.5. Browse the Windows XP Embedded Service Pack 1 disc, which contains the WinPE files, and

open the I386 folder.6. Copy the contents of the WinPE I386 folder into the Remote Install I386 folder that was just

opened, overwriting all files if prompted.7. Open the Templates folder in the I386 folder that you just copied over.8. Open the RIStndrd.sif file in a text editor, and on the line that starts with OSLoadOptions, add

the switch /minint.

Sdimgr /help > SDIMgr_help.txtSdimgr /cmdhelp >> SDIMgr_help.txt

Page 12: Building and Deploying XP Embedded Images

3.10.12. Building and Deploy ing XP Embedded Images

12/12msdn.microsoft.com/en-us/library /ms838635(d=printer,v =w inembedded.5).aspx

© 2012 Microsoft. All rights reserved.

9. Copy sdimgr.wsf from the Windows XP Embedded folder on Windows XP Embedded disc 1 tothe WINPE I386\System32 folder.

Start a RIS client, and select the operating system image that was created in Step 1. WinPE starts.To automate the process of laying down the SDI disk (gold.sdi), modify startnet.cmd in theI386\System32 directory.

Additional Resources

For more information about Windows XP Embedded, see Windows XP Embedded home page11.

For online documentation and context-sensitive Help included with Windows XP Embedded, see

Windows XP Embedded product documentation12.

Links Table

1http://msdn.microsoft.com/en-us/library/ms912927(v=winembedded.5).aspx

2http://msdn.microsoft.com/en-us/library/aa460277(v=winembedded.5).aspx

3http://msdn.microsoft.com/en-us/library/aa460410(v=winembedded.5).aspx

4http://msdn.microsoft.com/en-us/library/ms912906(v=winembedded.5).aspx

5http://go.microsoft.com/fwlink/?LinkId=17185

6http://msdn.microsoft.com/en-us/library/ms838511(v=winembedded.5).aspx

7http://msdn.microsoft.com/en-us/library/ms912854(v=winembedded.5).aspx

8http://msdn.microsoft.com/en-us/library/ms940108(v=winembedded.5).aspx

9http://go.microsoft.com/fwlink/?LinkId=17184

10http://go.microsoft.com/fwlink/?linkid=17182

11http://go.microsoft.com/fwlink/?linkid=7659

12http://go.microsoft.com/fwlink/?linkid=15114

13http://msdn.microsoft.com/en-us/library/ms369863.aspx

Community Content