Subject: [bug#63527] [PATCH 0/3] Initial attempt at rumpdisk support for the Hurd.

From: Janneke Nieuwenhuizen <[email-masked]>
Date: Mon, 15 May 2023 21:35:31 +0200

Hi!

Some time ago we kind of promised to move forward with the Hurd[0] and while
we have had this pretty neat "childhurd" feature for some time[1], to really
do that we should get it to boot on real iron.  An important ingredient to
make that happen made it into Hurd upstream over a year ago[2]: rumpdisk
support making use of the NetBSD rumpkernel[3].

Building this rumpkernel is a bit tricksy, Debian uses an import of the NetBSD
git archive[4] --which is quite large--with some twenty-odd custom patches[5].
Some of us asked bug-hurd to document their rumpkernel support[6] or distribute
it in a less Debian-centric and more usual way to make it more digestible for
other parties (such as Guix) to adopt, but that was rejected at the time[7].

Inspired by Josselin Poiret's recent Hurd updates[8] our chats on IRC and
especially their succes in getting it to boot again on master[9], I decided to
just take the easiest route possible and build the rumpkernel from Debian's
salsa package git archive and its patch series.

The good news is that with this patch series the Hurd now has two additional
servers: pci.arbiter and rumpdisk.  Sadly, it currently hangs for me on

--8<---------------cut here---------------start------------->8---
start: pci.arbiter:
--8<---------------cut here---------------end--------------->8---

Anyway, while this builds, we probably do not want to rely on Debian's
packaging support in this way but I'm also not sure what would be a better
course of action right now.  Other than asking bug-hurd again to create an
upstream for their code outside/independent of their packaging.

Help and thoughts much appreciated!

See also:

    https://gitlab.com/janneke/guix/-/tree/wip-hurd

Greetings,
Janneke

PS: I build it like this

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix system image -t hurd-qcow2 gnu/system/examples/bare-hurd.tmpl
--8<---------------cut here---------------end--------------->8---

and start it doing

--8<---------------cut here---------------start------------->8---
guix shell qemu -- qemu-system-i386                     \
-m 1024                                                 \
--enable-kvm                                            \
--device rtl8139,netdev=net0                            \
--netdev user,id=net0,hostfwd=tcp:0.0.0.0:11022-:2222   \
--snapshot                                              \
--hda /gnu/store/0zmdmjafmz0hgzw3gszl38nd0n2bblq9-disk-image
--8<---------------cut here---------------end--------------->8---

[0] https://guix.gnu.org/en/blog/2020/deprecating-support-for-the-linux-kernel/
[1] https://guix.gnu.org/en/blog/2020/childhurds-and-substitutes/
[2] https://archive.fosdem.org/2022/schedule/event/dzammit/
[3] https://wiki.netbsd.org/rumpkernel
[4] https://salsa.debian.org/hurd-team/rumpkernel
[5] https://salsa.debian.org/hurd-team/rumpkernel/-/tree/master/debian/patches
[6] https://lists.gnu.org/archive/html/bug-hurd/2022-02/msg00020.html
[7] https://lists.gnu.org/archive/html/bug-hurd/2022-02/msg00051.html
[8] https://mail.gnu.org/archive/html/guix-patches/2023-03/msg01597.html
[9] https://issues.guix.gnu.org/63501

Janneke Nieuwenhuizen (3):
  DRAFT gnu: Add rumpkernel.
  gnu: hurd: Add rumpkernel.
  DRAFT system: hurd: Boot with pci.arbiter and rumpdisk.

 gnu/packages/hurd.scm | 232 +++++++++++++++++++++++++++++++++++++++++-
 gnu/system.scm        |  26 ++++-
 2 files changed, 248 insertions(+), 10 deletions(-)

base-commit: 555a41f31c9ec9f4344d00beb94f663b44017019
-- 
2.39.2