history of debian freebsd

A Brief History of the Debian/FreeBSD Project

Background and Motivation

In the mid-90's, I did part-time work at a small ISP called quic.net. We used Linux for nearly everything, and I was the main system administrator making kernel and OS decisions. We had switched from RedHat to Debian sometime around the time RedHat Linux 5.0 came out. The quality difference was impressive, and after a few years of using it, we were very satisfied with Debian. I applied and was accepted as a Debian developer. (It was a much simpler process in those days.)

We had chosen to use SCSI for most of our systems, and were becoming increasingly unhappy with the Linux kernel.

At that time, we saw several major issues going on with Linux that bothered us:

  • devfs was being rejected by the kernel developers. At that time, udev did not exist, and there was no reasonable solution for identifying which hard device went with which device node. This was a major problem when a SCSI device failure could cause a system to try to mount wrong drives on boot.
  • SCSI support was not very good in Linux. There were many long standing design headaches with SCSI that didn't seem to be getting worked on. It was hard to even find the current mapping of target/lun to device node.
  • Regressions with 2.4 releases. 2.4.9 and 2.4.12 had major issues. We became very paranoid about kernel upgrades during this time.
  • No volume management in the kernel. I believe we were using kernels patched with EVMS from IBM. We were getting the impression that no volume manager was going to make it into the kernel.
  • It seemed that Linux kernel developers at that time were flatly rejecting most of the things that we needed for good storage management. Volume management and stable device names were things we really needed, and we needed them ASAP, not "someday."

It's worth pointing out that all of us at quic.net worked with Solaris systems at our day jobs at that time, so our expectations were being shaped by an enterprise system that had exactly the things we wanted in Linux.

First Experiments with FreeBSD

I started playing with FreeBSD in 2001. I saw in the documentation that it appeared to have exactly the things quic.net wanted. The CAM SCSI layer, Vinum, and devfs all made a unified whole that looked much better. Vinum seemed to have a similar design to Veritas Volume Manager, which I was very familiar with.

I also liked the development process FreeBSD followed better. The system of -RELEASE, -STABLE, and -CURRENT approximately matched Debian's stable, testing and sid distributions.

What I didn't like at all was the software packaging situation. One of the reasons quic.net had switched to Debian was because the packaging system was more stable, and we could reliably upgrade

While looking into alternatives, I ran across the debian-bsd mailing list. Wartan Hachaturow had posted a patch for dpkg that I thought looked interesting.

So I setup a chroot with the patched dpkg, and started compiling Debian packages to see what would happen. I was able to get some working packages fairly quickly.

Early on, I identified some major sources of incompatibilities:

FreeBSD didn't have utmpx functions at that time.
shadow passwords
FreeBSD was missing
This, and some other minor GNU extensions in glibc had to be pulled in from libiberty.

Later, I found problems with internationalization:

A lot of Debian packages expected libintl to be part of libc.
wide characters
There were some missing functions that I believe later turned up in FreeBSD 5.x.

In late 2001, I was laid off from my full-time job as a Solaris system administrator. I had a bit more time on my hands after that.

Solutions Found

At this time, there were a handful of people casually hacking on a Debian port to NetBSD, I was working on FreeBSD, and later one or two people worked on OpenBSD.

The general approach was to port to the BSD libc, and build on a largely broken chroot. All of the Debian BSD porters were working this way, and we shared patches on the mailing list.

Matthew Garrett hacked shadow to work on NetBSD. I borrowed it, and extended it a bit more later.

I got sysvinit and fakeroot more or less ported. Matthew was able to get this working on NetBSD, and boot up under sysvinit for the first time, a major milestone.

I wrote an implementation of utmpx for FreeBSD. This was fun, since I wanted a completely clean re-implementation under a BSD license, so that it could potentially be included in FreeBSD someday.

And a bit later, I got shadow passwords working, and was able to boot up multi-user.

In a moment of extreme optimism, I even filed an ITP on FreeBSD.


Shortly after Debconf, around July of 2002, Bruno Haible emailed me to let me know he had ported Glibc to FreeBSD, and suggested I give it a try.

There were problems with it from the beginning. The port was incomplete, and had fundamental issues with FreeBSD system headers. With Linux, we have Linux kernel headers shipped with the kernel, and we have glibc headers.

FreeBSD does not work this way. They release the kernel, libc, and core operating system all together, and these components aren't designed to be separated. So there was no clean separation between kernel and libc headers.

There were also several things that didn't work at all, including DNS resolution and threads. Threads was a very large problem, since FreeBSD implemented completely different system calls and even an entirely different approach to threading than NPTL.

I experimented with it anyway, because I wanted to see if it would work. I found I had to mix glibc and the FreeBSD libc in the same system in order to get a working system. There were a lot of system utilities like mount or ifconfig that wouldn't compile against glibc.

For a while, I thought it would work out.

Personal Problems

I had not found a job, and began to run out of money. I no longer had broadband, and found it impossible to work on the project or share the work I had done by uploading via dial-up.

The haphazard approach of hacking packages just enough to work, then immediately moving to the next package also began to catch up to me. It was hard to produce patches for all of those changes, and it became obvious that I should have used a version control system to track those changes from the start.

Robert Millan

Robert had originally worked on the Hurd port, and unlike me, he felt strongly that glibc was a better choice.

As this email mentions, I was lucky to have even have email access at that time.

By that time, I had become convinced that glibc had bigger problems than the ones it solved.

Robert and I did not agree at all on this, and my situation prevented me from doing much to continue.

Robert began working independently on the glibc based port.

I had fixed the major compatibilty problems with the FreeBSD libc by this time, but simply didn't have the time and a stable network connection to continue.

Naming and Trademarks

Some concern was raised that the various BSD's had trademarks on their names, and Debian couldn't simply call the BSD ports Debian FreeBSD or Debian NetBSD without infringing. There were many suggestions to change the names of these ports to something completely different. In the end, it was decided to go with Debian GNU/kFreeBSD, which seemed ridiculous to me.

The End

Seeing the port pushed to glibc, which I by then believed would never be well-supported, complete, or reliable, then getting involved a long, silly, and very frustrating discussion over the name to use for the project, left me very frustrated.

At that point, I felt that Debian also was going in directions that I did not want to go. debian-devel was frequently full of flame wars, most people seemed disinterested or hostile in the non-Linux ports, and even the amd64 port was having problems getting into the archive.

Also, by this time I wasn't all that impressed with the quality of several essential packages in Debian (such as dpkg or base-passwd).

I decided I no longer really wanted to work on Debian FreeBSD if it was never going to become the production system I had needed in the first place.

So I announced my retirement from Debian.

It was a fun project, and I learned a lot. Today, Linux kernel development is in a better place than it was 10-12 years ago, and I happily use FreeBSD and Debian systems side by side.

Oh, and Debian GNU/kFreeBSD is still using Linuxthreads almost ten years later, as I suspected all along…