Have I ever mentioned how much I hate computers?
Now, don't get me wrong. I love programming. But
I hate computers.
I replaced the hard drive in my computer about 1.5
months ago. It dual boots between Windows 98 and
Mandrake. Why am I using Windows? Because I couldn't
get the ppp connection working under Mandrake - it
would stop anywhere between 1 minute and 30 minutes
of use. The phone line would still be in use, but
just sitting there making noise.
So I replaced the hard drive and upgraded Mandrake
from 6.5 to 7.2. Thanks to the help of a friend, it
went pretty smoothly, although I exlaimed "I hate
computers" a few dozen times during that process.
Last Friday evening, Norton Antivirus kicked in and
say the master boot record had changed and would
I like to fix it. Admittedly, I didn't read the
text too closely where it said "this could be caused
by upgrading the OS" so I hit the "Repair" button.
This replaced the MBR with the old and now invalid
information NAV had saved somewhere. Which meant
I couldn't boot my machine.
Did I mention I hate computers?
Please realize that I didn't and still don't have
a good idea of what is on the master boot record.
All I thought it did was wipe the boot loader, so
I spent about 4 hours on Saturday trying to
It wouldn't work. It wouldn't identify the partition
but would say it was uknown and of type "0x83".
This is strange because 0x83 is the ext2fs partition
type identifier. Perhaps it's something to do with
the "stage 1.5" loader, so tried figuring that out.
Nope. Pulled up the latest CVS to see if that fixed
Started going through the code. Frustrating code. Global
variables everywhere makes it hard to follow the
thread of meaning. Various #ifdefs for stage 1.5 vs.
stage 2 code. Mixed use of "grub_printf" and
"printf". Using a statically embedded function
as an iterator for a variable in the surrounding
scope. Overuse of the for() statement so all of the
checks for the end of loop are inside the for()
so to have an empty body.
Anyway, I managed to track the problem down to a
seven line conditional check for an if statement.
Everything was find except for the last part, which
was a superblock check.
It failed because the partition entry no longer
pointed to an ext2 file system. This is a good
thing. However, it didn't tell me why it failed
and only implied that something was wrong with
the filesystem type identifier.
After I figured out that the partition table was
bad, I spent the rest of Saturday getting the
machine back into shape. Managed to dig up some
tools (like rescuept) which reconstruct the
partition table information.
Even getting that going was nasty. Had to figure
out how to make a bootable floppy. Used a
Red Hat 7 distribution to get into a bare-bones
Linux mode then figure out how "mknod" worked
so I could talk to the different partitions.
But I don't know anything about partition tables.
I managed to get the settings in fdisk to match
the output of rescuept. (Used another program
to double check, "s" something.)
Amazingly enough, that seemed to work.
Under Win98 I could no longer put my laptop into
suspend or hibernate mode. No problem under Linux.
The only thing that changed was the partition table.
I had assigned the FAT partition for my D: drive
an identifer of 0xB, but couldn't tell if 0xC was
really the right one. (There are suggestions that
early FAT32 needed special BIOS support, so I
conjectured that perhaps a different identifier
was used when that changed.) Changed to 0xC.
Still no suspend. Conjectured that there was a
setting changed in the registry.
There I was able to pull out my secret weapon,
which was that I hadn't made all that many changes
to Windows since I copied the files from my old
drive to the new one, so I was able to export
and diff the two settings. There were a couple
of differences, but changing them didn't fix things.
Replacing the new registry with the old also didn't.
Doing a recursive diff on the two Windows' didn't
Windows running from the old disk can hibernate.
So there isn't some PROM setting which needs to
be changed. I backed up the /dev/hda1 partition
and copied over the old installation. Should be
identical code. But still Windows doesn't hibernate
from that drive.
A friend of mine works for Microsoft. Called him
up hoping he could divine why two almost identical
configurations would allow one to standby and the
other not to do so (even though it did the week
before). His divining agents were no help. And
he can't get his laptop to hibernate at all under
Did I mention I don't like computers?
While rereading the Linux man page for "fdisk" I see
the comment "you should always use an OS-specific
partition table program." So I played around with
the Windows fdisk, which is a pale shadow of the
Then I noticed a small comment on my worksheet.
(Paper doesn't get a corrupted partition table!)
It had the statement "in extended partition."
Apparently there is a difference between "primary"
and "extended" partitions and what I had used as
primary partitions 2, 3 and 4 really should be
extended partitions 5, 6 and 7. While Linux
and Windows understood them just fine as primary
partitions, I guessed that perhaps Windows
acts differently when there's more than one primary
Rebuilt the partition table to use an extended
partition. When I used primary partitions I
needed to specify the start and end clusters.
When using the extended table I noticed that the
start clusters were always correct. Figured this
was a good thing.
Somewhere in here my FAT16 and EXT2 partitions
became corrupted. Don't know if it was when
I created the extended partition or playing around
with the Windows fdisk or I forgot to unmount
nicely or what it was. But I semi-ruined them.
Remember that I said I backed up the FAT16 partition?
It was onto the ext2 one, and now that file is
in never never land. Also got the only time I've
seen where fsck stops and asks for manual intervention.
Computers. Hate. Blech.
Managed to mount and save my home directory. It's
about 3GB of which over 1GB are files from various
bioinformatics databases. Easy to drop a GB on
a 20GB drive. I must admit that nice feature of
So now I'm in the process of reinstalling everything
back onto my new hard drive. Didn't loose that
much. I was very cautious about my email, so had
an extra archive of that. Worst problem will be
the final details of my Q4 finances, but even there
I still have the paper copies.
Still, I've been working at this for four days,
and learned a slew of things I didn't care about
and would rather forget. Everything I did needed
to be double checked because if I, oh, swapped
an if= with an of= I would wipe everything. (I am
able to borrow 10GB of space on someone else's
machines, so I do have a second backup.)
I hate computers.
How to improve things?
First would be if Norton used the word "Restore"
rather than "Repair" in that button I pressed
which sent me on this nasty journey. I would
really enjoy it if Norton has a "undo last
repairs" option since I figured out there would
be a problem before I rebooted. I could also
have booted into Windows from a grub'ed boot
disk to run that command.
Huh. When anything other than Norton touches
the MBR, NAV kicks in to say there might be some
virus activity. That would have warned me that
something possibly back was taking place. I wonder
how NAV recognizes self and if an anti-antivirus
program could take advantage of that.
Second would be if there was no distinction between
"primary" and "extended" partition. I bet it was
some sort of hack to get around the 2GB limit in
Third would be more verbose reporting information
in grub, to say why it couldn't recognize a disk
with a correct partition number.
Fourth would be better reporting in Windows to
say why things failed - that is, an equivalent to
the system log under unix. Hmm, I bet there is,
but I just don't know how to find it.
There's probably more, but that's enough for now.
Don Norman is right. Computers are still in their
primitive infancy. Will they mature in my lifetime
or will there continue to be levels upon levels of
Don't come back telling my why things have to
be done this way. Think of it as a challenge. People
use software to achieve goals in their domains.
How can you reduce (eliminate!) the need for
knowledge unrelated to those goals?
Bear in mind too that I've been a programmer since '83
and a professional programmer since '95. If I have
this much problem with computers, no wonder I'm not
the only one who hates them. But as a programmer,
they're the only game in town.