• Step 6: Finalize image, burn and boot the run-time image from an El Torito CD
  • Troubleshooting
  • Common problems and solutions
  • Sample FBALOG.TXT
  • Booting from an SDI file
  • Microsoft Windows Embedded Standard 2009 Developer Resource Kit Componentizing Windows xp professional for embedded systems developers




    Download 5.67 Mb.
    bet25/36
    Sana26.12.2019
    Hajmi5.67 Mb.
    #5189
    1   ...   21   22   23   24   25   26   27   28   ...   36

    Step 5: Running Etprep.exe


    Before you can burn your updated run-time image onto a CD, you must run the Etprep.exe tool. Make sure to reboot your system immediately after etprep.exe has finished.

    To run Etprep.exe:



    1. Your system should still be booted on the embedded partition. Open a command prompt, navigate to the windows\system32 subdirectory, and then type the following command:

    etprep /all

    1. If the operation is successful, the following text will be displayed.

    Deleted EWFpartitions = 1.

    Swapped ElTorito volume drive F: with Boot volume C: .

    Since the system reboots immediately after running etprep, you may not be able to see these statements.



    1. The EWF partition on the disk has been deleted, and the boot drive letter has been reassigned to the El Torito CD, which will become the boot volume when you boot your target system from CD ROM. The partition you are currently booted from may no longer be bootable after running Etprep.exe because the drive letters have changed. Be sure that you are ready to burn the final CD before completing this step.


    Step 6: Finalize image, burn and boot the run-time image from an El Torito CD


    Restart your system on your safe build (XP Professional).

    The following steps 2-3 are optional, and can be useful for troubleshooting.



    Check if ETPREP /All command has been executed with success: run Regedit and highlight HKEY_LOCAL_MACHINE is left pane. File Menu  Load Hive. Go to c:\windows\system32\config and open SYSTEM file. Give a name (ex: SYSTEM XPe).

    In left pane of regedit, go to HKEY_LOCAL_MACHINE \SYSTEM XPe\MountedDevices. There, you will see some objects with volume IDs in the form "\??\Volume{[guid]}". Ignore these entirely. Below them will be some values with the form "\DosDevices\C:". There should be a new drive letter listed there whose binary data starts with 45 4C 54 4F... (converted from hex to ASCII, this spells “ELTO”. This is the new "drive" reported by the Eltorito driver and represents the emulated hard disk image on the CD. If the ETPREP tool successfully “swapped” the drive letters, you should see this:



    If the tool did not correctly execute, the drive assignment will look something like the following, and you will need to manually swap the binary data of this new drive with the binary data of the \DosDevices\C: drive (assuming C: is the original source partition).



    Make sure that there is nothing else you need to do with the embedded image before you reboot to your safe build to burn the final El Torito master CD.

    When finished, you must “unload” the hive. Select the hive (SYSTEM XPe), then choose File->Unload Hive.

    Finally, close the Registry Editor program.



    1. Run HD2ISO for the second time (same process as in step 3) and burn the final .ISO image.

    2. Insert the CD that contains your run-time image in the CD ROM drive on your target device.

    3. If you have a hard drive installed, in the BIOS configuration menu on your target system, verify that the CD is configured as first boot device, and that your target system will attempt to boot from CD first.

    4. Allow your target system to reboot. The system should boot from the El Torito CD.

    5. Log on to your target system, open a command prompt, and then type ewfmgr c: to confirm that the RAM-based EWF is running. The EWF Manager Console application component should report the amount of system memory used. This number should grow as your target system is running various applications.

    Troubleshooting


    If having problems:

    • Use kernel debugger to get additional data during boot.

    • Ensure the target Embedded partition is Marked As Active (in Computer Management / Storage / Disk Management)

    • After FBA completes, inspect %windir%\FBA\FBALOG.TXT). Confirm the “Created ewf partition on… “ message. Also a later message should indicate “Protected Volume Config on … Type=RAM, State= Disabled”.

    • After FBA completes, this registry entry should exist: ControlSet\Enum\ElTorito. EWF should indicate it is disabled.

    • If still having trouble consider creating an El Torito build designed to boot up on a stock PC (instead of your unique hardware or CF storage) to ensure you are following the basic procedure correctly.

    • The free space for the EWF partition cannot be larger than 2GB

    NOTE: If you are using an extended partition, EWF will attempt to use free space within the extended partition. If there is no free space in the extended partition, EWF will fail (even if there remains free unpartitioned space available on the disk).

    Usage notes:

    • Any applications included on the El Torito image should be designed to minimize disk writes, since each new disk write consumes available system memory until the next boot.

    • After creating your image, you cannot repartition the disk in any way wherein the offset of any boot partition changes, and you cannot add new boot storage devices. However, you CAN add non-boot type devices to an El Torito image.

    • El Torito cannot be used to create a bootable DVD:
    Common problems and solutions

    You see a never-ending FBA reboot loop.

    The main cause of this is not clearing the “Start EWF Enabled” check box in the EWF component settings.

    Before starting FBA, ensure any old EWF (type 45) partitions are first deleted, using Disk Manager (diskmgmt.msc) or the WinPE Diskpart utility.

    Also make sure your drive letter mapping is correct. This information is configurable in the root component of your configuration, in Target Designer.


    The EWFMGR command with no parameters reports “NO EWF PARTITION”

    There is no EWF partition. This is a normal condition if deploying EWF-RAM-REG. You can, however, get the status of the EWF RAM-based volume if you include the drive letter, e.g. EWFMGR C:

    A window appears on the desktop stating:

    “Delayed Write Failed. Windows was unable to save all data for the file…”



    The most probable cause of this is if you run out of free overlay space.

    For RAM-based EWF, ensure you are using Windows XP Embedded Service Pack 2 or later. Otherwise, the total memory available for RAM overlay is limited to 256MB.

    Ensure you have a large enough overlay (RAM) to accommodate the worst case disk write scenarios. Increase the amount of physical memory until you get the “running out of disk space” warning instead of the delayed write failure. This way, when you start running out of normal disk space (on the CD = 650 MB), the operating system can warn about “disk space” instead of failing.

    Consider setting the following check box: “Use Less Overlay Space & Less Writes”

    Your application should minimize disk writes. Make sure you have no page file and that hibernate is DISABLED.

    Make sure the background disk defragmentation service is turned off, as described elsewhere in this document.



    The FBA log reports that ewfOpen returned an Invalid Handle

    Usually, the partitioning described earlier in this document is not correct. The program must find free space either at the end of the first Primary partition with no other primary or extended partitions, or at the end of the logical drive in the extended partition (i.e. Logical drive does not use the WHOLE extended partition).

    The FBA log reports that it is unable to create the EWF partition

    There are no free sectors available to create the EWF partition. Note that even with EWF-RAM an EWF partition is always created temporarily with a minimum size of 32KB.

    Fatal Error 0xC000021A occurred when booting the El Torito image

    This blue screen fatal error may occur (WINLOGON_FATAL_ERROR) if you did not leave the intermediate El Torito CD in the CD-ROM drive when the ETPREP tool was used, in preparation for creating the final El Torito CD.

    Sample FBALOG.TXT


    This excerpt from the FBA log lists only the portion where EWF and El Torito are being configured.

    11:04:26 AM - [FBADoReboot] Exiting process...

    11:05:22 AM - ConfigureEwf() Start.

    11:05:22 AM - Getting EWF config parameters from registry.

    11:05:22 AM - EWF Partition Size = 65536 (KBytes), Levels = 1, Volumes = 1.

    11:05:22 AM - Protected Volume Config #0 :

    11:05:22 AM - Disk= 0,Part= 1,DiskType= IDE,Type= RAM.

    11:05:22 AM - Enable= Disabled, Optimize= 0, LazyWrite= N.

    11:05:22 AM - Found 3 Hard Disks.

    11:05:22 AM - Searching for El Torito disk.

    11:05:22 AM - Disk0 signature = 0xEA1AA9C7.

    11:05:22 AM - Disk1 is raw.

    11:05:22 AM - Disk2 signature = 0x4F544C45.

    11:05:22 AM - Disk2 is an ElTorito disk.

    11:05:22 AM - Checking Start value in System\CurrentControlSet\Services\redbook key.

    11:05:22 AM - Resetting Start value.

    11:05:22 AM - Checking Start value in System\CurrentControlSet\Services\Imapi key.

    11:05:22 AM - Disk #0 layout info:

    11:05:22 AM - PRIMARY partition,start=0x0000000000007e00, len=0x0000000028332600, type= 6

    11:05:22 AM - EXTENDED partition,start=0x000000002833a400, len=0x00000004809cde00, type= 15

    11:05:22 AM - LOGICAL partition,start=0x000000002833a400, len=0x00000001770d7a00, type= 11

    11:05:22 AM - EXTENDED_FREE partition,start=0x000000019f411e00, len=0x00000003098f6400, type= 0

    11:05:22 AM - FREE partition,start=0x00000004a8d08200, len=0x00000000007d8200, type= 0

    11:05:22 AM - Allocating EWF in LOGICAL partition, start=0x000000019f411e00, len=0x000000000000fc00.

    11:05:22 AM - Created EWF partition on Disk = 0, partition = 3,size = 0x0000000000007e00 .

    11:05:22 AM - Saving EWF configuration to registry:

    11:05:22 AM - Protected Volume ArcName = multi(0)disk(0)rdisk(0)partition(1).

    11:05:22 AM - ewfOpen.

    11:05:22 AM - EWF Volume Config on Disk#0, Partition#3:

    11:05:22 AM - Segments = 0, Max Volumes = 1, Max Levels = 1

    11:05:22 AM - ewfAdd.

    11:05:23 AM - Protected Volume Config on Disk0\Partition1 :

    11:05:23 AM - Type = RAM, State= DISABLED.

    11:05:23 AM - ewfClose

    11:05:23 AM - ConfigureEwf() End, status = 0x0.

    11:05:23 AM - [CallEntryPointThread] C:\WINDOWS\system32\ewfdll.dll, ConfigureEwf

    11:05:23 AM - [FBASetProgressText] Resetting Setup Flag...

    11:05:24 AM - [FBADoReboot] Sleeping...

    11:05:34 AM - [FBADoReboot] Rebooting system...

    11:06:30 AM - [FBALaunch] cmd /c c:\windows\system32\end-cd-script.cmd


    Booting from an SDI file


    As an alternative to El Torito, you can prepare an SDI image on a CDROM that copies itself into a RAM Disk and then boots from the RAM Disk. Since the RAM Disk is writable, this approach does not require EWF. The boot media is effectively protected since it is only read during the copy phase, and is never written to.

    The Standard 2009 Remote Boot feature also uses RAM Disk, except it obtains the volume image from a server on the network.

    As a prerequisite, please study the section in the Remote Boot document that describes how to create an SDI image.

    Create your image in accordance with the procedure in the Remote Boot documentation, including the “Windows RAM Disk Driver”.

    Let your embedded image complete FBA successfully.

    Prepare the SDI using SDI Manager (SDIMGR.WSF), thereby creating an SDI image that is compatible with Remote Boot. The SDI should only have the PART blob, which contains the post FBA volume image. Let’s call this JUSTPART.SDI. This SDI image will need to be able to fit onto CDROM, typically <650MB:

    sdimgr /new justpart.sdi

    sdimgr justpart.sdi /readpart:i:

    Use SDI Manager to determine the offset of the PART blob. Typically it’s 4096 if the PART blob is the first in the SDI. You'll use this offset with the /RDIMAGEOFFSET switch.

    Copy the following files from your original image to a bootable FAT (not NTFS) partition on the hard disk. Do not use the NTLDR from the Remote Boot downloads directory. If desired, the partition may actually be located on an SDI drive, so you do not need to install a physical disk for this step.

    NTLDR

    JUSTPART.SDI



    BOOT.INI

    NTDETECT.COM

    Edit BOOT.INI to add this entry in the [operating systems] section:

    ramdisk(0)\windows="Windows XP Embedded from RAM" /fastdetect /rdpath=multi(0)disk(0)rdisk(0)partition(1)\JUSTPART.SDI /rdimageoffset=4096

    NOTE: All the above text must appear as a single line in the BOOT.INI text file.

    Use HD2ISO to create an ISO image file of the post-FBA hard disk (or SDI drive). Use a CDROM burning software utility to transfer the ISO image to your target CDROM media.

    The prepared media, upon power up, will automatically copy its ISO image to RAMDISK and subsequently boot from RAMDISK. Note that EWF is not required since RAMDISK is a writable “medium”.

    Command-Line Tool (XPECMD.WSF)

    This feature was originally called CMI Explorer (CMIEXP) and Console Application for Windows XP Embedded (XPECon) but its latest rendition is the Windows XP Embedded Command-Line Tool, and is started by launching XPECMD (XPECMD.WSF).

    This tool is found in the following folder: Program Files\Windows Embedded\bin

    For the latest on-line content:

    Command-Line Tool Guide

    Be advised that the following old links refer to the older names of this tool:



    What's new: XPECON.WSF

    Console Application for Windows XP Embedded

    TDLite (CMIExplorer)


    Download 5.67 Mb.
    1   ...   21   22   23   24   25   26   27   28   ...   36




    Download 5.67 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Microsoft Windows Embedded Standard 2009 Developer Resource Kit Componentizing Windows xp professional for embedded systems developers

    Download 5.67 Mb.