May 28 2008
Mounting UFS/ext2/ext3 filesystems on Windows XP, and destroying old development hard drives.
After cleaning out the garage, I came across an old box that had been sitting in the corner for many years. The bottle recycling depots in my area now take old computer parts (Canada put in a small environmental tax on new electronics, so now the recycling places take old stuff for free!), so it's pretty convenient to get rid of this stuff now.
However, I knew the hard drive likely contained old checked-out code that had been moved to a new machine. I'm not a super-paranoid guy, but there's enough horror stories out there that I'd rather wipe an old drive if I have the chance. So I popped the drive out and hooked it up to my Windows XP box.
I wasn't really surprised when I booted XP and couldn't see any sign of the drive. I cruised over to Device Manager, and it showed up there, but you can't format or mount drives from Device Manager. I was a bit vexed, moreso because I wasn't sure what kind of file-system was on the drive. Was it a linux ext2/ext3, or a FreeBSD UFS system?
I came across a nice post that pointed me in the direction of a great tool called Ext2 Installable File System for Windows. It installs a Control Panel that lets you mount and access ext2/ext3 drives. I gave it a shot, and it even picked up my drive and allowed me to assign it a letter during the install, so by the time I was done, Z: was waiting for me!
It turns out that the drive was UFS however, so when I tried to access it, I got a "This drive has not been formatted" message. That was enough for me though, as I could now quick-format it with NTFS, then access it with my erasing utility, eraserd.
A couple of quick commands into a DOS prompt later:
eraserd -allfiles Z: -passes 3
eraserd -disk Z: -passes 1
and this hard drive was all set for it's trip to recycling, and I was assured that nothing wayward will happen to any old data that might be on it. The first command removed any known files on the disk (which was none, since I had just formatted it), and the second command then used a secure erasing algorithm to overwrite all free space on the disk.
Because I wasn't using the XP machine for anything else at the moment, I re-formatted the disk and re-wiped the free space two more times. Maybe I am super-paranoid.

