What is the GNU Hurd?

The GNU Hurd is the GNU project's replacement for the Unix kernel. It is a collection of servers that run on the Mach microkernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix kernel or similar kernels (such as Linux). More detailed.

What is the mission of the GNU Hurd project?

Our mission is to create a general-purpose kernel suitable for the GNU operating system, which is viable for everyday use, and gives users and programs as much control over their computing environment as possible. Our mission explained.


News

2023-q4

Hello! Welcome to a new qoth. This qoth covers new and interesting GNU/Hurd developments in Q4 of 2023! Details.

Samuel Thibault fixed gcc's Hurd's default pie and added static pie support. He also added a whatis command to GNU Mach's kernel debugger, which can determine what an address points to (a stack? a port? some kalloc? ...). He also added hurd-amd64 support to GCC.

Samuel requested that the Hurd team set up a continuous integration, so that when developers make code changes, they can be certain that they did not break anything. It turns out that the Hurd supports several different environments: 32 bit, 64 bit, 32-on-64 bit, ACPI, non-ACPI, SMP, non-SMP, Xen, etc. Apparently Flavio has a personal CI, but it is set up in a Debian independent way. If you are interested in helping the Hurd project set up a CI, then please get in touch!

Luca Dariz worked on adding some simple GNU Mach user-space tests . With a working MiG, a GNU/Linux machine can run make check in the GNU Mach source code, which will launch qemu to ensure that 32 bit (PAE and non PAE), 32 on 64 bit, and full 64 bit GNU Mach works. We currently do this testing on GNU/Linux, because qemu does not run on the Hurd.

Many people worked on the Hurd's new x86_64 bit support. A 64-bit debian buildd is set up, and we can bootstrap a chroot! The hurd-amd64 wanna-build infrastructure is also set up. We are having issues reliably building packages on a 64-bit Hurd, which lead Samuel to uncover and fix a proc leak.

Flavio Cruz improved GNU Mach's IPC by reordering mach_msg_type_t fields to byte align msgt_name and msgt_size. He also created a patch series to avoid message resizing for x86_64. He also removed untyped mach RPC code. GNU Mach uses typed IPC. The Hurd could support both typed and untyped, but it appears that the Hurd only uses typed RPC. So it seems best to remove any untyped RPC code.

Sergey Bugaev added GNU Mach entry re-coalescing support. Essentially, Mach was not always able to merge two vm entries that are made next to each other, which was slowing down ext2, bash, etc. Sergey allowed GNU Mach to merge entries in the common cases, which greatly helps ext2fs for instance.

Sergey is also working on porting the Ladybird web browser to the Hurd. The author of this post uses the netsurf web browser on the Hurd, which works on simple websites like wikipedia, but it badly renders javascript heavy websites, which makes many websites un-useable. If Sergey is successful in porting Ladybird, then Hurd users could start using sites like Github! It is worth noting that someone should update the Firefox port as well.

Sergey also started porting the Hurd to AArch64! While a port to RISC-V might be more exciting, it is worth mentioning that AArch64 is more established. What is interesting is that Sergey is already able to build Hurd servers for AArch64! Normally, in order to run the binaries, one would port GNU Mach to AArch64. Luckily for us, he turned to GDB and directly ran a 'Hello World' Hurd AArch64 binary on Linux! This helped him fix some bugs along the way. We still need to define the ABI and complete the GNU Mach port, but this is exciting news!

Tobias Platen started porting GNU Mach to Power9.

So if you want to test if your favorite packages work on the Hurd and contribute towards making the full GNU system usable for a wider range of people, please check the contributing page.


The GNU Hurd is the GNU project's replacement for the Unix kernel. It is a collection of servers that run on the Mach microkernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix kernel or similar kernels (such as Linux). More detailed.

GNU Mach is the microkernel upon which a GNU Hurd system is based. It provides an Inter Process Communication (IPC) mechanism that the Hurd uses to define interfaces for implementing in a distributed multi-server fashion the services a traditional operating system kernel provides. More detailed.

2023-q3

Hello! Welcome to a new qoth. This qoth covers new and interesting GNU/Hurd developments in Q3 of 2023! Details.

Joan Lledo modified the PCI arbiter to prevent mapping I/O region files. He previously sent some patches to implement mapping region and ROM files using mmap(). However, a BAR region can represent either memory or I/O space, and only memory should be allowed to be mapped. Since I/O BARs only contain I/O addresses, he went ahead and prevented the mapping of I/O region files. The next step is to make IO spaces available for users through the pci-arbiter. He plans to add a new RPC that checks for permission and calls i386_io_perm_create(). Then it returns the resulting port.

Our Google summer of code student Vedant Tewari decided to port rust, and the rust porting effort is making good progress. The build process is a bit wonky, and Debian is using an older rust version. Check out the rust pull request that adds Hurd support!

Samuel worked on setting up PAE, which will eventually let us use more than 4GB of RAM on a 32-bit Hurd! It is also useful for the X86_64 architecture. He also fixed the jemalloc build.

Samuel was incredibly productive this quarter making the X86_64 bit port more stable. He fixed the 64-bit Hurd PIE build, and he got git working on the 64-bit port! Though a few of the git tests are failing on both X86_64 and the 32 bit port. He fixed the glibc build, which involved fixing pmap_remove and pmap_protect. He discovered that core dumping is currently causing problems on the 64-bit port, and he temporarily encourages people to disable core dumping. Samuel fixed some networking issues and a dpkg issue for the 64-bit port. It was hard to discover what the problem was, because the debugging tools have not been ported to the 64-bit port. He add some helpers to locking to fix some bugs, and he encourages other developers to help him fix the debugging tools for X86-64. It seems that most developers are currently running the 64-bit Hurd in a virtual machine and not in real hardware.

Luca Dariz got a patch series merged for the 64 bit port.

Sergey implemented MAP_EXCL and provided MAP_FIXED_NOREPLACE and MAP_TRYFIXED as aliases of (MAP_FIXED|MAP_EXCL) as well other mmap work. He explains:

MAP_FIXED is defined to silently replace any existing mappings at the address range being mapped over. However, this is dangerous and only rarely desired behavior.

Various Unix systems provide replacements or additions to MAP_FIXED.

  • SerenityOS and Linux provide MAP_FIXED_NOREPLACE. If the address space already contains a mapping in the requested range, Linux returns EEXIST. SerenityOS returns ENOMEM, however that is a bug, as the MAP_FIXED_NOREPLACE implementation is intended to be compatible with Linux.

  • DragonFly BSD, NetBSD, and OpenBSD provide MAP_TRYFIXED, but with different semantics. DragonFly BSD returns ENOMEM if the requested range already contains existing mappings. NetBSD does not return an error, but instead creates the mapping at a different address if the requested range contains mappings. OpenBSD behaves the same, but also notes that this is the default behavior even without MAP_TRYFIXED (which is the case on the Hurd too).

Since the Hurd leans closer to the BSD side, add MAP_EXCL as the primary API to request the behavior of not replacing existing mappings. Declare MAP_FIXED_NOREPLACE and MAP_TRYFIXED as aliases of (MAP_FIXED|MAP_EXCL), so any existing software that checks for either of those macros will pick them up automatically. For compatibility with Linux, return EEXIST if a mapping already exists.

Damien Zammit added a USB mass storage translator via rumpusbdisk. Though it has some issues as he explains:

Netdde sneems to exhibit a bug when running ifdown /dev/eth0 simultanously to running the rumpusbdisk translator, because to the two devices share the same IRQ.

Damien also worked on the Hurd's SMP support (much of his SMP contributions is based on the earlier work done by Almudena Garcia):

  • He tweaked GNU Mach's scheduler, and he merged three GNU Mach commits.

  • He added a show all runqs command to GNU Mach's kernel debugger.

  • He also improved SMP in GNU Mach by storing the struct processor in a percpu area and avoiding an expensive cpu_number every call of current_processor(), as well as getting the cpu_number from an offset in the percpu area. Further improvements can be made by using other percpu areas. It was untested on 64 bit.

  • Damien also taught GNU Mach to use the x86 CPUID instruction to get the CPU ID for speed. He reduced the time it takes to get the CPUID. He made it 100 times faster!

  • He mentioned some issues: 60% of the time, booting a 32 bit Hurd, with SMP enabled, fails to boot (sometimes apparently getting stuck in the rumpdisk). When it does boot, it is not particularly stable and likely to crash.

Essentially, the SMP work is progressing, but it is not ready for production use. His recent work made the non-SMP faster, and a 32 bit Hurd, with SMP enabled and only one core, appears relatively stable (but slow to boot). The 32-bit SMP enabled Hurd may soon be as fast as the non-SMP Hurd. Eventually the SMP enabled Hurd will be faster than a non-SMP Hurd.

Flavio Cruz halved the size of mach_msg_type_long_t, from 16 to 8 bytes. He also simplified the overall 64bit RPC ABI, removing "holes" in mach_msg_type_t or mach_msg_type_long_t, which prevents possible leakages to userspace.

Some Hurd people talked to Kent Overstreet, the author of bcachefs to discuss the possibility of porting Linux's newest filesystem to the Hurd; the conversation was recorded. While most Hurd developers believe that it would possible to port bcachefs to the Hurd, all agree that it would be difficult to port and hard to maintain. No Hurd developers are currently planning or working on porting bcachefs to the Hurd. But perhaps you want to?

So if you want to test if your favorite packages work on the Hurd and contribute towards making the full GNU system usable for a wider range of people, please check the contributing page.


The GNU Hurd is the GNU project's replacement for the Unix kernel. It is a collection of servers that run on the Mach microkernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix kernel or similar kernels (such as Linux). More detailed.

GNU Mach is the microkernel upon which a GNU Hurd system is based. It provides an Inter Process Communication (IPC) mechanism that the Hurd uses to define interfaces for implementing in a distributed multi-server fashion the services a traditional operating system kernel provides. More detailed.

Debian GNU/Hurd 2023 released! Details.

It is with huge pleasure that the Debian GNU/Hurd team announces the release of Debian GNU/Hurd 2023.

This is a snapshot of Debian "sid" at the time of the stable Debian "bookworm" release (June 2023), so it is mostly based on the same sources. It is not an official Debian release, but it is an official Debian GNU/Hurd port release.

Read the announcement email.


The GNU Hurd is the GNU project's replacement for the Unix kernel. It is a collection of servers that run on the Mach microkernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix kernel or similar kernels (such as Linux). More detailed.

GNU Mach is the microkernel upon which a GNU Hurd system is based. It provides an Inter Process Communication (IPC) mechanism that the Hurd uses to define interfaces for implementing in a distributed multi-server fashion the services a traditional operating system kernel provides. More detailed.

Debian GNU/Hurd 2021 released! Details.

It is with huge pleasure that the Debian GNU/Hurd team announces the release of Debian GNU/Hurd 2021.

This is a snapshot of Debian "sid" at the time of the stable Debian "bullseye" release (August 2021), so it is mostly based on the same sources. It is not an official Debian release, but it is an official Debian GNU/Hurd port release.

Read the announcement email.


The GNU Hurd is the GNU project's replacement for the Unix kernel. It is a collection of servers that run on the Mach microkernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix kernel or similar kernels (such as Linux). More detailed.

GNU Mach is the microkernel upon which a GNU Hurd system is based. It provides an Inter Process Communication (IPC) mechanism that the Hurd uses to define interfaces for implementing in a distributed multi-server fashion the services a traditional operating system kernel provides. More detailed.

Debian GNU/Hurd 2019 released! Details.

It is with huge pleasure that the Debian GNU/Hurd team announces the release of Debian GNU/Hurd 2019.

This is a snapshot of Debian "sid" at the time of the stable Debian "buster" release (July 2019), so it is mostly based on the same sources. It is not an official Debian release, but it is an official Debian GNU/Hurd port release.

Read the announcement email.


The GNU Hurd is the GNU project's replacement for the Unix kernel. It is a collection of servers that run on the Mach microkernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix kernel or similar kernels (such as Linux). More detailed.

GNU Mach is the microkernel upon which a GNU Hurd system is based. It provides an Inter Process Communication (IPC) mechanism that the Hurd uses to define interfaces for implementing in a distributed multi-server fashion the services a traditional operating system kernel provides. More detailed.

Older news entries can be found in the news archive. For Hurd developers' musings have a look at the shared weblog. The recent changes page lists the latest changes of this website.

Contributing

So, you are interested in contributing to the GNU Hurd project? Welcome! Every single contribution is very much encouraged. Please read our detailed recommendations about how to contribute.

See our source repositories for the source code.

Access to a GNU/Hurd System

We provide accounts on our public Hurd boxen, and there are also QEMU images available.

Getting Help

There are a couple of different FAQ lists. There are a number of IRC channels and several different mailing lists with searchable archives.

Before asking a question on a mailing list or on IRC, first, please try to answer your own question using a search engine and reading the introductory information. If you have done this and you cannot find the answer to your question, feel free to ask on a mailing list or on IRC.

Running the Hurd

The most functional distribution of the Hurd is the one provided by Debian. Find more information about it at the Debian GNU/Hurd website.

Along with it there are various ways to run a GNU/Hurd system. Three of them are

And these web pages are a living proof of the usability of the Hurd, as they are rendered on a Debian GNU/Hurd system.

Current Status

The latest releases are GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8, 2016-12-18. The Hurd is developed by a few volunteers in their spare time. The project welcomes any assistance you can provide. Porting and development expertise is still badly needed in many key areas.

Functional systems are installable in a dual-boot configuration. Development systems are currently mostly based on the Debian GNU/Hurd port sponsored by the Debian project.

Community resources for related projects focus around these pages, http://hurd.gnu.org/, the mailing lists and the IRC channels.

If you want to see the current discussions in the Hurd project, please have a look at the bug-hurd mailinglist archives. If you want to have a look at the current coding work, you can just head over to our source repositories.

For more details, please read our writeup on the current state of the GNU Hurd.

Advantages and Challenges

The GNU Hurd operating system design provides advantages, but uncovers new challenges, too.


These pages are powered by ikiwiki.

Further information about this site and how it was created can be found in the colophon.