No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sam James cb5c7141ec
TODO.md: we use rumpnet now
Signed-off-by: Sam James <sam@gentoo.org>
2026-09-17 00:36:35 +01:00
base_sys base_sys: allow ssh-as-root w/ pw 2026-07-24 06:05:40 +01:00
shared-gnu-hacks/etc/portage shared-gnu-hacks: drop obsolete Portage patch 2026-07-24 05:07:17 +01:00
.gitignore .gitignore: Ignore more types of images 2026-04-01 20:28:05 +02:00
COPYING Initial commit 2026-03-17 16:55:42 +00:00
default.config default.config: Reflect REPOS change; touchups 2026-03-28 15:48:32 -04:00
mkhurd.sh mkhurd.sh: don't use subshell, simplify die message 2026-09-13 21:32:56 +01:00
mkhurd64.sh mkhurd64.sh: make this actually do something useful 2026-03-23 17:58:47 +01:00
README.md README.md: added sys-apps/merge-usr as a dependency 2026-09-10 17:02:17 +01:00
TODO.md TODO.md: we use rumpnet now 2026-09-17 00:36:35 +01:00

gentoo-hurd

Scripts to build a Gentoo GNU/Hurd bootable image.

Very much work-in-progress and subject to change.

TODO

See TODO.

Instructions

sys-devel/crossdev and sys-apps/merge-usr are required.

config file lives in default.config.

Preparation

# emerge --sync # lots of recent changes
# emerge --update sys-devel/crossdev # lots of recent changes
# emerge --noreplace app-eselect/eselect-repository && eselect repository create crossdev
# crossdev -t i686-gnu -oS gentoo # x86_64-gnu works too

Creating the actual image

Prime the sysroot (/usr/i686-gnu or /usr/x86_64-gnu) with workarounds and needed packages:

# mkdir /root/hurd/mnt-i686 # or /root/hurd/mnt-x86_64, as appropriate (configurable via TARGET)
# ./mkhurd.sh prepare

Create the hurd.ext2 image itself:

# ./mkhurd.sh create

Replace with ./mkhurd64.sh for x86_64.

Using it

As a QEMU image (preferred method)

The script can start QEMU for you with ./mkhurd.sh qemu, or run:

$ 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

To log in, input login root, then use gnuhurdrox as the password. Upon logging in, you can run ./setup-net.sh and /etc/init.d/sshd restart to get SSH. Connect via ssh -p 2222 root@127.0.0.1 on your host.

Using real hardware (experimental, here be dragons!)

As the produced hurd.ext2 is a disk image containing the base system, you can clone it in a real hard drive using dd by running:

# dd if="<path to the image>"/hurd.ext2 of="<path to the hard drive>"

Layout

mkhurd*.sh

mkhurd.sh and mkhurd64.sh are entry points, accepting arguments:

  • prepare (prime the sysroot)
  • create (create ext2 image; unmounts when done)
  • mount (mount the image for manual inspection)
  • boot/test/qemu (launch QEMU)
  • unmount (unmount the image)

Hack directories

i686-gnu-hacks and x86_64-gnu-hacks are for workarounds that get rsync-ed over to the sysroot upon prepare. The same applies for shared-gnu-hacks which is for all arches.

base_sys directory

base_sys is copied with rsync over to the image upon create. base_sys/_errata.sh has fixups which should only apply to the target, not to the sysroot.

base_sys.custom directory (optional)

If base_sys.custom exists, it will also be copied to the target upon create.

Use this to add personal customisations like additional users, SSH keys, etc.

Useful tools and scripts to scavenge from:

Debian repos:

Guix:

Previous Gentoo work: