Installing Windows XP from USB
You’ll be needing ample space on a USB storage device like a thumbdrive or external disk drive. 1 GB of storage will suffice. Possibly, you could access the setup files from a network share in which case you’ll only need a 256 MB thumbdrive, but I haven’t tried that.
Personally, I booted off a 512 MB thumbdrive and put the Windows XP setup files on an external disk drive. So a combination will do just fine, but just make sure that you’ve got sufficient USB ports: all USB devices will need to be plugged in and stay plugged in while we’re booted into BartPE later on!
You’ll also need a bunch of software, including a valid copy of Windows XP. The other software components can be downloaded freely:
* Bart’s Preinstalled Environment (BartPE)
* Windows 2003 Server Service Pack 1
You will also need an already functional Windows system to prep the USB disk from. In addition, your target system (the one that needs reinstalling) should support booting from USB. Virtually all modern ones do though.
Finally, not all cheaper USB devices properly support being booted from. The BartPE forums have a partial list of ones that don’t.
Step One: Preparing the Windows XP Setup Files
For this procedure to work correctly, you’ll need Windows XP to be at Service Pack 1, Service Pack 2 or Service Pack 3. Many newer Windows XP CDs already have either one included.
You can check by inserting the CD-ROM and looking at the files in the top folder. There should be a file named WIN51P.SP1, WIN51P.SP2, WIN51P.SP3. If you see either one, fast forward to step two.If there is no such file, or you’ve got a SP1 CD that you would like to update to SP3, proceed as follows:
1. Copy the Windows XP CD-ROM to a location on your hard drive. We’ll be assuming C:\winxpcd. I strongly advise you to use such a vanilla CD. Users have reported strange happenings with custom XP distributions.
2. Download the Windows XP Service Pack 3 Network Installation Package.
3. Unpack Windows XP SP3 by running WindowsXP-KB936929-SP3-x86-ENU.exe -x. Note the -x parameter that will allow you to specify a location to unpack to. We’ll be assuming C:\winxpsp3.
4. Integrate SP3 into the setup files by running C:\winxpsp3\i386\update\update.exe /integrate:c:\winxpcd.
If your system needs special drivers to operate, this would be the time to include them (called “slipstreaming”). Doing so isn’t exactly trivial and should only be necessary if you, say, require non-standard SATA support. The process is beyond the scope of this article, but fortunately Google is your friend.
Step Two: Prepping BartPE
First we’ll prep the USB drive we’ll be using for booting. This is by far the largest step in the process, though it shouldn’t be difficult for anyone to follow. It requires a functional Windows system.
1. Install BartPE. We’ll be assuming that you install to C:\pebuilder.
2. Unpack Windows 2003 SP1 by running WindowsServer2003-KB889101-SP1-x86-ENU.exe -x (that’s assuming that you downloaded the English version). Note the -x parameter that will allow you to specify a location to unpack to. We’ll be assuming C:\server2003sp1.
3. Create a folder named C:\pebuilder\srsp1.
4. Copy C:\server2003sp1\i386\setupldr.bin to C:\pebuilder\srsp1.
5. Expand and copy ramdisk.sys by running expand -r C:\server2003sp1\i386\ramdisk.sy_ C:\pebuilder\srsp1.
6. Start PE Builder from the Start Menu. Point “Source:” to the location of your Windows XP setup files containing SP1, SP2 or SP3.
7. Make sure the “Output:” is set to “BartPE”. If using SP2 or SP3: go into the Plugins configuration dialog and enable “RpcSS needs to launch DComLaunch Service First - SP2 only”.
8. Hit “Build”.
9. When it’s done building, insert the USB drive you intend to boot from and run C:\pebuilder\pe2usb -f [drive:], replacing [drive:] with the location of your USB drive. This will destroy any data on your USB drive! The drive shouldn’t be partitioned any larger than 1 GB. If it is, then repartition it using Computer Management in the Control Panel.
10. Copy the Windows XP setup files to the USB drive (or another USB device if you have insufficient space left). You’ll only need the i386 folder.
If no errors occured in the process, you should now be all set to boot from USB!
Note: it’s possible to use Windows 2003 Server as the operating system to boot from, but I don’t recommend it. Many of BartPE’s included utilities won’t work properly.
Step Three: Configuring the BIOS
You should now reboot and go into the BIOS configuration to boot from USB. Instructions for doing so wildly from system to system, but generally entail the following:
1. Reboot the system.
2. While booting (before Windows starts loading), get into the BIOS configuration screen by hitting something like F1, F2, Delete or Escape. Hotkey instructions are generally provided on the screen.
3. Go to the section that contains your boot devices.
4. With your USB drive plugged in, the USB drive should be listed. If it isn’t, your system might not support booting from USB. Assuming that it is supported (as is the case with virtually all modern hardware), promote your USB drive to the primary boot device.
5. Exit from the BIOS configuration, saving all changes.
If you’re completely new to BIOS configuration, BIOS for Beginners over at Tom’s Hardware might be a good primer. Be aware though, that you can seriously screw up your system by providing incorrect settings!
Step Four: Booting into BartPE
Assuming that you properly configured your BIOS and your USB device supports booting, BartPE should now load. Depending on the speed of your USB device, this may take a while.
If it isn’t working, then double-check the following before making a scene:
* Is your BIOS properly configured for booting from the USB disk? (Is the USB device listed and does it have top priority?)
* Have you correctly prepared the USB disk in step two? (Restart the procedure.)
* Does your USB stick properly support being booted from? (Try another one!)
Step Five: Prepping the Hard Disk
You need to make sure that your hard drive is partitioned and formatted properly. Especially if you’ve had Linux or some other operating system on it, you’ll need to repartition and format it. BartPE contains DiskPart for disk partitioning and A43 File Manager to format your drive.
If you are sure that your hard drive is set up properly (i.e. it has only run Windows, it contains a valid FAT or NTFS partition) then you can safe yourself the hassle and skip this step.
This procedure will destroy any data on the hard drive.
1. From the Go menu, navigate to DiskPart.
2. Enter the commands needed to repartition your drive. For example, try the following: select disk 0 (select the first disk), clean (purges the entire drive, essentially resetting it), create partition primary (creates a single partition from the entire disk), assign (assign the partition a drive letter), exit (quits DiskPart).
This procedure will destroy any data on the hard drive.
1. From the Go menu, navigate to the A43 File Manager.
2. Right-click on the target drive (e.g. C: ) and click Format. Should be self-explanatory.
Step Six: Launching Windows XP Setup
With your drive all ready, you can now launch the Windows XP setup with a few custom parameters. Let’s assume that the files are available at D:\i386.
Plugging in a device now won’t work. Remember that all USB devices will need to be plugged in right from the start while using BartPE.
1. Run D:\i386\winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource. Replace C: with the drive you want to install Windows to.
2. Proceed with the installation. When asked to convert the installation volume to NTFS, answer No. The setup program incorrectly believes that your USB drive (which is formatted as FAT) needs conversion.
The setup program will then silently close, which might make you think that something went wrong. Don’t worry though. Reboot your system, remove the USB drive(s) and – if all went well – you can now finish setting up Windows XP. Congratulations!