Pages Menu
TwitterRssFacebook
Categories Menu

Stumbling Blocks

This is a story about how I built my new computer, and the dozens of headaches it gave me. This is a long story, and I ramble a lot. There are some pretty pictures, though.

It all started one day when I realized I had some extra cash in my bank account. I have a 1.4ghz P4 that I dual boot into Windows XP and Linux. Previously that computer was for my personal use only, and my daughter used an older P2 333mhz to play her Disney/Jumpstart games, and play Shockwave games on Nick Jr.

After I got comfortable with Linux, I decided to turn her computer into an Apache server (in fact, this document is being served from that computer now), and to let Stacey put her games on the faster computer with the bigger monitor. On the rare occasions we both want to geek out at the same time, I would update my web page on the old computer, and she would play her games on mine.

So I saw this extra money in my bank account, and it occured to me that I had never built a computer completely from scratch, run a computer without Windows on it somewhere (except for an Apple // and an old Mac), and never had a really good gaming computer. I decided to try to fix all three of these problems at once. After taking out some cash from the bank and checking hardware prices at my local computer stores, I headed down to Micro Center in search of some parts.

In a couple weeks I had collected a new case, motherboard, processor, ram chip, video card, and monitor. On hand I had a suitable spare hard drive, keyboard, mouse, CD burner, and speakers. The motherboard had built-in ethernet and sound, so I was all set. Total bill was ~$800 (detailed below), or about $900 if you count the costs of the hardware I had on hand.

The hardware setup was pretty painless.

Here is the case I purchased, a low-end mid-tower from Aopen, nothing fancy. The innards contained a bunch of power cables, a bag of screws, setup cheatsheet, and an Aopen sticker.

Here are the contents of the motherboard package, an Intel P4 D845PEBT2. We have the motherboard itself, a couple extra USB ports in case the 4 on the main board aren’t enough, a red ATA cable in case I want to set up a RAID array, an IDE cable and floppy drive cable, CD and floppy with Windows drivers and BIOS utilities (both still in their packaging today), several instruction guides, and an IO panel that matches the main board’s port configuration.

Before I started screwing things in, I checked the IO panel against the one already in the case. No dice, the default case panel would have to come out and be replaced by the one from the motherboard. It was a pretty good match until you got over to the speaker connectors and ethernet jack, neither of which should be considered standard motherboard IO ports. No big deal, the old panel popped out with minimal difficulty, and the replacement wedged in nicely with no need for connectors/glue/what have you.

The motherboard fit the case just-so. I needed two spacers from my bag of 8, and nothing appeared to be shorting the board anywhere, so shortly after this picture was taken, I set off to test the boards first POST. I popped in the CPU, a ram chip, and video card, connected the case’s power button cable to the motherboard, then connected a monitor cable and power cord and fired her up. Voi-la! POSTed right up, and died with a keyboard error. Since I didn’t have a keyboard plugged in, that’s exactly what I expected.

I had originally intended to have scores of pictures detailing each item I plugged in, what changed after a boot attempt, etc., but I realized that would slow me down quite a bit, so I instead took the “just plug everything in” approach. Here is the functional system, drives in place, everything cabled, CPU and video card in place, and ready to go. At this point all the hardware on the system was connected and usable.

So there I was, pleased with myself for not having fried anything, and ready to try booting into Linux. I had originally installed Linux on my old machine’s second hard drive (hdb), and installed LILO to the master boot record (MBR) of the first hard drive (hda). So I created a two-fold problem for myself because I assumed I would always have those two drives on the same computer.

“What’s the problem?” It’s in the boot sequence. The computer boots the MBR of hda and finds LILO. LILO needs a Linux partition to store the boot menu, in this case that was on partition 1 of hdb (or hdb1). So the computer boots the MBR, finds LILO, finds that the boot menu is on hdb1, and then prompts to boot hda1 for Windows XP or hdb1 for Linux. Because of this, separating the hard drives breaks both machines.

The Windows machine can’t boot because there is no boot menu, because there is no hdb1. LILO chokes. The Linux machine has problems because its hard drive doesn’t have an MBR installed at all, and if I get past that, everything in Linux’s drive mapping table (/etc/fstab, /etc/mtab) points to hdb, but the hard drive would now be hda.

Fixing Windows would be easy if I had a Windows XP CD. I didn’t. Micro Center likes to give you a “rescue CD” instead, that has a crippled Windows install on it, and a few utilities… but not the “Recovery Console” that has the FIXMBR utility. Also, my XP install had an NTFS partition, so I couldn’t run fdisk /mbr. In leiu of shaking my fist at the poor Micro Center clerks, I opted to plug in the Windows computer’s floppy drive (just hadn’t needed it up till that point), create a boot disk and copy Win95′s fdisk utility onto it. I booted to the boot disk, ran fdisk /mbr, and successfully wiped out LILO from the MBR. The Windows computer was then taken care of.

Fixing Linux wasn’t too bad, either. I found my original install media for Linux (a “netinst” CD I burned for Debian a ways back), used the rescue boot option to mount hda1 as root, edited the fstab and mtab files, and then rebooted Linux… and all was well.

That would have been the end of it, but my ethernet, sound and video hardware had suddenly changed, and now the Kernel would need new modules compiled for the new hardware, and Xfree86 would need to be reconfigured. A couple hours with that and I had a working system that I could play Quake on…

I only had two minor problems left to conquer, no ethernet, and no sound. If all I wanted to do was play muted Quake, I’d be set. Being who I am, though, I thought listening to a .wav file or two and maybe even checking my email periodically would be just the thing, so off I went to fix the remaining problems.

This is worth a little sidebar. If I installed Win2K or XP on the new machine, everything would have been auto-detected. So why would I want to give myself an aneurysm with Linux? Why indeed. Some of you may not remember the dream of an OS that was Windows 3.1…

Video drivers that were provided by the hardware manufacturer would crash mysteriously. Most users eventually gave up on SuperVGA and settled for 640×480, 8bit video. There was no plug and play, so all your ISA cards (no PCI back then, bub) had to be jumpered to use a free IRQ. There was no reliable list of what device used what IRQ, you just had to know your system. The default settings for Windows had COM1 and COM3 to both use IRQ4, and for COM2 and COM4 to both use IRQ3. So to use an internal modem, you had to jumper the device to a non-standard configuration, making sure to not use an address or IRQ already in use, and then change the port settings in Windows to match.

And God forbid you wanted to connect to the Internet. There was no broadband access back then to anyone but universities and major ISPs (of which there were about 3). If you managed to get your modem working, you needed to download a copy of Trumpet Winsock from a local BBS (or *gasp* BUY it at a computer store), learn its scripting language, learn how to get a PPP connection on your ISP using Terminal, write a script, and then if you were lucky you could establish an Internet connection. Oh, right, you needed to know your modem’s AT command set. Back then different manufacturers were competing for market share with AT commands that didn’t even come close to matching. You had to understand why Xon/Xoff, long revered, had gone the way of the 8-track and Beta-max, replaced by the more popular RTS/CTS. You had to balance reliability with speed with your average phone line quality to choose what error correction method and what port speed and modem speed to start with. And then you had to copy Trumpet’s winsock.dll into the directory of all the Internet applications you wanted to use….

Let me make this point again: This was all with the express help of the hardware manufacturer specifically making drivers for Windows. Linux, on the other hand, has very little help from hardware manufacturers. Driver writers do a lot of reverse engineering, a lot of talking to each other, and a lot of petitioning hardware manufacturers to assist them.

In a few years, no one will be having the hardware problems I am with Linux, just as hardly anyone would face hurdles like these with a modern Windows system. However, it is no harder to do what I’m doing now than it was for an average computer user to configure a Windows system back in the mid-90s. Best of all, I’m not paying anyone a license fee for the headache I have now: I got this headache free of charge. When the Linux desktop catches up to the ease of installation of the Windows desktop, Windows will still be trying to catch up to Linux on the security and stability fronts.

Ahem..Off of the soap box, let’s see, where was I… Fixing the ethernet connection would be the key to getting everything else working, so I concentrated on that first. I was getting resource conflicts for some reason when my BIOS had the onboard sound and ethernet enabled at the same time (your mileage may vary). I stopped back by Micro Center and picked up a $15 NIC that mentioned “works with Linux” somewhere on it and popped it in. After disabling the onboard ethernet and enabling sound, dmesg showed everything was detected and no conflicts. W00t! Of course, that didn’t mean I could actually use any of them.

Getting the ethernet to work would require recompiling my Kernel with 8139too support. After that I could download ALSA, which had a driver for the AD1980 (what the Intel 845PE needs to get its onboard “SoundMAX Cadenza” sound working).

Damnit, I was almost there! I had trouble compiling ALSA, so I decided to do an “apt-get upgrade” to get any out-of-date libraries freshened. That worked, and after figuring which channels I needed to unmute in the alsamixer, I could play sounds. I could not, however, get Quake to work at over 30FPS.

If only I could have fixed ALSA another way, I’d be set now. Instead I’m still fighting with direct rendering (DRI/DRM). For awhile my frames per second (FPS) score on the test open GL app (glxgears, just shows some spinning gears) went through the roof, but didn’t actually display anything. I upgraded to the DRI trunk of Xfree86, now using DRI crashes X. After scouring the net for advice, I’ve found that I need to recompile my video card’s DRM module for the latest Xfree86 version. I’m heading home to do that in a few minutes, provided I don’t have any more fallout at work from the “SQL slammer” virus, another Microsoft security problem.

I think that should fix my one remaining problem and have me quaking with the best of them…provided I don’t break anything else in the process.

Post a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>