Showing posts with label a. Show all posts
Showing posts with label a. Show all posts

Boot Windows XP from a USB flash driveBoot Windows XP from a USB flash drive

May 1, 2007

You can't boot Windows XP...


Takeaway: You can't boot Windows XP from a floppy disk the way you used to be able to with DOS. One handy way to easily boot XP is by using a USB flash drive. Here's how to make it work.

Almost everyone who has worked with computers for any length of time at all has run into at least one situation in which a problem left a PC unbootable. What if you could return the machine to a bootable state just by inserting a USB flash drive though? Believe it or not, it is actually possible to install a bootable copy of Windows XP onto a flash drive and then boot a PC off of the flash drive. From there, you can use applications that you have installed on the flash drive (anti virus, anti spyware, disk repair, etc.) to fix the PC's problem. In this article, I will show you how.

What's the catch?

As with most cool new techniques, there are a few catches. For starters, not every PC is capable of booting from a USB flash drive. For the most part, computers manufactured within the last two years are generally able to boot from a flash drive. Older systems may require a BIOS update, or might not be able to boot from a flash drive at all.

Another catch is that not every flash drive will get the job done. The primary factors that limit your use of a particular flash drive are capacity and speed. Technically, speed isn't really a limiting factor, but booting Windows will be painfully slow unless you use a flash drive that supports USB 2.0.

The flash drive's capacity is actually a limiting factor though. Surprisingly though, there are size limits on both the upper and lower end. Your flash drive can't be too large or too small. There isn't really a documented minimal size for a flash drive. You just need something large enough to hold Windows XP and a few applications. As you probably know, Windows XP normally consumes over a gigabyte of disk space. 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. Even so, I still recommend that your flash drive be at least a minimum of 256 MB in size.

As I mentioned, there is a maximum size for the USB flash drive that you can use. Currently, USB flash drives exist in sizes of up to 4 GB, and 8 GB flash drives are expected to be available by the end of the year. As nice as it would be to have 8 GB to play with, the flash drive that you use for this project can be no larger than 2 GB. The reason for this is because you will have to format the flash drive using the FAT-16 file system, which has a 2 GB limit. Presently, you are stuck using FAT-16 because most computers will not recognize a flash drive as being bootable if the drive is formatted with anything other than FAT-16.

Preparing your Windows installation CD

One of the requirements for creating our bootable USB flash drive is a Windows XP with Service Pack 2 installation CD. If your Windows XP installation CD doesn't already include Service Pack 2, then you will have to make a CD that includes Service Pack 2 through a technique called slipstreaming.

Other requirements

In addition to your Windows XP installation CD, there are a couple of other things that you are going to need. For starters, you will need the HP USB Disk Storage Format Tool. You can download this tool for free.

Another utility that you are going to need is 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, you must verify that the PC that you will be using to create the Windows deployment has 1.5 GB of free hard disk space (minimum) and supports booting from a USB device. I also strongly recommend that the PC be running Windows XP Service Pack 2. Prior to Service Pack 2, Windows XP sometimes had trouble interacting with USB storage devices.

Formatting the flash drive

Now that you have all of the prerequisites taken care of, it's time to actually start setting up our flash drive. The first step in doing so, as strange as it sounds, is to format the flash drive. Windows will actually let you format a flash drive in the same way that you format a floppy disk. However, formatting a flash drive in this way will not work for this project. Furthermore, using Windows to format a flash drive directly has been known to destroy some types of flash drives.

Instead, you must format the flash drive by using the HP USB Disk Storage Format Tool that you downloaded earlier. To do so, simply open the utility, select the device followed by the FAT file system option and click Start.

Once the device has been formatted, you must make it bootable. To do so, you must copy the BOOT.INI, NTLDR, and NTDETECT from the root directory of your PC's boot drive to the flash drive. These files are hidden by default, so you will either have to configure Windows Explorer to show hidden files (including protected operating system files) or you will have to open a Command Prompt window and use the COPY command to copy the files.

If you choose to use the Windows Explorer method, then open Internet Explorer and enter C: into the address bar so that you are looking at your local hard drive. Next, select the Folder Options command from the Tools menu. When the Folder Options properties sheet opens, select the View tab. Now, just select the Show Hidden Files and Folders and deselect the Hide Extensions for Known File Types and the Hide Protected Operating System Files check boxes. Click OK to continue.

Booting from the USB flash drive

Now that you have formatted your USB flash drive and installed the boot files onto it, the next thing that you must do is to configure your PC to allow you to boot from the flash drive. This is all done through the computer's BIOS Setup. I can't give you specific instructions for this part, because every computer is different. I can give you a few pointers though.

You can access your computer's BIOS by pressing a specific key immediately after you turn the PC on. The key varies, but it is usually either [F1], [F2], or [Delete]. Once you are in the BIOS Setup, you should verify that all of your computer's USB options are enabled. This might include things like support for legacy USB devices or support for USB 2.0. If there is a time out setting for USB devices, you should set it to the max to insure that the system doesn't time out while waiting on the USB device to boot.

Next, find the section on boot device priority. Normally, a USB flash drive (which is usually listed as USB-HDD, but may be listed as a removable device) will have a very low boot priority. If the USB flash drive's boot priority is lower than the hard disk (listed as HDD) then the only time the computer would ever boot off of the USB flash drive is if the system were to fail to boot from the hard disk. You must therefore rearrange the boot device priority so that the flash drive has a higher priority than the hard drive.

Configuring Windows

Now that we have finally made it through all of the prep work, it's time to start setting up Windows. As you have probably already guessed, the process of installing Windows to a flash drive is quite a bit different from your normal, run of the mill installation. There are a couple of reasons for this.

For starters, a full blown Windows XP deployment takes up over a Gigabyte of hard disk space. When you are installing to a flash drive, disk space is a scarce commodity. Even if you have over a Gigabyte of space on your flash drive, you probably don't want to use it all on Windows. It would be nice to have room to install a few applications. Therefore, you need to trim the excess fat off of Windows.

The other reason why the installation process is so different from the usual Windows installation is because Windows Setup is not designed to install Windows to a flash drive. You therefore have to configure Windows using an alternate method.

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
Free Image Hosting at www.ImageShack.us
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
Free Image Hosting at www.ImageShack.us
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
Free Image Hosting at www.ImageShack.us
Use menu option 5 to install Windows to the flash drive.

Installing applications

Now 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.

Figure D
Free Image Hosting at www.ImageShack.us
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 pocket

Running 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.




How to zap the crap on a new Windows PC

Apr 28, 2007

Dave Methvin

April 25, 2007 (Computerworld) When you take a brand-new Windows PC out of the box, it's shiny and scratch-free, but on the PC's hard disk, it's a different story entirely. Most major hardware makers clutter their systems with preinstalled applications, browser toolbars, search settings and utilities -- not to mention self-launching advertisements enticing you to try out even more software.

In essence, they have sold your PC to the highest bidder long before you take it out of the box. Instead of having Windows defaults or your own preferences, the system is set up to maximize the profits of the computer maker and its business partners at the expense of your convenience.

All this extra unwanted software takes its toll on system performance and reliability. Each time the system starts, many of the applications run in the background. While running, they may access the Internet to find updates or change the behavior of standard Windows functions. These freeloaders also take up system resources such as processor, memory and disk space, resulting in longer start-up and shutdown times.

Many of them clutter the desktop, system tray and browser with icons, buttons, yellow balloon dialogs and other visible reminders in the hope that you will click on them and use their services. Apple even pokes fun of this phenomenon in one of its "I'm a PC; I'm a Mac" commercials, called "Stuffed" (requires QuickTime plug-in).

Out of the box, my brand-new Acer notebook had a system tray brimming with icons, including two volume controls.

Out of the box, my brand-new Acer notebook had a system tray brimming with icons, including two volume controls.

Uninvited applications and utilities often target product or service categories where competition is fierce. Take music, for example. Nearly every new computer comes with preinstalled software designed to grab your business for music downloads. It may be Napster, MusicMatch, RealPlayer or Microsoft's own Windows Media Player. The preinstalled software usually takes over all sound-related file extensions, such as .MP3 or .WAV, and launches an in-your-face barrage of advertising any time you want to play something as simple as a sound effect.

Uninstalling isn't always as simple as it should be, either -- many preinstalled processes don't offer a standard uninstall routine.

Internet Explorer 7 is loaded down with preinstalled toolbars.

On my new notebook, Internet Explorer 7 is loaded down with preinstalled toolbars. (Click image to see larger view.)

Microsoft is certainly aware of this problem, but to some extent the solution is out of its hands. The computer maker, not Microsoft, is responsible for the extra software installed on the system and for making sure the final combination works correctly before it's sent to the customer.

When Windows XP was released in 2001, Microsoft attempted two changes to address this problem. The first was to prompt the user with a message offering to clean up unused desktop icons a few weeks after the system is installed. The second was a prompt offering to hide the tray icons that the user has not clicked on recently. But both changes merely mask the clutter; neither removes the underlying mess.

For all its changes in other areas, Windows Vista hasn't improved things much when it comes to dealing with the junk installed by hardware makers. I just purchased a new Acer notebook with Vista Home Premium installed, and it suffers from the same old plague of icons, advertisements and start-up utilities.

And several of the third-party applications consistently misbehave in ways that make me think that they are not yet Vista-compatible. For example, the PC came with Symantec's Norton Internet Security, which would often pop up error dialogs when the system resumed from sleep. The Windows error logs indicated that several Symantec software components were causing trouble.

Vista's error logs showing Symantec software impacting system performance.

Vista's error logs showing preinstalled Symantec software impacting system performance. (Click image to see larger view.)

Is there any way to avoid the clutter? For medium and large businesses, yes. Hardware makers often give bulk buyers more flexible setup options than they do consumers. You may be able to get a bare-bones operating system setup or even select your own preinstalled set of software. Small system makers may also offer bare-bones Windows setups to both consumers and businesses.

However, if you purchase these you should be sure that you are getting a legal Windows license for the system. The system builder should provide a certificate of authenticity at the very least, and preferably an original Windows DVD that you can use to reinstall or repair the operating system. You can verify that your Microsoft software is not pirated by going to the Genuine Microsoft Software site.

Taking Out the Trash

Nearly every name-brand consumer or small-business PC will have the same software mess that I've seen on my Acer. So, the first thing to do with any new PC isn't to start using it, but to clean it up.

Step 1: Back up.
Before starting, plan for a way to recover in case you delete important files. If you've literally just taken the system out of the box and haven't yet moved over your own files, you can just restore from the recovery CD or DVD that the manufacturer provides -- assuming that they provided one. Some vendors don't offer a disc but provide a reinstall image on a hidden partition on the drive.

If you've been using the PC for a while, backing up your own documents and data is a necessity. An external USB hard drive is a great option.

Step 2: Run PC Decrapifier.
After the backup, you're ready to start hacking through the clutter. One quick way to remove the junk is to use a utility called PC Decrapifier, which can automatically uninstall programs that it knows to be supplied by many hardware vendors -- even those that don't provide uninstallers. It's free for personal use or $20 for IT personnel who plan to use it on multiple computers.

When you run PC Decrapifier, you'll be presented with a list of items it can delete or change for you. Although it was originally written to clean up the junk installed by Dell on its computers (and still works best with Dell machines), it can be useful on other brands as well. The screenshot below shows what it found on my Acer.

PC Decrapifier at work.

PC Decrapifier at work. (Click image to see larger view.)

Step 3: Uninstall programs manually.
Even after using PC Decrapifier, you will probably find that there are other programs that you would like to eliminate. To uninstall programs manually, go to Control Panel, then to Add or Remove Programs (for XP) or Programs and Features (for Vista). You may need to switch to Classic View to see these options listed.


Just a few of the applications preinstalled on my new Acer.

Just a few of the applications preinstalled on my Acer. (Click image to see larger view.)

All of the vendor's preinstalled programs will be shown here. Keep an eye open for any entry with a name that includes words like "registration," "tour," "offer" or "trial." Also be suspicious of any entry with "toolbar" in its name; these are often browser toolbars that redirect your searches to sites that you haven't chosen. All of these are good candidates for removal.

On the other hand, do not remove entries that are listed as drivers; they are often required so that the associated hardware will work properly.

A few examples of software that can be deleted on my system include Acer Registration, Acer ScreenSaver and Acer Tour. Most of the other Acer software is optional as well, but you might want to keep Acer Arcade Deluxe if any of the games there interest you. I don't plan to use Symantec's Norton security software, so that can be uninstalled. Finally, I prefer the simplicity of Google's home page and don't like toolbars in my browsers, so the Yahoo Toolbar can be uninstalled as well.

To uninstall a program in XP, select it, click the Remove button, and click Yes. On Vista, right click the program and choose Uninstall.

Step 4: Boot into Safe Mode to uninstall any remaining programs.
It's not uncommon for programs that are OEM installed to either not have an Add/Remove Programs option or to have one that doesn't work. Your next step is boot into Safe Mode (hold down the F8 key as Windows begins to start) and try to uninstall the program in Add or Remove Programs (for XP) or Programs and Features (for Vista).

Unfortunately, some applications block their own uninstallation from Windows Safe Mode. To get around this problem, try installing a utility called SafeMSI, which lets you uninstall software from Safe Mode. Once it's installed, reboot to Safe Mode and try again.



Tip: Use SafeMSI to clean up Vista software conflicts
When you've installed Windows Vista as an upgrade to your existing Windows XP environment, you might find that many background programs for supporting minor hardware-oriented functions (such as DVD label creation) don't work under Vista or conflict with Vista in some way. It's quite common to see a bunch of error messages inside Windows after it boots on Vista-upgraded machines.

The way to turn off these errors is to eliminate software, but oftentimes it just won't uninstall. And Vista seems less permissive than XP about letting you uninstall things in Safe Mode, which is when SafeMSI can come in very handy.

Step 5: As a last resort for software that remains "stuck," turn to Google.
Despite your best efforts, certain pieces of software may resist being removed through normal channels. In most cases, a Google search on its name will turn up some custom instructions for removing it. There are also various third-party products for removing unwanted software, but cleanup for these tenacious programs is likely to be very app-specific and you'll likely have more luck with specialized instructions you find via Google.

Step 6: When you're done removing software, do a driver check.
While you're doing cleanup, it's also a good idea to check for new drivers. The most recent official drivers for a system are usually available at the vendor's site. Often you'll find that the drivers installed on the system are not the most recent versions available. This is especially true with PCs sold in retail stores, where the computer may have been on the shelf for several weeks or even months.

When the vendor doesn't have a working driver, another source is the Windows Update site. The Automatic Updates feature of Windows does not update drivers, so you must do this manually by going to windowsupdate.microsoft.com.

Step 7: Defragment and clean the disk.
Once all the undesirable software is removed and the drivers updated, you can defragment the drive (Start > Programs > Accessories > System Tools > Disk Defragmenter). Deleting and creating files creates significant disk fragmentation, and a fragmented drive degrades performance. You will also want to run Disk Cleanup (Start > Programs > Accessories > System Tools > Disk Cleanup) as well, because some setup or uninstall programs leave junk files behind.

Defragmenting the drive on a weekly basis will keep performance from degrading. Vista does this automatically through a scheduled task, but you'll need to do this yourself on XP.

Finally, the system is clean and ready to install the software that you really want. You may be surprised how much better the system behaves once you remove the junk that was put there by the system manufacturer.



Tip: Down the road, don't fall into the renewal trap
If you decide to purchase or subscribe to any of the applications or services preinstalled on your new system, remember that these companies expect you to stay with them when the time comes to renew. When a dialog pops up telling the user that his subscription has expired, most users will simply enter their credit card without doing any competitive shopping. Microsoft, Symantec and McAfee have even started to automatically bill users when their renewals are due.

As a result, companies generally offer the least favorable deals to renewing customers. Better prices are available through retail purchases or through competitive upgrades to different products. Even if you want to stay with Symantec, for example, you may be financially better off uninstalling it and purchasing a local copy from a retail store that includes a rebate.

Dave Methvin is chief technology officer of PC Pitstop, a free site that automatically diagnoses and fixes common PC problems.