Boot Windows XP from a USB flash drive

You can't boot Windows XP from a floppy disk the way you used to be able to with DOS. One handy way to easily boot XP is by using a USB flash drive. Here's how to make it work.

Almost everyone who has worked with computers for any length of time at all has run into at least one situation in which a problem left a PC unbootable. What if you could return the machine to a bootable state just by inserting a USB flash drive though? Believe it or not, it is actually possible to install a bootable copy of Windows XP onto a flash drive and then boot a PC off of the flash drive. From there, you can use applications that you have installed on the flash drive (antivirus, antispyware, disk repair, etc.) to fix the PC's problem. In this article, I will show you how.

What's the catch?
As with most cool new techniques, there are a few catches. For starters, not every PC is capable of booting from a USB flash drive. For the most part, computers manufactured within the last two years are generally able to boot from a flash drive. Older systems may require a BIOS update, or might not be able to boot from a flash drive at all.

Another catch is that not every flash drive will get the job done. The primary factors that limit your use of a particular flash drive are capacity and speed. Technically, speed isn't really a limiting factor, but booting Windows will be painfully slow unless you use a flash drive that supports USB 2.0.

The flash drive's capacity is actually a limiting factor though. Surprisingly, there are size limits on both the upper and lower end. Your flash drive can't be too large or too small. There isn't really a documented minimal size for a flash drive. You just need something large enough to hold Windows XP and a few applications. As you probably know, Windows XP normally consumes over a gigabyte of disk space. Later I will show you how to use a free utility to trim the excess fat off of Windows XP and make it a whole lot smaller. Even so, I still recommend that your flash drive be at least a minimum of 256MB in size.

As I mentioned, there is a maximum size for the USB flash drive that you can use. Currently, USB flash drives exist in sizes of up to 4GB, and 8GB flash drives are expected to be available by the end of the year. As nice as it would be to have 8GB to play with, the flash drive that you use for this project can be no larger than 2GB. The reason for this is because you will have to format the flash drive using the FAT-16 file system, which has a 2GB limit. Presently, you are stuck using FAT-16 because most computers will not recognise a flash drive as being bootable if the drive is formatted with anything other than FAT-16.

Preparing your Windows installation CD
One of the requirements for creating our bootable USB flash drive is a Windows XP with Service Pack 2 installation CD. If your Windows XP installation CD doesn't already include Service Pack 2, then you will have to make a CD that includes Service Pack 2 through a technique called slipstreaming.

Other requirements
In addition to your Windows XP installation CD, there are a couple of other things that you are going to need. For starters, you will need the HP USB Disk Storage Format Tool. You can download this tool for free.

Another utility that you are going to need is Bart's Preinstalled Environment Bootable Live Windows CD / DVD, or BartPE for short. You can download this utility for free from the BartPE Web site.

In addition to the software requirements, you must verify that the PC that you will be using to create the Windows deployment has 1.5GB of free hard disk space (minimum) and supports booting from a USB device. I also strongly recommend that the PC be running Windows XP Service Pack 2. Prior to Service Pack 2, Windows XP sometimes had trouble interacting with USB storage devices.

Formatting the flash drive
Now that you have all of the prerequisites taken care of, it's time to actually start setting up our flash drive. The first step in doing so, as strange as it sounds, is to format the flash drive. Windows will actually let you format a flash drive in the same way that you format a floppy disk. However, formatting a flash drive in this way will not work for this project. Furthermore, using Windows to format a flash drive directly has been known to destroy some types of flash drives.

Instead, you must format the flash drive by using the HP USB Disk Storage Format Tool that you downloaded earlier. To do so, simply open the utility, select the device followed by the FAT file system option and click Start.

Once the device has been formatted, you must make it bootable. To do so, you must copy the BOOT.INI, NTLDR, and NTDETECT from the root directory of your PC's boot drive to the flash drive. These files are hidden by default, so you will either have to configure Windows Explorer to show hidden files (including protected operating system files) or you will have to open a Command Prompt window and use the COPY command to copy the files.

If you choose to use the Windows Explorer method, then open Internet Explorer and enter C: into the address bar so that you are looking at your local hard drive. Next, select the Folder Options command from the Tools menu. When the Folder Options properties sheet opens, select the View tab. Now, just select the Show Hidden Files and Folders and deselect the Hide Extensions for Known File Types and the Hide Protected Operating System Files check boxes. Click OK to continue.

Booting from the USB flash drive
Now that you have formatted your USB flash drive and installed the boot files onto it, the next thing that you must do is to configure your PC to allow you to boot from the flash drive. This is all done through the computer's BIOS Setup. I can't give you specific instructions for this part, because every computer is different. I can give you a few pointers though.

You can access your computer's BIOS by pressing a specific key immediately after you turn the PC on. The key varies, but it is usually either [F1], [F2], or [Delete]. Once you are in the BIOS Setup, you should verify that all of your computer's USB options are enabled. This might include things like support for legacy USB devices or support for USB 2.0. If there is a time out setting for USB devices, you should set it to the max to insure that the system doesn't time out while waiting on the USB device to boot.

Next, find the section on boot device priority. Normally, a USB flash drive (which is usually listed as USB-HDD, but may be listed as a removable device) will have a very low boot priority. If the USB flash drive's boot priority is lower than the hard disk (listed as HDD) then the only time the computer would ever boot off of the USB flash drive is if the system were to fail to boot from the hard disk. You must therefore rearrange the boot device priority so that the flash drive has a higher priority than the hard drive.

Configuring Windows
Now that we have finally made it through all of the prep work, it's time to start setting up Windows. As you have probably already guessed, the process of installing Windows to a flash drive is quite a bit different from your normal, run of the mill installation. There are a couple of reasons for this.

For starters, a full blown Windows XP deployment takes up over a Gigabyte of hard disk space. When you are installing to a flash drive, disk space is a scarce commodity. Even if you have over a Gigabyte of space on your flash drive, you probably don't want to use it all on Windows. It would be nice to have room to install a few applications. Therefore, you need to trim the excess fat off of Windows.

The other reason why the installation process is so different from the usual Windows installation is because Windows Setup is not designed to install Windows to a flash drive. You therefore have to configure Windows using an alternate method.

The PEBuilder utility that you downloaded earlier can take care of both of these issues. PEBuilder is designed to create a build of Windows XP (or Windows Server 2003) that does not take up as much space as a full blown installation. Once you create this new build, you can copy it to the flash drive. For right now, I will show you how to create a basic Windows build and copy it to the memory stick. Unfortunately, it's rather difficult to install applications once Windows is up and running. Therefore, after I show you how to create a basic Windows build, I will show you how to create a build that includes some applications.

Begin the process by opening PEBuilder. When you open PEBuilder, you will see a screen similar to the one that's shown in Figure A. Simply enter the path to the Windows installation files (the ones from your Windows XP with Service Pack 2 installation CD). Next, verify that the Create ISO Image and the Burn to CD check boxes are not selected and then click the Build button. PEBuilder will now create the new Windows build.

Figure A

You must use PEBuilder to create a Windows build that will work with a flash drive.

Now, it's time to copy Windows to the flash drive. To do so, you will have to use a special batch file that's included with PEBuilder. Open a Command Prompt window and navigate to c:\pebuilder313\plugin\peinst. Now, insert an empty flash drive into the computer's USB port and then execute the file PEINST.CMD. You will now see a menu appear as shown in Figure B.

Figure B

PEBuilder uses a batch file to install Windows onto a flash drive.

Type 1 and press [Enter] and you will be prompted to enter the path to the build that you have created. Enter C:\pebuilder313\BartPE. Now, type 2, press [Enter], and you will be prompted for the target path. Enter the drive letter that Windows has assigned to your USB flash drive. After doing so, the menu is updated as shown in Figure C. The menu now displays the source path and the destination drive. Type 5 and press [Enter] to install Windows to the flash drive.

Figure C

Use menu option 5 to install Windows to the flash drive.

Installing applications
Now that I have shown you how to create and install a basic Windows build, I want to talk for a moment about how you can add an application to the build (prior to creating it). The PEBuilder program comes pre-configured to support a number of common Windows applications, but does not come with the applications themselves.

The reason why installing applications can be a little bit tricky is because most Windows applications modify the Windows registry. The build that you are creating is basically a collection of installation files, and the build itself does not contain a registry (the registry gets created when Windows is installed onto the flash drive). As such, PEBuilder uses a sort of registry emulator.

If you go to the C:\PEBUILDER313\PLUGIN folder, you will see sub folders for a number of different applications. If you open one of these application folders, you will see that the folder contains an INF file and a FILES folder. The INF file contains all of the information that would normally go into the registry, and the FILES folder stores all of the program's files.

To see how this works, let's install an application that I'm sure most of you are familiar with; Nero. Begin by installing Nero onto the machine that's running PEBuilder, as if you planned to run Nero locally on that machine. When the installation completes, copy all of the files from C:\Program Files\ahead\Nero to C:\pebuilder313\plugin\nero burning rom\files. In this particular case, the Nero burning rom folder is the folder that has been set aside for the Nero application. The Files sub folder is intended to store Nero's system files.

Now, you must take care of Nero's registry entries. To do so, go to the C:\pebuilder313\plugin\nero burning rom folder and open the PENERO.INF file using Notepad. As I explained earlier, the INF file in an application's folder is used to store the application's registry entries. For Nero and all of the other applications that PEBuilder predefines, the INF file is pre-configured. You just have to make a few changes that are specific to your system.

In this particular case, the PENERO.INF file is designed to support both Nero versions 5.x and 6.x. Initially, the lines for both versions are commented out. You must therefore determine which version you have and then remove the semi colon from the beginning of the lines that apply to that version. If you look at Figure D, you can see how the two versions are separated.

Figure D

An application's registry entries are stored in an INF file.

Once you uncomment the appropriate lines, just replace "Your Name", "Your Company Name" and "Your Serial Number" with your name, your company's name, and your Nero product key. Save the file, and your set to go. The next time that you click the Build button, Nero will be included in the build.

Putting XP in your pocket
Running Windows from a flash drive isn't an exact science. Sometimes the process just doesn't work and there is no good reason why. As more PCs start to support booting from USB devices though, USB boots should become more standardised, and the technique should become more reliable.

TechRepublic is the online community and information resource for all IT professionals, from support staff to executives. We offer in-depth technical articles written for IT professionals by IT professionals. In addition to articles on everything from Windows to e-mail to firewalls, we offer IT industry analysis, downloads, management tips, discussion forums, and e-newsletters.

Talkback

i need to want a bootable flash drive software to make a pendrive bootable.pls sent download link.........

souviksouvik May 23rd, 2010
Report offensive content Reply (+67) (-5)

make booteble pen for windows xp

shanthashantha May 27th, 2010
Report offensive content Reply (+13) (-9)

Boot Windows XP from a USB flash drive

sophalsophal September 22nd, 2010
Report offensive content Reply (+15) (-4)

How to convert usb flash drive NTFS to FAT16?

rizwan Ahmadrizwan Ahmad July 4th, 2011
Report offensive content Reply (0) (-1)

This is wonderfull to read..but i' upset because your tutorial is wasting my time like hell..next time if you want to be famous write it in full detail..here i'ved seen that you miss many step and make other that not familiar easily lost their mind while following your step..correct it by out the step by number or in sequence..this is totally wasting my time like i said...thx

jimmy hongkongjimmy hongkong December 7th, 2010
Report offensive content Reply (+3) (-6)

just work with myself

abulabul December 26th, 2010
Report offensive content Reply (0) (-1)

good softer

anuday rayanuday ray December 27th, 2010
Report offensive content Reply (+1) (-2)

y are all of you talking like this???
and this is good for me because I have a class for computers and we are trying to put windows XP on the computers

josebradenjosebraden February 10th, 2011
Report offensive content Reply (+3) (0)

Pls i can't download the softwares, so i need someone to send them through my mail amura222@yahoo.com

AmuraAmura April 16th, 2011
Report offensive content Reply (0) (-3)

enter the google search box ->download wintoflash software->open the first link than -> download the software->install the software->than open the software and give the path of windows file, and pen drive path..........->next->i accept the condition->

pankaj chaudharypankaj chaudhary July 19th, 2011
Report offensive content Reply (0) (0)

dear sir how to make pen drive soft ware bootable in windos xp & win7 to send the software my mail thanks 09915338216 inderjit2u@yahoo.co.in

inder22inder22 October 8th, 2011
Report offensive content Reply (0) (-1)

i need to want a bootable flash drive software to make a pendrive bootable.pls sent download link........

adiptadipt October 22nd, 2011
Report offensive content Reply (0) (-1)

thx ., but i would be most interested if u write it as for IT , this sounds like for beginners ,.

leinzleinz December 21st, 2011
Report offensive content Reply (0) (-1)

I want bootable a pen drive so pls help me. And send a software of bootabl;e pendrive and give me idea. plsssssssssssssssssssssssssssss.

layeeq mansoorilayeeq mansoori March 3rd, 2012
Report offensive content Reply (0) (-1)

how can i boot usb to my samsung laptop......

mohsin00999mohsin00999 April 13th, 2012
Report offensive content Reply (0) (-1)

Because they are a bit tarded u know just pretend they dont exist ;-)

dicaekilidicaekili April 27th, 2012
Report offensive content Reply (0) (0)
Add your opinion

In order to post a comment, you need to be registered. (Sign In or register below)

Post your comment

Terms of Service - As a ZDNet registrant, and by using this service, you indicate that you agree to our Terms and Conditions and have read and understand our Privacy Policy.

ZDNet Australia Live

RT @zdnetaustralia: The Westpac board have gone paperless using iPads and a secure, home-grown app environment: http://t.co/F1d17bvF ^LH

BYOD: What the people think http://t.co/5Mh2x0u9 via @zite #byotchat #edtech

Interesting..Who uses Twitter for job search? http://t.co/KuWVItXK @zdnetcharlie

SAP gets huge cloud and extended business process boost with Ariba acquisition: SAP is focused on global cloud g... http://t.co/75ps1wG3

Microsoft exec: Dynamics CRM, AX aims to feast Oracle, SAP switchers http://t.co/XiC912eT

Polo Ralph Lauren est une marque de vêtements américaine haut de gamme fondée par Ralph Lauren en 1967. Dès 1969, une boutique Ralph ...

1 hour ago by geadwaylype on Westpac board goes paperless with iPads

#SAP wants to be the biggest cloud player by 2015... http://t.co/fLwejro7

RT @playbiggeradv: #SAP wants to be the biggest cloud player by 2015... http://t.co/fLwejro7

Handy overview of #Android 's major #security flaws: http://t.co/oiVrKSHb #mobile #infosec

The implications of NZ school Principals demanding access to student mobile devices | ZDNet http://t.co/jMSJXzpT

michael kors purse http://www.michaelkorshandbags-online.com/#37 ZLlrPzyxFdu

3 hours ago by YJyqTygeShm on Kodak files for bankruptcy, sues Samsung

Google closes Motorola buy: http://t.co/9ezoLnSg

War talk dominates #AusCERT 2012 - http://t.co/WbuTt174 - #security #cyber

Nuance launches in car voice activated platform (Zack Whittaker ZDNet) http://t.co/9mFEA93c

Sage simplifies SMB payment management http://t.co/gbAKq1ku

A farewell to democracy: Kaspersky http://t.co/zE2SAGol via @zdnetaustralia

Private Cloud: 'Everyone’s got one. Where's yours?': Promising the business a cloud delivered within your own ... http://t.co/jCsDqPlj

BYOD: What the people think http://t.co/hR1pokPG

@ZDNet
R they joking? iPhone only way 2 go!
New 5 out in October (we think) & will kill all copycat phones, AGAIN!!

Android's biggest security flaws - Security - News - ZDNet Australia http://t.co/6nYZRvhh
@sjshock

Google: We now own Motorola Mobility http://t.co/oeFgovzl

@dougsteelman RT @dellsecureworks : Security researcher Tim Vidas of Dell SecureWorks outlines problems with the Androi…http://t.co/BE4LmItr

EMC hones focus on hybrid cloud, big data http://t.co/To6Qpsz4 #bigdata #XBRL #GRC $$

#Security researcher Tim Vidas of @DellSecureworks outlines some concerns with the #Android operating system: http://t.co/gV8MgCiN

Article and Infographic: Retailers attracting the next-gen customer http://t.co/UL3E2Fct #socialmedianews

adgtqMkWiDg //www.2012chanelbagsforsale.com]chanel handbags RKaOBd krFiudOGrBw //www.2012chanelbagsforsale.com]chanel outlet GQXRRYsDNI...

8 hours ago by rfcdvpmubn on Deakin Uni opts for Cisco Unified Computing

“@Techmeme: TiVo streaming coming to iOS this summer (@jasonogrady / ZDNet) http://t.co/07L0ndoD ” < wonder if it will work in AU

Security researcher Tim Vidas of Dell SecureWorks outlines problems with the Android operating system: http://t.co/lA4t9ffu

Why I (now) hate Apple | ZDNet - http://t.co/f5v6BWxu

A farewell to #democracy: (according to)> #Kaspersky http://t.co/82GeK5Ik via @zdnetaustralia

I am not sure how this issue becomes an attack on Mr Turnbull. But I guess he is fair game. In any event I would have thought a Ddos woul...

9 hours ago by Doubt on National Botnet Network coming: Earthwave

RT @JamesVickery: Westpac board goes paperless with iPads http://t.co/L8V05zFs

I still use 98SE. Windows ME was an abortion in a bucket and Vista was ME without the bucket. My screen may look boring, but I jumped str...

9 hours ago by Treknology on Microsoft admits Vista was 'cheesy'

What is it [url=http://vintage-erotic.com/] retro xxx movies [/url]? And why all this it is possible to look free of charge?

9 hours ago by Drienlyinhibe on Australian police swoop on Warez community

Windows 8 includes enhanced multi-monitor support http://t.co/ZVfVHntw

This story has been voted 10 times in the last 24 hours!

9 hours ago, CeBIT 2012 opens: photos

Android users, you think only Apple are having security problems. See what is your major problem.
http://t.co/cjJYSOJw #infosec

RT @my_CISB: Android users, you think only Apple are having security problems. See what is your major problem.
http://t.co/cjJYSOJw #infosec

This story has been voted 15 times in the last 24 hours!

10 hours ago, Lenovo ThinkPad 3G tablet (32GB)

RT @aimee_maree: "For Buytaert, Drupal owes much of its success to being open source" http://t.co/RdnHB2y9 #Drupal

Malware charges users for free Android apps on Google Play - http://t.co/Zhnf2rtw

Well I don't know what they have done with their EFTPOS machines, local one in WA Coles Express I used this morning and I normally do "ch...

10 hours ago by harryinthesoup on Coles ditches PINs in payment pilot

@TaschaD More information: http://t.co/8rfUsQJ0 I guess I shall simply go without.

RT @zdnetaustralia: The Westpac board have gone paperless using iPads and a secure, home-grown app environment: http://t.co/F1d17bvF ^LH

ルブタンは彼が彼の靴に女性が感じる方法を好む、 クリスチャンルブタンポンプ これは彼がそれらを...

11 hours ago by Coiffboarieri on Reservoir blogs: Fan fakes Tarantino diary

6.7 M last ditch attempt - interesting - The Auckland region (population 1.4 mil) has estimated to have spent less than this in total ...

13 hours ago by debsteele on Vic scraps HealthSMART system

Interesting - no mention of Win 98/ME/2000 ... which heralded Internet access for millions of users ? I thought Win 98/ME would be the mo...

14 hours ago by gouranga on Microsoft admits Vista was 'cheesy'

An Application like Good from Good Technologies does the same thing, working with the enterprise email server and is off the shelf.

14 hours ago by Helpdesk123 on Westpac board goes paperless with iPads

Never mind a "B+" version, go for "C" and put in a few extras. I'd like a high speed ADC (100Msps) but that's just me... Final size? Equ...

15 hours ago by sa_penguin on Raspberry Pi architect mulls design change

what a non-story. these thing happen all the time. is zdnet short on material?

16 hours ago by paulwrussell on Spotify launch suffers redirect bungle

4 months old phone died. Took 6 weeks, three visits to the authorised repairer (Fonebiz) to "fix it". 2nd hand untested parts used, I say...

16 hours ago by paracin on Sony Ericsson Xperia Arc S

It's easy to rubbish an old operating system long after the rest of the world has already passed judgement upon it. I would be far more i...

17 hours ago by ramnet on Microsoft admits Vista was 'cheesy'

If Vista is cheesy, Metro is an over-ripe Stilton.

17 hours ago by meski on Microsoft admits Vista was 'cheesy'

you are kidding right - what qualification do you have to make such wildy stupid statements - do you really have customers who pay you fo...

18 hours ago by rant rant rant on National Botnet Network coming: Earthwave

Exactly. There are two topics of discussion, that are co-mingled; 1) Unauthorized software was put on the company device, by an IT person...

21 hours ago by lamont on ABC's Bitcoin miner tackled in minutes

First off, Bitcoin is not a virus. Second off, the only way to generate Bitcoins, is by using a Bitcoin miner. More information on this h...

1 day ago by rizowski on ABC's Bitcoin miner tackled in minutes

When an operating system is sold it should not launch until an approved security service is purchased online with a list of approved supp...

1 day ago by Kevin Cobley on National Botnet Network coming: Earthwave

Facebook Activity

Keep up with ZDNet Australia

ZDNet Events Calendar

ZDNet Events Calendar