eRacks Systems Tech Blog

Open Source Experts Since 1999

Debian.  That’s a Linux distribution, right?  Debian is (understandably) strongly associated with Linux.  But, did you also know that a port of Debian exists that’s built on top of the FreeBSD kernel?

Say What?

The project is called KFreeBSD.  At first glance, it may sound like a contradiction.  After all, how can you run Linux on FreeBSD?  The answer to this apparent paradox is that you’re not running Linux at all.  Linux is just a kernel, and actually has little to do with the rest of the operating system.  An entire Linux-based OS consists of much more, specifically a hierarchy of libraries and executables.  These libraries and executables don’t have to run on top of Linux.  In fact, they can operate on any *NIX-like platform.  All the Debian developers have done is to port these libraries and executables over to the same kernel used by FreeBSD.

But, What’s it Good For?

Lots of stuff.  Unlike Linux, the FreeBSD kernel has support for ZFS.  Unlike Linux, the FreeBSD kernel has built-in support for NDIS drivers.  Unlike Linux, the FreeBSD kernel interfaces have changed relatively little and have remained largely consistent.

Ok, then why not just use FreeBSD?  You may prefer the Debian package manager to FreeBSD’s ports.  Perhaps you prefer a Debian-style init system.  Maybe you’d like to take advantage of code licensed under the GPL without having to compile third party kernel modules, like built-in support for ReiserFS or XFS.

For more information about why you might be interested in giving KFreeBSD a try, have a look at this: http://wiki.debian.org/Debian_GNU/kFreeBSD_why.

Ok, I’m Interested.  Is it hard to install?

Not at all!  If you know how to install Debian Linux, you also know how to install KFreeBSD.  The process is identical.  When you first boot off the CD image, you’re presented with the following GRUB prompt:

CD Boot Prompt

CD Boot Prompt

Once the installer starts running, you will see the following screens throughout the installation process:

Language Selection

Language Selection

Setting the Hostname

Setting the Hostname

Disk Partitioning

Disk Partitioning

Disk Partitioning

Disk Partitioning

Installing Packages

Installing Packages

Look familiar? 🙂

Is it Easy to Use?

Yes!  KFreeBSD is as easy to use as Debian Linux.  The only unfamiliar sight you may encounter is when the kernel starts to boot:

Booting the FreeBSD Kernel

Booting the FreeBSD Kernel

After all the foreign kernel messages, you’ll immediately recognize the init scripts that are being called, as well as the login prompt when the system is ready:

KFreeBSD Login Prompt

KFreeBSD Login Prompt

Want to install an application?  Simply type apt-get install <application>, just like you would on Linux:

Installing a Package

Installing a Package

Do you prefer to use a GUI?  Simply choose to install a Desktop Environment during installation  and you’ll be presented with the following GDM prompt after the system boots:

GDM Login

GDM Login

Once logged in, you’ll get to navigate around using the already very familiar GNOME window manager:

GNOME Window Manager

GNOME Window Manager

 

What’s the Catch?

Unfortunately, there are a few.  For starters, due to a bug in the Debian userland, wireless network adapters, while supported by the kernel, do not function.  This can be worked around by running the FreeBSD version of ifconfig in a chroot jail.  Also, there’s only partial support for Java via GIJ.  This very incomplete implementation does not include Swing.  The Sun JDK has yet to be ported, though there’s hope for the future on this point, since Sun’s Java does run natively when linked against the FreeBSD userland.  Finally, the port is still experimental, which means you will likely encounter bugs.

For more information about KFreeBSD and the trade-offs of using it versus Debian Linux, consult the FAQ.

Conclusion

Part of what makes Open Source so attractive is choice.  With the Debian userland now at least partially ported over to the FreeBSD kernel — a third port also exists based on GNU’s HURD — Debian users now have more freedom than before to mix and match technologies according to preference.  While KFreeBSD’s experimental and in some respects incomplete status precludes it from ordinary use, it is nevertheless an interesting project, and one that will serve its users well when complete.

June 15th, 2011

Posted In: Open Source

Leave a Comment