Saturday, August 2, 2008

Wipe a hard drive completely

More than half the computers donated to the Salvation Army and Goodwill still have the users' personal information on them. I suppose PCs at yard sales are just as bad. A criminal who obtains your used hard drive may find enough information to steal your identity and ruin your credit.

Deleting files or moving them to the trash doesn't really get rid of the data. It just removes the filenames from the file system. The data are still on the hard drive until something writes over it. Writing zeroes over the entire usable surface is enough. The FBI might be able to dismantle your drive and read the platters with special equipment, but it can't be done with software alone.

All Unix systems, including Linux, come with a very old, standard utility program called dd, for "disk dump." dd will copy data from any file or device to any other file or device. On Linux, there is a device name for the "master" (first) drive on the first "IDE" channel: /dev/hda. There is also a thing called /dev/zero. Any program can read data out of /dev/zero all day, and all it ever gets is an endless string of zeroes. So, guess what, use dd to copy a big pile of zeroes onto /dev/hda and the drive will be wiped clean.

Now you're saying but I never use Unix, Unix is for geeks who can't get a date, and I sure don't want to install an operating system just to wipe a drive, right? Well your old hard drive doesn't care if you're a geek. Nor do the criminals who want your data. And these days you can use Linux without installing anything. So here's the step by step:

Go to http://www.damnsmalllinux.org/download.html and choose a nearby download site, and download the file dsl-3.1.iso (or whatever version it's up to) from the "current" directory. This 50MB file took six minutes on my ADSL line. That's faster than driving to the store and buying a commercial disk wipe program.

Burn this CD image onto a CD with your favorite CD burning program. I picked Durn Small Linux because it fits on a business card CD, but you can put it on a regular CD if you like. I burn CDs with K3B (from www.K3B.org) but you might use Nero.

Insert the CD in the computer to be wiped, and boot (or reboot) the computer off the CD. There is a Durn Small Linux "splash screen" with a boot prompt boot: in the lower left. Type dsl 2 and hit Enter. Durn Small Linux takes a little while to scan your computer and figure out how to run there. It prints a bunch of chatty messages about a bunch of modules it can't find. Ignore all of that. The boot sequence ends with a command prompt root@tty1[/]# and a blinking cursor. That 2 you typed means never mind your fancy graphical hoo-ha, I just want a command prompt. So that's what it did. Try it without the 2 some other time.

Are you sure the first drive on the first IDE channel is the one you want to wipe? This operation is not reversible! Very carefully type the command

dd if=/dev/zero of=/dev/hda

and hit Enter. In English, that's disk dump, with input file /dev/zero and output file /dev/hda. There are no spaces around the slashes or the equal signs. The dd program will run until it hits the end of the hard drive. Your drive light will be on, solid. At the end it will tell you how many 1KB blocks of zeroes it wrote. You may now unplug the computer and donate the cleaned drive to charity.

Your drive is empty. Even its partition table is gone. You can create a new one with the cfdisk command. It's rather self-explanatory, especially if you have used Microsoft's fdisk before.

This trick works for standard USB flash drives, too. The first flash drive is /dev/sda. It should be recognized automatically when you plug it in.

The second ("slave") drive on the first IDE channel is /dev/hdb. You can wipe it, too.

This is not an installation. Durn Small Linux runs in RAM, and when you shut off the computer, it's gone. If your computer can't boot off a CD, or you can't create a bootable CD, you can do this disk wipe with a floppy disk and the tiny little eensy weensy Linux system known as Toms Root That Boots from http://www.toms.net/rb/. I chose Durn Small Linux because who uses floppies anymore? (And would you believe CNET's software wouldn't let me use the Bad Word in the name of that operating system? Sheesh!)

Label the CD and put it in your PC repair tool box, or give it to a friend who works on PCs.

The dd program that comes with Linux is from the Free Software Foundation, http://www.fsf.org.

Choosing a Boot Camp partition size

How big should your Windows partition be when you first set up Apple's Boot Camp software for running Windows on a Mac? The answer depends primarily on how much Windows software you intend to install, because this partition must hold all your Windows programs. If you already know what software you'll be using, consult the system requirements for each application and add up how much space they need; add at least 1.5GB for Windows itself. Also consider how much space you'll want for documents you save in Windows (including media, such as photos and music files), and include that in your total as well.

Unfortunately, once you make your choice, you're stuck with it; you can't currently resize your Windows partition after the fact. And, unlike the disk images Parallels Desktop normally uses, this partition cannot grow automatically--not even if you use it as the source volume for Parallels. So make the partition a bit larger than you think you'll need, to give yourself some breathing room, but not so large that you no longer have enough space for your Mac OS X files! (If you're still unsure, I suggest 10 to 15GB; with the default setting of 5GB, you may not have enough space for common tasks such as burning CDs, but 32GB is more than most casual Windows users will need.)

Be aware that although you may be able to access your Windows files while running Mac OS X, the reverse is not true; Boot Camp does not let you access files on your Mac partition while running Windows. (Some work-arounds exist, though; see the book Take Control of Running Windows on a Mac for details.)

Disable annoying warnings in Windows

From the looks of Windows XP SP2, it seems that Microsoft thinks that users are the weak link in the security chain. We do stupid things, such as download files, and then--fools that we are--we actually open them.

Because SP2 deems it important to protect you against yourself, it goes to great lengths to keep you from receiving e-mailed file attachments that might carry worms and viruses. For the same reason, it makes sure--by asking you again and again--if you know what you're doing when you download files from Web sites, also a potentially dangerous practice.

This may make sense if you're my mom, who doesn't know a computer virus from a flu shot. But to many of us, this dumbing-down smacks of some serious blame-shifting. Or at the very least, it gets downright annoying.

To get back your self-respect, try these tips.

1. Take control of Outlook Express.
The new Outlook Express in SP2 doesn't let you receive attachments in some file formats, such as .exe and .scr, that have traditionally been used by worms and viruses to deliver their payloads. But this draconian measure also blocks legitimate transfers. To get back the ability to accept these files--of course, keeping in mind that you'll have to carefully consider each download to protect yourself--follow these steps:
  • In Outlook Express, click Tools/Options > Security.
  • Clear the "Do not allow attachments to be saved or opened that could potentially be a virus" box.
  • Click OK.

2. Tell Internet Explorer to shut up.
Windows now puts up an annoying warning when you try to run a file downloaded from a Web site if that file doesn't include a digital signature. This may be good for you--it could stop you from falling victim to a phishing scam or other Web-based attack--but if you are very, very careful and feel you know how to identify these threats yourself, you can do the following to stop the alerts:
  • In Internet Explorer, click Tools/Internet Options > Advanced.
  • Under Security, clear the "Check for signatures on downloaded programs" box.
  • Click OK.
3. Download like you used to.
After installing SP2, you'll have to actually click a link to start a download from Internet Explorer. That means the common download site technique of "Your download will start automatically in 10 seconds" no longer works. Instead, IE puts yet another warning, this time in what it calls the Information Bar (the section directly under the toolbars and above the browser display window), to tell you that you're doing something stupid. Although CNET's sister site Download.com has been tweaked to work smoothly with SP2, other major download destinations, such as tucows.com and majorgeek.com, haven't. To get back your dream of easy downloads, follow these steps:
  • In Internet Explorer, click Tools/Internet Options > Security.
  • Click the Internet icon, then the Custom Level button.
  • Under Downloads, check the radio button marked Enable under the heading "Automatic prompting for file downloads."
  • Click OK here and in the next dialog.