Compartilhar via


Advanced Scenario: USB El Torito (Booting from USB CD-ROM)

XP Embedded Feature Pack 2007 introduces the new USB 2.0 Boot component, which makes it possible to boot a fully operational runtime from a USB thumbdrive, disk-on-key, uDOC, etc.  So far, it appears to be working very well for quite a few people, and it certainly enables a lot more scenarios than were possible before - without requiring any of a multitude of hacks and third-party solutions needed to make these removable devices bootable.

The question came up in-house recently: Can this functionality be extended to include booting from USB CD-ROM?  How well do the El Torito and USB 2.0 Boot components get along with each other?  So we decided to test it out, and it turns out that you CAN do this, and in fact the system is quite a bit more flexible than we originally anticipated.

Our scenario for testing this was a new HP AMD64-based computer with a fairly standard DVD-RW drive and an M-Systems 1 GB uDOC.  For simplicity, I created a runtime with the following components:

  • Winlogon Sample Macro (disable the "NT Loader" option in the ConfigUI)
  • El Torito CD Support
  • USB 2.0 Boot

After resolving dependencies, I set EWF to start disabled as usual and built the runtime.  The only major difference between this runtime and any other "normal" El Torito runtime (see this article for basic instructions) was the presence of the USB Boot components (most particularly "USB Boot Mass Storage Device" and "USB NT Hardware Detect").  Then I deployed the runtime to the uDOC, inserted my Pre-FBA CD-ROM into the USB drive, and let it all go through FBA.  An "etprep /all" later, and I was burning my bootable CD.  When it came time to boot from the USB CD-ROM, everything worked without a hitch - in fact, it was surprisingly fast for a CD-based image.

Of course, as with anything, there are a couple of catches.  First off, I did this with an M-Systems uDOC, which XP Pro and Server identify as a fixed hard drive once it's inserted.  Unlike most USB mass storage devices, this device can be managed via Diskpart and Disk Management, allowing you to partition and format it like you would any standard hard drive.  With a typical thumbdrive, you would need to use UFDPREP instead.

The reason this distinction is important is because HD2ISO, the program that creates ISO images out of hard drive partitions, can also read the uDOC directly, but it would not be able to do so with a regular UFD.  To get around this limitation, you could create an equal-size partition on your hard drive, or you could use the SDI Loader (another of our fine tools) to create and mount a virtual hard drive in a file.  In either case, you'd then copy your post-FBA runtime to this new partition, and HD2ISO can then commit the data to an ISO.

Another limitation (which is apparently due to a common BIOS issue we haven't figured out how to work around yet) is that if you deploy your runtime to a UFD or uDOC, you should make sure there are no fixed hard drives (IDE, SCSI or SATA) in the system.  Otherwise, Windows and the BIOS start disagreeing on which physical device is properly named "C:", causing ETPREP to fail to swap the drive letters even if everything else goes according to plan.  The easiest solution is to disable your hard drive controller or physically unplug the HDD(s), so that the UFD/uDOC is the only item identified as a hard drive.  (Of course, you can also just deploy your runtime to a fixed HDD.)

The good news in all of this is that once you've burned your final bootable CD, it will boot successfully from both a USB CD-ROM and from an internal IDE/SCSI/SATA CD-ROM.  We tested the same exact runtime on both devices, and the traditional compatibility issues with certain BIOSes and CD-ROM manufacturers still apply.  On the other hand, an El Torito CD prepared without the USB 2.0 Boot components will fail to boot from a USB CD-ROM (you'll get a STOP 7B error).

This is admittedly a pretty advanced scenario, but the fact that it works can provide significant value to device manufacturers who want to be able to boot from an easily-replaceable CD-ROM while still taking advantage of the flexibility and ease of installation that a USB device provides.

- Matt

Comments