Introduction: How to Make Any Compact Flash Card or Microdrive Boot Windows XP
This is a handy method of getting around the requirement for XP to be booted from fixed media. One of the biggest problems with building a car pc or other highly mobile device is that you really should boot from a fixed media for long life as standard hard drives are not vibration friendly.
Step 1: Choosing Media
For this to work, there will have to be enough room on your CF card for your install of XP plus an install of your favorite distro of Linux. With this in mind, I would recommend no less than a 4GB card. Speed is also an issue, as read and write speeds are slower than on a conventional hard drive and slower read times can lead to longer startup times. Buy the best that you can afford, as a 4GB card can be had for $10 off of ebay. Write cycles is another consideration, since all normal CF media has a limited number of write cycles. If the write cycle problem is a deal breaker, a microdrive is another good option. It has the small form factor of a CF flash drive but without the read/write limitations. The microdrive is limited to 8GB in size, but work well when coupled with a standard CF card. Note that some embedded microdrives will internally be wired as master and will not work at all in the slave position on a dual CF adapter. This will keep you from using two microdrives on the same IDE connector
Step 2: Interfacing With the Computer
This is usually done with an IDE to CF adapter. Single and dual card adapters are available. If you think you will ever need two cards, get the dual adapter now save yourself the trouble later. If you do choose to use a microdrive, note that they are slightly thicker, and that adapters need to mention that they will fit the thicker microdrives.
Step 3: Installing Windows
This will require either an internal CD-ROM drive or an external USB CD-ROM drive connected, and the BIOS set to boot from the CD drive before the hard drive.
With your CF adapter properly installed in your computer, install only the card that you want to use as the boot drive and verify that the computer recognizes it as master. Put the Linux live CD in and let the computer boot up. Go to a terminal and run the command, "sudo gparted" (without the quotations). Select the disk that represents your CF drive and right click the partition on it, and click delete. This should leave you with the whole drive as unpartitioned space. Right click the unpartitioned space and click New Partition. Select the maximum available space and set the format to FAT32. Click apply and once it completes, exit gparted. Shut down the live session. Put the Windows CD in the drive, and let the computer boot into the setup. Go ahead and partition the whole disk as your windows partition, and format it to the file system of your choice (I prefer FAT32). Let the installation continue as normal until it reboots. At this point, swap to a Linux live CD (I used Ubuntu 8.04) and let it boot to its startup menu. Choose install, and let it boot into its setup. Go through its installation steps until it asks for what drive to put it on. Choose to resize the drive and give the Ubuntu installation about 2.5GB of the available space. Finish the installation as normal and reboot. Swap back to the Windows CD, and let the GRUB menu pop up. Choose the Windows XP option and hit enter. This should start up the second half of the installation. Let this finish as normal and you have a working install of Windows
Why this works (or at least my educated guess) - The code that checks if windows is being run from a removable device is in the windows bootloader (ntldr). When Linux is installed, it installs its bootloader (GRUB) to the master boot record. Since the Linux bootloader detects other installations on the computer, it will give you the option of starting XP. When it starts XP, it doesnt run the Windows bootloader code and runs its own code instead. This code doesn't have the check for removable storage.
Step 4: Making the Computer Default to Booting XP
By booting into Linux, you can edit the GRUB configuration file to choose how you want the computer to boot up.
Step 5: Thoughts
It is possible to install the GRUB bootloader to the computer without installing Linux, but it is very complicated process. This is my first instructable, so any commentary or advice would be appreciated.
We have a be nice policy.
Please be positive and constructive.