Cloning Windows XP installed on a USB flash drive to another USB flash drive

In this article we will describe how to clone Windows XP installed on a USB flash drive to another USB flash drive.

A lot of information can be found on the internet, but the cloning process is original work. Please, note that this article is for educational purposes only.

Installing WinXP on a USB flash drive is very well documented on the internet, and you should be able to find out how it’s done using any search engine.

For cloning process you will need the following:

2x USB flash drive or other removable media

a computer that you want to boot from USB flash drive

other computer needed for cloning process

Hitachi Microdrive filter drive

 

Why boot from a USB flash drive at all?

Well, because it can be done. 🙂 Second, USB flash drive is a kind of solid state drive (SSD), so you can have pretty fast constant read/write speed and very low access times. It is very useful when building any kind of appliance (resistant to vibrations like car mp3 player, etc). Its power consumption is close to none, so no need for high-power PSU (less than 100W should be sufficient).

There is a nice way to speed up Windows XP installed on a USB flash drive using some XP Embedded drivers, which will be described later.

 

A few steps to make it work…

The process of cloning is a bit tricky, because it involves some tweaking of installation files. Note that if you simply copy/paste or clone the USB flash drive on another one, it won’t work. We need a solution that does work.

Before you begin, boot WinXP from USB flash drive on the computer where you will use this installation, disable page file and hibernation.

To disable page file:

Right click on My Computer

Advanced tab

Under Performance click on Settings

Advanced tab

Under Virtual Memory click on Change

Under Paging file size for selected drive, click on No Paging File for all drives!

If we look at the normal cloning process hard drive to hard drive, we know that it works. But, if we clone USB flash drive to USB flash drive, this situation does not work. There should be something with the way how Windows handles drives. The only explanation is the difference between a fixed drive and a removable drive. If we clone fixed drive to fixed drive, it works, but if we clone removable to removable, it won’t work no matter which utility we use (like Norton Ghost or Acronis TrueImage). OK, let’s try to solve this issue.

We have found that Hitachi Microdrive filter driver can represent any removable drive as a fixed drive, but not without some tweaking of the installation files. Hitachi Microdrive can be downloaded here:

http://xpefiles.com/cs/files/folders/hardware/tags/Hitachi+Microdrive/default.aspx.

Unpack this file and open file ‘cfadisk.inf’ in Notepad. Look for something that looks like this entry (it will mention some Hitachi drive models):

[cfadisk_device]

%Microdrive_devdesc% = cfadisk_install,IDEDiskIBM-DSCM-11000___________SC2IC801

IDEDiskIBM-DSCM-1100_________SC2IC801 should be changed to match Hardware ID of your USB flash drive – the Hardware ID can be found in the registry under this key:

HKEY_LOCAL_MACHINESYSTEMControlSet001EnumUSBSTOR

Look for a key for your USB flash drive:

 

 

Look at the key on the right stating HardwareID. Double click on it and copy the first entry.

 

 

[cfadisk_device]

%Microdrive_devdesc% = cfadisk_install,IDEDiskIBM-DSCM-11000_____________SC2IC801

Replace the bolded text with copied line so that the line looks like:

[cfadisk_device]

%Microdrive_devdesc% = cfadisk_install,USBSTORDiskJetFlashTS256MJF2A/120___8.07

Now go to Device Manager and under Disk Drives choose your USB flash drive. Update the driver for your USB flash drive with the Hitachi Microdrive driver. Use manual advanced install and point it to the folder where your cfadisk.inf driver is located. Restart as many times as needed.

This way your USB flash drive will be represented as fixed drive in Windows Drive Management. This is exactly what we need.

Now that we have made the first USB flash drive represented as a fixed drive in Drive Management, plug the second USB flash drive onto which you’d like to make a clone and do the same process for making it seen as a fixed drive. When both USB flash drives are in Drive Management shown as fixed, we can go on and make a clone of the first one.

The cloning process is simple but needs another computer. Just plug both drives in another computer and copy/paste all data from the USB flash drive with WinXP to the empty one. It probably could not copy the System Volume Information folder, so right click on it, and add permission for Everyone, setting it to Full Control.

Why not just copy/paste without the whole procedure? The problem is in Windows installed on the first USB flash drive. Windows is grabbing all the information about this USB flash drive into its registry. If we just copy/paste the data from one flash drive to another, the original Windows registry is still ‘locked’ to the old USB flash drive, and you’ll get BSOD immediately or the booting process will hang at the ‘Welcome screen’.

This is because Windows cannot recognize the original USB flash drive anymore. To avoid this situation, we lied to Windows that the USB flash drive is a fixed drive by installing Hitachi Microdrive filter driver for both USB flash drives. Windows is now tricked and can boot from any of the USB flash drives ‘thinking’ that it’s booting from a fixed drive.

After this process is finished, don’t forget to remove Everyone from the permission list of System Volume Information folder on both flash drives. You should be able to boot from any USB flash drive cloned this way, but only on your original machine for which you installed WinXP on USB flash drive in the first place.

 

Using XPe Enhanced Write Filter to lock down and speed up USB flash drive

If you need to speed up the whole thing, there is a nice filter driver used on Windows XP Embedded platform. It is called Enhanced Write Filter (EWF) and is used on XP Embedded USB flash installations.

What it does is basically a lockdown of the partition and redirection of all I/O to RAM drive in memory, pretending that it’s writing to the drive preserving write/erase cycles for the USB flash drive. Since there is no physical writing on the drive, everything is lost if you restart or power off the machine. This is a very neat feature for the appliances that are supposed to be read-only. If you need to write down something (eg. configuration file) you can disable EWF to dump all the data to the drive, then enable EWF to lock down the partition again and then restart the computer.

More about this driver can be found on Microsoft pages:

http://msdn.microsoft.com/en-us/library/ms912906(WinEmbedded.5).aspx

The process of installing EWF driver is simple and involves just replacing NTLDR file and copying some EWF special system files to C:Windows folders. After this is done, you need to change some registry settings to enable it, and then just start it using ‘ewfmgr’. Since EWF tweak is not an original work, author decided not to publish it. Further information can be found on the internet.

What is gained using EWF driver? Much speed, very low access times and preservation of write/erase cycles on which USB flash drives are not immune. This way, any preinstalled application on the USB flash drive is loaded momentarily and the experience when working on a computer with EWF installed and enabled is that it works blazingly fast! 🙂

Please, bear in mind that this text is written for educational purposes only, and the author is NOT encouraging piracy.

 

About Joe Citarella 242 Articles
Joe Citarella was one of the founders of Overclockers.com in 1998. He contributed as a site administrator and writer for over 10 years before retiring. Joe played an integral part in building and sustaining the Overclockers.com community.

Be the first to comment

Leave a Reply