USB Boot Tricks and Tips
Developing the USB Boot feature into POSReady was both challenging and rewarding, and certainly loaded with unusual and often unexpected secrets. The biggest gain is that for the first time, the POSReady could easily be installed onto system without an IDE bus. That’s right, no floppy, no CDROM, no hard drive. This was a huge improvement over Windows Embedded for Point of Service which not only required a CDROM for installation, but required a floppy drive if installing to a SATA drive, besides the destination hard drive.
Installing to SATA
In the olden days, users had to store SATA drivers on a floppy drive supplied by the OEM or the motherboard’s manufacturer. Knowing that this was inconvenient for users, many motherboard manufacturers added a “Legacy” mode to allow SATA drives to be accessed as IDE. This may come at a price as some systems must disable some of SATA’s features.
With USB media, this has all changed. POSReady can now load and install drivers real-time, no floppy required.
To do this:
- Find the driver floppy and find a workstation that has a floppy drive installed (this is probably the hardest part).
- Insert the floppy drive and the POSReady USB Setup media into the workstation. Close the Autorun if it comes up, we won’t need it.
- Create a “Drivers” directory on the root of the USB drive.
- If you are deploying POSReady to a number of different systems with different drivers, you may optionally create a sub directory within Drivers. For example, you might have a \Drivers\Sata612 and \Drivers\Sata324 named after the hardware’s name or ID. Setup will look here and any sub directories for driver that match the detected hardware.
- Copy the entire contents of the floppy to this new directory.
- Disconnect the USB drive from Windows
- Insert into the new system and boot from the USB drive.
- You may notice the “Press F6” option will still pop up. Let it go, this will only look for floppy drives.
- One the command prompt appears, type Install to start Setup.
- If you go to fast (like I often do), you might get to the Partition screen and skip the Storage Drivers screen. This will produce a warning if no disks found. This is okay, click the Back button to go to the Storage Drivers screen.
- Click the second radio button to install additional drivers, and click Next. The Partition screen should show your new SATA drive.
Setup should continue normally, hopefully with slightly better performance.
USB to USB
Okay, there are some problems to overcome. It takes a long time to install POSReady to a USB drive. Unfortunately there’s little we could do to make Setup run faster, but the good news is that USB drives read fast. In fact, installation from a USB drive is noticeably faster than a CDROM or DVD. Also, usage of POSReady once it’s installed is surprisingly fast. Depending on your application, you might not even notice the difference compared to a hard drive.
The biggest challenge you will run into is determining boot order. If you’re lucky, your system’s BIOS will allow you to choose this during the boot sequence or in the BIOS configuration. While slightly inconvenient, it’s generally reliable and consistent.
If your BIOS doesn’t allow this, there is a way to determine boot order of USB drives. Strangely, the physical USB ports are always enumerated in a consistent manner by the BIOS which will always boot from the first bootable device if finds.
So, to determine the boot order of USB ports, insert the two devices into ports and boot. If the system fails to boot from them, swap the two drives and try again. You will have a 50/50 chance of getting it right the first time and almost always works the next (with only strange exceptions).
After the first stage of Setup completes, it will then expect the system to boot from the destination drive. As soon as the system is shut down, swap the two drives to update the boot order. Note that USB drive enumeration happens early on in the boot process, so it’s often best to do this with the system turned off.
With this done, Setup should continue to progress and you can remove the Setup media when you see the POSReady logon screen.
Unattended Installs
Windows Embedded for Point of Service and POSReady both support unattended installation through an XML that can be easily generated during Setup (using the /guionly switch). On CDROM installs, this can be tricky forcing users to find a writable location for the XML.
USB drives eliminate this problem. Not only is it easier to store unattended scripts, it also allows other common tasks such as:
1. Adding your own applications to the runtime. This can be done by copying the files to the media and adding the Setup command lines to the Unattend’s RunOnce list.
2. Develop and test more complex scripts, such as updating configuration and registry settings.
Catches
The biggest downside to installing to USB drives (or any solid state media) is that too many writes will eventually damage it. Technology is improving this, but POSReady contains a couple features to help.
- File Based Write Filter (FBWF): This service is installed, but not enabled, by default. Typically this is used more for security, allowing users to update and delete files but have them restored once rebooted. For USB devices, preventing updates to the media means a considerably longer life span.
- Hibernation and Page File. Unfortunately these features are known to make a lot of updates to the hard disk and would be too much for these drives. These features are disabled by default.
More Help
For more help with installing to USB drives, see the MSDN documentation at:
https://technet.microsoft.com/en-us/library/dd458834(WinEmbedded.20).aspx
- Brendan