A bootable flash drive can come in handy--but trying to create one might have you pulling out your hair. Windows expert Greg Shultz shares the method he followed, from configuring the BIOS to allow the USB port to act as a bootable device to creating a bootable image of Windows XP using the free PE Builder software (and a pair of Windows Server 2003 SP1 files) to formatting and copying the image onto a UFD.

The ability to boot Windows XP from a USB Flash Drive (UFD)
offers endless possibilities. For example, you might make an easy-to-use
troubleshooting tool for booting and analyzing seemingly dead PCs. Or you could
transport your favorite applications back and forth from home to work without
having to install them on both PCs.

However, before you can create a bootable UFD, you must
clear a few hurdles. You saw that one coming didn't you?

The first hurdle is having a PC in which the BIOS will allow
you to configure the USB port to act as a bootable device. The second hurdle is
having a UFD that that will work as a bootable device and that's large enough
and fast enough to boot an operating system such as Windows XP. The third
hurdle is finding a way to condense and install Windows XP on a UFD.

If you have a PC that was manufactured in the last several
years, chances are that its BIOS will allow you to configure the USB port to
act as a bootable device. If you have a good quality UFD that's at least 512 KB
and that was manufactured in the last couple of years, you've probably cleared the
second hurdle. And once you've cleared those first two hurdles, the third one
is a piece of cake. All you have to do is download and run some free software
to create the bootable UFD.

I'll start by showing you how to determine whether your PC's BIOS will support booting from USB and explain how to
configure it to do so. Then, I'll show you how to download and use the free
software to create a bootable UFD running Windows XP Professional.

The UFD hurdle

You probably noticed that I didn't mention how to determine
if your UFD would support being configured as a bootable device, except that it
must be a good quality unit of recent manufacture. Well, I've discovered that
when it comes to the actual UFD, you'll just have to try it and see what
happens. As long as you have a PC with a BIOS that will allow you to configure
the USB port to act as a bootable device and you have configured the
installation correctly, it should
work. If it doesn't, you probably have a UFD that can't boot.

I tested three UFDs on two new
computers and had mixed success. First, I attempted to use a 128 MB PNY Attache but received an error message that said "Invalid or
damaged Bootable partition" on both PCs. Next, I tried a 1GB Gateway UFD and it
worked on both PCs. Then, I tried a 256 MB Lexar JumpDrive Pro and it worked on
only one of the PCs. You can find lists of UFD brands that others have had
success with on the Internet.

Checking the BIOS

Not every new BIOS will allow you to configure the USB port
to act as a bootable device. And some that do allow it don't make it easy. On one
of my example systems, it was a no-brainer. On the other, the UFD had to be
connected to the USB port before it was apparent that I could configure it as a
bootable device. Let's take a closer look.

On the test system with a PhoenixBIOS version 62.04, I
accessed the BIOS, went to the boot screen, and found that USB Storage Stick
was one of the options. I then moved it to the top of the list, as shown in Figure A, thus making it the first
device to check during the boot sequence. (This particular BIOS also allowed me
to press the [F10] key during the boot sequence and select any one of the
available bootable devices, so it really wasn't necessary to move it to the
top.)

Figure A

The settings on the Boot Screen of the PhoenixBIOS made it a no-brainer to
select the device.

On the test system with an AMI BIOS version 2.59, I accessed
the BIOS, went to the Boot Sequence screen, and didn't find a USB boot option,
as shown in Figure B. I then went
one step further and checked the Hard Disk Drives screen and still didn't find
a USB boot option, as shown in Figure C.

Figure B

A USB boot option didn't appear on the Boot Sequence screen.

Figure C

The Hard Disk Drives screen only showed the SATA hard disk.

I then plugged a UFD into the USB port, booted up the system,
and accessed the BIOS. When I checked the Hard Disk Drives screen, the UFD
appeared in the list and I could select it as the first drive (Figure D).

Figure D

With the UFD plugged into the USB port, I could configure the UFD as a
bootable device.

When I returned to the Boot Sequence screen, the UFD was
indeed set as the first bootable device (Figure
E).

Figure E

As the Boot Sequence screen indicates, the UFD was set to be the first bootable device.

Rounding up the software

To condense and install Windows XP on a UFD, you'll need a
program called PE Builder by Bart Lagerweij. You'll also need two files from
the Windows Server 2003 Service Pack 1. And of course, you need to have a
Windows XP Professional CD.

You can download PE Builder from Bart's Web
site. At the time of this writing, the most current version of PE
Builder was 3.1.10a.

Keep in mind that at 329 MB, Windows Server 2003 SP1 will
take some time to download. And although you need just two small files, the
only way to get them is to download the entire package.

Warning

Do not run the Windows Server 2003 SP1 executable file! Doing
so will completely corrupt Windows XP. We will use a set of special commands to
extract the two files and then delete the rest of the package.

Preparing the software

Installing PE Builder is quick and easy. Just run the
installation program and follow the onscreen instructions. To make things simpler,
I installed the program in the root directory in a folder called PEBUILDER3110a.

Once PE Builder is installed, you'll need to create a folder
in C:\PEBUILDER3110a called SRSP1, as shown in Figure F. This is the folder in which PE Builder will look for the
extracted Windows Server 2003 SP1 files.

Figure F

Once PE Builder is installed, you'll need to create folder called SRSP1 in
C:\PEBUILDER3110a.

Now, you can begin extracting the two needed files from
Windows Server 2003 SP1. When you download the Windows Server 2003 SP1, the
executable file will have a long name: WindowsServer2003-KB889101-SP1-ENU.exe. To
save on typing, you can rename the file to something shorter, such as
WS-SP1.exe.

To begin, open a Command Prompt window and use the CD
command to change to the folder in which you downloaded the Windows Server 2003
SP1 executable file. I downloaded the file to a folder called Downloads. Now,
to extract the files contained in SP1, type the command

WS-SP1.exe -x

You'll immediately see a dialog box that prompts you to
select a folder in which to extract the files and can type the name of the same
folder, as shown in Figure G. Click
OK to proceed with the extraction procedure. When the procedure is complete, just
leave the Command Prompt window open.

Figure G

You can extract the files into the same folder containing the Windows
Server 2003 SP1 executable file

The extraction procedure will create a subdirectory called
i386 and extract all the Windows Server 2003 SP1 files there. Use the CD
command to change to the i386 folder and then copy the setupldr.bin
file to the SRSP1 folder with the command:

copy setupldr.bin c:\pebuilder3110a\srsp1

Expand the ramdisk.sy_ file to the
SRSP1 folder with the command:

expand -r ramdisk.sy_ c:\pebuilder3110a\srsp1

These three steps are illustrated in Figure H.

Figure H

You'll copy and expand the two necessary files to the SRSP1 folder.

Now, using Windows Explorer, verify that the two necessary
files are in the SRSP1 folder, as shown in Figure
I. Once you do so, you can delete all the Windows Server 2003 SP1 files.

Figure I

You'll want to verify that the setupldr.bin and ramdisk.sys files are in the SRSP1 folder.

Running PE Builder

Now that you've extracted the necessary files from the
Windows Server 2003 SP1 package, you're ready to use PE Builder to create a
compressed version of Windows XP. To begin, place your Windows XP Professional
CD into the drive and hold down the [Shift] key to prevent Autostart
from launching the CD. Then, launch PE Builder.

In the Source field on the main PE Builder screen, simply
type the letter of drive in which you put the Windows XP Professional CD, as
shown in Figure J. Make sure that
the Output box contains BartPE and that the None option
is selected in the Media Output panel. Then, click the Build button.

Figure J

Fill in the Source field on the main PE Builder screen.

As PE Builder compresses Windows XP Professional into a
bootable image, you'll see a detailed progress dialog box. When the operation
is complete, as shown in Figure K,
click the Close button.

Figure K

PE Builder displays a detailed progress report.

Preparing the UFD to boot Windows XP

At this point, you're ready to format and copy the Windows
XP Professional bootable image to the UFD with the BartPE
USB Installer. To do so, open a Command Prompt window and use the CD command to
change to the pebuilder3110a folder. Then, insert your UFD into a USB port and
take note of the drive letter that it is assigned. On my example system, the
UFD was assigned drive E.

Now, type the command

pe2usb -f e:

You'll then be prompted to confirm this part of the
operation, as shown in Figure L.
While the operation is underway, you'll see progress indicators.

Figure L

You'll be prompted to confirm that you want to format your UFD.

Once the BartPE USB Installer
finishes its job, you'll be prompted press any key to exit the program. Now you
can use your UFD to boot your computer into the BartPE
interface for Windows XP, as shown in Figure
M.

Figure M

The BartPE interface provides you with a pared
down version of Windows XP.

You can find a list of specialized
applications on Bart's Web site, which you can install on your UFD
as Plugins. For example, you can find such things as
Firefox or McAfee command-line virus scanner.

Conclusion

Booting Windows XP from a UFD requires that your PC's BIOS support booting from USB and that you have a UFD
that can be formatted as a bootable device. If you can meet these two
requirements, all you need is PE Builder, a couple of files from the Windows
Server 2003 Service Pack 1, and a little effort to configure a UFD to boot the BartPE interface to Windows XP.

About Greg Shultz

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

Full Bio

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

I realize that this article was written quite a few years ago, but I couldn't get it to work.

I did a search on "how to easily make a bootable USB drive" and found a program named "rufus". Within 2 minutes of downloading it, I had a bootable USB drive.

I then downloaded Hiren's Boot CD 15.2 in zip format, extracted it, and pointed Rufus to the ISO file, and literally in less than 5 minutes had a USB drive that booted to Hiren's rescue disk when plugged into a USB port (once the BIOS had been set to boot from a USB drive first).

Download Rufus here https://rufus.akeo.ie/ and enjoy how easy it is now to create a bootable USB drive in a matter of minutes.

i would like to say that i tried the program and had no problems. the only thing that i felt it did not do is run the windows xp pro setup file. that is what i needed the bootable for. i did get it to boot up into the bartpe builder GUI. put from there i did not know where to go. but all in all i enjoyed the program thank you sharing it with us.

I have followed the instructions to the letter.
I installed this on a Flash drive (5 different drives) and 4 different hard drives.
It says "Loading system please wait...."
for over 30 minutes then the computer turns off.
Waste of time.
Do not bother.

I've been reading a few articles about using different formats for the flash drive. it doesn't say how bart-pe2usb formats the drive (NTFS/DOS?) I've found that by using NTFS i get faster boot off the flash drive, but some virtual-HDs won't boot over USB unless they are formated in DOS-FAT32. You can try using DISKPART to set the FS=NTFS. "FORMAT FS=NTFS QUICK" Then you will have to also copy the windows sector boot.ini and boot.ldr to the flash drive using XP tool "Bootsect f:\windows /s F:" where F:\ is the flash drive. For detailed instructions on how to do this with win7/win8 see September issue of CHIP-Magazine Malaysia, or download their article "Windows8 On a USB Flash Drive." To see the complete CHIP article click here...http://goo.gl/CwmA1

Great instructions - very clear. Problem: When I boot the USB stick, it took over 45 minutes for the Flash Disk to initialize -- and eventually all I saw was a PLEASE Wait on the bottom of the screen - 1/2 hour after that, I gave up.
Same on a different system.
I will try a different, slightly more modern USB stick.
Thanks!

hi
i followed all the steps as they are mentioned in the above procedure. all worked well . i didnt have any error messages or warnings in the pebuilder process was completed without any problems.
but when i try to boot from my pd i get the following message : ntldr is corrupt. the system cannot boot

I followed the mentioned steps successfully, and when i started the setup process, the first message appeared at initializing (file amdbusdr.sys is missing file not found), kindly note that there was 2 errors found by PE builder and 128 warnings!!!
please advice
Thanks for your precious help.

OK, for all the folks interested....it takes about 24 hours to format a Seagate GoFlex Desk 2TB external HDD. If you're doing it from a Win7 portable you should change your power settings to allow it complete the formatting without supervison by not allowing your PC to go to sleep while it's unattended. Now I get to see if Recuva works. BTW, the reason I used such a large external HDD is that I wanted to recover as much data and settings as I could from my damaged 500GB internal HDD and a flash stick wasn't gonna handle all that much data. Another thing to mention is that now when you're confronted with a DOS command line is that you have to learn how to use quotation marks around paths specified. All in all it's been a wild ride and I ain't done yet.

I had already formatted my Seagate GoFlex 2TB external HDD before using the command line to enter pe2usb -f e:....after about 30 minutes I'm seeing a 1% progress. Am I in for a long night to install a FAT format instead of the NTFS that was probably there?

This whole precess is not 100% workable, as I used a lots of old flash drive (HP, scandisk), and successfully installed BARTPE on these UFD.
But recently I used latest UFD (KINGSTON) but I am not able to install Bootable bartpe on this UFD.
I dont know whats the difference between these UFD's but it depends upon the type of UFD you are using.

Just download a freeware WinToFlash and the program will do the trick for you for free for any system and any drive flash, CD, floppy. And the system doesn't even have to be legal :) All you need is just CD with windows and it doesn't even have to be bootable CD. just windows system

it was very useful but i got this message during making bootable UFD:
mkisofs: Permission denied. cannot open 'C:\pebuilder3110a\bartpe/i386/system32/
setuphiv'
Error: mkisofs failed!
and the process aborted

hello
your tutoral is just superb.
being a rookie that i am icoud'nt finish expanding the ram disk as you instructed,instead the following massage appears-can't open input file :c pebuider3110a\srsp1- how do irectify this?
please help my email is obeymlambo@yahoo.com
regards
obey

Hey guys I need help I'm trying to abstract the file from windows server 2003 sp1 and when I type the command WS-SP1.exe -x I get an error that says C:\Documents and Settings\Administrator\WS-SP1.exe is not a valid Win32 application. Any help on extracting the file and what to do?

The problem with UFDs is that if you format them on a Windows machine the OS doesn't put down a boot partition. This was done to save a few Kilobytes.
So format the stick using a Linux machine to FAT32 and you're laughing.

During my project to create a bootable USB VMWare ESXi server stick I ran into an issue with the computer I was using. The bios did not have the option to boot to USB. I found a program on a site that allows you to create a floppy disk that boots the computer to a boot menu that includes the USB option. I was even able to create the disk to auto boot to the USB stick. Work Great.

Hey guys,
I have the Windows XP Pro CD but when trying to create the Build using PE Builder, I get the error:
"Source files wrong version.
File version "D:\i386\ntdll.dll is 5.1.2600.0 should be 5.1.2600.1045 or higher. You must use Windows XP Service Pack 1 or Server 2003 version of windows!"
I've done everything as stated up to this point. Any idea how to get around this problem?

When I put my Win XP Pro install CD in the drive and tried to run PE Builder, I got a message that my version was 5.1.2600.0 and that I needed 5.1.2600.1045 or later. Can I use the XP sp3 cd as a valid source?

I am trying to reinstall Windows XP on a netbook that recently had Ubuntu installed on it. However, I do not have a bootable CD-Rom drive and therefore I needed a bootable USB in order to install Windows XP. I have tried this method over a hundred times already. This method is close to the working one. If using Windows XP SP2, in PE Builder, you need to enable a plugin "RpcSS needs to launch DComLaunch Service First ? SP2 only." Only then will the USB be bootable. Then you must also copy the i386 folder from the Windows CD to your flash drive to install it. For full instructions, view: http://www.vandomburg.net/installing-windows-xp-from-usb/

While Bart PE is good The Ultimate Boot CD is better. http://www.ubcd4win.com/ It's a fully configured version of Bart PE also downloadable for free. You get a huge assortment of Bart PE Addins ready to use. You just select the ones you want and Build your Image. There are more Addins available, but these are more than most folks will ever use.

ok this is little out of topic. i tried this for putting xp recovery disk to usb & make it bootable but its FAILED.
My Netbook NOT notebook/laptop, Toshiba NB100 12M can boot via usb, and i have 2 file from wserver2003, and also pebuilder3110a, kingston 2GB.
while start building it is asking "cannot find file layout.inf"
thanks a million

BillD, This article is all about creating an XP bootable. Would you explain why you are referencing files on Windows Server 2003?
Also, is this XP bootable good for only Professional, or will other versions work as well, given the caveats you've already mentioned.

I just cannot get this thing to work. I've tried 3 or so UFD two system which both support UFD booting. The only thing is I am running windows Vista, but I don't think that should make a difference, or should it? I have 4 files on the UFD: bartpe.iso, ntdetect.com, nldr and winnt.sif. Any suggestions?

After creating a boot image on UFD and trying to boot the laptop using the UFD; system tries to create a ramdrive.
After creating a virtual drive, when attempting to load BartPE I am getting error; File \I386\system32\ntoskrnl.exe could not be loaded. Error code 14, setup cannot continue? Any guesses what could be wrong?

seems like alot to go thru when you can get knoppix on to a CD and boots from the CD. I have used it several times to recover windows Pc and or user files if windows was to corrupted. http://translate.google.com/translate?hl=en&sl=de&u=http://www.knoppix.org/&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3Dknoppix%26hl%3Den%26rlz%3D1T4GGLR_enUS241US242

I have trouble installing the Mcaffee virus scanner. It kept telling me that it can't find scan.exe when I tried enabling it on the plugins screen. I followed the instruction and it didn't tell me anything about this. Any extra info I should know?

It's not necessary to expand all of SP1. Simply open it with WinZip or WinRAR, select the two files, extract them to your SRSP1 (or wherever) and expand ramdisk.sys. Of course, if you have a server already running 2K3SP1, just copy the files from there...