A BSD Blitzkrieg! - Open Source For You

Let's Try
Let's Try
A BSD Blitzkrieg!
With three major BSD releases in quick succession, it might be tough for you to choose
amongst the flavours of BSD—FreeBSD, OpenBSD and NetBSD. Here’s a roundup on the
new menu from the BSD kitchen, and some advice on which BSD is the one you should try.
he end of 2005 saw a blitzkrieg of BSD
releases. FreeBSD [www.freebsd.org],
OpenBSD [www.openbsd.org] and
NetBSD [www.netbsd.org] all made
their latest releases within a short
span of time. So what, you might ask. These new
releases of the BSD triumvirate give the FOSS
community much to try out—promising speed,
performance and security, in addition to great
support for the latest hardware. The time is
opportune, one would imagine, for all of us to sit
up and notice the BSD operating system now.
This article is not a BSD v/s Linux discussion. We
have already had enough of those and I personally
believe that the entire hullabaloo is pointless.
Whether it is Linux or BSD, the free software
movement is all about choice and the flexibility to
use what you like to and want to.
T
FreeBSD 6.0—the power to serve
FreeBSD is arguably the most popular BSD server
out there today, and some numbers put its
32
FEBRUARY 2006
|
LINUX FOR YOU
|
www.linuxforu.com
deployment at even 70 to 80 per cent of the BSD
market. FreeBSD supports a wide range of
architectures with versions for i386 (Pentium
etc), 64-bit machines, Alpha and UltraSPARC
architectures available. But the OS is found
lacking when it comes to supporting new
hardware. The latest version 6 tries to address
this problem to some extent, by supporting newer
hardware, wireless equipment, etc.
FreeBSD 6.0 takes an enterprise class
operating system a step further. The BSD today
sports features that are not available even in some
commercial operating systems. A noteworthy
feature is compatibility modules, wherein
programs written for Linux, SCO UNIX, etc can be
run on FreeBSD.
FreeBSD also comes with an SMP (symmetric
multiprocessing) enabled kernel for new desktops
(nothing new for Linux users, though). It can
also support up to twelve parallel processors
(which is the official tested number). The kernel
comes with built-in support for security features,
such as stateful IP firewalling, IP proxy gateways,
encryption mechanisms, Kerberos authentication
and access control lists (ACLs), among others.
The outstanding feature of FreeBSD has
always been the thousands of applications that
are available for the platform. Some of the
applications are available pre-compiled, forming
the excellent package collection. The majority of
the applications are part of the ports collection—
that vast repository of applications that can be
compiled and installed on any FreeBSD machine.
The ports cover nearly every conceivable
application. At last count, there were more than
13,000 true open source packages available, with
full source code, which could run on FreeBSD.
OpenBSD 3.8—free, functional and
secure
“Only one remote hole in the default install, in
Let's Try
more than 8 years!” This one line sums up all that
OpenBSD has stood for over the years. The official
mandate for OpenBSD is that it emphasises portability,
standardisation, correctness, proactive security and
integrated cryptography.
By “proactive security” OpenBSD strives for the full
disclosure of all security related issues and to provide bug
A great desktop variant of BSD, derived from
FreeBSD, is PC-BSD and was covered in the
October issue of LINUX For You. The issue
bundled a PC-BSD CD-ROM as well.
fixes within hours of their being discovered. The audit
process is a rigid one with an audit team constantly
searching for and fixing holes. Another facet of the
security audit is the proactive method of fixing bugs, even
if their exploitability is not proven. Exhaustive code
review is a way of life at OpenBSD.
One of the biggest advantages of OpenBSD is that it
ships integrated cryptography support (being based in
Canada, the OpenBSD project faces no major export
restrictions). All the cryptographic algorithms used in the
system are freely available without any patents or other
restrictions. Kerberos V authentication is included into
the base system, and the X window that ships with
OpenBSD has been extended to make use of Kerberos as
well. OpenSSH is part and parcel of OpenBSD, now; and
OpenBSD also supports some cryptography hardware such
as random number generators. OpenBSD was also the first
operating system to ship with an IPSec stack.
The best is yet to come—OpenBSD ships in a secure
mode by default. This ensures that you do not need to be a
security expert to benefit from installing OpenBSD. Also,
since all non-essential services are disabled by default, you
can extend your server, as you learn and move on.
If ever you feel a need to secure your network, look no
further than OpenBSD.
NetBSD 2.1—of course it runs NetBSD
The choice of the name NetBSD can be traced back to its
roots in BSD and the fact that its evolution has been
primarily through developers cooperating on the Internet.
The word ‘Net’ in NetBSD is thus a tribute to the power
and the spirit of the Internet. One of the primary focuses
of the NetBSD project has been to make the base
operating system extremely portable. NetBSD is designed
to take advantage of the latest high-end hardware available
on the PowerPC and PC architectures, while still retaining
support for older architectures. This has resulted in
NetBSD being ported to a large number of hardware
platforms, and it can today run on handhelds like the
palmtops, right up to 64-bit Opteron machines and large
servers. NetBSD is thus an ideal code base to port to new
machines and embedded platforms, since all platforms use
the same source tree. At last count, it was found that
APPLICATIONS OF FREEBSD
FreeBSD rocks in the following roles:
Internet server—FreeBSD can run WWW, FTP, e-mail,
Usenet and other services exceptionally well.
Network server—The OS acts as an excellent network
server thanks to tools like secure firewalls, a PC/NFS
server, a proxy gateway, etc, which come bundled
with it.
Software development—FreeBSD is an excellent
development platform and comes with all conceivable
tools for building software. FreeBSD is truly the
developer’s dream OS.
Desktop—An excellent desktop OS, FreeBSD
includes the X window workstation, and great tools
like Openoffice.org and Mozilla Firefox.
WHICH BSD SHOULD I CHOOSE?
FreeBSD was originally targeted at getting the best
possible performance on x86 platforms (although more
recently a lot more architectures are supported). Its
primary goal is to be as robust and efficient as possible,
on its various platforms—both for server and desktop
roles.
NetBSD aims at supporting as many platforms as
possible. Its goal is to be the most portable OS on the
planet, and it seems to be getting there as it runs on
hardware ranging from handhelds to large servers. It is a
particularly good choice to run on old non-Intel hardware.
OpenBSD is focused primarily (you could also say
solely) on security, code purity and related virtues like
tight integration of security, auditability and cryptography.
In short, those at OpenBSD are paranoid about security
and this has made it the OS of choice for many US
government organisations, banks, stock exchanges, etc.
PC-BSD and Desktop BSD are targeted at getting
BSD on the home desktop system. So, if you want a
BSD-based desktop that is easy to use, you could choose
one of these. They attempt to give users the Linux-like
feel on the desktop, using a BSD base.
It is not that one BSD is better than the other. It’s just
that they all target various end users. Choose your flavour
based on the end use. The information here should serve
only as a guide. Do go through the excellent detailed
documentation that is provided by each of these projects
on their websites.
NetBSD supports an astounding 55 architectures.
Another outstanding feature of NetBSD is its focus on
clean design (not that the others are bad, but NetBSD is
specialised in this). The focus on well-designed solutions
is adhered to even at the cost of supporting some exciting,
new features later than other systems. This has ensured
that the NetBSD code base today is extremely mature and
easily manageable.
NetBSD also ships with advanced networking
technologies like Network Address Translation (NAT),
IPv6, Network File System (NFS) and wireless networking.
www.linuxforu.com
|
LINUX FOR YOU
|
FEBRUARY 2006
33
Let's Try
BSD AND LINUX—THE BATTLE
OF EQUALS
This discussion is irresistible. At the risk of triggering a
controversy, I am going out on a limb here to make a
quick contrast (not comparison) of Linux and BSD. Both
Linux and BSD are UNIX-like operating systems. They are
both developed by volunteers and exist mostly in noncommercial forms (though some Linux distros are
commercial—Linspire, for instance). However, BSD is
generally considered more like traditional UNIX, when
compared to Linux, since BSD has its roots in the BSD
from Berkley (which had its roots in the original AT&T
UNIX). BSD is not owned by a single person or a corporation, but by the developer community of the world. The
development of the BSD kernel is also not owned or done
by one individual (even in Linux, many individuals are
allowed to make changes). BSD maintains the entire
operating system and not just the kernel.
The development methodologies are also different—
while BSD builds up a core system, which is uniform,
Linux is more about putting the pieces together. The two
approaches have their relative advantages and disadvantages. While BSD is more controlled, Linux is more
adaptable. This allows Linux to chase new versions of
applications much faster than BSD. This also leads to the
fact that BSD uses only the base and port system to
distribute software, whereas there are various package
formats in Linux like deb (Debian, Ubuntu), rpm (Fedora,
SUSE), and so on.
Such a design of base and ports also influences how
you would upgrade your system. For instance, OpenSSL is
a part of the base in BSD, which means you cannot
upgrade only OpenSSL but have to upgrade the entire
base system. Linux, by contrast, allows the upgrading of
just that one piece that requires to be updated. Is this a
problem or an advantage? Well, I feel it is both. This makes
it harder to keep Linux, as a whole, up-to-date since
multiple pieces are separated, whereas any upgrade in
BSD, by default, would mean that the entire base system is
upgraded. This could be time consuming, but ensures that
you always have an updated and running system.
As far as performance goes, there are hardly any stark
performance differences between the two operating
systems. Note that BSD can execute Linux applications
via compatibility modules whereas Linux cannot execute
binary BSD applications. And, for those who are paranoid
about security, there is no rival that can quite outclass
OpenBSD.
And, finally, let’s look at the licensing issues. Linux is
distributed under the General Public License or the GPL,
which makes it mandatory for developers to supply the
source code, if redistributed. BSD, on the other hand, is
distributed under the BSD license, which is less restrictive
and allows binary only distribution, as well. This makes it
particularly attractive for some groups, like companies
working with embedded solutions, to adopt BSD.
34
FEBRUARY 2006
|
LINUX FOR YOU
|
www.linuxforu.com
It also supports software and hardware RAID controllers.
And, best of all, there is a full-featured 64-bit file system.
Whether it is modern hardware or that old machine you
once condemned to the closet, NetBSD should be your
choice of server OS. The performance of NetBSD has been
found to be excellent even on dated (read obsolete)
hardware.
Getting and installing BSD
Once you make up your mind on which flavour of BSD you
want to try out, visit the official website to download the
appropriate software. For installation details, refer to the
excellent official online documentation (look for the PDF
versions for offline access) that even provides step-by-step
instructions for installation. FreeBSD makes available two
ISOs, labelled disc1 (install and base) and disc2
(precompiled packages), which can be used to boot your
PC via the CD-ROM and to install. NetBSD also makes
available ISO images for all supported platforms. The CDs
are named ${MACHINE}cd.iso. So, to install it on your PC,
you could download the i386cd.iso. On the other hand,
OpenBSD does not make available any ISO images, but
provides the base system and packages via a FTP/HTTP
download for installation (CDs can be purchased directly
from OpenBSD). Under the main download directory, the
different platforms are organised under various folders
with detailed instructions. For example, for your PC, you
can check the INSTALL.i386 file under the i386 folder.
Installing OpenBSD is a complex procedure, but the
documentation provided is excellent and will lead you
through. Links for downloading are prominently displayed
on the relevant websites.
BSD and Linux are both UNIX variants with BSD
following the traditional UNIX model a bit more than
Linux. If you want a cutting-edge end system for desktop
use, Linux is the way to go. If you prefer a sober and
‘bare-bones’ OS (but steadfast and rock solid system), go
for BSD. If you have new and exotic hardware that you
want to use seamlessly, you are left with only one
choice—Linux—since its driver support is light-years
ahead of BSD. You would also choose Linux if you have
specific application needs, and the package in question is
simply not available for BSD. As far as documentation
goes, BSD is pure pleasure (check out the FreeBSD
handbook if you doubt me). For the security conscious,
OpenBSD is the choice to make. In short, choose whatever
OS logically fits your requirements, but just remember—
both BSD and Linux are all about choice and controlling
your software-destiny.
By: Srinivasan Subramanian. The author has been in the
IT industry for the last 14 years and is a passionate Linux
follower. Support for this and other articles by him can be
found on [www.sourcecode.co.in/lfy]. He can also be
contacted at [email protected].