Sunday, August 23, 2009

Easy as pie: Upgrading a laptop hard drive

The problem: My laptop was running out of storage, and so it was time to swap out the standard Asus G2S-B2 drive, the Hitachi Deskstar 7K200 200GB - a good drive - with a larger one. Blow-by-blow with many parenthetical asides follows; you may wish to just skip to the very end for a quick digest of my findings.

It turns out the solution is as simple as using software from my drive's manufacturer, but I'll first go over some of the failed paths I took getting to that point. On one of my regular desktop computers, it was a simple process: Swap out the drive and reinstall the OS using the retail disc and copy any files over (or reinstall from the 'net). However, this laptop took me back into the wonderful world of preinstalled OSes, which I've studiously avoided since the early part of the decade (remember Best Buy's in-house brand VPR Matrix? Not only did they die, but one of the restore CDs they put in the package was corrupt). Humorously, I have two full Vista installation discs lying around, but neither was the correct version (Business, and even Ultimate 64-bit on DVD). These discs can be helpful for fixing a different version of Vista, but they didn't provide the needed solution. More on that later.

There are a variety of freeware (and pay-ware) programs which promise easy duplication of a hard drive's contents to a new drive, along with a bevy of other features. After some experimentation, it's true that a free drive cloning program can copy partitions just as quickly as non-free software - and provide some additional features to boot - but you likely still need more than one program to do the job to get a true copy of a disk that will boot the OS. However, you can still do it for free if you know where to look.

Some initial 'net searches led me to some well-regarded freeware programs, including EASEUS Partition Master Home Edition (as the name indicates, only free if you're a "non-commercial" user, whatever that means), and Driveimage XML (I also found a reference to another freeware package, but its URL has been absorbed by a domain squatter).

The preparation stage was like this: I bought the new drive - a 500GB Seagate Momentus 7200.4, which I think uses only two platters. It's fairly energy efficient, more so than even the 7K200 it replaces, while it's still a true performance drive; it doesn't seem to run quite as hot as the Hitachi. Cost per gigabyte (using the 1 billion bytes gigabyte, however) is 24 cents/per, while there is an anomalously-priced 320GB model (the 250GB model is the same price, $70 after a $10 drop compared to the 320's $5 drop) with a price of about 22 cents per; I could have gotten 140 extra billion bytes (across two drives) for the same price, but maximum capacity was important here. Secondly, to assist in transferring the data and to give myself a nice 180GB removable drive and backup, I picked up a cheap but sturdy and effective e-SATA enclosure from no-name brand Coolmax (keeping in mind you need to have an eSATA port on your laptop to use this, otherwise you're stuck with USB) in Hollywood starlet cigarette case yellow and silver (...for lack of a better image coming to mind). I'm actually very happy with it, though eSATA cable isn't flexible enough. Finally, I temporarily disabled Vista's UAC so I could access the Disk Management console and alter disk attributes easily (it's also worth noting that version 4.39 of the great SpeedFan software has vastly improved new S.M.A.R.T. disk monitoring, but it wouldn't show any disks until I disabled UAC.

Failure one: I got interested in the differences between MBR and GPT. MBR is allegedly obsolete, and can't deal with partitions over 2TB in size, but as my current disk was set up as MBR I couldn't copy the partitions to it, much less expect them to boot. The end. I sheepishly deleted the GPT formatting and started over with MBR.

Failure two: I'll spare all the details of the next failure, but suffice to say that copying the hidden restore partition, the boot drive (C:\), and the data partition (D:\, which computers preinstalled with Vista are starting to use to allow you to save your data if the OS becomes corrupted, which would have been a bit more useful in the days of Win9X and NT to XP) was not enough to make a boot drive. The drive letters were wrong (C became A, while D became B), which will doubtlessly confuse some software. Just as importantly, the all-important special attributes - System, Boot, Page File, and Crash Dump, seen in the Disk Management console (from the Run item in the Start Menu, type diskmgmt.msc) - could not be set. Microsoft obviously has an interest in not letting people set drives as boot at whim from within Windows (that reason is preventing piracy). I could set Primary and Active, as well as hide the backup partition, but I couldn't make the drive boot. The flashing cursor would appear after the BIOS logo/diagnostic screen, and there the PC would sit as long as I left it on, languishing without direction. No surprise there.

Failure two, Part two: Going off another online tip, I pulled out the Vista Business disk, set the BIOS to boot first from removable media (on a G2S-B2, that's Escape followed by F2, joy, and don't forget to turn the BIOS sound off, what the?), and used the "Repair your computer" option from the Vista installation (which appears on the second screen along with the installation option, immediately after you set your location). It did what I'd read it would, restarting a few times, but soon it started reporting that the installation looked fine - even though the system clearly still wasn't booting. Whoops! It wasn't setting the attributes (system, boot, et cetera - what I listed earlier) and so the drive still wasn't booting.

The solution: Ridiculously simple. Since I bought a Seagate drive, I had the option of using DiscWizard software from Acronis, a free download on Seagate's site. I can't say whether it ran faster than the freewares, but what's important is that it gave the drives the correct labels (C and D) and attributes. DiscWizard (why the c and not a k in the name, I wonder?) deleted the partitions I'd copied over earlier (which made me unhappy since it seemed unnecessary, but the software isn't meant to be that flexible) and made a true one-to-one copy.

Cleanup: I'm not ready to ditch all the freeware yet; I still need to resize the partitions to give myself more room on C:\ and D:\ and use the rest of the hard drive, of which more than half is still unpartitioned. EASEUS Partition Master Home Edition allows you to easily set the size of the partitions from a single view - a bit easier than doing it within Vista, which is certainly possible. The GUI looks a lot like Vista's Disk Management console, which is great, although I feel it's slightly better since the partitions are arranged in a traditional tree view which makes it more obvious that an entire disk can be selected (in Vista's console the entire disk is shown as a gray box, which isn't obviously selectable given the longstanding Windows design of gray items being unselectable).

GOOD:
Software: Seagate's DiscWizard, developed by drive tool manufacturers Acronis, is all you need to do a direct copy from one drive to another if you have a disk enclosure. Go get one; you'll like having a backup in case of emergencies, and even if you keep that other drive at home you'll still want that enclosure for the time savings (all you're paying for is basically a SATA to eSATA converter) of copying directly, automatically, from one drive to another. Don't worry about installing Bootable Media Builder or BartPE. Finally, you will likely need to extend the partitions on a larger drive, and I found EASEUS Partition Master Home Edition very useful.
Hardware: Seagate's Momentus 7200.4, and Coolmax's $13 HD-250YL eSATA enclosure.

BAD:
Freeware tools from independent, unaffiliated vendors and Windows' Disk Management console didn't seem able to make a drive the booting one, or copy C:\ to C:\ - not without using an intermediary drive or other removable media, which is a time and money waster. Go directly from one drive to another whenever you can.
Transferring a working OS installation from MBR to GPT seems impossible using automated tools; furthermore, GPT limits your choice of OS installations and requires an EFI "BIOS" (as GPT is EFI's replacement for MBR).

UGLY:
Any hard drive manufacturer who doesn't offer a free variant of DiscWizard (do these even exist) for their customers.
Clearly, manufacturers need to start supporting EFI, the replacement for the BIOS, before drives larger than 2TB start appearing or else people are going to start wondering why they have to partition their drives...and let's not get started on the "partitioning for speed" myth.

Don't forget to reactivate UAC!