Project:Hurd

From Gentoo Wiki
Jump to:navigation Jump to:search
GNU/Hurd Project
Description Porting Gentoo to the Hurd
Project email [email protected]
Packages p.g.o/[email protected]



IRC channel #gentoo-hurd (webchat)
Bugs Related bugs
Lead(s)
Last elected: 2026-04-01
Member(s)
Subproject(s)
(and inherited member(s))
(none)
Parent Project Gentoo
Project listing


The GNU/Hurd project works to bring Gentoo to the GNU Hurd.

Background

The Hurd has a legendary status, being developed around the same time as the Linux kernel that readers will be familiar with, but Linux took off while the Hurd wasn't so lucky.

It has a different design: it is a microkernel, meaning as little code as possible is run in kernel space, and as much as possible is delegated to userland.

This means that a bad kernel driver (say, for WiFi) can't crash the whole system. It makes developing easier too, as a debugger can be attached to any process without locking up the machine.

With the Hurd, the kernel doesn't need to know anything about a filesystem. Everything is like Linux's Filesystem in Userspace (FUSE). There's no need to reboot to add support for a particular feature and no need to ask the administrator to enable something.

Hardware support is always a problem for new kernels, especially with how advanced today's devices are. The old approach for Hurd was to import (now old) Linux drivers into sys-kernel/gnumach, but this doesn't scale both to the number of devices to be supported or with the rate of Linux changes. The approach today is to instead embrace NetBSD's sys-kernel/rumpkernel where its drivers can be run in userland.

It's also just good fun. One has the familiar GNU userland and the unfamiliar kernel. Explore!

Status

Lots to be done! Best to use a VM, but folks have booted Gentoo GNU/Hurd on real hardware too.

amd64 support exists in Gentoo but it is less stable so far than x86. For first experiences with the Hurd, we recommend trying x86, then graduate to amd64 if brave.

There's a TODO in the scripts repository.

Glossary

Set of terms common in Hurd discussions
Term Area Meaning
pfinet Networking Built-in networking stack in Hurd. Improved from Linux many years ago.
lwip Networking Alternative TCP/IP stack, packaged as net-libs/lwip. Controlled by lwip.
netdde Networking Collection of networking drivers imported from Linux also many years ago. Unpackaged in Gentoo as it's not considered the future, because syncing with Linux is too challenging with its rate of change. rumpnet is its replacement.
rump* General Refers to the rumpkernel project from NetBSD where its driver components can be run in userland. It is considered the future of hardware support on Hurd.
ext2fs Filesystems ext* filesystem translator. As of 2026-06, this now supports journaling compatible with Linux ext3/4.

Getting started

Cross-compilation

Crossdev now supports cross-compilation to the Hurd. The two target tuples are:

  • i686-gnu (x86)
  • x86_64-gnu (amd64)

To build a cross-toolchain, follow these steps:

root #emerge --sync
root #emerge -n app-eselect/eselect-repository sys-devel/crossdev
root #eselect repository create crossdev
root #crossdev -t i686-gnu -oS gentoo

Arbitrary packages can then be cross-compiled for the Hurd with i686-gnu-emerge or x86_64-gnu-emerge respectively.

Booting

Gentoo GNU/Hurd can be tested using a pre-prepared disk image. The easiest way to do this is with QEMU. For x86-64, use

root #gpg --verify hurd-x86_64-preview.qcow2.sig hurd-x86_64-preview.qcow2
root #qemu-system-x86_64 -drive file=hurd-x86_64-preview.qcow2,format=qcow2 -m 4G -net user,hostfwd=tcp:127.0.0.1:2222-:2222 -net nic,model=e1000 --enable-kvm -M q35

For i686, use

root #gpg --verify hurd-i686-preview.qcow2.sig hurd-i686-preview.qcow2
root #qemu-system-i386 -drive file=hurd-i686-preview.qcow2,format=qcow2 -m 2G -net user,hostfwd=tcp:127.0.0.1:2222-:2222 -net nic,model=ne2k_pci --enable-kvm -M q35

Note that the virtual ethernet card uses different simulated hardware (e1000 for x86_64/rumpnet, ne2k_pci for i686).

To log in, input login root, then use gnuhurdrox as the password.

Upon logging in, run ./setup-net.sh and /etc/init.d/sshd restart to get SSH. Connect via ssh -p 2222 [email protected] on the host.

The image can be created locally using the mkhurd.sh script in the gentoo-hurd repository.

Notes

  • The Hurd website gets pretty regular updates, but the Recent changes tab doesn't reflect this. hurd/web.git can be used to track changes.
  • Images produced default to using rumpdisk wd* devices even for x86 (Debian only does it for amd64). This can be changed by editing the grub.cfg to remove noide and by adjusting root=. /etc/fstab and a MAKEDEV call in the scripts may need tweaking too for the traditional Mach IDE drivers which present devices as hd*.

Team

Project members who are not Gentoo developers

Member Nick Role
Hyland B. nekobro Boffin

External resources