The Bootable Maintenance Flash Drive

10:15:00 PM |

Creating a bootable flash drive is remarkably easy. All you need is a flash drive (a 512MB drive will do, with room to spare) and the free Universal USB Installer. Insert the drive into a USB port, and then launch the installer. In step one, select PartedMagic (it's somewhat near the bottom), and then check the Download the iso option. The download itself can take time; as I write this, the current version is 163MB. Everything else should be clear from there.

Once the drive is bootable, you can copy your Windows programs onto it. But I won't talk about those programs just yet; I'd rather start by showing you what to do in Linux.

Fixing Windows From Another OS

Your friend's PC probably doesn't boot from a flash drive by default, so you'll have to figure out how to make it do that. When the computer first comes on, it may produce messages telling you what keys to press for 'Setup' or the 'Boot Menu'. If it offers both, go with the Boot Menu option, since Setup will require you to change the boot order of your friend's machine (you should change it back when you're through).

If you see no such messages, experiment with pressing function keys just before Windows loads (F10 is a good bet for the Boot Menu). You can also search the Web for setup or "boot menu" plus the PC make and model number.

Even if you know the appropriate button, getting the timing right can be tricky. I just push and release the button over and over again until the correct menu comes up.

(If you're wondering why you shouldn't simply create a bootable CD instead of a flash drive, I can list several reasons: You can't easily copy files to a CD. Not all PCs have optical drives anymore. And not all computers with optical drives boot from them without the same hassles I just described.)

Once you successfully boot from the drive, select Default Settings (Runs from RAM) from the resulting menu. You'll soon find yourself in a comfortably familiar-looking environment.

But here's one thing you should remember: Linux is actually running in a virtual drive in RAM. Any file you save to the root "drive" will disappear when you reboot. If you want to save a file, save it to the flash drive.

The following are a few things that you can do in PartedMagic.
Mounting partitions in Linux.
Recover files: If your friend can't boot the PC, recovering important files off its hard drive is probably the first priority. Click the external-drive icon near the lower-left corner, and then click the Mount button next to the appropriate partition. Find the files and folders you want, and drag and drop them to an external drive (if your flash drive has enough free room, you can use that).
Editing hard-drive partitions.
Edit partitions: If the name PartedMagic didn't clue you in, this Linux distribution's main claim to fame is a nondestructive partition tool. Just double-click the Partition Editor icon on the desktop, and up it comes. This will tell you right away if the correct partition is bootable, or even visible. To change a partition's status, right-click it and select Manage Flags.

Check the hard drive's health: Double-click the Disk Health icon on the desktop for technical information on the hard drive. The last tab lets you run the drive's built-in diagnostic tests.

Scan for malware: Unfortunately, the command-line version of ClamAV that comes in PartedMagic is anything but friendly. You may want to follow these instructions closely, or just skip to the next section, where I suggest some alternatives.

First, you have to download the current definitions. Click the Start button (yes, I'm using the Windows term for clarity) and select System Tools. If a Download Clamav Definitions option is available, select it.

If you don't see one there, launch Firefox (Start, Internet, Firefox), and go to the ClamAV site. Download main.cvd and daily.cvd. Save them to the /root/clamav folder.

Before you run the scan, make sure that all of the partitions you want to scan are mounted. See the "Recover Files" section above for instructions.

Next you'll need a folder, preferably on the flash drive, to store the suspected infected files. If you know how to create a folder in Windows, you can figure it out here.

Now open a terminal window: Select Start, Accessories, LXTerminal. A command-prompt window will open. At the prompt, type cd /root/clamav and press Enter. Then type clamscan -r -v --move= path to your new folder /media. For instance, you might type clamscan -r -v --move=/media/sdb1/badstuffinside /media. (Note that there's a space between badstuffinside and /.) Press Enter.

When the scan is over, suspected files will be off your friend's hard drive and on your flash drive. You can then look at them, determine if they're necessary, and delete them. Just don't open them in Windows.

Point your browser to linux.die.net/man/1/clamscan for more on using ClamAV.

Other Malware-Fighting Tools

If ClamAV seems like too much of a hassle, consider using one or more of these other portable malware scanners.
SuperAntiSpyware Portable
SuperAntiSpyware Portable Scanner: You shouldn't keep this one--the portable version of one of the best free on-demand scanners--on your flash drive. Why? The dictionary is built into the file, so fresh versions come out every day or two. Download it from a safe computer at the last possible moment, and save it to your flash drive. Boot your friend's PC into Windows' Safe Mode, and run it from there.

HijackThis: Actually, this isn't a scanner, but a portable, Windows-based analysis tool. It produces an obtuse report on the PC's configuration, and that report may contain clues about an infection. Consult Trend Micro's HijackThis site for a list of online forums where you can upload your report and get advice.

AVG Rescue CD: If you can't (or won't) run a malware scan in Windows, here's another live Linux distro built especially for antivirus work. You can download separate versions to burn to CD or to put on a flash drive. Either one is bootable.

Extra Tools for Your Flash Drive

Not every PC problem your friends have will require a malware scan or an alternative boot. These portable programs easily fit on your flash drive, and can run in Windows without being installed.
Recuva Portable
Recuva Portable: If any type of software should be portable, it's an uneraser, because every time you write to your hard drive, you lower the chance of successfully restoring a lost file. You'll never find a guaranteed file-recovery tool, but in my experience Piriform's Recuva has an amazing track record.
CCleaner Portable
CCleaner Portable: Here's another excellent, free, and portable tool from Piriform. As the name implies, this one cleans up your friend's messes. It empties caches, cookies, and other Windows and application garbage. It cleans out the Registry (do this with extreme caution). It can also uninstall programs, although not as well as my next recommendation.
Revo Uninstaller Portable
Revo Uninstaller Portable: Every Windows program comes with an uninstaller, but many of them leave junk behind. Windows' own Uninstaller tool (called either 'Programs and Features' or 'Add or Remove Programs') isn't any better--it just launches the selected program's own uninstaller. Revo, on the other hand, runs the program's uninstaller, and then cleans up the remaining garbage. It isn't perfect, but it does a reasonable job. One warning: Although the free, portable version works in 64-bit versions of Windows, it cannot remove x64 programs.
HD Tune
HD Tune: You don't need to boot into Linux to check a drive's status. This program will do it in Windows. This version is free only for personal use; professionals will have to shell out $35 for the more-powerful HD Tune Pro. This is not officially a portable program--you have to install it on Windows. But once you do that, you can copy the folder to your flash drive, and use it anywhere.
Folder Size Portable
Folder Size Portable: If your friend's hard drive is too crowded, cleaning it out will be easier if you can identify the folders that contain the bloat. MindGem's tool will show you which folders, and which folders inside those folders, are taking up lots of disk space. Two caveats: First, the portable version is marked "Experimental," although it works fine for me. Second, the cool-looking, animated graphics work only if your friend has Java installed in Internet Explorer. But don't fret--the data is the same with or without the pretty pictures.

With tools such as these in your pocket, you can be a very popular person.