From Linux to FreeBSD: A FreeBSD Review

We’ve all heard the age old argument second only to the vi vs. emacs religious wars: FreeBSD Vs Linux. As a long time linux user, I decided that is was time I spent some time on the other side of the fence to see if it was any greener. Oh, and by the way, vi rules.Background

My first experience with Linux was about 7 years ago. I decided to try Linux after a failed attempt to install SCO Unix (eek… really dodged a bullet there). I started with Slackware and over the years I migrated through various other distributions before finally settling down with Gentoo. I have been using Linux as my main OS for about 2 or 3 years. With my background, I felt reasonably confident that I could adapt well to a different unix like operating system. I prefer the BSD license to the GPL, so I saw some potential philosophical advantage in using BSD. For my evaluation, I chose FreeBSD because after a cursory glance, it appeared to have the best hardware support and appeared to be the most popular.

Hardware

The machine I used was my “second in command” machine. It was retired from active duty almost a year ago, so it is rather old, but hasn’t hit the stage of seeming painfully slow. Here are the specs:

1Ghz Athlon Thunderbird
FIC AZ11 motherboard with a messed up secondary IDE controller
(it works if I hit reset after powering on)
640Mb PC133 SDRAM
Generic 64Mb Geforce 2 MX400 (with rather blurry 2d graphics)
Sound Blaster Live
Creative 5x dvdrom with dxr2
Mitsumi 4x4x24 CDRW
Tulip based Linksys ethernet card

At this time, I would like to advise all of you girls and boys thinking about building your own system to BUY NAMEBRAND PARTS. You might save a few dollars, but there really is a difference in quality.

Installation

I grabbed the ISOs for FreeBSD 4.8 because it was the most recent stable revision at the time I started. I won’t bore you with all of the gory detail of the install. It uses a curses based installation program which should be reasonably comfortable to anybody who has installed Slackware. I made a few mistakes and had to restart a couple of times since you can’t always easily back up in the process. Once I finally got the process down, I had a working console system within an hour (I chose to delay installing X until later).

Configuration

Most of the hardware worked without any intervention on my part. The sound card required building a custom kernel, but the kernel building process is well documented and rather painless (roughly on par with building the kernel in linux). Instead of using something like “make menuconfig” under Linux, you edit a moderately sized config file and use it to generate the build parameters. I just had to add the line “device pcm” to the config file, build a new kernel and reboot. BAM! The sound was working. No need to muck with modules or setup aliases or any of that other junk that I frequently forget. I then used ports to install X and also to install the nvidia driver. I noticed some problems with KDE applications dumping core on exit and discovered that it was a problem related to the stock 4.8 kernel and the nvidia drivers. After a few minutes of searching on bsdforums.org, I discovered that there was a kernel patch to fix the problems. The patching process and rebuild of the kernel went off without a hitch.

Ports and Packages

My main interest in investigating BSD was the ports system. As a Gentoo Linux user, I have often heard portage compared to ports. After observing a number of similarities in file layout of ports and portage, I have no doubt that portage was inspired by ports. To install a port, you find the corresponding directory under /usr/ports and enter “make install”. I found this to be a bit of hassle compared to portage largely due to having to find the appropriate directory which is not always found in what I would consider a logical location (for instance the nvidia driver is in /usr/ports/x11/nvidia_driver). I later found out that I could use the command “whereis” to locate the correct directory. This is very useful since it finds the location much quicker than running “find” from /usr/ports. For the most part, the ports I installed worked quite well and correctly handled dependencies. There were some minor annoyances such as the openoffice port prompting for user interaction partway through the build process. I was not pleased to get up in the morning and discover that the build was not completed. One advantage of using a port compared to an ebuild is that it you need to kill the build partway through, you can later resume where you left off (there may be a way to due this in portage, but if there is, it is not very obvious). After you have installed a port, you can use “make deinstall” to remove it, however there is a bit of a snag. If you use “make clean” to avoid wasting disk space, “make deinstall” will not work. You must unistall the port as if the program was installed as a package. I found this annoying since I am only interested in installing from source and I did not want to waste my time learning about the package system (used for installing binary packages). Many ports have options that you can pass to the make command in order to enable options, but these have to be dealt with on a port by port basis and not set globally like portage’s USE flags. There is a method to globally change the CFLAGS used by ports, but I never bothered to learn it (I trust the defaults).

I noticed a number of things which made ports appear to be more release-oriented than the portage system. The first is that there is no way to upgrade the ports tree without installing an additional port after installation (namely cvsup). I installed cvsup and noticed that I had to modify a config file before I could use it. Example config files were included, but they needed minor alterations before they could be used (mostly just setting the server name). This isn’t necessarily bad, but the documentation is extremely thorough and not geared toward newbies. Once configured, it is relatively painless to upgrade the ports tree. Similarly, upgrading an installed port to a newer version is a bit clunky without installing another utility (namely portupgrade). It isn’t a big deal, it just leaves me with the impression that the developers expect some people to treat different releases as distinct entities much like many binary Linux distributions. Of course, it is still possible to do a continuous upgrade like I would with Gentoo. Release 4.9 was released in the middle of my evaluation period, and I successfully upgraded the system and kernel to the new version without reinstalling. Overall, the system seems to work well, in spite of some rough edges.

Conclusion

Overall, I found FreeBSD to be a very usable system, but not very newbie friendly. The documentation was generally good, but it could benefit from some additional documentation geared toward beginners. I had to adapt a bit to the command line utilities since some of the parameters are a bit different from the equivalent GNU versions. For instance, “find” requires that the directory be specified whereas with the GNU version, it can be omitted. I also discovered that under BSD, it is bad to edit /etc/passwd directly. I tried to change my shell by editing /etc/passwd, but it seemed to be ignoring it. However, if I used “vipw” as root, I could edit it without any problems. I suspect that the system examines some sort of cached copy of the data in /etc/passwd, so any changes not reflected in the cache are not seen. There is also a handy too “chsh” which will allow any user to change his own default shell. I was a bit disappointed with the ports system, however it is still quite useful. To be fair, I am not currently aware of any package management systems that actually satisfy me (*shameless plug* I am working on a new package management system, and when it is more developed I suspect many people will like it). I did not do extensive performance testing, but X seems more responsive under FreeBSD than it does under Linux, particularly when running CPU intensive tasks in the background. Overall, I would say that FreeBSD is not good for Joe (L)User, but it is definitely worth consideration by hard-core techies. My first few nights using it were rather painful, but within a week I was becoming reasonably comfortable. If you think you are up to it, I would recommend giving it a try, just don’t give up too quickly.

About the author
Gabe Yoder is a full-time software engineer and a geek’s geek. In spite of work, he enjoys programming and is one the OpenBeos development team. When not chained to the computer, he enjoys collecting swords and shooting people with paintballs.

80 Comments

  1. 2003-11-11 10:03 pm
  2. 2003-11-11 10:07 pm
  3. 2003-11-11 10:07 pm
  4. 2003-11-11 10:09 pm
  5. 2003-11-11 10:11 pm
  6. 2003-11-11 10:13 pm
  7. 2003-11-11 10:16 pm
  8. 2003-11-11 10:46 pm
  9. 2003-11-11 10:58 pm
  10. 2003-11-11 11:01 pm
  11. 2003-11-11 11:11 pm
  12. 2003-11-11 11:16 pm
  13. 2003-11-11 11:16 pm
  14. 2003-11-11 11:17 pm
  15. 2003-11-11 11:31 pm
  16. 2003-11-11 11:39 pm
  17. 2003-11-11 11:41 pm
  18. 2003-11-12 12:11 am
  19. 2003-11-12 12:18 am
  20. 2003-11-12 12:35 am
  21. 2003-11-12 12:40 am
  22. 2003-11-12 1:00 am
  23. 2003-11-12 1:12 am
  24. 2003-11-12 1:19 am
  25. 2003-11-12 1:27 am
  26. 2003-11-12 1:30 am
  27. 2003-11-12 1:34 am
  28. 2003-11-12 1:35 am
  29. 2003-11-12 2:18 am
  30. 2003-11-12 2:34 am
  31. 2003-11-12 2:45 am
  32. 2003-11-12 2:46 am
  33. 2003-11-12 2:48 am
  34. 2003-11-12 2:58 am
  35. 2003-11-12 3:20 am
  36. 2003-11-12 3:32 am
  37. 2003-11-12 3:33 am
  38. 2003-11-12 3:39 am
  39. 2003-11-12 3:41 am
  40. 2003-11-12 3:47 am
  41. 2003-11-12 3:52 am
  42. 2003-11-12 3:53 am
  43. 2003-11-12 3:59 am
  44. 2003-11-12 4:18 am
  45. 2003-11-12 4:41 am
  46. 2003-11-12 5:41 am
  47. 2003-11-12 6:10 am
  48. 2003-11-12 8:26 am
  49. 2003-11-12 8:52 am
  50. 2003-11-12 11:49 am
  51. 2003-11-12 12:41 pm
  52. 2003-11-12 2:09 pm
  53. 2003-11-12 3:03 pm
  54. 2003-11-12 4:51 pm
  55. 2003-11-12 5:12 pm
  56. 2003-11-12 6:44 pm
  57. 2003-11-12 6:53 pm
  58. 2003-11-12 7:23 pm
  59. 2003-11-12 7:32 pm
  60. 2003-11-12 7:32 pm
  61. 2003-11-12 7:32 pm
  62. 2003-11-12 7:57 pm
  63. 2003-11-12 8:41 pm
  64. 2003-11-12 9:18 pm
  65. 2003-11-12 9:39 pm
  66. 2003-11-13 2:24 am
  67. 2003-11-13 4:53 am
  68. 2003-11-13 6:32 am
  69. 2003-11-13 7:22 am
  70. 2003-11-13 10:59 am
  71. 2003-11-13 12:25 pm
  72. 2003-11-13 2:10 pm
  73. 2003-11-13 3:43 pm
  74. 2003-11-13 6:57 pm
  75. 2003-11-13 8:03 pm
  76. 2003-11-13 11:35 pm
  77. 2003-11-13 11:41 pm
  78. 2003-11-14 2:26 am
  79. 2003-11-14 2:43 am
  80. 2003-11-14 4:40 am