GNU/Hurd strikes back
GNU/Hurd is alive and kickin’
The GNU/Hurd is the Sagrada Família of the Software World: having started to develop in 1990, the GNU/Hurd has yet to reach version 1.0. The Linux kernel, on the other hand, began development in 1993 and was initially considered a “kludge” until the Hurd was completed. It is now matured and widely used.
Like the Loch Ness Monster, many believe that GNU/Hurd is vaporware and does not exist. It does exist and continues to evolve, albeit at a slow pace. Just recently, the Debian GNU/Hurd 2023 has been released. You can use the GNU/Hurd right now.
GNU/Hurd? GNU Hurd? or Debian GNU/Hurd?
There has been a well-known ideological controversy over the names GNU and Linux. Anywise, it would be helpful to sort out the word.
GNU is the name of a Unix-compatible operating system (an acronym of “GNU is Not Unix”), and the GNU Project is a project to create GNU. Hence, a flavor of GNU that adopted Linux as its kernel is GNU/Linux. There was also GNU/kFreeBSD, which adopted the FreeBSD kernel, although it has recently been discontinued.
To simplify it further,
- Linux = kernel (the core of the operating system).
- GNU = so-called user land (the part of the operating system that is not the kernel and that deals with users, such as the GNU Core Utilities, the GNU tool chain such as GCC, etc.).
Unlike the Linux kernel, the Hurd is not a “kernel.” In a way,
- “Hurd” = GNU Mach (microkernel) + GNU Hurd (system servers) + GNU MIG (Mach Interface Generator)
are roughly equivalent to a “kernel.” The GNU Hurd is a herd of servers that implements many functions, including user authentication, binary execution, the file system, networking, and even /dev/null as a server separate from the kernel. There are currently 24 servers consisting of the Hurd.
So, although slightly imprecise, GNU Hurd (without the slash) is the name of the group of user-mode servers, and GNU/Hurd is the name of the Unix-compatible operating system that uses the “Hurd” as its “kernel.” Therefore, a kind of GNU that adopted the Hurd is an operating system called GNU/Hurd.
There are already several distributions based on GNU/Hurd. The best known is Debian GNU/Hurd. I am using this one because I am a Debian developer and familiar with Debian. The GNU Guix system on the GNU Hurd is another interesting one.
Running Debian GNU/Hurd in the cloud
The GNU Hurd’s hardware support is poor, so trying to run it on modern physical machines is suicide. In the cloud, however, “virtual” devices are standardized. There is no need to support various devices as in the real world.
However, virtio still needs to be supported by the current GNU/Hurd. So we have to get creative. Having a cloud provider based on OpenStack would be nice, since we have to tweak the image parameters directly using command line tools. I use Fuga Cloud.
First, download and deploy the image.
$ wget http://cdimage.debian.org/cdimage/ports/12.0/hurd-i386/debian-hurd.img.tar.xz
$ tar xJf debian-hurd.img.tar.xz
This is a 5GB pre-installed image, consisting of 4GB of user space and 1GB of swap space. This should be enough for now, since GNU/Hurd is a tiny OS compared to Linux.
The next thing you need is an OpenStack command-line tool. For Debian or Ubuntu, for example, there is a python3-openstackclient package. I have no experience with it, but it seems to be available for Windows as well. Then you have to do some setup. Fuga Cloud’s OpenStack CLI tutorials (for Linux, for Windows) are useful even if you don’t use them.
Now you need to upload the image to the cloud. You need to set the properties: “hw_disk_bus” to “ide” and “hw_vif_model” to “e1000” (or “rtl8139”) as these are only supported devices on GNU/Hurd. Also, uploading may take some time. A progress bar ( — progress) would be nice.
$ openstack image create --property hw_disk_bus=ide --property hw_cdrom_bus=ide --property hw_vif_model=e1000 --disk-format raw --container-format bare "Debian GNU/Hurd 2023" --file debian-hurd.img --progress
After that, you can use the OpenStack web interface to create an instance based on the custom image you just uploaded. I am using one of Fuga Cloud’s cheapest plans (“t2.small”: 1 CPU, 1.23 GB RAM, 20 GiB SSD), but it seems to be enough.
After booting (via GRUB), open the console for now from OpenStack and log in as “root” (the password is empty, so simply hit Enter). After that, you can immediately create your own user account.
# adduser yourloginname
This image is prepared to configure the network with DHCP, so you should already be able to log in with SSH (using your user account’s login password) once the instance is booted. Then, you put your SSH public key in ~/.ssh/authorized_keys, and you can SSH login as usual.
Everything else can be handled similarly to Debian GNU/Linux, because it is Debian after all. If you are using it as a server that is open to the outside world, don’t forget to set the root password.
GNU/Hurd has a number of interesting features. The most famous of these is probably the translator. The translator allows users to create local implementations of the programs that handle access to specific directories and files. It is like a supercharged version of mount. It implements symbolic links, sockets, etc. The translator provides extreme flexibility.
It is possible to run multiple instances of the Hurd on a single instance of GNU Mach, the microkernel. It’s called neighborhurd. Each neighborhurd is essentially isolated, so it’s like a supercharged Docker. There is also subhurd, which uses some of the resources provided by another Hurd.
Personally, one reason for using GNU/Hurd is that the Linux kernel has become too huge. Look at this:
I don’t think that anyone is able to grasp the full picture of Linux anymore. It was also said that the Hurd would never be finished because it was too complex and too large. That is no longer the case. GNU/Hurd is a relatively small OS! Maybe the development of the microkernel and the Hurd required the development of Linux and the development of virtualization after all.
Also, there are a variety of interesting budding operating systems, but they are largely experimental and often not practically usable; the GNU/Hurd is Unix(POSIX)-compatible, so most things work (roughly 65% of the Debian archive can be built for the Hurd).
One big problem would be systemd. systemd has not yet (or forever) been ported to the Hurd. systemd is very popular in the Linux world these days, and there are many packages that depend on systemd. GNU shepherd is promising, but not yet complete.
As mentioned above, hardware support for GNU/Hurd is poor, but it is hard to rewrite device drivers from scratch now. Rump Kernels is an interesting solution and is being actively implemented (a nice recent FOSDEM presentation PDF).
And, of course, there are a whole lot of open issues.
Try GNU/Hurd! I enjoy it a lot. It’s an old world and a new world. I am pretty sure you will like it too.
- The Official site of GNU Hurd
- The Official site of Debian GNU/Hurd
- Mailing Lists and its archives
- IRC (Looks like this is still the official communication channel in 2023…)
The Source Code of the Hurd
They are all managed by Git.