Thursday, November 29, 2007

Installing Windows XP from USB thumb drive

Updated Sunday Dec 9, 2007

Installing Windows XP on the Asus EEE pc using a single USB flash drive.

Please note this tutorial works on all computers not just the Asus EEE PC.
To complete this tutorial you need a 32bit version of Windows XP or Windows Vista installed on your home PC.

What you'll need:
USB_PREP8 (alternative download)
PeToUSB (alternative download)

Bootsect.exe (alternative download)
Special Note: If you use the program Nlite be sure to keep the manual installation files as the USB_prep8 script relies on these files.

Extract the files in
The next step is to extract USB_prep8 and PeToUSB.
Next copy the PeToUSB executable into the USB_prep8 folder.
Inside of the USB_prep8 folder double click the executable named usb_prep8.cmd.

The window that opens will look like this:

Press any key to continue

You next window will look like this:
These settings are preconfigured for you all you need to do now is click start.
Once the format is complete DO NOT close the window just leave everything as it is and open a command prompt from your start menu (type cmd in the search bar or run box depending on your version of windows.).

Inside of the command windows go to the directory you have bootsect.exe saved.
(use the cd directoryname command to switch folders)

Now type "bootsect.exe /nt52 R:" NOTE R: is the drive letter for my USB stick if yours is different you need to change it accordingly. What this part does is write the correct boot sector to your USB stick, this allows your PC to boot from the USB stick without it nothing works.
Please note: When running the bootsect.exe command you cannot have any windows open displaying the content of your USB stick, if you have a window open bootsect.exe will be unable to lock the drive and write the bootsector correctly.

If all went well you should see "Bootcode was successfully updated on all targeted volumes."

Now you can close this command prompt (don't close the usbprep8 one by mistake) and the petousb window.

You window you see now should look like this:

If it doesn't try pressing enter.

Now you need to enter the correct information for numbers 1-3.
Press 1 and then enter. A folder browse window will open for you to browse to the location of you XP setup files (aka your cdrom drive with xp cd in)
Press 2 and enter a letter not currently assigned to a drive on your PC
Press 3 and enter the drive letter of your USB stick
Press 4 to start the process.

The script will ask you if its ok to format drive T:. This is just a temp drive the program creates to cache the windows installation files. Press Y then enter.

Once it's done formating press enter to continue again, you can now see the program copying files to the temp drive it created. Once this is done press enter to continue again.

Next you will see a box pop up asking you to copy the files to USB drive yes/no you want to click yes.

Once the script has completed copy files a popup window asking if you would like to USB drive to be preferred boot drive U: select YES on this window.

Now select yes to unmount the virtual drive.

Ok we are done the hard part, close the usbprep8 window.

Now make sure your EEE pc is configured with USB as the primary boot device.
Insert your USB drive and boot up the EEE.

On the startup menu you have two options, select option number 2 for text mode setup.

From this point on it is just like any other windows XP installation delete/recreate the primary partition on your EEE pc and format it using NTFS.

Once the text mode portion of setup is complete it will boot into the GUI mode (you can press enter after the reboot if your too excited to wait the 30 seconds)

Once the GUI portion of setup is complete you will again have to boot into GUI mode this will complete the XP installation and you will end up at you XP desktop. It is very important that you DO NOT REMOVE THE USB STICK before this point. Once you can see your start menu it is safe to remove the usb stick and reboot your pc to make sure everything worked.

This method has advantages over all current no cdrom methods of installing XP to the EEE. You do not have to copy setup files in DOS to the SSD and install from there. It gives you access to the recovery console by booting into text mode setup, and it gives you the ability to run repair installations of XP if you have problems later on.

I hope this worked out for you and please post feedback to the comments section.


Anonymous said...

Thanks !

THEREX said...


means Thanks! :)

Anonymous said...

Really works for me ...

Anonymous said...

Sounds great!!!, but need more pics plz :)

Titi said...

Foarte misto, util si bun tutorialul. M-am chinuit 3 zile sa invat cum sa pun XP pe EeePC si singur nu am reusit sa ii dau de cap.

Multumesc mult pentru acest tutorial; Merge brici si eee simplu.

gbpdem said...

Hi there, tried it but when attempting to boot into GUI, keeps getting "missing or corrupt hal.dll" error message.
Tried many times still getting into that same loop.
Followed steps here also futile

In the end I had to pull the usb stick out and got new error message "ntldr missing" and could not boot so had to do a reset.

Even tried to use cdrom plugged into EEE usb port to install but the ntldr refuses to go away and it basically hung.

Any ideas please?

Fahad said...

I have the same problem as gbpdem..
the file hal.dll is missing and even after formatting the drive and to begin copying installation files, it prompts to restart.

Any idea?!

Nick said...

Yes you need to make sure the USB device is set as the first boot device in your bios under the hard drive section. that should fix the problem you two are having.

Fahad said...

Thanks Nick for the quick reply,,
It is set to boot first,, but still encountering this issue many times!!

Nick said...

Fahad: recreate your USB stick and make sure bootsect.exe writes the correct boot sector to the USB drive with no errors. A failed bootsector write is the only instance I've experienced the problem you're describing.

Fahad said...

I dont have any issue booting from the my USB flash,,

The only problem i face every time is:

After my laptop boots from the USB and displays the options, i choose 2nd (TXT) and then it displays the blue installation screen, i choose the fresh windows installation option, check the right partition, and then it prompts for formatting, after format is complete, it should copy the installation files right now,, THIS IS THE ISSUE, it doesnt know where are the files and dislplays can't find installation files retry or restart,,

So i dont know what to do, any idea?!
I dont have usb cdrom, and i need to get my laptop up & running,,

Thanks Nick

Nick said...

Yes Fahad I do understand the problem you are having. What I told you to do last time is still the solution. The boot sector currently written to your USB device does allow you to boot to text mode setup which is basically DOS but you do not have the correct boot sector written to boot into NT which is the second portion of setup, windows setup does not write this boot sector because it is already supposed to exist. Recreate your usb stick like I said in my previous post.

Fahad said...

You know Nick, i did what you said exactly all over again and the process is correct coz it displays "Bootcode was successfully updated on all targeted volumes"

Again, it boots but ends up with the same issue again displaying the following
"Setup cannot access the CD containing the windows XP installation files.
To retry, press ENTER, if you are not successful after serveral tries, quit setup....ect"

Now, it might not have the boot sector for NT!!
I was check screen after format is done, after that at the bottom of the screen it displays "Checking C: drive" and i think the USB that has the files been granted the letter U:

is there any way to check this out?! i am really confused :((

Nick said...

Fahad, when you last ran bootsect did it display this message above the one you sent me? "Updated FAT filesystem bootcode. The update may be unreliable since the
volume could not be locked during the update:
Access is denied." because if that message displayed it means it was not written correctly. This is the only time I've had the problem you're discribing. Sorry I can't be of more help but there is no reason why you should be having this problem.

Fahad said...

No, it didnt display what you mentioned,,

it was successful,
"Bootcode was successfully updated on all targeted volumes"

I guess to solve this issue, after format is accomplished, we need to point system to copy the files from the flash which is set to U:\,, instead of looking for C:\ which has no installation files on it.

if you can help, otherwise, i really appreciate your prev. answers


Nick said...

Fahad: try this method you may have more success
be sure to read through all the posts it is much simpler to do than the first entry indicates.

gbpdem said...

"Fahad: I guess to solve this issue, after format is accomplished, we need to point system to copy the files from the flash which is set to U:\,, instead of looking for C:\ which has no installation files on it."
Fahad you may be right there

Nick, I copied my hal.dll and NTLDR files from a working XP into the \windows\system32\ on the eee, as well as trying bootcfg /rebuild, fixboot etc

Nothing works.

By the way, is there any difference between setting the installation to start or finished in the bios?

I tried both with the same result.

Anonymous said...

Excellent advice. It worked for me first time.

The initial 'cmd' selection of drives didn't seem to want to work for 10 minutes, but then suddenly did as was expected after I'd selected options 1-3 quite a few times.

I've got 1.91Gb of space left too!

Thank a lot as I need this to use at work and openoffice impress doesn't show the slides in the same way as PP.

Anonymous said...

Do you need a multiple-license copy of XP do do this, or does it work with a regular home edition and 1 product/activation key?

Nick said...

You do not need a Volume License Key to use this tutorial.

Anonymous said...

After 3 day's of testing I finally managed to make it work.

I used the Windows XP SP 1 and (King Max 1 GB Memory Stick ) then I've made an update to windows and got SP2 and all the updates, it works much faster with SP 1 but less security :(

I've tried to use XP with SP2 but I received many of the problems mentioned above so I've got an XP SP1 and all went well.

Nice Post!


Anonymous said...

Your guide worked great! I installed it on my new 8G and I have room to spare! The only problem is that I can't get my sound to work. I've tried all the drivers on the ASUS DVD, but Windows XP still can't find it. :(

Anonymous said...

Done exactly as said, get this message after booting from USB

"...biosinfo.inf could not be loaded. The error code is 14
Setup cannot continue. Press any key to exit"

DuKe_GR said...

I think that, all you have problems booting after install having a message about the hal.dll file, you have earlier bios than 0401.
Please upgrade bios and retry.
I had problems with 8804 bios as the setup was writing the mbr of win at the sd card and i couldn't boot after removing the card having the hal.dll message...

Ben said...

I keep getting to this section

"If all went well you should see "Bootcode was successfully updated on all targeted volumes."

But the window doesn't change even after pressing enter. The numbered options are not there.

Please help.

ZBozicevic said...

I had the same problem as Fahad and I solved it - there were 4 partitions on th eeePC hard drive. I've deleted all of them and created only one. Setup worked fine after that.

Thanks for a great tutorial!

ZBozicevic said...

Ben, I think that that you have this problem because you haven't closed PeToUSB - you need to clese it, but leave the command window open.

erick61405 said...

After typing 4 then enter. it begins the gives me an error "Falied to open file 'tempimage.img' Please input path:" and then im stuck dont know what to do next

Ben said...

Mine says "File creation error - Error performing inpage operation." For loads of the files. I let it finish and do the other steps but it doesn't work.

Alex BANH said...
This post has been removed by a blog administrator.
Cell said...

Anonymous said...

Done exactly as said, get this message after booting from USB

"...biosinfo.inf could not be loaded. The error code is 14
Setup cannot continue. Press any key to exit"

i have the same problem
i solved it by copying the biosinfo.inf from my CD to the usb stick
i reached the blue XP Setup screen, but there are other files missing (after copying some i can't get on because of the file ntkrnlmp.exe - i don't know where to copy it (can someone tell me the root directory for the setup process?) )
i think i and the other guy are having this problems because we are usign a XP version modified with nLite, but i can't check it out atm because i have only a 512mb USB stick
it would be great if someone else could try to use this methode with a modified XP version

Nick said...

This tutorial is not for nlited installations. I will post another tutorial for nlited installations later.

Anonymous said...

Hi can you upload the file to another site. unable to download thx

Cell said...

thank you, nick

i have uploaded the 3 files:
just klick [Free] and enter the code in the box

Nick said...

Thanks cell

I checked the downloads and both the primary and alternative downloads still work for me.

Cell said...

i found out that the real problem isn't nLite, but that i was using a HP_OS_RESTORE - version of Windows
Maybe you cold mention that your methode works only with a "real" XP CD, nick

renwklo said...
This post has been removed by the author.
renwklo said...

Those who got hal.dll problem is because you boot from the harddrive after you finish the partition and copy files procedure.
You should boot into the usbstick again and select option 2, boot to GUI install.

Anonymous said...

I have the same problem as gdpdem & fahad - i.e. "missing or corrupt hal.dll". I am trying an install on a regular PC with PATA drives.

... renwklo, this problem is not because we're booting off the HDD.
Booting off the USB thumb drive, doing 1. text mode, everything OK, then rebooting, selecting 2. gui mode, and up pops the hal.dll thang.

Any progress?

Nick said...

This is from the usb_prep help file:
b. Mixed Config of SATA / PATA Harddisks
In this case you have to change the computer SATA / PATA configuration (unplugging) such that
the C-drive is recognised as belonging to the Harddisk on which you want to Install XP
If during TEXT MODE your usb Drive is listed first when SETUP searches for disks ,
above SATA/SCSI disks, disable in BIOS IDE channels including the ones with CDROM/DVD attached
or disconnect them, this should fix the order.
Do not continue install if USB-Drive is listed first, this will corrupt files and MBR on it.

I don't have a pata drive so I can't test this for you, good luck.

Anonymous said...

the method works for me after 3 times!!.
- after plugin your USB, start and go to BIOS. Put the USB as the first device for boot: it should be made in two different BIOS options: boot order and HD order.
- be sure to delete ALL partitions to get only one partition in NTFS format.

Before that I have received failures of hall.dll and other missing files.
Hope it helps,

Gergely said...


I have Vista 64-bit and the usb_prep8 crashes with 'failed to create virtual drive - driver blocked from loading'. Any solution for 64-bit systems?


Nick said...

Gergely: the virtual drive portion of usb_prep is not compatible with 64bit operating systems, you'll have to use a 32bit system to do it, perhaps install 32 bit XP on a virtual machine and use that.

Gergely said...

OK, I managed to create the image using a colleague's PC. Thanks for the tutorial!


Zach said...

After I follow the first several steps and get to the window where I select 1 to choose the Windows XP source path, I always get the same error message: "The path xxx does not contain Windows XP Source Files."

This is always after I follow your nLite instructions with an XP SP2 cd. I don't get the error when I use the cd without doing nLite first, but I don't want to have to go with such a bloated install.

Is this a problem specific to SP2?


Nick said...

Zach: This tutorial is for a full installation of XP it doesn't work for nlited installations because files the script is expecting to be there aren't anymore.

Robert said...


I have followed all the instructions and it seems to be working fine. However, I cannot boot my computer without having the usb in the usb slot. I have changed the boot order in the bios and when I try to run it from the hard disc, it says: Failed to startup. Press Ctrl+Alt+Del to restart.
Anyone has an idea why this is happening and how it can be fixed? Thank you.
Best regards,
PS:I hope it is not related to the MBR

Anonymous said...

Robert, be aware there are two options in the BIOS. 1: Boot Device Priority, 2: Hard Disk Drives.

If the second option is in the wrong order startup is not possible. Fix two options, save, remove USB and reboot. If it fails, then maybe you must apply fixboot.

Hope it helps,

subc said...

I just thought about this.. maybe

fdisk /mbr

is needed?

Robert said...

@Anonymous, I should have mentioned that I have used this method on my Thinkpad as it does not have a CD/DVD drive...
In the BIOS of the Thinkpad, I have only changed the order of the devices in the "Startup" menu of the BIOS.

@subc, Mhhh... fdisk /mbr, I have to read about that again to find out what exactly it does..

Thank you for your suggestions so far. If anyone has another idea, please keep them coming as I will look into the above.



Nick said...

Robert: If your thinkpad has a factory recovery partition on it you need to get rid of that from within windows setup. The boot.ini file on the root of your C: drive (hidden file) is automatically configured to boot to disk 0 partition 1, so if you have a pre existing partition it won't boot properly from the HD. Check the boot.ini file on your usb stick and make corrections to the one on your hard drive.

MJ said...

Just to let you know I used this method with an nLite version of XP SP2 and it worked perfectly.

Robert said...

I have put a complete new hard drive into my Thinkpad with no partitions at all. I created one partition of 25GB for Windows XP and left the rest for later.
I have tried to change the boot.ini in C: and changed it accordingly to what it was on the memory stick.
That did not work.
I then ran the text based system again and this time I tried chose to repair the existing Windows. When in command prompt, I tried fdisk /mbr, but the command was not available. Therefore I used fixmbr as a command. Now the system does not boot at all. I have to start all over again. :-(

Nick said...

try this in the command prompt instead: BOOTCFG /rebuild

Robert said...

@Nick: Just recreated the USB stick and I can boot into my old Windows again. Strange....
Ok, will try your command now...Thank you.

Robert said...

I have done the BOOTCFG /rebuild command. It detected one Windows installation in C:/Windows as expected. It asked me whether I would like to add it to the choices that I see during bootup and I said "yes". I put the correct loaders (e.g. fastdetect) in it and called it "WINXP".
When I restarted (USB Stick out and booting from hard drive), it did not work. Then, when booting again from the USB stick, I looked at the boot.ini file and there was my entry "WINXP". All the numbers in () where the same as the other entries.
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS=" WINXP"
But it is still not working. I have looked at the error message again when booting. It says: "A disk read error occured. Press Ctrl+Alt+Del to restart".
I am starting to believe that the problem is not with the boot.ini, but something that is happening before. Any ideas, please?
Thanks. Robert

Anonymous said...

MJ, how did you get nlite XP to work? Everytime I point to the directory, it says Windows source file not found.

Nick said...

Yes MJ I would like to hear the settings you used also, I've spoken with an nlite developer before and he seems to think it should work as long as you don't remove the manual installation files and other command line related items.

Nick said...

Robert I don't know what else could be causing your problems. Are you sure that you followed the instructions exactly as they are laid out in the tutorial? The only thing I can think of is that you may have removed the USB stick once the graphical part of setup was complete instead of letting it boot into windows then removing the USB stick.

Robert said...

I have got it to work now. Yes, it might have been that I have removed the USB Stick to early or have booted into the GUI based one too early. I should not have done that, but cannot be sure...
Anyway, I figured it had something to do with the partition table since the boot.ini was correct.
For some reason the boot.ini on the USB stick was configured like that:
I downloaded "Partition Table Doctor 3.5" and when I started the program it said that the partition has some errors. I fixed those errors with the program, changed the boot.ini to:
and voila, the thing is up and running.
Thank you for your efforts and this great tutorial.

MJ said...

In response to those that have asked:

I started with a full image of XPSP2 with the latest updates as of last week.

I then used nLite following a guide on eeeuser forums with what they suggested you remove, however I did not select to remove the manual install (winnt.exe etc)

I then used nLite to make an image which I mounted with Daemon tools.

When promoted I just pointed usb_prep8.cmd to the root of the mounted image.

Nick said...

Thanks MJ, I suspected it would work but never tried myself.

MJ said...

As a sidenote the image ended up as 250mb and XP took 611mb once installed with pagefile removed.

btw, thanks nick for taking the time to write this guide up, it saved me alot of hassle.

Jep said...


I also got the "missing or corrupt hal.dll"-message and as a total beginner I was affraid to delete all 4 partitions (since I thought that would make it impossible to restore the computer if the XP-installation failed). But that proved necessary and the install worked like a charm immidiately after I had merged the partitions into one. So don't hesitate to delete all partitions and create one big partition if you get the "missing or corrupt hal.dll"-message.

I cannot thank you enough for the tutotorial, Nick. It really helped me a lot and it is great that you have explained the steps in detail. That is the key to helping us beginners. So thanks a lot for the great work!



brad said...

Thanks for the write up, it works...

But on boot i have two choices:
1)Start Windows XP
2)USB Repair NOT to Start Windows XP

obviously I have to select 1. 2 gives me an error and reboots to the menu. Any idea how I can fix this and make #1 the default choice?????

MJ said...


Simply edit your c:\boot.ini file and remove the line for the USB boot, or you can change the timeout from 30s to something quicker.

rvrvtvr said...

I have the same problem as rick61405

After typing 4 then enter. it begins the gives me an error "Falied to open file 'tempimage.img' Please input path:"

Seems that the virtual drive cannot be created or written to.

Can anybody help ?


Nick said...

rvrvtvr: You need to be using windows vista or windows XP 32bit not 64bit.

rvrvtvr said...

Nick: Thanks for your answer. However, I am actually using Windows XP 32bit.

rvrvtvr said...

I apologize. The problem I mentioned occurs when there is not enough space on your hard-drive. You should have at least 1GB.

Dman said...

Nick you are the man!
Thanks for posting this one it helps me understand my options.

I am in Australia and will be purchasing a new EEE PC soon.
Just waiting for the order to arrive.

I will try the steps above including some of the post that everyone contributed.

Wish me luck!
Dennis aka "Dman" or "Pogi"

DaF said...


Thanks for this nice guide.Tried it and amazingly it worked!!!It's godsend for newbie like me.Keep up the good work. =)

Mouse said...

Had most of the problems listed above. My fault entirely as i removed the USB drive 2 early. If you follow the guide then it will install. I have installed XP with SP1 no probs now. My hall errors and boot errors all stemmed from the fact that i removed the USB stick too early. I had to restart the guide from the beginning to get this installed as instructed.
Many Thanks for this guide..

rvrvtvr said...

"missing or corrupt hal.dll"

Maybe this could help some: This error also occurs when you do not delete ALL present partitions.

jcondon said...


I tried the above tutorial and ran into a problem. I have WinXP Pro without service pack and a cruzer micro 4.0 gb

When I boot the first time (txt) I can partition the HD and format it. When it gets to the point where it is to start copying files I get an error. Actually it DOES copy some files but, very few.

The error I get is...

"The following value in the .sif file used by setup is corrupted or missing: Value 0 on the line in the section [SourceDisksFiles] with key 'binifix.cmd.' Setup cannot continue. To quit setup, Press F3.

Here is part of TXTSETUP.SIF I think the errror is refering to but, I have no clue.

binifix4.cmd = 100,,,,,,_x,2,0,0
undoren.cmd = 100,,,,,,_x,2,0,0
ren_fold.cmd = 100,,,,,,_x,2,0,0
bootvid.dll = 1,,,,,,3_,2,0,0,,1,2
kdcom.dll = 1,,,,,,3_,2,0,0,,1,2
c_1252.nls = 1,,,,,,3_,2,0,0,,1,2
c_437.nls = 1,,,,,,3_,2,0,0,,1,2
l_intl.nls = 1,,,,,,3_,2,0,0,,1,2
vgaoem.fon = 1,,,,,,3_,22,0,0,,1,2
acpi.sys = 1,,,,,,3_,4,1,,,1,4
wmilib.sys = 1,,,,,,3_,4,0,0,,1,4
atapi.sys = 1,,,,,,4_,4,0,0,,1,4
disk.sys = 1,,,,,,5_,4,0,0,,1,4
classpnp.sys = 1,,,,,,5_,4,0,0,,1,4
dmio.sys = 1,,,,,,4_,4,0,0,,1,4
dmload.sys = 1,,,,,,4_,4,0,0,,1,4
ftdisk.sys = 1,,,,,,3_,4,0,0,,1,4
intelide.sys = 1,,,,,,3_,4,1,,,1,4
pciidex.sys = 1,,,,,,3_,4,0,0,,1,4
isapnp.sys = 1,,,,,,3_,4,1,,,1,4


Nick said...

You may be running into this error because you are using an OEM disk that came with another PC. Examples of these disks are HP restore cd, gateway restore cd etc. This guide works with retail disks or some OEM disks that aren't altered in any major way such as dell disks.

Anonymous said...

Works great baby I love you!!! I used nlite got it down to a 250mb thumb drive and it is cruzin. I had the hal problem as well but fixed that with fast fingers because I got it once but hit the pause button before it came up the second time and low and behold I was sitting at text mode and from there on smooth sailing. THANKS!!!