Eric Lee Green
Eric's Home Page

Menu:

Home
UP

Links
Contact Info
My Resume
My Public Key
EMAIL Eric

BadTux Portal[et]

Unix the Old Fashioned Way

As promised in my review of the disaster that is Red Hat 7.3 Linux, I have now converted my server to FreeBSD 4.6. This was made easier by the fact that I had reserved a 30gb partition for "alternative" operating systems when I installed my new 60gb hard drive. At the moment, this allows me to alternately boot FreeBSD or Linux. However, since this is my server, I am not bothering with Linux.

Installation

The first thing I had to do was convert all my Linux partitions from ReiserFS back to ext3. FreeBSD cannot read ReiserFS, so if I wanted to access my data after loading FreeBSD, I had to go back to the primitive ext3 filesystem. That will allow me to copy the contents of the ext3 filesystems to my FreeBSD partition, reformat them as FreeBSD filesystems, and move them back to their original location, now as FreeBSD filesystems. At the same time I backed up my hard drives (and discovered that all my data no longer fits on a single DDS4 DAT tape, sigh) in case something went disasterously wrong with my FreeBSD install. Nothing did, but a backup is always good to have.

Next thing I did was try downloading the FreeBSD ISO from one of the mirror sites. Bad move. All I got out of the ISO image was a bunch of register dump garbage scrolling rapidly down the screen when I tried to boot the kernel.

Okay, so then I assumed that maybe the ISO on the mirror was corrupted. Rather than download an ISO from another mirror, I downloaded the boot floppies to do an FTP install. Two boot floppies are necessary -- one has the kernel on it and some modules, the other has an install filesystem on it, from what I can tell. I booted up, and selected a mirror after going over to my laptop and doing some traceroutes and pings to find out which mirror was fastest. Soon I was happily in the FreeBSD installer, which looks much like the Slackware installer (not that the two share anything in common other than the fact that they're both text-oriented installers). Follow the directions, and voila. Soon I had a base FreeBSD system installed from scratch via FTP over the Internet courtesy of Cox Cable Internet.

The first problem I ran into was mouseconfig. moused refused to work with my wireless Logitech wheelie mouse. I had to downgrade to an old 3-button Logitech wired mouse in order to get my mouse to work.

The next problem I ran into was that "X" refused to configure. First, my video card did not show up on the list that FreeBSD presented to me. According to " pciconf -l -v" I have an "ATI Technologies Rage 3D IIC AGP (PQFP Package)" video card in my server. This has been supported by XFree86 since sometime when dinosaurs roamed the Earth. So I exited out of /stand/sysinstall and tried to configure by hand. I used the xf86config program then checked the results against the man page to make sure everything was right. Still no go. XFree86 barfed on a piece of syntax in the config file that the man page said should work.

Finally I updated my ports collection from the most current ports on the FreeBSD mirror sites. I uninstalled XFree86-Server using pkg_delete (pkg_delete complained that half the world depended on it, but deleted it fine), then went into ports and did a 'make install'. FreeBSD politely grabbed the very latest source from the XFree86 web site, and rebuilt it. Once this happened (after a *VERY* long time), my XFree86 worked fine (pkg_info reports "XFree86-Server-4.2.0_3" for the working version, as vs. "XFree86-Server-4.2.0_1,1" for the busted version). Apparently FreeBSD 4.6 shipped with a busted XFree86 server.

Finally, I recompiled my kernel to have Linux ext2 filesystem support (it doesn't by default, due to political issues -- the ext2 stuff is "license-tainted" according to FreeBSD purists). After doing some translation on my old /etc/fstab into FreeBSD format, I was then able to access my old Linux partitions (I suggest mounting them as "read-only" though). I also compiled in the pcm0 driver for my Ensoniq sound card. When I rebooted and used 'startx' to go into KDE, it was detected immediately and KDE played its little startup tune just fine.

Operation

User Administration

FreeBSD's main user configuration tool is /stand/sysinstall . Do not try to edit /etc/passwd or /etc/group by hand, go through /stand/sysinstall, because FreeBSD uses db databases to generate those. Similarly, do not edit /etc/passwd to change your shell. Use 'chsh', which will update the db files.

Standard Configuration

To configure standard stuff (e.g. to get the lpd daemon going), edit /etc/rc.conf with /bin/vi, using /etc/defaults/rc.conf as the template. This is also where you change the host name, gateway, or IP address as required.

To add third-party things to startup, plunk a script into /usr/local/etc/rc.d with a "foo.sh" name (substitute name of program for 'foo'). It will get executed on next bootup as "foo.sh start". Usually 3rd party software installed via the 'ports' or 'package' system will put a "foo.sh.sample" file into that directory, which you need to rename to "foo.sh" in order for it to run.

Note that FreeBSD does not have the concept of "runlevels" like Linux, though if you boot into "single user mode" you can get a temporary shell where you can make fixes and modifications (exiting that temporary shell resumes the normal boot process). When I got my kdm config messed up, that allowed me to remove kdm from my startup process and get things going again.

Installing Software

FreeBSD has a pre-packaged software system via /stand/sysinstall that will FTP-install a large selection of packages, downloading and installing any dependencies at the same time. If you recall, I had some problems with upgrading to Red Hat 7.3 because of dependency problems. /stand/sysinstall handles all of that, downloading any software that a particular package depends upon. So when I installed KDE, for example, /stand/sysinstall went ahead and downloaded and installed everything that KDE depends upon.

Besides the pre-packaged software system, FreeBSD also has its 'ports' system. I referred to this earlier when I talked about how I upgraded my XFree86. Generally the pre-packaged software is 'frozen' at a particular point in time, and may contain old, outdated, or buggy software. If so, the easy way to solve that problem is to update your 'ports' collection (a set of descriptions of what the current version of various software is, where to get its source, and how to compile its source into a FreeBSD package), and type 'make install' in that particular port's directory. The 'ports' system, as with /stand/sysinstall, will automatically compile and install any software that the current software requires for proper operation. For example, when I compiled 'xmms' (there was no pre-packaged 'xmms' in the /stand/sysinstall collection), the 'ports' system also went and fetched the appropriate version of gtk+ and other software that xmms relied upon.

Updating the OS

The "cvsup" system is used to patch the source code and ports collection with the latest bug fixes. I found some example supfiles on the system and modified them to work for me, using the list of cvsup servers in the online FreeBSD handbook. Once everything is patched, a simple procedure in the FreeBSD handbook will recompile the system and re-install everything. This all worked, but I'll point out that "make world" took over 6 hours to run on my 450mhz Celeron system (Celeron 300A overclocked to 450mhz, i.e., a pretty swift little guy for its era).

Performance

FreeBSD is well known to have a better virtual memory system and disk scheduler than Linux, and that proved true in actual use. Applications that had Red Hat 7.3 Linux thrashing to death did not make FreeBSD flinch. With Linux, starting up two memory, CPU, or disk hog processes makes the whole system slow to a crawl as it starts thrashing wildly. With FreeBSD, the system remained quite usable and responsive even with two 'makes' going on in the background and a 'periodic weekly' going on in the foreground (which was thrashing the disk with a 'find' to update the 'update' and 'whatis' databases).

Real Life Use

I have installed Samba and my Windows box now sees it. I've installed the apsfilter system and my printers now work. I've installed the "minimalist" mailing list manager as a simpler alternative for hoary old "majordomo" (which was on my Linux box running my mailing lists, which never really worked that well), and so far so good. I've set up my /etc/exports so that I can access my files from the rest of the network, and my /etc/hosts.lpd so I can print from the rest of the network.

The biggest lack is Java. This points out again why Java sucks: because for all intents and purposes, it is a proprietary Sun product rather than something compatible with the Open Source ideals. Lack of Java also means that I cannot run many things that rely on Sun's Java, such as the Tomcat web applications server. I investigated getting Sun's Java. It apparently requires agreeing to a source code license from Sun. For legal reasons that I cannot go into here, I cannot do that.

In addition, the mouse driver issue remains. moused still refuses to see my cordless mouse. So here I have this expensive cordless wheelie mouse, and am stuck using a $8 three-button special purchased years ago.

Conclusions

I had gone into this with the hope that FreeBSD could serve as a substitute for Linux not only on my home network, but also in my professional life. Unfortunately, Java/JSP is a requirement for many new web applications. Customers are increasingly turning to Java (or worse yet, ASP) to avoid the morass that Perl or PHP programs tend to turn into over time. For legal reasons, Java is very difficult to install on FreeBSD, and may in fact be legally impossible in some embedded applications cases due to licensing issues which I have vaguely alluded to in previous paragraphs. So FreeBSD is not going to replace Linux anytime soon as a web hosting server.

I encountered a number of challenges installing and configuring FreeBSD. These challenges pretty much relegate FreeBSD to the "knowledgable user" arena. You aren't going to see relative novices installing FreeBSD anytime soon.

The flipside is that all challenges were easily resolvable with FreeBSD. FreeBSD is reasonably transparent, and unlike Red Hat 7.3 Linux and its 'rpm' system, FreeBSD does not get in your way. For example, I *NEVER* got X working on Red Hat 7.3... the upgrade broke my X installation, and I could never get it working again. With FreeBSD, it was a simple matter of updating my "X" server and running the configuration program again.

Basic conclusion: On a scale of 1 to 10, a 7. The functionality is there. Performance is there. Drivers, third party software (esp. Java), and ease of administration by relative novices remain issues. Unfortunately, FreeBSD is not going to be replacing Linux in my shop anytime soon, though it will retain its place on my home server, where its bullet-proof nature and good performance attributes are both appreciated.


Note that everything on this page is Copyright 1997-2003 Eric Lee Green and represents my own opinions and nobody else's. Reproduction without permission strictly prohibited.

Created with PHP 4. Last modified Fri, 06 Dec 2002 10:27:39 -0500.