Boot XP from a USB flash drive and how to use the PE Builder

68
rate this page

By maverickmonk



Windows XP can be booted using a USB Flash drive.. here its about how to boot using USB flash drive

Many people who have worked on computers for many years have comeup into a situations where they had a problem with Booting their PC ie left their PC unbootable. Well What if you can return the PC to a bootable state just with the help of a USB Flash drive? YES, it is possible to instal a bootable windows xp into a flash drive and then boot the PC using it and then you can use the applications that you have installed on the flash drive to fix the pc problem (like that of disk repair, anti virus, anti spyware etc). This article tells you how.

For a starter, every PC is not capable to be booted from a USB flash drive. computers manufactured in recent years are generally able to be booted from the flash drive, older systems might require BIOS update or may not boot from a flash drive atall and every flash drive will not get the job done. The main factor that limit the use of a particular flash drive are capacity and its speed, so speed is not really a limiting factor but booting will be slow if the flash drive doesnt support USB 2.0. The flash drives capacity is a limiting factor though, there are sixe limits on both the lower and the upper end. ie flash drive cannot be too large or too small. All we need is a something which can hold windows xp and few applications. Since Win xp will usually consume over a GB of disk space. so i recommened that your flash drive must be atleast 256MB of size. l

* Later I will show you how to use a free utility to trim the excess fat off of Windows XP and make it a whole lot smaller.

you can use the maximum size for the USB flash drive . At present, USB flash drives are available in various sizes of 2GB, 4 GB and 8 GB, more sized flash drives are gonna available by the end of the year. It would be nice to have 8 GB to play with, this flash drive that we use for this process can be upto a minimum of 2 GB. The reason is that you will have to format the flash drive using the FAT-16 file format , which has a 2 GB limit. we are stuck using FAT-16 because most of the computers do not recognize a flash drive as being bootable if the drive is formatted with any other format other than FAT-16.


Preparing your Windows installation CD

if the windows xp installation CD doesnt have service pack 2, then we need to include service pack using slipstreaming.

Other requirements

Apart from Windows XP installation CD, Some other things also are required they are

  • HP USB Disk Storage Format Tool, download this tool for free.
  • Bart's Preinstalled Environment Bootable Live Windows CD / DVD, or BartPE for short. You can download this utility for free from the BartPE Web site.

In addition to the software requirements, we need to check that the PC that we are using has minimum of 1.5 GB free hard disk space and also must support booting from a USB device. I do strongly recommend that the PC be running Windows XP with Service Pack 2. Prior to Service Pack 2, it sometimes had trouble interacting with USB storage devices.

Microsoft Office Home and Student 2007 Microsoft Office Home and Student 2007
Price: $89.98
List Price: $149.95
Adobe Photoshop Elements 6 Adobe Photoshop Elements 6
Price: $63.63
List Price: $99.99
Nancy Drew: The Phantom of Venice Nancy Drew: The Phantom of Venice
Price: $14.99
List Price: $19.99
VMware Fusion VMware Fusion
Price: $49.95
List Price: $79.99
QuickBooks Pro 2008 QuickBooks Pro 2008
Price: $143.69
List Price: $199.95
Diablo Battle Chest Diablo Battle Chest
Price: $30.95
List Price: $39.99
Warhammer Online: Age of Reckoning Collector's Edition Warhammer Online: Age of Reckoning Collector's Edition
Price: $79.99
Microsoft Outlook 2007 Microsoft Outlook 2007
Price: $87.99
List Price: $109.95


Formatting the flash drive

Now that we have all the prerequisites, its time to start setup the flash drive.

step1: we can format the flash drive in the same way of that of a floppy disk. Anyhow, formatting a flash drive in this way will not work for this process. Moreover, using Windows to format a flash drive directly has been known to destroy some types of flash drives. so Instead, we must format the flash drive using the HP USB Disk Storage Format Tool. To do so, simply open the utility, select the device followed by the FAT file system option and click Start.

step2: after formatting the device we must now make it a bootable device, So we must copy the following files from the root directory of the PC's boot drive to the flash drive
  • BOOT.INI

  • NTLDR

  • NTDETECT

These files by default are hidden, so we need to configure Windows Explorer to show hidden files (including protected operating system files) or else we need to use Command Prompt.


Booting from the USB flash drive

Now that we have formatted the USB flash drive and installed the boot files onto it, the next thing that we must do is to configure our PC to allow us to boot from the flash drive. This can be done using the BIOS Setup.

since every computer is different hence i cannot give you the specific instructions but i can give you a few points though.

we can access the BIO's by pressing del key immediately after we turn on our pc [the key varies from F1, F2 or del in general ]. once we open the BIOS setup, we should verify that the USB oprions are enabled. This might also include things like support for legacy usb devices or support for usb 2.0 and if there is a timout setting for usb devices then set it to the maximum to ensure that the system doesnt time out while waiting o the usb to boot

now, we need to find the section on the boot device priority as it might be having a very low boot priority (USB-HDD may be listed in removable devices). if the USB drive's boot priority is lower than the hard disk then the only time the computer would boot from the usb drive is when it fails to boot from the hard disk. Therefore we must rearrange the boot priority so that USB drive has the higher priority than a hard disk


How to use PEbuilder for Windowsxp

The PEBuilder utility that you downloaded earlier can take care of both of these issues. PEBuilder is designed to create a build of Windows XP (or Windows Server 2003) that does not take up as much space as a full blown installation. Once you create this new build, you can copy it to the flash drive. For right now, I will show you how to create a basic Windows build and copy it to the memory stick. Unfortunately, it's rather difficult to install applications once Windows is up and running. Therefore, after I show you how to create a basic Windows build, I will show you how to create a build that includes some applications.

Begin the process by opening PEBuilder. When you open PEBuilder, you will see a screen similar to the one that's shown in Figure A. Simply enter the path to the Windows installation files (the ones from your Windows XP with Service Pack 2 installation CD). Next, verify that the Create ISO Image and the Burn to CD check boxes are not selected and then click the Build button. PEBuilder will now create the new Windows build.

figure A


You must use PEBuilder to create a Windows build that will work with a flash drive.

Now, it's time to copy Windows to the flash drive. To do so, you will have to use a special batch file that's included with PEBuilder. Open a Command Prompt window and navigate to c:\pebuilder313\plugin\peinst. Now, insert an empty flash drive into the computer's USB port and then execute the file PEINST.CMD. You will now see a menu appear as shown in Figure B.

figure B


PEBuilder uses a batch file to install Windows onto a flash drive.

Type 1 and press [Enter] and you will be prompted to enter the path to the build that you have created. Enter C:\pebuilder313\BartPE. Now, type 2, press [Enter], and you will be prompted for the target path. Enter the drive letter that Windows has assigned to your USB flash drive. After doing so, the menu is updated as shown in Figure C. The menu now displays the source path and the destination drive. Type 5 and press [Enter] to install Windows to the flash drive.Figure C

Microsoft Office Home and Student 2007 Microsoft Office Home and Student 2007
Price: $89.98
List Price: $149.95
Adobe Photoshop Elements 6 Adobe Photoshop Elements 6
Price: $63.63
List Price: $99.99
Nancy Drew: The Phantom of Venice Nancy Drew: The Phantom of Venice
Price: $14.99
List Price: $19.99

Use menu option 5 to install Windows to the flash drive.

Installing applicationsNow that I have shown you how to create and install a basic Windows build, I want to talk for a moment about how you can add an application to the build (prior to creating it). The PEBuilder program comes pre-configured to support a number of common Windows applications, but does not come with the applications themselves.The reason why installing applications can be a little bit tricky is because most Windows applications modify the Windows registry. The build that you are creating is basically a collection of installation files, and the build itself does not contain a registry (the registry gets created when Windows is installed onto the flash drive). As such, PEBuilder uses a sort of registry emulator.If you go to the C:\PEBUILDER313\PLUGIN folder, you will see sub folders for a number of different applications. If you open one of these application folders, you will see that the folder contains an INF file and a FILES folder. The INF file contains all of the information that would normally go into the registry, and the FILES folder stores all of the program's files.

To see how this works, let's install an application that I'm sure most of you are familiar with; Nero. Begin by installing Nero onto the machine that's running PEBuilder, as if you planned to run Nero locally on that machine. When the installation completes, copy all of the files from C:\Program Files\ahead\Nero to C:\pebuilder313\plugin\nero burning rom\files. In this particular case, the nero burning rom folder is the folder that has been set aside for the Nero application. The Files sub folder is intended to store Nero's system files.

Now, you must take care of Nero's registry entries. To do so, go to the C:\pebuilder313\plugin\nero burning rom folder and open the PENERO.INF file using Notepad. As I explained earlier, the INF file in an application's folder is used to store the application's registry entries. For Nero and all of the other applications that PEBuilder predefines, the INF file is pre-configured. You just have to make a few changes that are specific to your system.In this particular case, the PENERO.INF file is designed to support both Nero versions 5.x and 6.x. Initially, the lines for both versions are commented out. You must therefore determine which version you have and then remove the semi colon from the beginning of the lines that apply to that version. If you look at Figure D, you can see how the two versions are separated.


An application's registry entries are stored in an INF file.

Once you uncomment the appropriate lines, just replace "Your Name", "Your Company Name" and "Your Serial Number" with your name, your company's name, and your Nero product key. Save the file, and your set to go. The next time that you click the Build button, Nero will be included in the build.Putting XP in your pocketRunning Windows from a flash drive isn't an exact science. Sometimes the process just doesn't work and there is no good reason why. As more PCs start to support booting from USB devices though, USB boots should become more standardized, and the technique should become more reliable.

working