Chapter 4. Embedded Enabling Features Introduction
This chapter contains supplemental information regarding Standard 2009’s Embedded Enabling Features (EEFs) which are tools and features that are unique to Standard 2009 and not included in Windows XP Professional.
You should begin by reviewing the foundation documentation on-line; click on this link:
Embedded Enabling Features
BootPrep
First review the on-line documentation by clicking on this link:
BootPrep
The principal intent of the BootPrep tool is to change the Master Boot Record (MBR) from an MS-DOS FAT16 format into a format that is recognized by Windows XP or Standard 2009.
The BootPrep tool only works when you run it from MS-DOS, and is only required if you are starting with a storage device that cannot be recognized as configurable by Windows XP.
The Bootprep tool is a command-line tool to create media that can boot into Standard 2009. First, you must prepare the media by using MS-DOS tools such as FORMAT and FDISK to prepare the MBR and at least one partition. The BootPrep tool prepares your media, the active partition of which has been formatted and made bootable with FAT16, BIGDOS FAT 16, or FAT32 for booting into Windows Embedded. The program replaces the partition boot sector code that normally boots into MS-DOS by loading Io.sys and Msdos.sys with the code that loads NTLDR.
We recommend first use the standard approaches to format the device (such as diskmgmt.msc or diskpart.exe); if these approaches do not work you can try BootPrep.
Using BootPrep to prepare a storage device
To use the BootPrep tool to prepare a storage device, the BIOS must be able to recognize the flash disk as an AT (Active Disk) disk. If this is the case, the hard disk can be treated like any other hard disk drive. To be properly recognized, your storage device must connect to your computer as an IDE device.
Plug in the hard disk drive that you want to prepare so that it is the primary partition.
Boot to a floppy disk that contains MS-DOS, fdisk, Bootprep.exe, and format.
Run fdisk, and delete everything.
Create a primary partition of the appropriate size, for example 500 MB.
Mark that partition as active.
Quit fdisk, and then reboot the embedded device. Boot to the same floppy disk that you used in step 2.
Run format to format the partition that you created in step 4.
Run the following command to create a Master Boot Record (MBR):
fdisk /mbr
Run Bootprep.exe to create a partition sector, for example:
bootprep.exe /dC
where C is the drive.
USB Boot
Links:
MSDN: Booting from USB Devices
MSDN: Booting Windows Embedded Standard from USB
MSDN: XPe Component: USB Boot 2.0
Troubleshooting USB Boot in Feature Pack 2007
If you intend to boot from USB media, include USB Boot 2.0 Update and USB Boot Mass Storage Device Update (or later versions). Include these components ONLY if booting from USB. Remove them if booting from IDE or SATA because USB Boot always marks the first enumerated USB Storage device as fixed type, so the device cannot be safely removed once installed (resulting in corrupted or lost data on the first detected USB Storage device).
Device Update Agent
Please see the on-line reference documentation for DUA:
Device Update Agent
Inside Device Update Agent (Standard 2009)
Link to more information in this document:
Chapter 6. Servicing
Another document describing how to prepare Updates for use with DUA:
Applying QFEs with Windows XP Embedded Device Update Agent
This link includes a DUA video tutorial.
Windows XP Embedded Tutorials
The following “power toy” (DUA ScriptGen) eliminates some of the burden of authoring DUAScripts:
DUAScriptGen User's Guide
Setting a registry key with Device Update Agent
The Device Update Agent documentation indicates that the size parameter for defining or setting a registry key or value is optional, depending on the command that it applies to. The command reference should really be as follows:
11, [ErrorMode], hKey, [ExpandMode], Key, [ExpandMode], ValueName, Type, [Size,] Value
A size parameter is only needed for the following value types:
DAREG_NONE
DAREG_BINARY
DAREG_LINK
DAREG_RESOURCE_LIST
DAREG_MULTI_SZ
For value types that do not require a size, leave out the parameter entirely. DUA looks at the type, and determines if the next parameter should be the size or the value. In the command you included in your Device Update script, DUA sees that the type is REGSZ, and expects the next parameter to be the value. Because the next value is specified as a null string, DUA assumes that this is the value that you want to set and moves on. This is why the command shows as a success. DUA ignores anything beyond the last parameter.
So you will find that this command sets an empty string:
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleValue,DAREG_SZ,,Hello World
Whereas this command actually sets the value:
REGSETVALUE,,HKEY_LOCAL_MACHINE,,SYSTEM\CurrentControlSet\SampleKey,,SampleValue,DAREG_SZ,Hello World
How to judge whether a previous DUA command was successful or failed
For the purpose of debugging, you can add a value in the registry under DUA config:
Key Name: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DUAgent\Parameters\Config
Value Name: ‘Logging’
Value: 1
Type: DWORD
This will log both successes and failures to the event log. To view the event log (Eventvwr.exe), include the Administration Support Tools component in your design.
|