Thomas (boggyb) wrote,

  • Mood:

Laptop upgrade: success!

I've been umming and ahhing over upgrading Aether (a ThinkPad R50p laptop) probably since this time last year. On the one hand, it's over 10 years old and struggles with the JavaScript monstrosities that form the modern Internet. On the other hand, I can't quite justify the cost of a replacement given that I don't use it much these days. And on the third hand... it's actually a very nice machine to use and would be quite hard to find a decent replacement for.

So at the weekend I finally decided that if I wasn't going to buy a replacement, I'd at least buy a couple of useful upgrades. Upgrade the first was replacing the slow hard disk with a SSD, since SSDs make everything go faster (it always used to be that the most cost-effective upgrade on any computer was doubling the RAM - these days, I think the most cost-effective upgrade is adding a SSD). My choice of SSD is a 256GB Plextor PX-M5M SSD (basically, the mSATA version of what I fitted to Khaos/Nyx back in March). There's something just wrong about being able to fit 256GB of solid storage on something this small (let alone the 512GB that's now available!):

Now Aether doesn't support mSATA, let alone SATA, so I needed an adapter. Or a 2.5" IDE SSD (which do exist), but I didn't want to spend a lot of money on upgrades that'd only be useful in Aether. So I also picked up a Lycom ST-173-7 for a tenner:

And yes, I did take the mounting bracket off to see what was inside. The answer is not much, though it looks like there may be an actual DC-DC converter in there - that's good for power draw, as the alternative of a linear regulator wastes power. The result is complete overkill for Aether, but being mSATA I can trivially fit it to whatever the eventual replacement will be.

Easy part done, now to actually clone the disk!

This was fun thanks to a combination of changes in the low-level format of drives (both HDDs and SSDs), Windows XP, and ThinkPads just being plain weird. First off, drives have changed from having 512 byte sectors to internally using 4kB sectors (this reduces the overhead, as each sector also has a header and error correction code). Externally they still pretend to use 512 byte sectors because drives have had sectors that size for so long that everything just assumes that's the case and would break horribly if it ever changed. Operating systems generally work in 4kB chunks, so in theory this is all good... except for historical reasons, the first partition usually starts on the 64th sector. This is 1 sector short of 4kB alignment and so misaligns every read/write, causing a massive performance drop.

Why 63 sectors? Well, back in ye olden days computers worked by telling a hard disk precisely which cylinder (track), head (platter), and sector to use. As far as they were concerned disks could have a maximum of 1023 cylinders, 255 heads, and 63 sectors. Real hard drives are nothing like that - they have a lot more than 1023 tracks and 63 sectors (in fact, not all tracks have the same number of sectors. Tracks nearer the edge of the disk have more sectors as there's more space - this also means that those tracks are faster, which is why lower-numbered addresses on hard disks are much faster to read/write from), and maybe 5 platters (giving 10 heads) in high-capacity drives. This was solved long ago with LBA, by numbering all the sectors from 0 to whatever and then having Windows just ask for "block 42". However the partition table still contains cylinder-head-sector addressing, and there was a convention that partitions start on the first sector of a track. Since tracks have 63 sectors, that means the first partition is on the 64th sector.

This was solved properly a few years back with the advent of UEFI and a completely new partition table structure, but Windows XP is far too old to understand such. Pre-SP3 versions are also too old to even cope with booting from any partition that doesn't begin at the start of a track (which now that I think about it explains all the problems I had with the cloned disk not booting - the MBR would have been from a SP2 or earlier Windows XP. These things are so obvious in retrospect).

As to ThinkPads being weird? Well, because of this begin-at-the-start-of-a-track convention there's 62 sectors spare between the MBR (which fits in 1 sector) and the start of the first partition. ThinkPads take advantage of this and the BIOS uses the space as part of the system recovery feature. Since I wanted to keep the recovery partition as it contains the original Windows installation files, I also wanted to keep this special track 1 data. Unfortunately most drive cloning tools completely ignore it.

My solution to all this was to factory restore onto the SSD (creating the recovery partition and track 1 data), then blow away the Windows partition and replace it with a clone of the current install. Again, this was a bit more complicated than it seems, as Aether wasn't originally a R50p. This particular Windows install actually started on the R50e I had at university. Later on I got hold of The Gnu's old R50p, and migrated the install by virtue of physically moving the hard disk across and then installing random drivers until all the warnings in Device Manager went away. So it's always been something of a frankensystem, and ideally I'd have liked to fix it by starting with a fresh R50p install. However the factory restore disks for that are in Horsham, not Fareham, and besides it takes ages to get a fresh OS install just how you want it. So I stuck the SSD in the R50e, factory restored onto that, then plugged it into the R50p via a USB adapter (resulting in the slightly silly chain of adapters from USB to PATA to SATA)... and then went hunting for a disk clone tool that actually worked.

First attempt was PowerQuest DriveImage, which back in the day was the disk cloning tool. That failed on two accounts: it didn't like the recovery partition one bit (which seemed to be some weird FAT16/FAT32 hybrid), and it can't create 4k-aligned partitions. In fact it (along with PartitionMagic) is actively dangerous with modern systems, as it will offer to "fix" the partition table and destroy it in the process. So that's out (shame, as it was a rather nice package).

Next was a copy of Acronis TrueImage 2014 which Scan had included as a freebie with the 2.5" IDE adapter. Except that refused to boot on the laptop, as the processor is missing PAE support... which has been present on every Intel processor since the Pentium Pro was launched in '95, except for the first generation of the Pentium M. Guess what this laptop's got in it? Yep, a first-generation 1.6GHz Pentium M.

Finally I found a tool called Partition Wizard, which looks and feels a lot like a newer version of Partition Magic. It had no problems creating the aligned partition and cloning onto the SSD.

That done, it was time to power down the laptop, physically swap the drives, and power it up... to be greeted most unfairly with a blinking "_" and nothing else as Aether failed to boot from the SSD. Now, I knew that this drive had been bootable (remember, I started out by factory restoring on to it and that worked), so my initial guess was that Partition Magic had failed to do whatever wizardry is needed to actually make a cloned Windows install boot. Surely all that's needed is to dig out the original Windows XP disc, boot that into recovery mode, run FIXBOOT, and reboot.

Nope. That would be far too easy a fix.

This now points to either Windows XP just not working with 4k alignment (which shouldn't be the problem, as it's got SP3 installed), or the MBR being broken (which shouldn't be the problem, as it was working). Since ThinkPads have this weird track 1 stuff I tracked down the actual IBM tool for repairing the boot sector, burnt all 1.75MB of it to a DVD (complete waste, but I'm out of CD-Rs and the stack of CD-RWs no longer erase). And of course that didn't work either. I'm not even sure if it did anything, as one option didn't fix it while the other option apparently crashed the utility.

At this point I gave up on trying to make sure the track 1 stuff worked in favour of having everything else behaving, and so tried FIXMBR from the Windows XP recovery console. In retrospect that was never going to fix it - the Windows XP install disc predates SP3 and so wouldn't cope with 4k alignment. But Windows 7 is sufficiently recent and so should fix it...

...except the Windows 7 install disc is 64-bit and so flatly refuses to boot. I then went digging through the stacks of CDs and DVDs and dug out a copy of the Windows 7 beta which is 32-bit and so should boot. The good news is it booted fine, despite being several years after the built-in expiry date. Unfortunately the bad news is this time it couldn't automatically repair the install (claiming that it could only repair Windows 7 systems), and the recovery console was missing such useful commands as FIXBOOT and FIXMBR.

Finally I swapped the disks again (violating the cardinal rule of disk cloning of never boot off the old disk with the new one attached - but meh, that's more of a guideline to stop you getting horribly confused), booted back off the HDD, and did what I should have done right at the beginning. Which is to use Partition Magic to write a shiny new 4k-supporting MBR. Swap the disks back, and at long last it worked!

This only took me what, three evenings to get working? Anyway, now for the important part: NUMBERS!

Before starting all this I ran HD Tune against the old drive (a 5400rpm 160GB Hitachi HTS541616J9A - so basically your typical laptop HDD) to get a baseline figure:

I ran this a couple of times to try and get a clean graph, and both times had the sharp drop at the start. Probably there's a few reallocated sectors there. For reference, here's what the desktop drives looked like.

I did the test while on battery to get some idea of power consumption. Turns out there's no significant difference in total system power draw, which is mildly disappointing as I was hoping to get improved battery life out off the SSD (that said, the increased speed should help with this - the more time spent in an idle state the lower the average power draw). There was, however, a bit of an improvement in performance:

This merely qualifies as "fast" - as I said, the drive is epic overkill for an old laptop and is pretty much saturating the 100MB/s PATA connection. The adapter could theoretically do 133MB/s if the laptop's controller supported it, but the drive itself is rated for a crazy fast 540MB/s read and 430MB/s write.

That said, the near-zero seek time will give by far the most impact on performance. Certainly the laptop now feels a lot more responsive - where before it seemed to spend ages doing hefty random access, now there's just the odd flicker of the disk light.

The weirdest part of all this is how quiet the laptop is. It's genuinely eerie working away on a truly silent computer. The loudest part now (aside from the fan, but that only runs when needed) is a faint buzz from the backlight inverter, with an even fainter hum from the power circuitry. You can almost tell how hard it's working by the change in pitch of the hum.
Tags: aether, computers

  • Brighton again

    It's been too long since I was last in Brighton - probably last time I was here was for Christmas shopping last year. Unusually it's actually…

  • Who wants a Christmas Card?

    Yes, it's now December and international posting deadlines are fast approaching... so who'd like a Christmas Card all the way from Blighty (brexit…

  • Another construction kit

    So what was yesterday's construction kit? A Nanoblock Santa! That was fairly straightforward to construct, albeit with some care needed as a few…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment