I had experienced a bunch of issues in my various attempts at getting Windows XP (and other operating systems as well) to boot from a Compact Flash card installed as a hard drive replacement utilizing a CF-IDE Adapter.Â I’ve read that CF-IDE adapters, and Compact Flash cards themselves can be very tempermental when utilized in this fashion.Â Apparently there are a high number of Compact Flash cards that do not perform well in a UDMA mode.Â While I still suspect that some of the hardware I tried was the culprit of the frustration, I was able to make a large portion of my prior attempts work properly (for use as Windows boot devices) by following some of the procedures outlined below.Â I found a number of good tutorials, most of which are linked in the following post.Â What I didn’t find was something that tied it all together in a concise fashion.Â I will attempt to do just that in the following post.
This will destroy all data on the Compact Flash card.Â Some of these steps, if misused can be seriously detremental to the health of your computer, or longevity of the data on your computer.Â Proceed with caution, don’t come crying to me if something is wrong or if you lose your entire collection of Rick Astley MP3s, weird videos about squirrels that you’ve collected while scouring the web, or that really disturbing picture of you with the lampshade on your head at the company party.Â Really, I don’t want to hear it.Â Especially the MP3s.Â For the purposes of this article, I am assuming the Compact Flash card is BLANK, or that you don’t care if it BECOMES BLANK.Â Also, missteps CAN destroy data on your primary hard drive.Â To be absolutely safe, I will typically make sure that ONLY the Compact Flash card itself is connected to the computer I’m using when running these procedures.Â (Sometimes I’ll have a USB drive plugged in too, to boot from or whatever.)
Strap in, here we go:
Boot from a USB Drive formatted for DOS.Â Pre-load with DelPart.exe, FDisk.exe, Format.com, Sys.com, and BootPrep.exe.Â FDisk.exe, Format.com, and Sys.com are available from the Windows 98 SE OEM boot disks.Â While you are prepping your DOS USB drive, also prepare a Puppy Linux USB Drive.Â Alternatively, you can use Puppy Linux Bootable CD versions.Â (You can also use any one of the many recovery CDs or other Linux Distributions that contain the GParted utility.)Â In my case, I wanted a solution that will work on machines that are not configured with a CD drive.
Run DelPart.exe and remove all partitions from the Compact Flash card.
Reboot.Â (Be sure to boot to the DOS USB Drive again.)
Enable LBA when it asks, Change Fixed Disk to Compact Flash card, Create DOS partition or Logical DOS Drive, Create Primary Partition, Use all available space.
Reboot.Â (Be sure to boot to the DOS USB Drive again.)
Format D: /s /u (assuming that the Compact Flash has drive letter D assigned to it, otherwise, substitute the appropriate drive letter).
Unfortunately, FDisk will not allow you to set anything but the current primary drive as bootable/the active partition.Â I have yet to find a DOS program (from Microsoft or ANY third-party) that has this capability.Â It seems like they are extremely floppy-centric, they assume you will be booting from a floppy.Â If anything takes the place of the primary drive (i.e. the USB stick we booted with), you can’t set any active partitions on the Compact Flash card.Â You also can’t use the Windows XP Recovery Console as Microsoft in all of their infinite wisdom does not allow setting of active partitions from the Recovery Console version of DISKPART.Â Don’t believe me?Â Try it.Â Because of this, we will now reboot to our Puppy Linux CD or USB Stick in order to set the active partition on our Compact Flash card.
Once booted to Puppy Linux, go to the Puppy Menu (same place the Start Menu usually is in Microshaft products).Â Then select System, followed by GParted Partition Manager.
I usually Left-click on the partition I’ll be working with, to select it and double-check everything prior to making any changes.
Right-Click on Compact Flash FAT32 partition, select Manage Flags.
Check the box for Boot, and wait while the partition is activated.Â Close the Manage Flags window, close partition manager, and reboot the computer (be sure to boot to the DOS USB Drive again).
Once back in DOS, run the following command:
(Replace the last D with whatever your drive letter is, mine happens to be D.)Â Answer Yes to both of the verification prompts.Â This prepares the card for booting directly to Windows XP.
At this point, if you boot to the Compact Flash card, you will get an NTLDR not found error.Â This is a good sign.
For my purposes, I’m installing the Compact Flash card in another machine (via USB multi-card reader) and copying the pre-configured Windows XP installation over to it. Once the bootprep has been completed, it seems that you can just do a flat-file copy to get Windows over to the Compact Flash card.Â I’ve done this a few times, and it seems to work just fine.
I’m using an NLited version of XP Pro.Â I’m using the “safe” setting.ini from IntellaWorks over in the MP3Car.com forum. I also enabled MinLogon.exe and the EWF flash write filtering tools from the XP Embedded Toolkit.Â I used the excellent tutorials available at Silvio Florito’s GranTuring blog for these steps.Â The whole install winds up being a little less than 600 MB once you disable Paging, delete the Paging File (if necessary), remove the DLLCache directory from Windows, and a few other tweaks that I can’t remember off-hand.Â Here’s a tip… Once you have the OS up and running, use Soft-Central’s excellent SC-DiskInfo utility (one of my FAVORITE utilities, I use it all the time) to see where the largest file hogs are in your Windows installation and delete them.Â I assume I could get the install even thinner, but I’m fairly pleased with how things are working right now, so I’ll probably stick with where it’s at.
For some reason, once Windows XP is up and running from a newly copied Compact Flash card, I have to re-enable the EWF filter.Â To do this, I’ve used the registry edits recommended by Silvio Florito.Â I created an EWF.REG file in my Windows\System32 directory in the NLited Windows installation for future use.
After re-installing the registry tweaks, you must also run the following command from the command prompt of the booted Compact Flash Windows:
ewfmgr c: /enable
After running this command, reboot the computer to enable the EWF filter.Â This should get you up and running. Even with a relatively slow (10 MB/s read speed) Compact Flash card, I am still able to boot windows in about 24 seconds.Â This is most likely due to the extremely low seek times associated with Compact Flash media.