Create a bootable USB drive (or CD) with portable Windows

Something I like to use is GetDataBack to retrieve data off harddrives once the partitions are mangled. For a rescue disk, it is extremely useful if it does not modify any data on the damaged harddrive, causing loss of data.

The bootable USB is a great way of testing and keeping your rescue disk up to date without having to waste CDs.



  • Windows XP (x86) installed or on a virtual machine
  • A 32bit copy of either Windows XP with SP2+ or Windows 2003 (does not work with x64) install disk
  • Windows 2003 SP1 (A hefty 329mb package, but you only need 2 files. Apparently its illegal to distribute them individually)

Notes before starting

BartPE will only work for Windows XP (x86). I don't know the nitty gritty details to why this is, but it is stated on the website "Bart's builder does not support Windows 64-bit editions".

For this purpose, I used an old 2gb Kingston Data Traveller which had more than enough space for what I was doing.

Some people use the HP Drive Key Boot Utility to make their USB drive bootable, but I've found the utility to be confusing and the fact it didn't actually test if the USB was bootable was a deal-breaker.

While searching the net for information, a lot of threads discuss what could go wrong but the majority of the time it is the USB drive you're using. Not all USB drives can be used to boot your computer.

USB Boot capability also depends on the type of motherboard you're using. For this tutorial, I'll assume that you're bright enough to know how to set up your BIOS to load off a USB.

You'll figure out if your USB drive/pen is compatible later on when its time to copy the boot image over. For now, we'll prepare the portable executable.

Creating the image

Most of the hard work is done for you by BartPE. Actually, all of the hard work is done already.

On your working copy of Windows XP, extract BartPE into a path without spaces, preferably something like "c:\pebuilder" to avoid problems later on.

Extract the Intel Matrix Storage Manager drivers to "C:\pebuilder\drivers\SCSIAdapter\Intel_IMSM".

Start up "pebuilder.exe" and select the path of your Windows install disk.

Click on "Plugins" to install, enable, configure or disable any extra programs you want on the boot image.

Under "Media Output", select "None" for as we're going to do a little extra work to the image before using it.

Note: if you wish to boot from CD, then just select "Burn to CD/DVD" and you're done. The rest of this tutorial wont be relevant to you.

Settings used. There's not much to it.

Click "Build" to create your boot image. The new files should be spat out to "C:\pebuilder\BartPE". You can now close the program.

Preparing the USB drive

The instructions are from "pe2usb.txt" but a bit more detailed.

Setting up pe2usb:

  • Extract the Windows 2003 Service Pack 1 files.
  • To do that, type in the command prompt:

WindowsServer2003-...whatever.exe -x

  • Select "C:\win2003sp1".
  • Create the folder "C:\pebuilder\srsp1".
  • Copy the file "C:\win2003sp1\i386\setupldr.bin" to "C:\pebuilder\srsp1".
  • In the command prompt, type:

expand c:\win2003sp1\i386\ramdisk.sy_ C:\pebuilder\srsp1\ramdisk.sys

  • Feel free to remove the folder "C:\win2003sp1".

Making the USB bootable:

Open up your command prompt and go to "C:\pebuilder".

If your USB drive has not been made bootable yet (or if you're not sure), now is a good time to back up its contents as you're going to format it.

Assuming that your USB drive is X:, format it by typing in:

pe2usb.cmd -f X:

The pe2usb command will format your drive to make it bootable and check that it is working.

If your USB drive is already bootable, then you can omit the "-f" flag and type:

pe2usb.cmd X:

The command pe2usb will also copy the boot image over to your USB drive. Once complete, your USB drive is now ready for bootin'! A basic image will only be about 155mb in size.


Problem encountered

First problem was that the 2 USB drives I tried were not boot capable. I tried a 4gb NEC drive and a 2gb Sanyo USB pen.

Second was that I forgot to install AHCI drivers for the PC I was working with. That was solved here.

The last problem was this:

The file ramdisk.sys is corrupted. Press any key to continue.

For me, it was because I copied the "ramdisk.sy_" file and renamed it into "ramdisk.sys" without inflating it first. The actual file has to be expanded before you can use it in your image.

That was almost as much fail as this guy.


Useful sources for USB drive booting:

Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog