Installing Windows XP from a USB memory stick

I had the pleasure of upgrading the OS on our sales director’s new notebook today.
(It was shipped with XP Home, which is useless for business work.)

After discovering that the “USB CD-ROM drive” we apparently had in the store-room was infact firewire, and as such totally useless for my purposes, I had to find another way of getting XP Pro installed.

From experience, I know you can run many flavours of Linux straight from a USB memory stick, as long as the computer’s BIOS natively supports USB flash disks. But I’ve never seen or tried to do the same with Windows XP.

After a morning’s worth of trying different ideas and different memory sticks, I was finally greeted by the warm blue installation screen of the Windows XP operating system.
Below is a quick step guide of how I achieved it:

 

BIOS: Make sure you’re not wasting your time!

The first thing to do is check your target computer is actually capable of booting from a memory stick. There’s no point going through the rigmarole of setting everything up, just to fall at the first hurdle!

  • 1. Plug a USB memory stick into a free USB slot.
    It’s important to do this BEFORE turning on your computer, as some BIOS versions will only show the “boot to USB device” options if a USB device is detected.

 

  • 2. Turn on your computer and then enter the BIOS setup utility.
    How you actually achieve this depends on what BIOS your computer has. However, it’s usually done by pressing either F1, F2 or DEL during the very first few moments after powering on the computer.
  • 3. Check the list of available boot devices.
    Again, how this is done exactly depends on what BIOS you’re running. However, there is usually a screen named “Boot” or “Boot Settings”.
    On this screen, you are able to choose in what order the computer will check devices for bootable partitions.
    Look through the list of devices for anything relating to USB; the “usual” names are:
  • Removable Device
  • USB Device
  • USB Flash Drive
  • USB HDD

 

  • 4. Configure your computer to boot from a USB device.
    Whilst we are here, and assuming you’ve found a USB device in the boot list, select it as the first boot device.
    If you have more than one possibility for the USB device (For example, USB Device AND USB Flash Drive are listed), place as many as you can into the list. It doesn’t matter if you need to remove your hard drive(s) or any other device from the list – just record the list of items you’re replacing and we’ll restore them later on.

If you’ve not got any USB devices listed at step 3, then it’s probably unlikely that you’re computer’s current version of BIOS supports USB booting.
Try checking for an updated version, as most common BIOS vendors do now support it…

 

 

 

Pre-Reqs: Get everything you need.

Unfortunately, it’s not just a case of grabbing your XP CD and a memory stick; you’ll need a couple of extra bits of software as well.

 

  • 1. Memory Stick (2GB or less).
    The reason for the maximum size limit is because we need to format the drive using FAT-16, which only supports sizes up to 2GB.
    Whilst it IS possible to re-partition a larger usb drive, it’s not straight forward and isn’t covered here… so time to dig out your old stick!
  • 2. Bart’s Preinstalled Environment (BartPE to its friends).
    This cunning bit of software is basically a Windows-esque bootdisk. It’s an incredibly usefull tool – especially if your Windows installation has just stopped working. However, all we’re going to use it for is as a jump-off point for the Windows Installation process.You can download it here: http://www.nu2.nu/pebuilder/#download
  • 3. Microsoft Windows Server 2003 – Service Pack 1.
    No, it’s not a typo. You really do need a copy of the Windows Server 2003 service pack 1. Why?
    Because.
    No really… why?
    Oh ok… you need it because the Windows Server 2003 installer uses a RamDisk (creates a fake hard drive in your computer’s ram) and uses this to run the installer from.
    Windows XP on the other hand doesn’t, so relies on the installation media being constantly present.
    So.. can’t I just leave the USB device plugged in?
    Sadly no. This is the main problem I found when trying to install XP this way. When Windows starts to boot up, it resets all USB connections, including the one you’re installing from.You can download it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=22cfc239-337c-4d81-8354-72593b1c1f43&DisplayLang=en

 

  • 4. FlashBoot (Demo version will suffice).
    Although BartPE claims to be able to make bootable USB sticks, from my own experience it only seems to work on a small number of memory sticks; most of the time you end up with a non-bootable memory stick and a lot of wasted time.
    To stop any of this fustration before it starts, I found this nice little app that seems capable of creating bootable partitions on every stick i’ve tried. Handily, it also seems to have been designed with BartPE in mind!You can download it here:
  • 5. Windows XP Installation Disk (With SP1, SP2 or SP3 rolled in).
    For this to work, you need to have a copy of the Windows XP installation disk which has any of the three service packs already “built in”.
    If your disk doesn’t specifically say it has one built in, you can quickly check;
    if you have a file called “WIN51IP.SP1″ in the root of the disk, then that disk has service pack 1 built in. If you have a file called “WIN51IP.SP2″, then it contains service pack 2… and so on.If you haven’t got an installation disk with a “built in” service pack, follow this guide to create one: http://www.helpwithwindows.com/WindowsXP/winxp-sp2-bootcd.html

 

 

Step 1: Building the foundations

Ok, so before we can start creating the installation image, we need to install and configure the above pre-reqs.

  • 1. Install BartPE.
    It’s pretty straight forward, just double-click to start, click “next” a lot and then “finish” when it’s done!
    The only thing to note is the installation path. For this guide, we’ll assume it got installed to:
  • C:\pebuilder3110a
  • 2. Unpack the Windows Server 2003 Service Pack.
    To unpack the service pack, open a command prompt, navigate to the folder where the service pack file was downloaded to, and type the following:
  • WindowsServer2003-KB889101-SP1-x86-ENU.exe -x

Press enter, and then you should be prompted to select a place to unpack the files to.

•3.       Copy some of the unpacked files into the BartPE directories.
BartPE needs two files from the service pack you unpacked in the previous step.
(Yeah I know; 300mb download and we’re only using two file! But there’s no other legal way of getting these files…)

  • setupldr.bin
    This file is found within the “i386″ folder that was unpacked in step 2.
    Copy this file into a new subdirectory, called “srsp1″, within the BartPE installation directory. (I.E, c:\pebuilder3110a\srsp1\setupldr.bin)  

  • ramdisk.sys
    This file is again found within the “i386″ folder. However, it will be in a “packed” state, and called “ramdisk.sy_”.
    To expand and copy this file, open a command prompt, navigate to the “i386″ directory, and enter the following:
    “expand -r ramdisk.sy_ c:\pebuilder3110a\srsp1″

•4.       Install FlashBoot.
Install FlashBoot using it’s default settings. No special setup required.

Step 2: Build the BartPE image

Now we’re all set to go, the next thing we need to do is create our bootable BartPE ISO image.

  • 1. Start PE Builder (BartPE).
    Simply click the icon either on the desktop, or in the Start menu.
  • 2. Set your Windows XP Installation media as the “Source”.
    BartPE needs to copy files from your Windows XP installation media in order to create the bootable image. Enter the full path to the root of your Windows XP installation media in the “Source:” textbox.
  • 3. Ensure “Output” is set to “BartPE”.
    The “output:” textbox should default to “BartPE”. However, if it hasn’t, change this now.
  • 4. Select “Create ISO Image” as the “Media output”.
    BartPE defaults to a “Media output” of “none”. You will need to change this to “Create ISO Image” and the specify a path and filename for the ISO image that will be created.
  • 5. Enable Required Plugin.
    This step is ONLY required if you’re using a Windows XP Installation media with service pack 2 or above “built in”.
    Click on the “Plugins” button and scroll down the list of available plugins until you locate “RpcSS needs to launch DComLaunch Service First – SP2 only”.
    Select this plugin and click the “Enable/Disable” button until it appears as enabled in the list.
    Click the close button to return to the main screen.
  • 6. Build the image.
    Click the “Build” button. Now go and make a brew, as this will take some time to complete…

 

Step 3: Create your bootable USB

Now we have the BartPE image, we’re ready to build the bootable USB partition…

  • 1. Plug in your USB memory stick.
    If you’ve got any files on the stick you’d like to keep, now is the time to back them up, as shortly, the stick is going to get formatted!
  • 2. Start FlashBoot.
    Launch up FlashBoot and click “next” when the “Welcome” screen is displayed.
  • 3. Select the BartPE ISO image.
    Ensure the top option (”Convert BartPE bootable disk to bootable flash disk”) is selected and click “next”.
    On the next screen, ensure the “CD-ROM Image” is selected, then enter the path to the ISO image that was created by BartPE in the previous section.
    Click “next” to move to the next screen.
  • 4. Select the USB Drive to use.
    Ensure the “Local disk drive” option is selected and choose the drive letter that Window’s has assigned to the USB memory stick you want to use.
    It really is worth double-checking this, as an incorrect choice is likely to result in a lot of swearing…
    When you’re sure it’s correct, click “next.”

 

  • 5. Select the format to use.
    Depending on what options were available to you on the target machine’s BIOS, select an option to use. If it doesn’t work, you can always re-run this step and try the other.
    If you’re unsure, try “USB-HDD” to begin with…
    Click “next” when you’ve made a choice.

 

•6.       Start the Creation.
Double-check everything in the summary looks correct, then click “Finish” to create your bootable USB memory stick.
Once it’s completed, click “Close”.

 

Step 4: Verify it works!

There’s no point carrying on further, if you’re not able to boot from the memory stick…
So let’s check!

  • 1. Turn off the target machine.
    If it isn’t already, fully power off the target machine.
  • 2. Plug in the USB memory stick.
    Plug the memory stick directly into the target computer. Avoid using USB hubs, as they may not initialise quick enough for the BIOS to detect the memory stick.

•3.       Turn on the target machine.
If all has gone well, and your BIOS has been correctly configured to boot from USB, after a few moments, you should see an on-screen message telling you that the boot disk was created by a demo version of FlashBoot.

If you don’t see this, but instead the computer starts to load an operating system, moans about missing files, or simply that no operating system was found, then something hasn’t gone quite right.
It’s worth double-checking that you’ve set up your BIOS boot configuration correctly before going back over the above steps… It’s caught me out before!

If you’re sure you’ve followed all the steps correctly, and that the target computer is correctly set to boot from USB devices, then it’s worth trying another memory stick.
(Although FlashBoot seemed to work for every memory stick I own, it is possible that some memory sticks just wont work…)

If you’ve tried everything, and it’s still not working, then I’m afraid you’re next best option is to purchase a USB CD-ROM drive…

 

Step 5: Copy the Windows XP installer

Now that you have proved you can boot up via USB, it’s time to copy the Windows XP installation files over to your USB memory stick.
If you’ve not got enough free space on the “bootable” memory stick, just copy all the installation files to another “standard” stick. (the 2gb limit doesn’t apply to this second stick. Infact, if you’ve got a USB hard drive you can even copy the files to that and use it!)

 

Step 6: Boot into BartPE

Now everything’s set to go! Follow the steps below and get installing!

  • 1. Turn off the target machine.
    If it isn’t already, fully power off the target machine.

 

  • 2. Plug in the bootable USB memory stick.
    If you had to use a second USB device for the installation files, insert this now also.

 

  • 3. Turn on the target machine and wait for BartPE to load.
    When presented with the FlashBoot demo message, follow the on-screen instructions to boot into BartPE.

 

  • 4. Locate the Windows XP Installation files.
    From the “Go->Programs” button, start the “A43 File Management Utility”. This program has a very similar look and feel to the Windows Explorer application.
    Using this, find the path to the Windows XP Installation files. Usually, they will be found on “D:\”…

 

  • 5. Start the Windows XP installation process.
    From the “GO” button, click “Run..” and navigate to the “i386″ directory, within the directory that contains the Windows XP installation files, as discovered in the previous step.
    Then enter the following command:

 

  • Winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource
(replace “C:” with the drive letter you wish to install Windows XP to)
 
 

 

  • 6. Proceed with the installation process.
    When asked to convert the installation volume to NTFS, choose “NO”; The setup program incorrectly believes your USB drive needs to be converted.
  • 7. When finished, reboot the target machine.
    When the setup process finishes, it may just disappear, making you think it has crashed.
    Don’t worry, it just thinks it’s restarting the machine, but BartPE stops it.
    Simply remove your USB devices and reboot the target machine.
    (If you replaced all or some of the devices in the boot configuration section of your BIOS (back in the first section), now’s the time to restore the list “as-was”.)   

Now just sit back and marvel as Windows XP installs!

 


3 Responses to “Installing Windows XP from a USB memory stick”

Leave a Reply