0% found this document useful (0 votes)
298 views

XP Embedded Boot Options Jones

The document discusses boot options for Windows XP Embedded, including booting from hard drives, compact flash, and other devices. It also covers the Enhanced Write Filter feature which allows booting from read-only media like CD-ROMs and flash storage.

Uploaded by

Keli Key
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
298 views

XP Embedded Boot Options Jones

The document discusses boot options for Windows XP Embedded, including booting from hard drives, compact flash, and other devices. It also covers the Enhanced Write Filter feature which allows booting from read-only media like CD-ROMs and flash storage.

Uploaded by

Keli Key
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 66

Windows XP

Embedded
Boot Options (Melbourne)

David Jones
RMIT University
Melbourne, Victoria, Australia
300: Developing Windows Embedded
Devices
Agenda
Microsoft Windows XP Embedded Features
Creating an XP Embedded Image
Boot up Overview
Windows XP Embedded
Boot Options
Booting from:
Hard drive
Compact Flash
Other devices:
Solid-state drives
CD-ROM
Network
Hibernated state
Boot Performance
Conclusions
Windows XP Embedded
Boot Options
Can boot from a variety of
media

Including diskless
systems

As well as CF and
other Flash devices
And even
USB
Windows XP
Embedded Features
What People Are Building Today
Retail Point of Sale
Thin Clients
Gateway/Media Store
Set-Top Box

Network Devices

Kiosk/ATM Game Platforms

Office Industrial
Automation Automation
Key features of Windows XP
Embedded
Componentized version of Windows
XP Professional
Same binaries as Windows XP Professional
Fully compatible protocols
Support for all Windows Device Drivers
Without modification/wrappers
Runs desktop Windows XP applications
Subject to resources, without modification
Full Win32 and Microsoft .NET API
.NET2
Embedded boot options
For example, from Compact Flash
Windows XP Embedded Service Pack 2:
Security and boot options
Windows XP Embedded Service Pack 2:
Changes to the Embedded-enabling
Features
Feature or area Description
Windows application Increase application compatibility between your run-time image
compatibility macro and applications in areas of multimedia, networking, shell,
components Windows Core, and Windows Management Instrumentation (WMI).
Generic Device Driver Quickly add support for one or more device classes to your
Support component run-time image.
Enhanced Write Reduce boot time for your EWF-protected run-time
Filter (EWF) image by using a hibernation file.
Minlogon Implement a single-user logon environment that supports standby

and hibernation.
Windows XP Read the latest Help documentation for expanded information
Embedded about security and servicing, as well as more how-to topics.
documentation Component Help is now available for every component in the
Windows Embedded Studio component database and includes
detailed information about dependencies, resources, and
interfaces.
New deployment - Hibernate Once Resume Many (HORM)
options - Remote Boot.
Some Windows XP Embedded
Scenarios
Robust diskless system but want to use existing
Windows XP-supported hardware peripherals
Windows XP Embedded uses same peripherals as desktop
Windows XP
Windows XP Embedded can be booted from solid state devices.
(For example, CF.)
Stateless system (always boots to the same state)
with quick boot
Windows XP Embedded with CF and EWF (RAM Reg mode)

System of many stateless and diskless webpads


Windows XP Embedded with remote boot
Embedded device that runs desktop .NET
applications and services
Windows XP Embedded runs same apps as desktop Windows
XP
Creating an XP Embedded
Image
Microsoft Windows Embedded
Tools-1
Target Analyser
Interrogates target system for devices
Ta.exe, runs under DOS
Tap.exe, runs under XP
Can run on existing desktop XP installation (best)
Can run from PXE boot using first XPE CD

Component Designer
Imports output from target analyser to create
platform component
Can also import XP device installation files
Component Database
Stored in SQL 2000/5
Microsoft Windows Embedded
Tools-2
Target Designer
1. Specify image
Which platform
Choose a macro
Add other devices
Fine tune settings
2. Resolve dependencies
Can auto-resolve
Repeat until all OK.
3. Build Image
Generates image within file structure for deployment
Not a bound single file like nk.bin (CE)
Can create a single bound image file (.sdi)
Eg. Use for network boot
Deployment

1. Suitably prepare target media


Create partition, set as active partition, reboot
and format
2. Copy XPE build files to media
Must copy hidden/system files as well
Can insert media into dev. machine and copy,
eg. CF
Can do network copy
3. Run First Boot Agent (FBA)
Completes the run-time image build process
by running a sequence of tasks on the target
system
Eg. Plug and Play device detection, security
installation, and network configuration.
Creating an Windows XP
Embedded Image

David Jones
RMIT University
Melbourne, Victoria, Australia
300: Developing Windows Embedded
Devices
A quick look at the Microsoft Windows Embedded
Tools
Overview of Boot Up
Boot Devices

Need to read boot information and code


Need to read operating system
configuration and code
Both may be same media or different
Electromechanical Flash
Floppy Compact Flash
Hard drive USB
Solid State Memory Stick
uDoc
Microdrive
DiskOnChip CD-ROM
El Torito
Network
Remote boot
Classifications of Boot Media
Read/Write vs. Read-only media
Typical storage is read/write. For example, hard drive.
For Flash ROM/CF with limited write cycles better to use as
read-only, except for updates and occasional save state
Fixed vs. Removable
Can the OS storage be removed?
Physically/electrically
Stateless vs. Stateful
Is it a requirement that the device boots to the same
pristine
state? (Stateless)
That is, discard transient state at shutdown
Local vs. Remote media
OS on local storage
OR get it from network server
Need network ROM
Read-write and Read-only
Media
Read/write
Hard drive
Embedded Disk
uDoc
(Compact Flash)
Read-only Media
Compact Flash
CD-ROM
Network
Removable Vs. Fixed Media

Fixed Media:
Hard drive, solid-state hard drive
Removable media
CF, USB Memory
Removable media
Can't be partitioned (with Windows tools)
Can't be made active partition disk
Hard to get to boot
CF can be marked as fixed and used as
fixed in True IDE mode.
Booting with Windows XP Embedded
Windows XP Embedded Boot
Modes
Hard drive
Read/write
Overlays
HORM
.OR Diskless:
Solid State Devices
Solid State Disk
Flash ROM
Compact Flash
USB
Bootable CD
Network
Booting With Windows XP Embedded in 5
Seconds

Media needs to be configured to boot using


boot.ini file
Boot partition needs to be marked as active
Boot.ini points to boot partition and OS directory
Need operating systems files on boot
media
Not a single binary file like nk.bin with Windows CE*
That is, no boot loader program
Created with directory structure in Microsoft Windows
Embedded System build process
Can do xcopy of files (/s /h) to media if it can be placed
on development system
* Or use SDI: Bind files into one file that then can be
deployed and unpacked
System needs to be configured (that is, in
A Typical Boot.ini File
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft
Windows XP Embedded" /fastdetect

This will boot Windows XP Embedded from


partition 1 on hard drive(media) 0 with OS
files in \Windows
Hard Drive: Read-write Mode
Can build a Windows XP Embedded system to boot from
hard drive on a standard desktop system
If it runs Windows XP it will boot Windows XP Embedded
Can multi-boot system to desktop Windows XP as well as
Windows XP Embedded
TAP interrogation of system can be more thorough when done
on an existing Windows XP desktop
Can build an Windows XP Embedded system in read-write
HD mode on Virtual PC and VMWare emulators.
Can allow stateful system
All changes are preserved between boots
OR can use stateless
Disk Overlays (EWF Disk Mode)
Enhanced Write Filter
(EWF) Overview
Protects a volume from write access
Enables boot from read-only media such as CDROM and flash
Can save write cycles to other media where desirable:
CF, Network

EWF Overlay
Protects contents of volume from writes by redirecting to
alternative media
Eg Read/write storage, RAM
Like a transparency overlay
Can be consolidated into the volume or discarded
EWF Volume
Stores static EWF information about the volume being
protected
Not the transient overlay data
Can be on protected volume, in registry
EWF Modes
Mode Overlay EWF Notes
Location Volume
Location
Disk On disk On disk in Useful where
unpartitioned state is
space required to
maintained
between boots
RAM In RAM On disk in Useful for
unpartititioned "stateless"
space systems
RAM Reg In RAM In system Useful where
registry disk has only
•Note: EWF Volume is created by First Boot Agent one
for first two
partition
modes.
Disk Overlays
Disk
Partition 1 Partition 2
<32 MB
C:\ EWF Disk Overlay
EWF Volume
Protected Volume EWF Partition

Read Read Read/Write


Only Only by EWF
EWF Overlay 3

EWF Overlay 2 Changes to C drive


will appear to the
EWF Overlay 1
OS as being to C
Can have multiple drive but will
overlays. actually be written
One active for write at to EWF
a time . Disk Overlay
Local Disk
RAM Overlay
Disk RAM
Partition 1 Partition 2
<32 MB
C:\ EWF Overlay
EWF Volume
Protected Volume EWF Partition

Read Read Read/Write


Only Only by EWF

When system is shutdown, overlay in RAM is lost


Useful for stateless system
Can commit overlay to protected volume
Disk must be partition-able
Not CF in removable mode, not CDROM
Single overlay only
RAM Reg Overlay
Disk RAM
Partition 1

C:\ Registry EWF Overlay

Protected Volume EWF config info


stored in Registry
Read Read/Write
Only by EWF

EWF configuration is skipped in FBA


EWF is added to registry after FBA and enabled
Useful:
Where media is not partition-able
For removable media such as CF, USB
Minimizing CF write cycles
Can commit Overlay to disk if it is writeable
Note on EWF API
There is an API for programmatic use of EWF overlays
eg. Sample app:
http://msdn.microsoft.com/library/default.asp?url=/library/e
n-us/dnXPesp1/html/EWFAPI.asp
EWF API is part of Windows XP Embedded install:
Include EWF API Component in Windows XP Embedded build
Use EWFAPI.DLL, EWFAPI.LIB, EWFAPI.H in programming
EWFAPI.LIB on Windows XP Embedded SP2 is incorrect file
Update: (May 2003 Q818822):
http://msdn.microsoft.com/embedded/downloads/xp/impQFE
/default.aspx

May also need Power Management API:


Shutdown, Restart, etc. functionality
XPEPM.LIB, XPEPM.DLL, XPEPM.H
In VALUEADD\MSFT\XPEPM folder on Disk 1
Booting Windows XP
Embedded from a Hard
Drive

David Jones
RMIT University
Melbourne, Victoria, Australia
300: Developing Windows Embedded
Devices
Demonstrate booting a preconfigured Windows
XP Embedded from a hard drive: with overlays.
Booting Windows XP
Embedded from CF
CF Types

Consumer Grade
Meant for use in consumer devices as removable bulk
data storage
That is, cameras, PDAs, phones
300K read-writes
OEM
For use in embedded systems
Wear-levelling
Hardware algorithm than avoids continuous rewrites to
same location.

Industrial grade
Wider temperature ranges
Consumer grade CF are less expensive
CF Issues
Pros and Cons
Solid state
 Robust
 Removable
 Can be adapted for IDE (CF-IDE adapter)
 May need to mark as non-removable in IDE mode
 Need vendor utility

Limited write cycles (300K)


 Wear-levelling in (some ?) OEM/Industrial grade CF
 Slower than diskonchip because of lack of DMA
SanDisk
SanDisk is inventor of CF
They provide consumer grade and OEM CF
Not industry grade CF (Temperature range aspect)
Flash Drives that boot Windows XP Embedded
http://www.seanliming.com/flashhelp.html
Using CF in an Embedded
System HD
Power

CF CF to
In true IDE
ID mode CF Pin 9 Adapter
grounded
IDE
CF has OS so is read by CPU Channel
Replaces hard disk of desktop system
Issues:
Want to minimise writes to CF though CPU
Marking CF as fixed
Need to get OS onto CF
USB CF Adapter
True IDE Mode: Fixed Disk
Mode
When pin 9 of CF is low it boot up the CF enters a true IDE
mode
With an adapter can be used in an IDE bus for storage
(read/write)
Windows XP will not allow low-level formatting with
non-fixed disks
fdisk and diskpart don't recognise it
So can't mark it as the active partition/disk
So can't boot from it with Windows XP Embedded
Need to mark the CF as fixed
Need a utility for that
Reversible
Note: CompactFlash ORG requires CFs to be delivered in
removable mode
If using CF with single partition (RAM Reg mode) you may
CF Scenarios

Use an OEM/Industrial grade CF


Get utility from CF manufacturer to mark CF as fixed
Confidentiality issues
If using, Mode may not need to mark as fixed.
Implement as storage device for operating system
Implement enhanced write filter to minimise (or totally
inhibit) writes to CF
Wear levelling also with OEM/Industrial grade CFs
Provide embedded systems with CFs
Use Consumer grade CF
The utility will work with only some CFs
Even within same batch
OK for development/teaching purposes
Booting from CF with Windows
XP Embedded RAM Reg Mode
Hardware needs Prepare CF as bootable
drive
CF-IDE adapter Boot with Windows XP
CF marked as fixed Embedded Disk 1
CF-USB adapter Copy files to disk
Use CF-USB adapter on dev
Key Windows XP machine
Embedded Xcopy /s /h
Components Get hidden files
EWF Manager Boot and let FBA run
Enhanced Write Filter When finally booted run
EWF NTLDR EWFMGR on device and
EWF Registry keys
see that EWF is running in
RAM Reg mode
Create as XPe component
Next slide
Other
Disable "Start EWF
Enabled
EWF on CF Registry keys
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ewf]
"ErrorControl"=dword:00000001
"Group"="System Bus Extender"
"Start"=dword:00000000
"Type"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\
{71A27CDD-812A-11D0-BEC7-08002BE2092F}]
"UpperFilters"="Ewf"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ewf\
Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ewf\
Parameters\Protected]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ewf\
Parameters\Protected\Volume0]
"VolumeID"="{1EA414D1-6760-4625-8CBE-4F9F85A48E15}"
"Type"=dword:00000001
"ArcName"="multi(0)disk(0)rdisk(0)partition(1)"
Booting Windows XP
Embedded from CF

David Jones
RMIT University
Melbourne, Victoria, Australia
300: Developing Windows Embedded
Devices
Boot a device in RAM Reg mode from CF
Booting from Other Devices
Embedded Disks

Can have IDE interface


Plug in in place of a hard drive
More robust than HD
Faster than CF
Can be used as read-writeable HD
No need for overlays
No "set fixed mode" utility required
Rewrite 1 million +
10 MB/s read/write transfer rate
Lower capacity than CF
Solid State Disk Demos

The previous Disk Overlay Demo used an


EmbedDisk.
The Hibernate Once Resume Many Demo
also uses and EmbedDisk
USB

Many embedded SBC only have USB 1.1


Not fast enough for boot process
Must have USB 2
USB (2) Memory sticks are in not suitable
XPe boot devices
USB is enabled late in boot process
USB devices are not fixed
M-Systems solution:
uDoc
USB: M-Systems uDoc

M-Systems uDoc (USB DiskOnChip)


Windows XP Embedded can be configured to boot from
this
Loads early in boot process
Can be connected to USB socket on board
No need for EWF
Wear levelling technology
http://www.m-sys.com/site/en-US/Products/M-Module/M-M
odule/Products_/uDiskOnChip.htm
Easy to transfer image files (USB host adapter for
module)
USB 2.0 Boot must be supported in BIOS

See: 300 Building Windows XP


Embedded Devices for USB Boot
Windows XP Embedded CD-ROM
Boot
Use RAM Reg mode
Develop El Torito Bootable CD-ROM
CD-ROM appears to be writeable via overlay in RAM
Configure system to boot from CDROM
User Mode FAT

Kernel Mode Enhanced Write Filter


(EWF.sys)

CD-ROM Class Partition Fault-Tolerant


Eltorito.sy Driver Manager Disk Driver
s (PartMgr.sys) (ftdisk.sys)

Disk Class
Driver
(disk.sys)

CDROM Local
Disk
Booting From CD-ROM

Slower boot than solid state


Easy deployment/update to multiple
systems
System integrity
Can use hard disk-less system
General slow depending upon image size
and CD-ROM speed
Useful as a system tool
CD-ROM Boot: How To
Create image Swap the HD and CDROM
Need EWF components drive letters
NTLDR, Registry, Run ETPrep
Management console
Generate Boot CD ISO
Need CDFS
Reboot with Windows XP
Need El Torito Component Embedded CD1 into PXE
Some others needed Create ISO file
Place HD and CDROM in Run HD2ISO
IDE channel 1 Copy ISO file to
FBA on target as <500M development machine
hard drive partition Burn CD
Need an El-Torito CD in Remove HD
drive during FBA
Place CD in target and boot
Have 2nd partition for ISO
image (900M)
Booting Windows XP
Embedded from CD-ROM

David Jones
RMIT University
Melbourne, Victoria, Australia
300: Developing Windows Embedded
Devices
Using a pre-existing image
Windows XP Embedded HORM Boot

Hibernate Once Resume Many


Resume from same hibernated state
Quick boot
Stateless system
Normally when Windows boots, the state
information in the hibernation file is deleted by
zeroing out the first page of the hibernation file
However, by using EWF, you can persist that
state information from boot to boot
Reuse the same hibernated state
Booting from HORM
Fast boot of system to known state
Easily extended/updated
Disable HORM
Reboot and add changes
Recapture

Adds robustness to system


Adds security
Use EWF with Hibernation:
Develop EWF system
Boot
Run required applications without closing
Hibernate
Persist same hibernation state after boot
Normally deleted
Volume remains protected
HORM Boot: How to
Create image. Needs Check that hiberfile.sys is in root
EWF: dir /Ahs c:\hiberfil.sys
RAM Overlay Mode, API, NTLDR, Use EWFMGR and XPEPM to
Management Console
manage HORM:
Power Management
Enable EWF
Computers
EWFMGR c: -enable
One of: ACPI PC, Standard PC, ACPI
Uniprocessor To see status
Setting: Enable hibernation EWFMGR c :
Must have target's specific video Hibernate system and enable
driver HORM
XPEPM –Hibernate
Build image
Reboot system from hibernation
Create and place a file: Can shutdown and restart to same
resmany.dat in root state.
Tells EWF that this is a XPEPM –shutdown / -restart
HORM setup Can commit changes to HD
Enables reuse of same hiberfile.sys EWFMGR c: -commit
file.
Can commit and stop HORM
EWFMGR c: -commitanddisable -live
HORM: Key Issue

This uses Power Management component


That only works if you have the correct
hardware drivers
Some things are missed by TAP via PXE
Can get by with other boot configurations but not
with Power Management
Need the correct Windows XP Video driver
Need various BUS drivers
Ref: "Troubleshooting Windows XP Embedded's
blue screen "Stop 0x0000007B" error", Sean
Liming
http://www.windowsfordevices.com/articles/AT6380158626.
html
Booting a Windows XP
Embedded HORM Image

David Jones
RMIT University
Melbourne, Victoria, Australia
300: Developing Windows Embedded
Devices
HORM: Hibernate Once Read Many
Windows XP Embedded (REMOTE) Network
Boot

Boot with device PXE


Preboot eXecution Environment
Image downloaded to RAM from PXE server
Uses TFTP
OS then boots from RAM Disk
No persist storage required:
Diskless system
Requirements:
About double normal RAM
PXE compatible BIOS and Network card
Remote boot PXE server
DHCP, PXE, TFTP
Remote Boot

Create a Windows XP Embedded image file


(post FBA)
Deploy that to a server
Install RBS on Windows Server from Windows
XP Embedded disk 2
With DHCP
Target PXE (network) boots.
On getting DHCP response RBS uses MAC
address to determine which image to return.
Note: Needs RAM 2 x image size
Image file gets downloaded to ram and system
is generated from there.
Remote Boot: How to
Create image and run FBA
No special components
Use HD system on target
Create .SDI file from booted image
Install Microsoft Windows Embedded Remote
Boot Manager
On a Windows 2003 Server
With DHCP on the Server
Some Remote Boot Server-DHCP configuring
Configure boot
Place .SDI file on RBS
Configure PXE boot based upon MAC address
Enable Network boot on target and boot
David Jones

RMIT University
Remote Booting of a
Windows XP Embedded
image

David Jones
RMIT University
Melbourne, Victoria, Australia
300: Developing Windows Embedded
Devices
HORM: Hibernate Once Read Many
Boot Performance
Usability

How much boot time will users suffer?


CF boots in about 1 minute
Other non CD boots < 1 minute
Network would depend upon many factors
Generally up to one minute to boot is
suitable for most scenarios
For example, POS at start of day.
If stateless system goes down, can bring back up in
pristine state within one minute
Enable Standby for more frequent
power downs
Conclusions
Windows XP Embedded can be booted from a variety
of media
Besides using a standard hard drive, it can be booted
from a CD-ROM and solid state media such as Compact
Flash and Flash drives
Solid state boot media make the system physically
more robust
Windows XP Embedded can be booted from read-only
media which has significant reliability and security
benefits
Windows XP Embedded systems can also be booted
from a saved hibernation state which facilitates fast
boot up
Network boot of Windows XP Embedded facilitates a
Resources
MSDN Training Course 2545C:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx
Search for "Windows XP Embedded" "General Discussion"

Some Books (Search on web):


Windows XP Embedded Step by Step, Beau Cseri, Annabooks/Rtc Books
January 2003 Windows XP Embedded Advanced , Sean D. Liming,
Annabooks/Rtc Books, October 2003

MSDN-Embedded-XPe Website:
http://msdn.microsoft.com/embedded/windowsXPembedded
/default.aspx

MSDN Library:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanch
html/XPembedded.asp
Resources
XPe Newsgroup:
"Developing Solutions for Microsoft Windows XP Embedded"

Windows XP Embedded Team Blog:


http://blogs.msdn.com/embedded/

Mikehall's Embedded WEBlog:


http://blogs.msdn.com/mikehall/

Flash Drives that boot XPe


http://www.seanliming.com/flashhelp.html

Need developer resources on this subject?


Stop by the MED Content Publishing Team Station in the Microsoft
Pavilion or visit the MED Content Publishing Team Wiki site:
http://msdn.microsoft.com/mobility/wiki
Contact:

David Jones
RMIT University, Melbourne Victoria, Australia
School of Electrical & Computer Engineering
[email protected]
http://babbage.sece.rmit.edu.au/embedded
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it
should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

You might also like