How to Create Windows XP Install to USB

Create Windows XP Install USB
Objective :
Winxp is really a good member of windows family. It is maybe the most common version of windows has ever used until now.
This post will show you how to put a full winxp on usb disk to use it anywhere.
Requirement :
  • Ability to use some VirtualMachine Management like VirtualBox, VMware, …
  • Good knowledge at using Winxp.
Terminology :
  • Vhd file : It looks like an image of a disk (and partitions) inside.
  • WinVBlock : Virtual scsi driver for Winxp to mount vhd disk image.
  • NTloader  : Boot loader of Windows works with ntldr file.
  • Grub4Dos  : Boot loader used to map vhd disk image file.
Primary steps :
  1. Create .vhd disk image includes a running Winxp (with WinVblock driver installed).
  2. Make USB disk bootable with NTloader and Grub4Dos.
  3. Boot the image by Grub4Dos.

Steps in detail :

1. Create .vhd disk image includes Winxp (with WinVblock driver installed)

1.1 Create New Machine :
In this post we will use VirtualBox to make an Winxp virtual machine with vhd disk image (fixed-size harddisk) (2GB for example) in vhd format. Notice to use fixed-size hard disk, otherwise Grub4Dos won’t work !
Create Windows XP Install USB
Create Windows XP Install USBCreate Windows XP Install USB

Point the CDROM drive to an Winxp installation disc (.iso), and install it as usual till it finishes

install windows xp to usb drive
1.2 Disable Page File :
By default Winxp uses a page-file (double RAM size) on the C: drive, it takes alot of disk space. We don’t need it, so we will remove it, and a full Winxp will takes about 900MB in size.
install windows xp to usb drive
install windows xp to usb drive
1.3 Config the Winxp driver to make it works on all machine :
Because our Winxp will run on USB disk, we need to make it able to run on all of different machine without depend on the driver (independent with driver) by making some devices using Standard Driver.
Open the Device Manger and update : IDE ATA/ATAPI Controllers and System Devices to use Standard driver. In this case, they should use :
  • IDE ATA/ATAPI Controller :
    • Standard Dual Channel PCI IDE Controller.
  • System Devices :
    • PCI bus.
    • PCI standard host CPU bridge.
    • PCI standard ISA bridge.
install windows xp onto usbinstall windows xp onto usbinstall windows xp on usb
Reboot the virtual machine if necessary, and you should have a status like this after all :
install windows xp on usb
1.4 Install WinVblock driver :
Google and download the WinVblock driver, unzip it. Open Control Panel / Add Hardware. Follow the Wizard and point it to the WinVblock driver folder.

After reboot the Winxp vitual machine, It should have 2 more scsi devices like this.

install windows xp on usbinstall windows xp to usb
1.5 Defragment the C: drive :
In order to boot with Grub4Dos (map to file), the image file need to be in contiguous disk area.
Just have a check if the C: drive has been fragmented ? If does, open the My Computer, right click on C: drive / Properties / Tools / Defragment Now …
install windows xp to usb
1.6 Locate the vhd file :
Until now, you should have a running Winxp virtual machine includes :
  • WinVBlock driver.
  • Some devices with Standard driver (IDE controller and system devices)
  • C: drive not fragmented.

Shutdown the virtual machine and locate for the .vhd file (check the Preferences of VirtualBox to find out the default location).

install windows xp to usb

2. Make USB disk bootable with NTloader and Grub4Dos

2.1 Format the USB :
You need an USB disk larger than the disk image (4GB in this post). Format it with NTFS filesystem or FAT32 (make sure to backup it first !!!)
install windows xp to usb
2.2 Make the USB disk bootable :
After format, suppose it has been mounted as D: drive. We will make it bootable by :
  • Make it as active partition (open Disk Management and right click / Set Active).
  • Copy from C: drive these files (maybe you need to set Folder Options to show all hidden file) : ntldrntdetect.comboot.ini.
  • Search and download the Grub4Dos tool. Unzip it. Copy these files to the USB (D: drive) : grldrgrldr.mbr
install windows xp to usbinstall windows xp to usb
Now you need to place the ntloader bootcode onto the MBR of the USB disk. You will need the bootsect.exe tool (search for it in the WinVista or Win7 installation disc, or google for download it … ), copy it to the C: drive. Then execute the command :
c:\bootsect.exe /nt52 d: /force
Now the USB disk can bootable, next we need to point NTLoader to load Grub4Dos. Edit the boot.ini file :
[boot loader]
[operating systems]

Save the boot.ini file.

Let’s restart the PC and boot from USB disk. The NTloader will load Grub4Dos according to the boot.ini file.install xp to usbinstall xp to usb
So, we now have the USB disk bootable according to :
  • Primary Active partition.
  • NTloader in the MBR : ntldr,, boot.ini
  • Grub4Dos at second stage : grldr, grldr.mbr

3. Boot the image by Grub4Dos.

3.1 Copy the vhd disk image to USB disk :
Restart the PC and copy the vhd image file (has been located at 1.6 step) to the USB disk. You should rename it from “winxp full.vhd” to “winxpfull.vhd” to kill the blank space.
install windows xp to flash drive
3.2 Boot the disk image :
Reboot the PC and boot from USB disk, when Grub4Dos has been loaded, choose the command line menu. Enter these commands to load the WinXP image :
map (hd0,0)/winxpfull.vhd (hd0)
map --hook
chainloader (hd0,0)/ntldr
install windows xp to flash drive
and the WinXP image will be loaded as usual … When done, you will see the disk image has been mounted as C: drive and the USB disk as D: drive. In Device Manager there also have a WinVblock disk appears under the Disk drive entry.
install windows xp on flash driveinstall windows xp on flash drive
so we’ve almost done.
3.3 Create Grub4Dos menu entry : 
Now we will create a menu entry for auto loading the image instead of manually typing the commands. On the USB disk (D: drive), create a text file named D:\menu.lst with the content :
timeout 5
default 0
title Boot to Winxp.vhd
map (hd0,0)/winxpfull.vhd (hd0)
map --hook
chainloader (hd0,0)/ntldr

Reboot the PC and boot from USB to see the result :

install windows xp on usb driveinstall windows xp on usb drive
So, we have done for a full Winxp running in USB disk. You can try it on different PC to see the result.

Video :

Known issue :

  • Not contiguous image file : You need to defragement the image file before load it.
  • Boot hang on new machine with SATA/AHCI controllers : Enter BIOS and switch the SATA/AHCI controller to use Compatible/Legacy mode.

Read More Post