Monday, December 17, 2007

Repairo: Fixing a hand-built Ubuntu based Linux computer

Linux has a reputation, well earned, that it will run on much more marginal hardware than most other OSes. I have brought it up on some truly itty-bitty gear over the years, and the embedded / Cell phone end of the Linux market certainly runs on tiny CPU / Memory footprints.

For all is capabilities though, Linux is not magic (thus the Harry Potter reference... well, that and the fact that I drive my daughter nuts by knowing more Harry Potter quotes than she does). Linux can not solve all the problems of the world (although OLPC is making a mighty effort in that regard), and it can not run on utterly non-boot-able, busted to the rafters hardware. Case in point, my brothers Ubuntu 7.04 system.

The Hardware

The hardware in question has a long sad history. The computer is a hand-built that contains bits of my daughters first Linux computer, a Mandrake unit back then. As various parts have failed over the years: Mother boards, Power supplies, video cards, it has sort of become the proverbial 'favorite hammer' (I.E.: This is my favorite hammer. I like it so much that I have kept it for years and year, replacing the bits when they broke. Why, I have replaced the handle three times and the head once...)

This hodgepodge of computer bits had been in for a new MB with 1Gb if RAM in the recent past, and was sporting a AMD processor that was rated faster than the new MB could clock it out: 1.8 Ghz under-clocked to 1.6 Ghz. The Sempron runs very cool though. The video card was the cheapest thing they had at Fry's about 3 or 5 years ago, and there were three Maxtor hard drives from three different generations of the computer all snuggled into the desktop computer frame rails. Two were seriously whacked out. Bad I/O, unrecoverable data checks, you name it. They were not even connected anymore. The third one decided to commit computer-hari-kari. It was the newest, a 250GB unit that was not more than about three years old. When a hard drive decides its time has come, you pretty much have to just let it go along its dark and random path. It is sad of course. Like most things in the area of dieing, it is those who are left behind that feel the pain. In this case, non-booting computer equals no access to email, Internet, or holiday gift giving lists lovingly crafted on the machine before the hard drive set out on its own.

The Software

A previous MS Windows computer resident at my brothers house had been rebuilt for the last time. The Semi-annual Windows re-installs had become more and more tiresome, and I had a brainwave: I had this hardware sitting at my house, and I hardly used it. I have switched to all laptops for work, play, and testing with one exception at the office. My hand-built home system, running Fedora 6, was idling quietly in the corner doing nothing. The iMac had supplanted it's role as print server and file server.

For all its hand-built past, the computer spec'ed out better than the gear my brother had: his MS Windows systems were also hand-me-downs from other in the family when they had upgraded, and that was all he needed or wanted. He is an amazing carpenter, and to him, a computer is just a tool, not a lifestyle. He uses them, but he also just wants them to work. His laptop is an iBook that my daughter and I built for him out of parts off eBay, and he likes the Mac well because it is painless. I thought Linux could be similarly painless

Dell had just announced they were going to support Ubuntu, and my brother lives in Austin where Dell is. The news was everywhere, and it seemed like it might be time to propose a move off MS Windows. My hand-built unit had no MS Windows license, and I doubted MS Win would even work on the hodge-podge of gear without some serious driver TLC. Work I was not going to do. I love my brother, but really: I am done with fixing MS Windows. Call it a quality of life issue.

I proposed the new-to-him computer and Ubuntu, and all my brother wanted to know was whether or not Google Earth would run on it. That was the killer app for him, As Ubuntu had that as an option, I told him it would, and formatted the 250GB unit and installed Ubuntu 7.04. I thought about Mint, but went with Ubuntu because of all the buzz around it at the time. Sure, Mint starts with Ubuntu and adds stuff, but I decided to go "Marquee" here.

This should have been the end of the story, except that I spent all that time mentioning the history of the hardware (repeating things I have posted elsewhere) to lead up to what happened a year or so after my brother got his Linux unit.

The Linux Experience

In the year or so that that Ubuntu 7.04 computer was there, it hummed along and just did it's job. No muss, no fuss. I used the default Gnome interface, and laid it out to somewhat resemble the Mac: Task bar at the top, etc.

Then one day when I got a call about the video being all wacky. The computer video card had come loose when the computer was moved, and needed to be reseated. Not really a Linux problem: Linux has to be able to tell the MB to send electrons to the video card. It's just picky that way. All was quiet again till a few weeks ago. I was in SanFran. It was cold and rainy, and the call came in that the computer would not boot. He read me some stuff off the screen. I walked him through a quick FSCK of the 250GB drive, but it was bad. Really bad. Permanent damaged hard drive bad. Like the video card thing, except that there is not way to put the little bits back onto the hard drive. It was not going to boot, and that was all there was to it. No operating system in the world, not even Linux, can deal with having a hard drive lobotomy, at least not when that was where Linux was storing its brain. Sure, I could boot the Ubuntu install disk, and run in LiveCD mode. This was not considered optimal though.

The good news was that we were already planning a family get-together, so he brought it along.

We can rebuild it: We have the technology

As much use as the Ubuntu computer might be, that does not map to wanting to spend a huge amount of money to fix it. Any time a computer has to be repaired, it is an exercise in the same math one uses to decide whether to repair the car one more time. Everyone probably has different ideas as to what is worth repairing, and what is not. My number right now is about 500 USD. More than that and the computer should probably be replaced. The is a personal number of course, and I base it off the cost of a new system. In this case, I could by a new Acer 5000 series laptop for a around that price on sale someplace, and have a computer that works as well or better than this desktop-unit of-suspect-parentage.

This was a failed hard drive. Everything else worked. Fry's had a 320GB unit on sale for about 70 USD, so that followed us home.

I brought Mint 4.0 with me this time. Last time I was going for Marquee, but my brother was now comfortable with Linux and the Gnome interface. It took a couple of minutes to replace the hard drive, and a couple more to boot Mint 4.0, and then about 10 more to go through an install. He had not watched me do Ubuntu 7.04, but after watching Mint 4.0, and having been witness to years of MS Windows rebuilds he asked me the unanswerable: 'Why do people still use Windows?". I admitted that I had no idea. I have had people try to explain it to me, but it seems to be like Color. I like Blue. I can't tell you why. I just do. Except in cars, where I prefer White. Go figure.

I explained as I did it my manual intervention with the default disk layout: I always lay out 10/2/remainder for this kind of system. 10 GB for "/", 2 GB for swap, and the rest of the hard drive for "/home". Makes upgrades easier, and especially ones where I cross distributions.

A reboot, and Mint was on the air...err... on the hard drive.

I also quickly put the default Gnome menu back, since that is what he knows.

Even Better

Now I had my fingers crossed. I installed the failed 250GB hard drive into a USB/Firewire external enclosure, and attached it to the new Mint 4.0 unit. And what I had not dared to hope happened: Linux could read the old "/home" partition! All the damage was up front, in the OS partition. We pulled over all his personal data with only one issue.


I thought Thunderbird uses either .thunderbird or .mozilla as the place to keep it's brains when it is not running. Those were what I copied over. When he got home, and re-connected to the Internet, and fired up, Thunderbird went into "New Account Set up". Doh. Looks like I'll make at least one more house call on this unit to get that figured out: There are emails they want to keep .. someplace.

I was planning a house call anyway. That hand-built's video card is slow slow slow. Even the cheapest card at Frys today is four times better than the one he has now. A new card would help Google Earth run way better. And that after all is the "killer app".


Anonymous said...

To answer your question: "Why people use windows".. Because they have to.. Good luck trying to run Autocad or electronic design software on Linux. Yes there is Wine, but most of the time it's just easier to get the job done on windows, than to struggle endless hours with wine crashes.

Anonymous said...

You're right about the folder that thunderbird uses, just go there and change in profiles to the old folder (must be 2 folders ending in .default, one was created now, the other is the old one).
Regarding the rest of the article, i must say, Linux isn't magic, but damn, it works! I've had my share of this type of situations, it may not solve it, but at least gives some clues about what is going on...

Cláudio Silva

Steve Carl said...

Re: Have To: Autocad is used as an example a great deal, and I am puzzled a bit by that, I totally agree that running under WINE is probably less the optimal (although there is an Architecture firm in Australia that does it all day long I was reading about a while back), but there is nothing intrinsic to MSWin that makes it run Autocad. Autocad started as a Mac app, and was ported. If can be ported again. Further, there is nothing all that compelling about Autocad: if the market wants a CAD package on OS.X or Linux, one will appear. It may not be Autocad, but it will probably import work *drom* Autocad.

Re: Thunderbird: Thank you. I will look at that as soon as I get next to his computer again! And I agree, Linux is not magic. No OS is. All are very complex bits of work written by people. Linux just works, and these days is works better than MSWin because as it has no axes to grind, and no agendas other than just being a great OS.