A Debian GNU/Hurd snapshot

This article brought to you by LWN subscribers Subscribers to LWN.net made this article — and everything that surrounds it — possible. If you appreciate our content, please buy a subscription and make the next set of articles possible.

Debian has released the first usable snapshot of its port to the GNU Hurd kernel (or, technically speaking, a microkernel and its servers). The snapshot is still very much a work-in-progress, and the announcement makes it clear that the system is not to be taken as an "official Debian release," but it still makes for an interesting look at the microkernel-based Hurd. A significant portion of the Debian archive runs on the snapshot, which provides a convenient way to test drive a Hurd system, although those using it should be ready for a few problems.

The release was announced on May 22. Officially dubbed Debian GNU/Hurd 2013, the system is based on a snapshot of Debian Sid at the time when the stable Debian 7.0 ("Wheezy") release was made, so most of the software packages are based on the same source as their Wheezy counterparts. Three forms of installation media are available for downloading from Debian Ports: CD images, DVD images, and Debian network install (netinst) images. There are also disk images available with the release pre-installed, which can be run on compatible hardware or in virtual machines.

It's Debian, but not as we know it

"Compatible hardware" is a bit of a tricky subject. The Hurd port of Debian is in most ways the same operating system as Debian GNU/Linux, albeit without the Linux kernel underneath. But Hurd itself is not as mature as Linux, nor does it support as wide a range of hardware, so there are limitations. Debian GNU/Hurd 2013 is available for the 32-bit x86 architecture only, and Hurd can currently only make use of one CPU (or CPU core). That is to say, it will still run on multi-core and SMP machines, but only utilizing a single processor. There are plans in the works for a 64-bit Hurd system layer that would support a 32-bit user space, but that appears to be a ways off. Addressing the single-processor limitation is also on the roadmap, but considerably further out.

Apart from the processor support, it is also important to note that Hurd generally uses device drivers ported from Linux 2.0, plus network interface drivers from Linux 2.6.32. So the latest and greatest shiny hardware might cause trouble. On the plus side, SATA disks are supported (again, generally), so getting a basic working system together is not likely to be all that problematic.

I tested the new release using the pre-installed images in QEMU, following the YES_REALLY_README instructions, and had no trouble getting things up and running. Out of the box, this pre-installed image comes with a minimal environment; basic utilities and applications are there, but one must perform an apt-get update to pull in repository information for the full list of available packages. Nevertheless, X.org does work out of the box (with IceWM) and, as one might expect, Emacs is pre-installed. Should you need something other than Emacs, there is also Mutt, Python, the w3m browser, a collection of shells, and quite a few general X utilities available.

But there is little reason to limit yourself to the pre-installed packages. A hefty percentage of the Debian archive compiles for GNU/Hurd and is available through Apt. The Debian wiki estimates that 76% of Debian packages work on the Hurd port. Naturally, most GNU projects are available, and the list of high-profile desktop applications seems diverse as well (for example, Iceweasel and Icedove, Debian's re-brandings of Mozilla Firefox and Thunderbird). You can also browse the more recent snapshots to find additional packages.

From Debian's perspective, there is a lot of work remaining to bring the Hurd port to a completed state. Some packages will not be ported, either because they are Linux-specific or because the Hurd otherwise covers the same territory in different ways. But, reading through the Debian GNU/Hurd porting page and the Hurd project's own porting guide, there are clearly some common problems with upstream packages that require attention. Some programs that are otherwise cross-platform make use of Linux-specific features like ALSA, or mistakenly include a dependency on a Linux-specific version of a library. But there are also a lot of programs that mostly just require fixes to the configuration and build system. As the Debian wiki page pointed out about the 76% number, the other main non-Linux port, Debian GNU/kFreeBSD, was only at 85% when it was accepted for Wheezy.

Have you heard the news?

Of course, simply swapping out the kernel and using the release like a run-of-the-mill Debian machine is not all that much fun; the interesting part is seeing what the Hurd looks like up close and personal. The core idea of Hurd is that all of the tasks normally handled by the kernel in a "monolithic" design run as separate processes—networking, filesystems, process accounting, etc. With each "server" (as these components are known, although "translator" appears to be the term for filesystem servers) running as a separate entity, they are independent in some important ways; if you want to reimplement a particular server you can do so without touching the rest of the servers, and when your experiment fails, it will not crash the entire system.

Hurd uses the Mach microkernel for basic interprocess communication, and supplies an assortment of servers. A look at ps -ef|grep hurd showed 328 processes running on the Debian GNU/Hurd image in QEMU, everything from /hurd/term processes providing virtual terminals to /hurd/storeio processes running for each storage device (and, of course, /hurd/null providing its valuable service).

It is an interesting experiment to play around with, even if the general experience is not very different from any other Unix-like OS. Perhaps the biggest difference at the moment comes from the Hurd's take on filesystems, which is a bit like Filesystem in Userspace (FUSE) taken to its extreme. Essentially, any translator can be bound to any node in the filesystem hierarchy, and the implementations can serve up whatever they choose in response to file access calls.

The Debian release includes many of the usual suspects, such as translators for ext2 and NFS, but it also includes ftp: and http: translators, which allow programs to treat remote sites exactly like they would local files. Thus, the dpkg utility can query .deb packages on the live Debian FTP server, and one can discover exactly what lives at a web site's top level by running (for example) ls /http:/www.google.com/ .

This is a post-Unix approach, extending the "everything is a file" mantra in a new way, and it is fun to experiment with. Certainly there is more to translators than simply treating remote sites like mount points; the Hurd's documentation notes that every user can alter his or her own view of the filesystem using translators, without affecting any other users on the machine. The Hurd, however, is still far from complete. But that does not mean it is not a worthwhile project to look at, and Debian GNU/Hurd 2013 offers one of the most painless opportunities to do so that most users are likely to find.

So, should we all stop working on Linux now?

In years past, Richard Stallman was quoted as saying that Linux was a good option to use while the Hurd was still incomplete, a sentiment that was met with much derision as the Hurd continued to develop slowly. But despite its slow growth, the Hurd seems to be here to stay and, like the Debian GNU/kFreeBSD port, offers an intriguing look at alternative perspectives in the free software community. Given how complete the Hurd port is already, perhaps by the next stable Debian release we will also get the chance to play with Plan 9. Although we wouldn't want that to distract the project from completing its work on Hurd.

