Booting Windows XP from a USB Flash Drive
- This will only work on a USB drive between 256MB and 2GB in size. Also, a 256MB drive may not hold all of the add-ons you may decide to include in this device.
- Make sure the BIOS in the machine you want to boot can boot from a USB drive. This can require you to check several locations. A BIOS upgrade may be needed.
- Create C:\Temp if it doesn't exist. Get rid of anything that is already in C:\Temp. Download Windows 2003 SP1 (32-bit version) (329MB). Move it to C:\Temp.
- Open the WinXP command line in C:\Temp (i.e., Start > Run > cmd > OK). On the command line, type "c:" and then "cd \Temp." (Here, and always in this post, don't type the quotation marks or the ending period unless otherwise indicated.) Type the name of that SP1 download and then "-x." Example: "WindowsServer2003-KB889101-SP1-x86-ENU.exe -x." Hit Enter. Let it extract to C:\Temp.
- Download BartPE Builder to destination folder C:\Temp\BartPE. Run BartPE Builder. You can let it get itself organized while you continue with the following steps.
- Create a subfolder called C:\Temp\BartPE\srsp1.
- Copy setupldr.bin and ramdisk.sy_ from C:\Temp\i386 to C:\Temp\BartPE\srsp1.
- On the command line, use the "cd" command to navigate to C:\Temp\BartPE\srsp1. Type "expand -r ramdisk.sy_." Delete ramdisk.sy_.
- Go back to the BartPE Builder program. Click OK, leave its default settings as-is, and click Build. When it's finished, click Close and Exit.
- Plug in your USB drive. Look at Windows Explorer to see which drive letter is assigned to the USB drive. In my case, the letter was J.
- On the command line, navigate to C:\Temp\BartPE. Type "pe2usb -f J:" (replacing J with the drive letter for your USB drive).
- Eject the USB drive from the computer. Plug it into the computer you want to boot from USB. Boot that computer.
The resulting USB stick didn't work, unfortunately. To clarify: it might have been fine for booting a machine that was not as screwed-up as my laptop appeared to be. I did not test it on a normal machine. It just did not work for my purposes.
Meanwhile, I had come across some pages describing other approaches, and went partway through their process. Here are some notes from that. Their first instruction was to find DOS system files. I used DOS 6.22. That particular download came in .exe format (boot622.exe). When I ran it, it looked for a floppy drive to install itself onto. I didn't have a floppy drive, so I used a virtual floppy drive creator program named Virtual Floppy Drive (VFD). But I couldn't get VFD to see the virtual floppy drive as drive A, so it didn't function as a substitute for drive A. Then download the HP USB Disk Storage Format Tool. If the download is in .rar or other compressed format, extract the .exe file. El-saabi used a file called HPusbUtil.exe. I didn't preserve the original name of the one I used, but it was 2026KB in size. Install the HP USB Disk Storage Format Tool. (That's as far as I got before taking a whole new approach, as described below.)
* * * * *
On the second attempt, I decided to try el-saabi's guide for creating a USB flash drive capable of installing WinXP. This guide had been created within the past eight months, by someone who described himself as a senior software developer, so I thought it might be worth trying. It didn't work on my screwed-up laptop either; but, again for posterity, the steps in his process were as follows:- On a computer running Windows (not necessarily the one where you will be installing Windows XP from a USB stick), open Windows Explorer (not Internet Explorer). Plug a USB flash drive into that computer and make sure it shows up in Windows Explorer. (I used a 4GB SanDisk USB jump drive.) If Windows needs to reboot in order to "Finish installing devices," do that.
- In Windows Explorer, create a new folder called C:\bootusbxp.
- Download PeToUSB 3.0.0.7 and usb_prep8 and bootsect from a safe location (e.g., 2shared.com) and move them to C:\bootusbxp.
- Unzip each of these three downloads. (To unzip, right-click on the file in Windows Explorer and choose Extract All.) So now you have folders called C:\bootusbxp\PeToUSB_3.0.0.7, C:\bootusbxp\usb_prep8, and C:\bootusbxp\bootsect.
- If the unzip created redundant nested folders, eliminate the redundancy. So, for example, if unzipping usb_prep8 gave you a folder called C:\bootusbxp\usb_prep8\usb_prep8 that contains a bunch of files, move those files up one level so that they are at C:\bootusbxp\usb_prep8\. In that example, you should now have a file whose full pathname is C:\bootusbxp\usb_prep8\boot.ini.
- Move C:\bootusbxp\PeToUSB_3.0.0.7\PeToUSB.exe so that it is now C:\bootusbxp\usb_prep8\PeToUSB.exe.
- Run C:\bootusbxp\usb_prep8\usb_prep8.cmd. To run an executable file (e.g., .cmd, .exe, .bat) in Windows Explorer, hit Enter when it is selected, or double-click on it. This opens a black-and-white command window. Press any key to start PeToUSB. Make sure your target USB flash drive is designated. Click Start to format it. Leave PeToUSB up and running for now - that is, don't close it.
- Open a WinXP command window (Start > Run > cmd). In that window, navigate to C:\bootusbxp\bootsect. (To do that, type C: and hit Enter; then type "cd \bootusbxp\bootsect" and hit Enter.) Type "bootsect.exe /nt52 G:" (replacing G with the actual letter for your jump drive as shown in Windows Explorer) and hit Enter. You should get a "successfully updated" message. Close the command window. Now close the PeToUSB program window, but not the command window that it was opened from.
- Insert your Windows XP installation CD. If it autostarts, kill that. Look at the command window that remains open. It should show a menu of options labeled "Prepares Windows XP LocalSource for Copy to USB-Drive."
- From that menu, choose option 1, "Change USB Setup Source Path." Browse to your Windows XP CD and click OK.
- Now choose option 3, "Change Target USB-Drive Letter." Type the letter of your USB drive.
- Now choose option 4, "Make New Tempimage with XL LocalSource and Copy to USB-Drive." When asked, proceed with format. In this process, there will be a few times when you will again have to press a key or click a button to continue. Altogether, this stage takes around 15 minutes.
- Say Yes to the questions about "Preferred Boot Drive U:" and "Unmount the Virtual Drive." Press any key (a couple of times) to close the command window.
Windows could not start because the following file is missing or corrupt: [Windows root]\system32\hal.dll. Please re-install a copy of the above file.This appeared to be a common problem for bootable WinXP USB flash drives. An old Microsoft webpage suggested that this might result from an error in the boot.ini file, but that error did not seem to exist here.
- Copy the entire contents of a Windows XP installation CD (ideally, one that includes Service Pack 3) to a new folder called C:\WINXPCD.
- Plug in the USB flash drive you want to use as your bootable WinXP flash drive.
- Install WinSetupFromUSB to its default location C:\WinSetupFromUSB. When installation finishes, start WinSetupFromUSB.
- In WinSetupFromUSB, use the Browse button to select C:\WINXPCD. Click Refresh to make sure WinSetupFromUSB recognizes your USB drive. This may give you an error message, such as "Warning! You should not be using FAT16 on partitions > 2GB!" I got this error message even when using a USB drive that Windows Explorer > Properties reported as being only 1.97GB. To change the format and choose which formatting tool to use, click on the Format USB Disk > RMPrepUSB button. For that particular USB drive, I chose the FAT32 filesystem and the XP Bootable [NTLDR] boot option, with no Overrides checked. Then I clicked on the Prepare Drive button; and after that was done, I clicked Exit.
- That put me back at the WinSetupFromUSB window. There, I clicked the GO button. This gave me a "Could not install GRUB4DOS bootsector" error. The error message indicated that it would try an alternative; I was not able to catch its details in time to record them here. Possibly I should have used FAT16 rather than FAT32 after all. But anyway, the process ran.
- When the WinSetupFromUSB process was complete, I got a dialog asking me to agree to the license terms. Next was a dialog that said, "This is important! Keep the USB disk plugged in AND start from USB 2 times - Text mode and GUI mode parts. When the GUI mode (the graphical part) is completed you should be safe to start from internal disk." It seemed that I might not have done this correctly in el-saabi's procedure (above).
- Although that warning did not explicitly allow me to move the USB drive from the computer where I had been programming it to where I intended to use it, that was obviously necessary, so I did that and then tried to follow the instructions just quoted. But in this version of the USB drive, I didn't get the same kind of menu as with el-saabi's method (above). Instead, I got a GRUB4DOS menu with only one option: "Windows XP/2000/2003 Setup - First and Second Parts." Ah, but then, when I hit Enter, it gave me a list with the first part and then the second part, and when I did nothing it seemed to default to the first part. That gave me the WinXP Professional Setup. I hit Enter to "set up Windows XP now." It said, as before, that it recognized no mass storage devices. I hit Enter again. This time, that gave me the Windows license screen. I hit F8 to agree. Now I was again given an option to install WinXP on the USB drive - which, of course, I did not wnat to do. I saw no alternative but to hit F3 to quit. The system again gave me the GRUB4DOS menu; and when I did nothing, it defaulted into the Second Part of the setup. Again, though, it gave me the "Windows could not start because the following file is missing or corrupt" error.
- Put your Windows XP CD into your CD drive.
- Create C:\BartUSB. Download and run BartPE Builder (name of present version: pebuilder3110a.exe). Install it into C:\BartUSB. So now, for example, you have a folder called C:\BartUSB\drivers. When BartPE asks, let it search for Windows installation files. It should find the files on the CD drive. If it doesn't, point it that way. Don't go any further with BartPE now.
- Download srsp1.zip (or srsp1.rar, another zip-like format). This srsp1 file contains just the files we need, which is faster than downloading the whole Service Pack as called for in the Fred Langa approach (above). (The "Extract All" right-click option in Windows XP does not open .rar files, but 7-Zip does.) Unzip the contents of the srsp1 file to C:\BartUSB. So now you have a folder named C:\BartUSB\srsp1, and that folder contains two files: ramdisk.sys and setupldr.bin.
- If your WinXP CD has service pack 2 or service pack 3 included, click on BartPE's Plugins button and enable "RpcSS needs to launch DComLaunch Service first - SP2 only." Then click on Close and then Build, and let it go through its steps. When the Build is done, close and exit.
- Plug a USB drive (size: 256MB to 2GB) into the computer you will be using to make the BartPE stick. In Windows Explorer, take note of its drive letter. On the command line, navigate to C:\BartUSB. Type "pe2usb -f J:" (replacing J with the drive letter for your USB drive). Type YES and so forth, as prompted, to finish the process.
- Eject the USB drive from the computer. Plug it into the computer you want to boot from USB. Boot that computer.
0 comments:
Post a Comment