Sunday, August 19, 2012

Geek Heaven, Part II: Hardware

But I don't DO hardware ...

I'm predominantly a software guy, not hardware. I know this from my worst failure ever, when I tried to assemble my own motherboard, CPU, and graphics card, and ended up shorting them all out and turning them into a recycling project. Since then I've done nothing more challenging than swapping out a hard drive, adding memory, or replacing an expansion card -- tasks which could be accomplished by anyone who can follow some simple instructions.

I've especially steered clear of daring to open a laptop computer case. Those things feel as if the components packed inside them are going to spring out like Slinky toys when you lift the lid, never to be reassembled. Don't you have to have the careful fingers of East Asian assembly line workers to deal with all those fragile connectors and tiny screws?

Necessity, the Mother

But necessity, as they say, is a mother. I was driven to the attempt by my inability to find a netbook computer with the exact specs I wanted for a price I was willing to pay. I wanted a solid-state drive instead of a hard drive, for the durability and extended battery life, but for marketing reasons they are only selling those preinstalled on high end "ultrabooks" priced from $700 on up. This is due to the cost of the SSDs, which currently runs around $1 per gigabyte, compared to only 10 cents per gig for a hard drive. (I remember when hard drives cost $16 per gig, so progress is being made!)

Instead I bought a low end netbook for $279 and added my own 128 gig SSD for an additional $119, saving half the money while getting what I wanted in a smaller package. (Ultrabooks seem to need larger keyboards and screens to justify their price.) For an extra $20 I also doubled the memory capacity from 2 to 4 gigs. Worth a bit of effort.

The case in point is an Acer Aspire, 722 series, which came with an AMD dual-core 64-bit low-power processor, Radeon dedicated graphics, and a 250 gig hard drive running Windows 7. Performance out of the box was surprisingly good, even with only 2 gigs of RAM. I played with it a bit just to be sure everything was working before I proceeded to jeapordize my warranty.

Compatibility Testing

Assured that the hardware was OK, I next tried running Linux on it to check compatibility before installing it. This is another huge advantage that Linux has to offer -- the Live disk. You can boot up a fully operational desktop directly from a CD or DVD without doing any installation whatsoever, so you can find out in advance if there will be any problems with your hardware. Contrast this with a typical Windows install, with its multiple reboots and requests for drivers that you may or may not be able to find. (Most people never make this comparison because they never had to install Windows, it just came with their computer.)

I used Linux Mint 13, KDE version, which is based on Ubuntu 12.04. The netbook did not come with an optical drive, but the Mint ISO files are "hybrid" images that can be burned to a USB flash drive and will happily run from there. I just had to go into the BIOS settings to be sure the Acer would try to boot from any USB drive before falling back to the hard drive, then plugged in the flash drive that lives on my key chain.

The Hack

As expected, almost everything was properly detected and "automagically" configured in the boot process. Within a minute I was looking at the familiar Mint desktop. The only exception was the wifi connection, but I had looked this up in advance and knew how to work around it. The system would detect available wifi networks -- even the very weak ones emanating from my neighbors' houses -- but if I tried to connect to mine it would freeze the whole computer. Not a problem, due to an inspired hack published online.

The Acer netbook also has the option to boot from a network server, and if you place that option first in the boot hierarchy it will initialize the wifi and look for a server to connect to. In a matter of moments, not finding one, it gives up and proceeds to boot from the next available device. But now, with the wifi properly initialized, it works perfectly under Linux.

True, it may not be pretty to have to look at a routine error message each time you start up, but it seems a small price to pay for the ability to run my software of choice. Likely this shortcoming will be addressed in future releases anyway, and I'll be able to eliminate the hack. One of the things said about open source is, "We'll fix it for you while you sleep!" Thanks to the tireless efforts of programmers around the globe, in the fullness of time most everything is eventually resolved.

Attack of the Clones

Finally ready to begin, my first step was to "clone" the Windows installation from the hard drive onto the new SSD. I could have just installed Linux onto the blank drive, but I hate to throw anything away. Somewhere in that $279 price tag was a fee I had paid for Windows, so why not keep it?

There was one difficulty in this, namely that the SSD was about half the capacity of the hard drive, which complicates the process because you have to deal with resizing the partitions on it. You also need to mount both drives at the same time so you can copy from one to the other. I opted for the easy way out by getting an SSD from Crucial that comes packed with a SATA to USB cable and software that does the cloning for you in one simple step. (They sell the kit separately for $18, and Corsair sells one too.) I thought that cable might come in handy for something else some day, so it was worth paying a bit extra for it.

One of the photos shows my keychain plugged into one USB port so I could run the cloning software from it, and the SSD plugged into another. The copying process took about 35 minutes at around 20 MB/sec. I might have been able to speed it up by monkeying with the settings, but hey, I only had to do this once. With that complete I finally came to the hardware portion of the evening.

Outpatient Surgery

All it took was removing the battery and a single tiny screw to slide the back cover off. Underneath, the hard drive and memory card were readily accessible. Also visible were the wifi adapter and cooling fan. Releasing the metal clips on each side of the memory board, I popped it out and replaced it with the new one. Then I had to coax the hard drive out of its snug fit between the rubber cushions that serve as shock absorbers, and remove two more tiny screws to unhitch it from the connecting SATA cable.

The photo shows the new memory installed and the empty hard drive bay. Truly, the hardest part of all this was making sure not to lose those teensy screws or drop them into the innards of the computer. A magnetic Phillips screwdriver was helpful for that.

After attaching the cable and screws to the new SSD and fitting it into place, I replaced the cover and rebooted to make sure it still worked. When you change the size of a partition that Windows lives on, it insists on "checking the disk for errors." You just have to let it do its thing so it will stop complaining, then all is well again. No errors were found, and I noted that the bootup process was noticably smoother and a bit quicker than before, though I didn't time it.

Almost done -- all that remained was to boot up again from the USB drive with the Mint install disk on it. Once you're up and running from one of these Live disks, you just double-click the Install icon to launch the installation process. If you're setting up a dual boot with Windows the only tricky part is deciding how to partition your drive.

A Drive Divided

One annoyance was that the Windows installation itself, with hardly any extra software added, was occupying almost 30 gigabytes. Compare that to my 1 gig Mint install disk that was going to end up at about 4 gigs after installation. 30 gigs is only about 12% of a 250 gig drive, but almost 25% of the SSD I put in its place. On top of that I was going to cut the drive in half to accomodate the two operating systems. And on top of that, the hard drive had come with two additional partitions that were taking up some of the remaining space. I was running out of room, and I hadn't even started yet!

But I hit on a simple and elegant solution. Those two extra partitions were not necessary. One was a sytem diagnostic area for testing hardware issues. The other was for restoring Windows in case it became hopelessly scrambled, a substitute for providing a Windows install disk. The diagnosic area didn't matter since it was only a few measly megabytes. But I didn't need the Windows restore because I had the entire hard drive I had removed as a backup. So I used the 10 gig restore partition for my Linux root -- where everything would be installed except my own personal files -- leaving the rest up for grabs.

I told the installer to resize the Windows partition to about 40 gigs, which left me 10 gigs for file storage under Windows. That small limit was no problem because I only need it for the occasional Windows-only program that I have to run, while most of my files live under Linux. This left me with the lion's share, about 66 gigs, to devote to my /home folder, plus the satisfaction of seeing my Linux root come first in the list of partitions, with Windows sandwiched between that and  /home. I created a swap partition too, equal to the 4 gig size of my RAM as recommended.

But don't let all this scare you off. If you're not as picky as I am you have the option of letting the installer resize your Windows partition for you and assign the rest of the space automatically. Or, just wipe the whole drive and use it all.

[And before anyone points out that the 100 megabyte diagnostic area would have been big enough for a Linux /boot partition, I considered it. But again, why throw anything away?]

Life is Good

The Mint install went smoothly and created the dual boot loader for me, naturally respecting my wishes to keep Windows available. So life is good. While happily installing my favorite software -- Chromium, LibreOffice, Dropbox, et. al. -- I paused to marvel. Balanced on my lap in this 2 pound (1 kilo) book-sized package was more computing power than I would have dreamed of in a desktop unit just ten years ago. Software has advanced, but hardware is sure coming along too.

1 comment:

  1. A footnote to this adventure. After using it for a few days my Linux installation began to crash with "kernel panics" which is the equivalent of the infamous Windows "blue screen of death." This is such a rare occurrence in Linux that it generally portends a serious hardware problem. I checked the partitions on the SSD and found no problems. Then I thought to test the memory again. I had done that after I first installed it, and no problems were found. But this time it immediately lit up with lots of error messages. The memory board had flaked out.

    So all I had to do was replace the board with the 2 gig one that I had removed, and all was well again in Linux land. It has become a rare thing for memory to fail so it's easy to overlook it. But this reminded me that in the old days it was one of the first things we would look for. On the Apple II for example, RAM chips were generally inserted into sockets so they could be easily replaced when they went bad. The down side of that was they could work themselves loose from heating and cooling, so the first thing to try was pressing them into the sockets. Nowadays the chips are hard soldered to their boards by robots because the traces are too tiny and thin for humans to manipulate. But this was a lesson to me -- they can still fail.