Monday, April 13, 2009

Ubuntu Wastes My Time and Money

So, in a previous post I described how I spent the better part of a day replacing a hard drive in my PC because Ubuntu reported persistent disk failures.

It turns out the drive wasn't bad. There was nothing at all wrong with the drive.

No -- what I was seeing was some kind of recently added diagnostic behavior in the FAT32 version of Ubuntu. When my system was booting, if the drive was marked dirty, Ubuntu would run its fsck, which is a script, which would launch the FAT32-appropriate binary. Apparently when that tool runs now, among the checks it does is a check to verify that my backed-up boot sector matches the real boot sector. The problem is that if it doesn't, which it didn't, it doesn't just produce a diagnostic to this effect, it dumps a list of non-matching inodes or block numbers or whatever the hell you call several pages of fsck's diagnostic numbers. Diagnostic numbers that look exactly like what you see when you have a persistently corrupt directory structure.

Naturally, since the file itself wasn't bad, repairing the file system repeatedly didn't fix this problem, so every time I'd boot, I'd see several pages of fsck garbage spew past.

Which, incidentally, is exactly what it looks like when your hard drive is going bad.

So I replaced it.

Yes, I could have found the actual error in the appropriate log. But after using Linux on and off going back to about, er, 1994? I thought I knew what the system was telling me.

Now I'm just pissed. The actual fix involved running the tool with sudo and allowing it to back up the boot sector.

It doesn't help that my machine also can't shut down without locking up; I get a hang about half the time after the line "running local boot scripts /etc/rc.local." And of course there was the time I had to waste to get the system, in 2009, to let me use my dispay's full resolution.

I might mention that this is about as generic a PC as they come; I built it myself, from an Antec Sonata case, an Intel motherboard with built-in video, an Intel CPU, Crucial RAM, and Seagate hard drives.

Except that now it has one Western Digital drive that I never wanted to buy at all, but it was the only EIDE drive the local Best Buy had in stock.

I could go on a rant about the user interfaces of command-line tools that overwhelm you with useless information while telling you almost nothing you need to know, but perhaps I should save that for another time.

2 comments:

Greg said...

Now that you have two hard drives perhaps you should install both and do a proper Ununtu install on an ext3 partition.

A clean Ununtu 8.10 install on an ext3 partition, then updates and backports installed should work perfectly on a motherboard with intregated Intel graphics.

You could also buy a cheap HD cradle system and have a Windows XP disk and an Ubuntu disk. Mucking about with wubi on a fat32 drive is really just for evaluation.

just a suggestion

Paul R. Potts said...

Thanks for your comment, Greg. Actually the box had two hard drives originally, one a FAT32 volume with Windows 2000, and a second drive for Ubuntu. It was the FAT32 drive that appeared to be going bad. It was installed on FAT32 instead of NTFS because a few years back when I built the box, Linux support for NTFS was very sketchy (I think it could do read-only access with an experimental package). And I chose Windows 2000 because it was more stable, although if I were setting it up from scratch today I would use XP.

You are probably right that a clean install from scratch might help. As it is, I have brought this system forward through several Ubuntu releases. But right now I am using it for production work on a tight schedule, so that will have to wait.

The video issue was apparently a known to other people as well: when I migrated to an HP monitor that does 1200x1600, the standard screen utility wouldn't show that resolution as an option. I have spent lots of time in the past editing X-Windows configuration files but I thought and hoped that those days were behind me. Fortunately, I found a lot of reports of similar troubles; the answer seemed to be that I had to use "sudo displayconfig-gtk" to configure the screen resolution instead of the standard tool. It even lets me rotate the screen 90 degrees, which is very nice because the used HP 2035 panel I picked up for cheap at Affordable Computers here in Ann Arbor rotates into portrait mode, which is fantastic for coding.

No word yet on the lockup-on-shutdown issue, but I'll have to work on that later.

If/when I get some time to upgrade this system, I might add a video card with two DVI outputs and pick up a second one of those HP panels, wipe the drives and bring it up entirely as a fresh Ubuntu system with two 1600x1200 displays in portrait mode.