PreviousINDEXNext
Installing FreeBSDFreeBSD - Post Installation Tweaks

Installing FreeBSD on a Laptop

I'd acquired a Compaq Armada 7400 laptop, and I decided to see how FreeBSD would install on such hardware. This machine had been christened maroon, and its makeup was as follows:

By this time, FreeBSD 4.7 was available. Rather than loading software from the Internet at boot time, I download the main FreeBSD 4.7 iso and created a CD to perform the installation. maroon was modern enough to support bootable CD's, so I didn't need to mess about with floppies.

My experiences with FreeBSD on crimson meant that my installation experience was relatively easy. The first slight difference I encountered was how PCMCIA cards are supported under FreeBSD. In order to get the LAN card recognised, the line pccard_enable="YES" must be added to the /etc/rc.conf file. Otherwise, the PCMCIA cards are not probed.

The second problem was altogether more frustrating, compounded by the false assumptions I made during tackling the problem. Having read the bit of the FreeBSD manual on getting sound working, it seemed relatively straightforward: adding the lines:

device pcm
device sbc

to the kernel configuration file and recompiling the kernel. Reconfiguring and recompiling the kernel is easy; first cd to the config directory (/usr/src/sys/i386/conf), copy the GENERIC configuration file to a machine specific file (MAROON in my case), editing the new config file, and then running the following commands:

/usr/sbin/config MAROON
cd ../../compile/MAROON
make depend
make
make install

Well, it may have been simple, but it didn't work. No sound. After a bit more reading, it seemed I needed the OPTION PNPBIOS, since the sound chip was on the motherboard. Success, the sound worked... but a few minutes later the machine hung. This was repeatable. After a bit of experimentation, I began to suspect the USB, because of a message that appeared shortly before the hang: usb0: unrecoverable error: controller halted. A wild goose chase resulted.

First, I tried removing all the USB support from the kernel. It wouldn't even boot. I hastily got to grips with using the boot loader commands to boot the backup kernel. Re-installed the minimum USB support, but the hang still happened, whether or not the usb daemon was started. Then I discovered that the if the machine was not plugged into the network, the hang did not occur; so it was nothing to do with usb.

So, now the position was as follows: with OPTIONS PNPBIOS I could have sound but no network. Without OPTIONS PNPBIOS I could have network connectivity but no sound. I noticed that the ep driver for the 3Com ethernet card had a different I/O port assigned when PNPBIOS was turned on. I tried telling it to use the original I/O port, but it made no difference.

More research on the Internet. It seemed that PNP caused lots of problems; all the recommendations were to turn it off via a BIOS switch. However, I could not get into the BIOS on the Armada; the F10 function key was ignored. I tried downloading a diagnostic from Compaq, but that only allowed one to look at the BIOS, not change anything.

I tried leaving the sound devices out of the config with PNPBIOS defined, and loading them as a kernel module after boot (via kldload). Made not the slightest difference.

Finally, I tried deleting all the things from the kernel configuration that I know I didn't use; SCSI, RAID and other ethernet devices. At the same time, I put back in the sound device configuration. On booting this kernel I noticed that the ethernet card was using the original (non-PNPBIOS) I/O port. Hmmm, something must have changed. However, now the soundcard wasn't being found - what was going on?

I then removed the PNPBIOS option from the kernel configuration, and added extra parameters to the device sbc line; parameters than should be used for a non-PNP device, like so:

device sbc0 at isa? port 0x220 irq 5 drq 1 flags 0x15

As if by magic, this kernel gave me sound and network capability! Here is the complete FreeBSD configuration file.

I'm still not sure what happened here. Did the Compaq diagnostics somehow reset something? Or should I have never used PNPBIOS in the first place, but tried the additional sbc settings for non-PNP devices? I may never know...

P.S.

Upgraded crimson to FreeBSD 4.7; seems just fine. For reference, here's the crimson kernel configuration file

PreviousINDEXNext
Installing FreeBSDFreeBSD - Post Installation Tweaks