Microsoft Windows XP Embedded Remote Boot

1.Remote Boot Overview
The Remote Boot service for Microsoft& Windows& XP Embedded is an implementation of Preboot eXecution Environment (PXE) that allows a client device to boot using a downloaded image. This service allows you to boot an image on a client device without requiring the client device to have a persistent storage device, such as a hard drive or Flash RAM memory. The Remote Boot service requires your client device to have a PXE compatible BIOS, a PXE compatible network card, as well as enough RAM memory to store and run your Windows XP Embedded run-time image.

Note In general, the amount of RAM necessary for a client device is twice the size of the image to be used.
The Remote Boot service allows a properly configured Windows XP Embedded device to boot using a PXE server. The Windows XP Embedded run-time image is then transferred to the client device using the Trivial File Transfer Protocol (TFTP) and is stored onto the device in memory as a RAM disk. Once the image has been transferred, the Windows XP Embedded operating system is loaded from the RAM Disk. When shutdown, the client device returns to its initial state.

The Remote Boot manager tool allows you to configure your Remote Boot service. This presents you with the option of excluding specific devices, specifying an image to load, and customizing your Remote Boot service.

Note The Remote Boot service requires the Dynamic Host Configuration Protocol (DHCP), TFTP, and PXE protocols and allows you to configure them on one or more servers. It is important for you to verify that your network allows these protocols to interact correctly for the Remote Boot service to function properly.

///////////////////////////////////////////////////////////////////////////////
2.Installing the Remote Boot Server
The Remote Boot Server allows your server to host Remote Boot images for remote devices.

To install the Remote Boot server

Prepare your server operating system in accordance with the minimum requirements specified by the Windows XP Embedded release notes.
Insert Microsoft Windows XP Embedded Disk 1 into the CD-ROM drive of the server.
From the Windows XP Embedded Installer window, choose Remote Boot Setup.
In the Setup Wizard, choose Next.
Choose the Accept option, and then choose Next to accept the terms of the End-User License Agreement (EULA).
In the User Name and Organization fields, type your name and organization information.
Choose Next.
From the Setup Type page, choose either the Typical or Custom option, and then choose Next.
Note If you choose the Custom option, you can install the PXE boot service, TFTP service, or both. If you choose to install the PXE boot service, you can specify the location of the TFTP server. If you choose to install the TFTP service, you can specify the file path for the TFTP server to use when obtaining files. Installing DHCP and the Remote Boot service on one system and TFTP on a different system is not supported.
From the Final Setup page, choose Install.
Note Installation of the Remote Boot server does not result in the installation of DHCP. DHCP must be installed separately on the server.

/////////////////////////////////////////////////////////////////////////////////////
3.Configuring the Remote Boot Service Using Remote Boot Manager
The Remote Boot manager is a tool that edits the policy list parameter information stored in \Windows Embedded\Remote Boot Service\Rbsprov.ini for the Remote Boot service and the registry. This allows you to quickly set up the Remote Boot service and configure it according to your specifications.

The following table shows the policy list parameters you can edit in the Device Policy List table in the Remote Boot manager tool.

Note The Client MAC address parameter information is required. All other parameter fields may be left empty and inherit the default settings specified in the Default Settings group box.
Policy list parameter Description
Client MAC Address Contains the MAC address of the Preboot eXecution Environment (PXE) client computer corresponding to the policy list entry.
Description Contains a description of the device being configured.
Action Specifies what action to take when the PXE client computer is discovered on the network. If set to Ignore, the Remote Boot server ignores the specified MAC address even if the Use default settings to boot unspecified clients option has been selected.
Boot Server Specifies the IP address of the server that contains the boot image. If set to 0.0.0.0, the Remote Boot server obtains boot files from the host server.
Boot Program Specifies the bootstrap program used to start the PXE client computer. The following list shows the available options in the Boot Program field:
Startrom.com enables attended remote image booting. This requires the user to press the F12 key to initialize the Remote Boot service.
Startrom.n12 enables unattended remote image booting. This does not require the user to press the F12 key to initialize the Remote Boot service.
Reboot.com is used for testing purposes and causes the client computer to reboot.
Abortpxe.com aborts a boot attempt of the PXE client computer. The client computer then proceeds to boot from the next available boot device.

Boot Image Specifies the name of the Windows XP Embedded image that is to be copied to the PXE device. If this field is left empty, the image name must be supplied using one of the following options:
Specify the image name in the Boot Parameters field, for example, /rdpath=net(0)\myimage.sdi.
Create a Boot.ini file and place it in the boot images folder. If you use a manually created Boot.ini file and also use a disk image (.sdi) file, you must include the option /rdimageoffset=4096 or your image execution will fail.

Boot Parameters Specifies additional boot parameters. For example, to debug a network bootable device using the kernel debugger, you may include the boot parameters /debug /debugport=com1 /baudrate=57600.
Note Not all boot features are supported, such as F8 functionality.

The following table shows the default parameters you can edit in the Default Settings group box.

Default parameter Description
Default Boot Server Specifies the IP address of the server containing your boot file information. If this field is set to 0.0.0.0, the Remote Boot client downloads the boot program and image from the server that hosts the Remote Boot service.
Default Boot Program Specifies the boot program to be used if one is not entered in the Boot Program field of the Device Policy List. The maximum length for a file name is 13 characters.
Default Boot Image Specifies the default boot image.
Default Boot Parameters Specifies the default boot parameters.

The following table shows the global parameters you can edit in the Global Settings area.

Global parameter Description
Response time Specifies the delay time between the reception of DHCP packets from a client computer and the processing of the packet information.
For more information, see Remote Boot Response Time.

Use default settings to boot unspecified clients Specifies whether the Remote Boot service should respond to all PXE client computers on a subnet or only respond to PXE client computers whose MAC addresses are specified in the Client MAC Address field.
Note Remote Boot service does not respond to clients with Action set to ignore.
Use DHCP port (67)? Specifies whether the DHCP and PXE services are located on the same server. Select this option only if the DHCP and PXE services are not on the same server.

Note Changes to the global parameters for the Remote Boot server do not take effect until you choose Save in the Remote Boot manager window. Restarting the Remote Boot service is required only if the Use DHCP port (67) setting is changed.
Microsoft recommends that you use the Remote Boot manager and do not edit the Rbsprov.ini file directly. However, in some situations it may be beneficial to edit the file manually using a text editor, such as when you have a large number of client computers. Rbsprov.ini can also be manipulated using custom software.

Each line of text in Rbsprov.ini is terminated with a new line character and corresponds with a policy list line item. Parameters within each line should be separated by a space character. Any changes made to the Rbsprov.ini file are automatically detected by the Remote Boot service. The following table shows the parameters found in a typical policy list entry.

Parameter Description
00-50-8B-CA-67-A2
Specifies the PXE client address.

  • enable
  • or -
  • disable

Enables or disables the Remote Boot service for a specific client device.
name=“Front Office Cash Register”
Contains the description field for the device.
imagename=“my-disk.sdi”
Indicates the name of the image file to be used.
bootprog=“startrom.n12”
Indicates the name of the boot program file to be used.
bootserver=“1.2.3.4”
Specifies the TCP/IP address of the boot server.
bootparams=“/debug /debugport=com1 /baudrate=57600”
Specifies additional boot parameters.

If you have edited an Rbsprov.ini file and then open it with Remote Boot manager, you may encounter some of the following problems:

Records with invalid MAC addresses are not displayed.
Text fields that contain a greater number of characters than the prescribed limit are truncated to the maximum length, as shown in the following table.
The following table shows the maximum character length for each field.

Field Maximum length
Boot Program 13 characters
Image 100 characters
Boot Parameters 100 characters
Description 50 characters

///////////////////////////////////////////////////////////////////////////////////
4.Creating a Remote Boot Image
Remote devices download a Remote Boot image from a Remote Boot Server.

To create a Remote Boot image

Verify that the available RAM for the client computer accommodates the size of the run-time image. Also, verify that the available RAM provides enough free space for the image to operate once it has been installed.
Using the Target Designer tool, create a run-time image for your Remote Boot device.
Configure the run-time image to boot from drive C.
If the Windows folder is different than C:\Windows, you must use the Boot.ini option to remotely boot the device.

Include the Windows RAM Disk Driver component in your image.
Verify that your image is 500 MB or less. This includes additional free space for temporary files, such as Internet Explorer cache files.
If you require unique security identifiers, you must add the System Cloning Tool component to your image. You must also verify that no custom components have been installed that may cause a reboot of the client computer after the cloning operation has completed

///////////////////////////////////////////////////////////////////////////////
5.Preparing a Remote Boot Image for Deployment
When you start your system using your run-time image on a system that is identical to the one that is going to be booted using Remote Boot service, the system is configured by First Boot Agent (FBA). The FBA service requires one or more system boots, making it unusable with the Remote Boot service. Therefore, you must run FBA before creating the deployable Remote Boot image.

To configure your image correctly using FBA

Copy the run-time image to the drive C of your target system. If you configured the target system as a multi-boot device, avoid overwriting the Boot.ini file on drive C to retain multi-boot capability. The Boot.ini file is not necessary in the final RamDisk/SDI image.
Run your run-time image on the target system as drive C to let the FBA phase finish. If you installed the System Cloning Tool component, FBA completes operation when the “Machine Resealed” message appears.
To prepare a Remote Boot image for deployment

In the BIOS setup utility of the client computer, configure the network boot attempt to occur first.
Install the SDI Driver on your development system.
For more information, see the SDI documentation in the Windows XP Embedded Help documentation.

Create an SDI disk of the appropriate size using the SDI loader utility.
Format the SDI virtual drive using Disk Management Console, Diskmgmt.msc. When prompted, do not choose to create the volume as a dynamic disk.
Copy your run-time image to the SDI volume. It is not necessary to copy the Ntdetect.com, Ntldr.exe, or Boot.ini files to the SDI volume because they are automatically downloaded from the server during an early phase of Remote Boot.
Create another SDI image that will contain the partition for the SDI disk created in Step 2. This will be the final SDI image that will reside on the Remote Boot server. The following command line example shows how to create the new SDI image using the SDI manager command line utility.
sdimgr /new c:\ramdisk.sdi
sdimgr c:\ramdisk.sdi /readpart:e:
Copy the SDI image to the \Program Files\Windows Embedded\Remote Boot Service\Downloads folder of the server.
If you choose to use a Boot.ini file that resides on the server, you must add the /rdimageoffset=4096 switch to the Boot.ini file to accommodate the structure of your SDI file. This step is not necessary if you are using the Remote Boot manager and not a Boot.ini file with an SDI image that uses an .sdi extension.
Note The first 4 KB of each SDI image file consists of the SDI header information. The remaining contains the partition image.

////////////////////////////////////////////////////////////////////////////////
6.Starting and Stopping Remote Boot Services
By default, the Remote Boot Setup Wizard automatically starts both the Remote Boot service and TFTP service and configures them to start automatically on reboot. From that point, you can stop or start any service manually by using either a command prompt or by running the Services.msc file. The following table shows the commands you can use to alter the state of a Remote Boot service.

Command Command line or batch file entry Services.msc instruction
Start a Remote Boot service Net start rbspxe
Right-click Remote Boot Service, and then choose Start.
Stop a Remote Boot service Net stop rbspxe
Right-click Remote Boot Service, and then choose Stop.
Start TFTP Net start tftpd
Right-click Trivial File Transfer Protocol, and then choose Start.
Stop TFTP Net stop tftpd
Right-click Trivial File Transfer Protocol, and then choose Stop

////////////////////////////////////////////////////////////////////////////////////6.
Configuring DHCP for Remote Boot Services
The Remote Boot service requires that a DHCP server be installed on your network. The DHCP server initiates the communication between the Preboot eXecution Environment (PXE) client device and the Remote Boot server, allowing the client device to retrieve necessary image information from the server. The following list shows the DHCP requirements for the Remote Boot service:

The DHCP server must be configured with a static IP address.
The DHCP server must have an assigned IP address range.
Exclusion ranges for all devices on the network that do not support DHCP should be entered.
IP address reservations should be created as needed.
If you choose to configure Remote Boot service and DHCP to reside on the same server, you must configure the Remote Boot service to communicate using a port that does not conflict with DHCP. From the Remote Boot manager tool, verify that the Use DHCP Port (67) option has not been selected. You must also configure DHCP to include the server option 60. The following example shows how to configure DHCP to include server option 60.

C:\WINDOWS\system32>netsh
netsh>dhcp
netsh dhcp>server \<server_machine_name>
netsh dhcp>add optiondef 60 PXEClient String 0 comment=PXE support
netsh dhcp>set optionvalue 60 STRING PXEClient
netsh dhcp>exit
If you choose to configure PXE and DHCP to reside on separate servers, you must configure the Remote Boot service to communicate using DHCP port 67. From the Remote Boot manager tool, verify that the Use DHCP Port (67) option has been selected. The DHCP server must not include server option 060 if PXE and DHCP reside on separate servers.

////////////////////////////////////////////////////////////////////////////////////7.Using a Boot.ini File in a Remote Boot Environment
The Boot.ini file can be used instead of using the settings within the Remote Boot manager to boot the appropriate image on a client device. You can create a custom Boot.ini file that is used to present the client device operator with a choice of images to load. If the default Boot Image and Boot Parameters fields are left empty and the Boot Image and Boot Parameters fields for the individual device are left empty as well in the Remote Boot manager, the Remote Boot client will download a Boot.ini file from the \Program Files\Windows Embedded\Remote Boot Service\Downloads directory to determine the run-time image to be used. You can force each Remote Boot device on your local network to boot using your custom Boot.ini file by verifying that the Use default settings to boot unspecified clients option has been selected in the Remote Boot manager.

The following example shows a Boot.ini file that allows the Remote Boot client operator to choose from two different images.

[boot loader]
timeout=30
default=ramdisk(0)\windows
[operating systems]
ramdisk(0)\windows=“Maint Tools” /fastdetect
/rdpath=net(0)\maint.sdi /rdimageoffset=4096
ramdisk(0)\windows2=“Image being debugged” /fastdetect /rdpath=net(0)\myimage.sdi /rdimageoffset=4096 /debug
/debugport=com1 /baudrate=57600
Note F8 functionality is disabled.

/////////////////////////////////////////////////////////////////////////////////////8.Remote Boot Response Time
The Remote Boot service can be configured to respond to a Preboot eXecution Environment (PXE) request immediately, or respond to requests, specified in seconds, that are at least n seconds old by setting the Remote Boot manager Response time field. When a PXE client device sends a request to the Remote Boot service, that request has a time stamp generated by the client device. The time stamp is a relative value, usually time elapsed since boot. When the Remote Boot service receives the request, it compares this value to the response time value and processes the request accordingly.

If the response time is set to 0, and the initial request from the PXE client has a time stamp of 4 seconds since boot, the Remote Boot service will respond to the initial request. If the response time is set to 5, the Remote Boot service does not respond to the initial request but responds when the client is retried. You can configure the response time with the following settings:

Users who want the Remote Boot service to respond to request immediately should set the response time to 0.
Users who want to respond only to client retries can increase the response time to a maximum of 32 seconds. Start with a delay response of 5-9 seconds and adjust accordingly.
Due to server configuration and variance in the implementations of the PXE clients, you should thoroughly test these settings.

嵌入实际上就是一个几百K的小EXE程序加上2G的SQL数据库,

用这个小程序加上自己编写的安装脚本后,
可以个性化的用数据库里每个文件及系统文件组成一个WINXPEMB系统,
实际上,这个脚本编写,够你研究几个月的了……