|
The return of BSDWhat are the BSD flavors and why might you use them?
|
The spotlight is on Linux these days, but what about the other freely available operating systems? In this overview of BSD variants, Greg Lehey runs down the history of the different BSD projects, describes their characteristics, and considers why you might run BSD on your Sun machine or even choose BSD over Linux. (3,000 words)
Mail this article to a friend |
t's been a long while, but finally people are coming to accept Solaris, the System V-based operating system that replaced SunOS 4. Still, six years is a long time, and it would have taken much longer if Sun had continued to maintain SunOS 4. Why such loyalty? They are, after all, both versions of Unix.
The last thing I want to do here is revive the SunOS vs. Solaris debate, but I will draw attention to the biggest single difference between SunOS 4 and SunOS 5, the operating system component of today's Solaris: SunOS 4 is based on 4.2 BSD, the version of Unix developed at the University of California at Berkeley and the first operating system with support for TCP/IP. By contrast, SunOS 5 (commonly called Solaris, though that's not quite accurate) is based on AT&T's Unix System V.4. BSD is different enough from System V that six years after the "death" of SunOS 4, it still has a large number of supporters. It's just a pity it doesn't run on modern hardware.
While SunOS 4 doesn't run on modern hardware, other BSD versions do. What's more, they're free. Recent publicity for Linux has tended to obscure the fact that other free operating systems are available. As far back as 1991, before the Linux effort got underway, people at Berkeley were working to release a free version of 4.3 BSD on the Intel platform. In addition, Berkeley Software Design Inc. (BSDI) was working on a commercial version. These efforts were significantly hampered when Unix System Laboratories (USL) filed a lawsuit against BSDI, alleging abuse of AT&T source code.
The lawsuit was resolved in 1994. Only one condition of the settlement was revealed: BSDI pledged to move its codebase to 4.4 BSD Lite, the last version of the BSD line, released just before Berkeley's Computer Sciences Research Group closed down. This version, AT&T agreed, contained none of its code. As such, the free BSD projects also moved to the 4.4 BSD-Lite base.
A modern BSD
One of the main reasons people stopped using SunOS 4 is because it's
out of date. In particular, it doesn't support modern hardware.
What about the derivatives of 4.4 BSD? Each has its own focus:
BSD/OS
BSD/OS is BSDI's product. It currently runs only on Intel, although
attempts have been made to port it to the SPARC architecture. It
would appear that BSDI has decided that the SPARC port isn't
worthwhile -- more on that later. As the only commercially sold BSD
variant, it offers superior vendor support.
FreeBSD
FreeBSD is currently the most widespread of the BSD variants. More
than the others, it aims for ease of installation and ease of use
for end users. It was originally targeted solely at Intel platforms, but
a port for the Compaq/DEC Alpha architecture was recently
released. Other projects include a port to UltraSPARC, which hasn't
yet made significant headway.
NetBSD
NetBSD takes a different approach: from the beginning, it was intended
to support as many hardware platforms as possible. At the time of this
writing, it supports just about any platform you can think of,
including just about all Sun hardware since the Sun 3, though some
support is limited. For example, at the time of this writing the
UltraSPARC port doesn't support PCI-based motherboards or multiple
processors, though it's likely that support for this hardware will
be added in the near future.
OpenBSD
OpenBSD diverged from NetBSD in 1995. Here, more emphasis is placed on
security aspects than in the other projects. Like NetBSD, it supports
a large number of platforms, though not as many as NetBSD. For
example, there is currently no UltraSPARC support.
Why so many?
Looking at this list of operating systems, you may wonder why
there are so many similar operating systems. Isn't one enough?
Historically, each project was founded after differences of opinion about what constituted a good operating system. Since the software is free, any group of people can decide to custom build their own operating system. If it doesn't work, they can just stop building. In fact, all current BSD varieties, including BSDI, stem from Bill Jolitz's 386 BSD project, which faded into oblivion in 1994.
On the face of it, this doesn't seem to be a good approach: why not bite the bullet and compromise? In practice, the system shows remarkable self-regulating tendencies: 386 BSD is the only project that has closed up shop, and its descendents are all doing well and actively cross-pollinating. The fact that each version has a different kernel means survival of the fittest applies to kernel code as well, whereas in Linux it applies only to user code. For example, the fledgling FreeBSD SPARC port didn't start from scratch: it started from the NetBSD implementation and immediately raised the question, What can we do better? This process automatically raises the standard necessary for success. As a result, many such attempts fail, but the ones that don't create world-class code.
When choosing a BSD version, you should first consider the platform. In many cases, the platform will determine the choice of operating system. On platforms like the PC, which all BSDs support, the choice may be more difficult, but there isn't really a wrong choice.
What do they taste like?
The biggest difference between the BSDs has nothing to do with the
system, but the way in which you use it. Nowadays all workstations
use some form of graphical user interface (GUI). All the BSDs include
XFree86, the implementation of X11 that is also supplied with
Linux. On the one hand, this interface has a strong unifying
effect: it's difficult to tell by looking at the screen whether the
system is running one of the BSDs, Linux, or even Solaris. On the
other hand, the extensive choice of PC hardware makes it relatively
difficult to set up X reliably, and it can be worthwhile to spend
some time choosing the display hardware for XFree86.
In addition to the choice of hardware, XFree86 offers a bewildering choice of software, in particular display and desktop managers, which makes guessing the underlying platform from the appearance of the screen even more difficult. For further information on window managers, see the Open Directory Project. You can even make it look like OpenWindows with the OpenLook Window Manager.
In many cases, though, you won't want to use a GUI. BSD systems are a particularly good choice for name servers, Web servers, mail servers, news servers -- you name it. This kind of system doesn't require a graphical interface. In fact, it may not even require a display.
What do you get?
All free BSDs are available on CD-ROM, including complete source code
and utilities. Many of the utilities are based on the same GNU
tools that Linux uses, though a number are also based on older BSD
utilities. All include complete software development tools, which
again center around the GNU tools. As mentioned, they also include
the XFree86 implementation of X11, and most platforms will execute
Linux and SCO executables.
In addition, the BSDs come with a large amount of third-party software. We'll look at that below.
|
|
|
|
What's it good for?
At first, it would seem that BSD/OS and FreeBSD aren't as
interesting as NetBSD and OpenBSD because they don't run on SPARC
hardware. In fact, the ability to run on SPARC hardware may be a
little overrated. This is probably why BSDI decided to discontinue
its SPARC port. There is already one well-maintained operating
system for SPARC, Solaris, on which Sun has bet the farm.
Although NetBSD and OpenBSD do some things much better than Solaris,
it's difficult to compete across the board, and the current state of
UltraSPARC support shows a few weaknesses. In particular, PCI
support is still under development, and the implementation still
doesn't support multiple processors.
In fact, much of the interest of the BSD flavors comes from the low price of PC hardware. If you want to build, say, a large FTP server, you have approximately four choices:
wcarchive isn't the only success story for BSD. Another
prominent user is Yahoo!, which uses FreeBSD for nearly everything.
In addition, at least two of the Internet root name servers run BSD, and most
ISPs use BSD for at least some functions.
In addition to these high-profile applications, NetBSD and OpenBSD
are good choices for older Sun hardware, including early SPARC
hardware on which Solaris 2 and 7 are too heavy, and Sun 3 systems.
The level of support is variable: both NetBSD and OpenBSD contain
code for Sun 3, but OpenBSD states that the code isn't actively
maintained. Both systems actively support Sun 4, Sun 4c, and Sun 4m
systems.
Why run BSD on a Sun machine? In many cases, the old hardware is
more than adequate for a number of functions; you could easily
use an old Sun 3 or SPARCstation I as a mail server or a name server.
It's also possible to do this with SunOS, but the age of the kernel
shows in some aspects of the network stack, and you would have to
port all the modern versions of the network clients, which could easily take a
multiple of the time it takes to install one of the BSDs with its
up-to-date software clients. Ironically, this rejuvenation is
most impressive with old PC hardware. Often enough, an old 386
that didn't have enough power to run a single Microsoft desktop
suddenly comes back to life as an Internet gateway, mail server,
name server and Web server combined.
Ported software
OK, you'll say, that's easy enough when you have the source
installed on your machine. It's not until you discover that the
directory hierarchy /usr/ports/net/xarchie contains only six files --
the largest of them 691 bytes long -- that you realize something truly
sophisticated must be going on here.
The FreeBSD Ports Collection currently contains nearly 2,000 ported
software products. In each case, it doesn't contain the software
itself, just a description of how to obtain the software, how to
build it, and how to install it. This gives BSD users easy access
to the largest quantity of installable software available for any
platform, all at the cost of two commands and a slight delay as
the software is loaded from the Internet.
It's easy to underestimate the advantages of this system. Which
version of Sendmail are you running? Chances are it's the version
supplied with your system, maybe version 8.8.8 if you upgraded your
system recently. The current version, 8.9.1, contains a number of
improvements designed to stop mail abuse, in particular by stopping
illegal relaying and blocking specific domains. But porting
Sendmail has always been a pain, even on the BSD platforms for which
it was designed. Use the Ports Collection, on the other hand, and
there's nothing to it.
How about named? A few months back, CERT released an advisory
showing that named, the name daemon, was susceptible to
various vulnerabilities that affected most Unix systems. By the
time the advisory came out, the BSD projects had already produced
fixes that addressed the problems; Sun had announced future patches
to specific operating system releases only.
Why BSD and not Linux?
There's not really a good answer to that question. Linux is
suitable for many of the same functions for which the BSD varieties are
suitable. Some people claim BSD is more stable than Linux --
that it's more suited towards server applications, whereas Linux is
more suited to the desktop. FreeBSD employs the slogan
The Power To Serve.
Others point to BSD's genuine Unix ancestry, claiming this makes
it automatically more mature than Johnny-come-lately Linux. Or they
point out that the BSD developers include well-known names from the
CSRG in Berkeley, thus implying that the codebase must be better.
But that's only part of the story, and it's on shaky foundations.
The truth is, Linux is a good operating system as well. Like other
operating systems, it has its weaknesses and its strengths. Some
make the argument that Linux's weaknesses include its virtual memory
system, which they claim is a strength of FreeBSD and NetBSD, but no conclusive
performance comparisons have been made.
One difference between the BSDs and Linux is standpoint.
Linux started as a grassroots development, just like the BSDs, but
in the last year or two it has become increasingly
commercial. One of the reasons you hear so much about Linux is
because people are making money selling it. The BSDs are less
focused on commercial sales.
So why BSD? Well, for one thing, it comes from the same codebase that's running
on your Solaris machines, so it's likely to feel more familiar.
And, while there's no hard evidence that BSD is more reliable or
performs better than Linux, there are surprisingly few claims to the
contrary from the Linux camp.
Getting BSD
What about support?
Traditionally, free operating systems have been tech-supported via mailing lists in which volunteers answer questions, usually correctly. The problem here is with the word usually. How can you tell if the advice you're given is correct? The alternative is to enlist the aid of commercial support organizations, reachable via the Web sites of the individual projects.
That's a wrap; now go check out the BSDs for yourselves!
Resources
About the author
If you have technical problems with this magazine, contact
webmaster@sunworld.com
URL: http://www.sunworld.com/swol-01-1999/swol-01-bsd.html
Did I say porting? Porting has been a way of life for Unix system
administrators for decades, but in the past it was never easy. The
FreeBSD Ports Collection (see Resources),
which has been adopted by OpenBSD, changes all that. Want to install, say, xarchie, on your system? It's simple:
# cd /usr/ports/net/xarchie
# make install
Linux is much more well known than BSD. Assuming you're going to
install a free Unix, why not go with the tide and use Linux?
FreeBSD, NetBSD, and OpenBSD are freely redistributable, and you can
download them via the Internet. This may not be the best
alternative, though, because the distributions are large, and
network problems can make this form of installation less than
straightforward. All three operating systems are available on
CD-ROM, and the FreeBSD distribution is available with a book The Complete
FreeBSD, which covers all aspects of installation and
system administration by which FreeBSD differs from other Unix
variants.
The big argument against using free operating systems in commercial environments
is support. Who do you call if something goes wrong? In this respect, the free
BSDs don't differ greatly from Linux. Some commercial support is
available, and more is becoming available. One difference, though, is that
there is also a commercial BSD: BSD/OS comes with support options comparable to those of other Unix flavors.
http://www.bsdi.com
http://www.bsdi.com
http://www.FreeBSD.org
http://www.NetBSD.org
http://www.OpenBSD.org
http://www.xfree86.org/
http://directory.mozilla.org/Computers/Software/X_Windows/Window_Managers/
http://www.plig.org/xwinman/screenshots/olwm.gif
http://www.microsoft.com/misc/backstage/solutions.htm
ftp://ftp.cdrom.com/archive-info/wcarchive.txt
http://www.freebsd.org/handbook/ports.html
http://www.cert.org/advisories/CA-98.05.bind_problems.html
http://www.cert.org/advisories/CA-98.05.bind_problems.html
The Complete FreeBSD http://www.cdrom.com/titles/os/bsdbook2.htm
ftp://ftp.FreeBSD.org/pub/FreeBSD
http://www.cdrom.com/titles/os/bsdthree.htm
http://www.freebsd.org/commercial/consulting.html
http://www.netbsd.org/Sites/net.html
http://www.netbsd.org/Sites/cdroms.html
http://www.openbsd.org/ftp.html
http://www.openbsd.org/orders.html
http://www.openbsd.org/support.html
http://www.sunworld.com/swol-12-1998/swol-12-support.html
http://www.linuxworld.com/linuxworld/lw-1998-12/lw-12-freebsd.html
Greg Lehey is an independent computer consultant and author specializing in BSD Unix. Based in Adelaide, Australia, he is the author of Porting Unix Software (O'Reilly and Associates, 1995), Installing and Running FreeBSD (Walnut Creek, 1996), and The Complete FreeBSD (Walnut Creek, 1997 and 1998).
Reach Greg at greg.lehey@sunworld.com.
Last modified: