Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory

Keywords: Match:
Tips for dual-booting Windows XP Embedded
by Sean Liming (Mar. 29, 2005)

Many first-time Windows XP Embedded (XPe) developers choose their own development systems as an XPe target platform. Known as dual-booting, the process allows the developer to build the XPe OS in Windows XP Professional, download the OS to a separate partition or hard drive, and then reboot the machine into Windows XP Embedded. Dual-booting provides some cost savings by not having to buy a separate PC as a target. What many developers run into, when developing in this fashion, is the problem of setting up the correct parameters within the XPe configuration and the boot.ini file. The XPe newsgroups are filled with questions about ARC paths, boot.ini settings, and drive letter issues. In the following, I will try to demystify the different issues:

Configuration Settings

Back in the Windows NT Embedded days, changing the ARC path in the boot.ini file of the primary active partition was the only setting requirement to dual-boot between Windows NT and Windows NT Embedded. Now, with a little more registry integration, XP and subsequently XP Embedded require the drive letter and ARC path information to be built into the registry. When Windows XP is installed on a PC, the drive letter and ARC path settings are automatically installed during setup.

For XP Embedded, you have to manually set the drive and ARC path settings in Target Designer for your custom configuration. The picture below shows a sample Target Device Settings. The OS will reside in the second partition of the first hard drive. The partition is 2MB in size.


Figure 1: Target Device Settings -- Is the drive letter correct?

How do you determine these parameters? The following sections provide some tips on how to setup these parameters.

Boot.ini File

The addition of the boot.ini file back with Windows NT allowed more than one instance of an operating system to exist on a PC. Via the boot.ini file, you can boot into different OS’s such as DOS, Windows 9X, Windows 2000, Windows XP, and XPe. Typically, these different OS’s reside on different hard drives or partitions on the PC. The boot.ini file contains the ARC (Advanced RISC Computing) paths that define the path to the OS installation.

When you build the XPe image, Target Designer automatically creates a boot.ini file with an ARC path based on what is set under the Target Device Settings. When it comes to dual-booting, this boot.ini along with NTLDR and NTDETECT, which are in the root of the image, are not used. A PC boots from a primary active partition. In the dual-boot scenario, Windows XP Pro resides in the primary active partition, and only the boot.ini file (as well as NTLDR and NTDETECT) in the primary active partition is going to be used. After you build the XPe image, you will have to manually edit the boot.ini file in the XP Pro partition to add the second ARC path selection. Here is an example:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect
Whether the files are used or not, it is still a good habit to copy the whole XPe image including the root-boot files to the partition. You will need these files when you start working with a standalone system.

ARC Paths

The ARC path provides the OS a method to determine where the installation of the OS resides. The long multi(X)disk(Y)rdisk(Z)partition(W)\windows_dir provides a pointer to the directory location of the OS installation. Determining X, Y, Z, and W is the real trick.

I should mention that there is also a scsi(X)disk(Y)rdisk(Z)partition(W)\windows_dir ARC path convention for use with SCSI drives. SCSI drives make things a little more complicated, and you might be using a mix of the two ARC paths. Since IDE (including Serial ATA) drives have improved performance and SCSI drives have faded out, we will stick to IDE discussions for this article. For more information on SCSI support, please see the MSDN ARC Path article reference in the last section. With that said, it is simple to say that X and Y are always 0 -- multi(0)disk(0). This leaves Z and W.

Z refers to the disk number, and disk numbers start with 0. The disk order is typically defined by the IDE or SATA bus and whether the disk is a primary or secondary drive. W refers to the partition number on the disk defined by Z. Partition numbers start with 1. A few examples might clarify the concept further.

Example 1: You want XPe to boot from the 2nd partition on the 2nd IDE disk (IDE0 secondary drive). The ARC path would be the following:
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect
Example 2: You want XPe to boot from 3rd partition on the 4th IDE disk (IDE1 secondary drive). The ARC path would be the following:
multi(0)disk(0)rdisk(3)partition(3)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect
Example 3: You want XPe to boot from 2nd partition on the 1st IDE disk (IDE0 primary drive) The ARC path would be the following:
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect
Notice that the ARC paths end with "\WINDOWS". There has been some confusion from developers that have been upgrading their systems since Windows NT. The old directory used to be called "\WINNT". The XPe image has all the main files in the "\WINDOWS" directory so you should also have "\WINDOWS" in the ARC path. If you accidentally used "\WINNT", you would get the following error on boot:
Windows could not start because the following file is missing or corrupt:
\System32\hal.dll.
Please re-install a copy of the above file.
Drive letters

Now that the ARC path has been discussed, what about the drive letter? The driver letter causes the most problems and can be the most elusive parameter to figure out. If you set the drive letter incorrectly, the OS will reboot over and over without ever starting FBA.

When you create a second partition, Disk Manager automatically assigns the new partition a driver letter. In the picture below, a second partition that is to be used for XPe on the primary disk was given the drive letter E, where D is the CD-ROM drive.


Figure 2: A second partition with drive letter E

You might be tempted to make the assumption that the XPe drive letter needs to be E, and you would probably setup the Target Device Settings like the Figure 1 above. This is not the case. To determine the correct drive letter, you have to think of the system as booting to DOS without a CD-ROM driver, and all the drives have the FAT file system. If you were to access each partition in DOS, the drive letters would break down as follows:
  • C in XP would be C in DOS
  • E in XP would be D in DOS since the CD-ROM drive is not loaded.
The correct drive letter is D. Figure 1's Target Device Settings needs to have D's instead of E's for the drive letters. It is not the most scientific method to find the drive letter, but it has worked time and time again. You may have to play with the drive letters if you have multiple hard drives in the system.

Virtual PC 2004 - The Better Alternative

I have to admit dual-booting is not my favorite method to test XPe. I prefer a separate target system; because in the end, the OEM is going to ship a system with only XPe on it. I understand the need for cost savings and first time exploring, but when you can’t get the OS to boot correctly, you will be left with a bad experience that was never intended to happen. Plus, the fact that you have to shutdown access to your development system to boot into a test OS, only slows down overall development process. Virtual PC 2004 (VPC) is the better alternative to dual-booting. I have found VPC very helpful on long trips where a second target system is not possible. Best of all, I don’t have to reboot my computer each time I need to run a build of XPe.

At the time of this writing, the Virtual PC 2004 had a free 45 day trial edition that you can download from the Microsoft website. Please see the Windows XP Embedded Toolkit for more information about using XPe with the VPC.

Reference Material -- MSDN Articles


About the author


Sean Liming is a Microsoft eMVP and is the author of three books on Windows Embedded including Windows XP Embedded Advanced and Window XP Embedded Supplemental Toolkit. Liming is currently the Managing Director of SJJ Embedded Micro Solutions, which offers books, toolkits, training courses, and consulting services covering all aspects of embedded design hardware, software, manufacturing, and life-cycle management.


(Click here for further information)


Windows XP for Embedded Applications
This white paper describes the benefits of using Windows XP when developing embedded applications.

A Manager's Guide to Selecting a Mobile Device Operating System
This white paper offers a comparative review of Microsoft Windows CE and Windows Mobile.

Visual Basic 6.0 to .NET Migration
This paper focuses on the methodology and techniques which Infosys (Microsoft Technology Center) has developed for migrating VB 6.0 Applications to .NET. Our approach ensures a smooth, cost effective, and efficient migration.

Mobile Device Security: Securing the Handheld, Securing the Enterprise
This whitepaper identifies security threats to corporate data on mobile devices and details how mobile devices can become a "backdoor" to the enterprise.

Mobile Device Security: The Eight Areas of Risk
It's common knowledge that adding mobile devices to your network increases security risks. There are multiple facets to mobile security, all of which should be paid close attention to. This E-Guide presents a more in depth look into the eight key areas of securing wireless devices.

Quality Assurance and .NET
This paper discusses best practices for functional, regression and load testing of .NET applications.

SCADA Security in Integrated Networks
As businesses leverage their SCADA systems by integrating them into the business networks, they must also assure the security of the SCADA system.

The Advantages of Small Form Factor HMI
HMIs have mutated and changed with new requirements, and they have become more flexible and capable. And while they've been doing that, they've become smaller and more useful.

9 Critical Requirements for Web Application Security
Learn why your Web applications expose dangerous security breaches and what’s required to effectively protect your Web applications and the sensitive information behind them.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Updated! The latest Windows-powered...

mobile phones!

other cool
gadgets

HOT TOPICS
Microsoft targets PNDs with new embedded OS
Microsoft tips .NET MF 3.0 highlights
Microsoft previews Windows Embedded Standard
Microsoft offers free Windows CE 6.0 textbook
Microsoft renames embedded operating systems
Microsoft unveils Windows Mobile 6.1
New Atom models target low-cost PCs
REFERENCE GUIDES
Windows Device Showcase
Intro to Windows Embedded
Intro to Shared Source
Real-time Windows Embedded
Windows Embedded books
Join our Windows Embedded discussion forums:
Windows XP Embedded
Windows CE
Windows Mobile


Windows Embedded developer newsgroups
Windows CE
XP Embedded
PocketPC
Smartphone

Microsoft's Windows Embedded resources
Embedded dev center
Mobile dev center
Windows CE tutorials
XP Embedded tutorials
Windows Embedded seminars
Windows Embedded application categories
3rd-party partners


BREAKING NEWS

• Cortex-A8 SBCs target signage and kiosks
• Student competition offers a different kind of fireworks
• Windows CE SBC targets HMI development
• All-you-can-eat carrier launches -- sort of
• Adeneo and IntervalZero promote "soft-control" architecture
• App creates virtual serial ports in Windows CE
• Windows satellite phone service takes off (literally)
• Bsquare and Microsoft renew key distribution agreement
• Software syncs HTC phones with Macs
• Electricity meter runs Windows, talks to Google
• Windows device is two phones in one
• MIcrosoft's online store to debut with 600 Windows Mobile apps
• Windows Mobile gets upgraded Skype VoIP client
• Panel PC targets outdoor use
• Samsung shrinks ARM11 application processor


MOST POPULAR (last 90 days)
• "Netbook" uses Intel's Atom N270
• Windows CE takes on Linux in low-end netbooks
• HTC ups Touch resolution
• Microsoft unleashes new embedded OS
• Windows Mobile phone gets 800 x 480 display
• HTC spins WiMAX phone?
• Smart camera sports Atom
• Dual-core AMD netbook gets rave review
• Windows Mobile 7 "delayed"
• GPS phone uses new Marvell "Tavor" chip
MOST POPULAR (Classics from the vault)
Windows XP Embedded USB boot
Troubleshooting Windows XPe's blue screen "Stop 0x0000007B" error
Asus reveals $190 mini notebook
Windows Mobile 6 SDKs available for download
Windows Mobile VPN client plays with Cisco
HTC adds GPS to Windows Mobile Touch line
Microsoft unveils Windows Mobile 6.1
Guide to HTC's Windows Mobile smartphone platforms
• HTC releases Touch Diamond ROM upgrade
Customizing Windows XP Embedded thin clients

Also visit our sister sites:


Sign up for WindowsForDevices.com's...

news feed

Or, follow us on Twitter...



Home  |  News  |  Articles  |  Polls  |  Forum  |  Directory  |  About  |  Contact
 

Ziff Davis Enterprise Home | Contact Us | Advertise | Link to Us | Reprints | Magazine Subscriptions | Newsletters
Tech RSS Feeds | White Papers | ROI Calculators | Tech Podcasts | Tech Video | VARs | Channel News

Baseline | Careers | Channel Insider | CIO Insight | DesktopLinux | DeviceForge | DevSource | eSeminars |
eWEEK | Enterprise Network Security | LinuxDevices | Linux Watch | Microsoft Watch | Mid-market | Networking | PDF Zone |
Publish | Security IT Hub | Strategic Partner | Web Buyer's Guide | Windows for Devices

Developer Shed | Dev Shed | ASP Free | Dev Articles | Dev Hardware | SEO Chat | Tutorialized | Scripts |
Code Walkers | Web Hosters | Dev Mechanic | Dev Archives | igrep

Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Windows is a trademark or registered trademark of Microsoft Corporation in the United States and/or other countries and is used by WindowsForDevices under license from owner. All other marks are the property of their respective owners. WindowsForDevices is an independent publication not affiliated with Microsoft Corporation.