1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-26 02:51:49 +02:00

28 Commits

Author SHA1 Message Date
Janneke Nieuwenhuizen c62a39174e system: hurd-boot: Prepare for runsystem in Guile.
Fo guile to run, it needs pipe support: without pipe support it aborts at
startup.  Pipe support is currently createn in runsystem by creating a
passive translator

    settrans --create /servers/socket/1 /hurd/pflocal

However, this needs a writable root file-system, and runsystem is started with
a readonly root file-system.

This patch enables running guile early in runsystem, and thus prepares for
replacing the runsystem shell script with a guile program, by embedding the
servers/socket/1 passive translator into the hurd system image using xattr.

* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Change optional root
parameter to keyword #:root.  Add #:hurd keyword parameter.  Use it to
create servers/socket/1 (pipe) and proc passive xattr translators.
* gnu/build/image.scm (initialize-root-partition): Update caller.
* gnu/system/image.scm (with-imported-modules*): Include (ice-9 optargs).
* gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use it to
update caller.
* guix/scripts/system.scm (install): Update caller.

Change-Id: Ib3a672ae78bd969a2a4c0e33db8e38ccf71238ba
Merges: #8609
2026-05-19 18:34:56 +02:00
Janneke Nieuwenhuizen b8f6ad6750 system: hurd-boot: Robustify passive-translator-xattr?.
* gnu/build/hurd-boot.scm (passive-translator-xattr?): Check for existance of
file-name first to avoid spurious backtrace.  Mention caveat of reading
xattrs on Linux in docstring.
* gnu/build/hurd-boot.scm (set-translator):   Mention caveat of writing
xattrs on Linux in docstring.

Change-Id: I0586359add5c565f5857c4923756840010e42cd5
2026-05-19 18:33:13 +02:00
brian cully a5a45d1822 gnu: hurd: Fix second boot.
Don't create /dev/random with a passive translator, so that it won't try to
start while the/var/lib/random-seed is read-only.

* gnu/build/hurd-boot.scm (set-hurd-device-translators): Do not create
/var/lib/random-seed, /dev/random, /dev/urandom.
* gnu/packages/hurd.scm (hurd)[arguments]: Create /var/lib-random-seed,
/dev/random, /dev/urandom as active translators in runsystem.

Change-Id: Id31dda3bd007a78a487a9a3df8dfc25d749f6b7d
Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>
2026-05-13 20:42:37 +02:00
Janneke Nieuwenhuizen d6a9c314ce system: hurd: Fix fsck.
* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Create "/dev/console".
* gnu/system.scm (hurd-multiboot-modules): Run ext2fs.static with --readonly.
* gnu/packages/hurd.scm (hurd)[arguments]: Use "fsysopts / --update
--writable" and "fsck --preen --writable" and Debian's return value meme.
Also substitute "/sbin/" in "sbin/fsck.c".

Change-Id: I7bc3cf334939d6f1f00ee8615810338167904e8e
Co-authored-by: Yelninei <yelninei@tutamail.com>
Fixes: #4820
2026-05-13 20:42:36 +02:00
Janneke Nieuwenhuizen d34477d22e system: hurd-boot: Redefine /dev/urandom.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Define /dev/urandom
with --fast instead of symlinking to /dev/random.

Change-Id: Ib8ed5848cc929a367d19ed0083101c01967acb42
2026-05-13 20:42:36 +02:00
Janneke Nieuwenhuizen 2e6aa8cc76 system: hurd-boot: Create initial random seed.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Create some content
in /var/lib/random-seed.

Change-Id: Ib8ed5848cc929a367d19ed0083101c01967acb42
2026-05-13 20:42:36 +02:00
Yelninei 9051aa1bd1 hurd-boot: change /etc/mtab to /var/run/mtab.
This corresponds to "_PATH_MOUNTED" in paths.h from libc.

* gnu/build/hurd-boot.scm (set-hurd-device-translators): Change etc/mtab to var/run/mtab.

Change-Id: I688289fe4b8143ae14a8eef5ba1625c4ebd2a209
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-12 22:22:01 +02:00
Janneke Nieuwenhuizen f2cefd700d hurd-boot: Support second boot.
* gnu/build/hurd-boot.scm (boot-hurd-system): Check for stale shepherd socket
and remove it.  Be chattier about /hurd symlink replacement.

Change-Id: I5e528c131ebeadb7ebc9727336a0f9301af3e68e
2024-11-11 07:28:33 +01:00
Janneke Nieuwenhuizen 7c93145d9e hurd-boot: Support system init: Create essential device nodes.
* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Cater for existing
directories (dev, servers).
(set-hurd-device-translators): Remove /servers/socket/1, that is created by
libexec/console-run.  Cater for nonexistent /dev/console.
(boot-hurd-system): Call make-hurd-device-nodes on initial run.
2024-10-15 11:13:48 +02:00
Janneke Nieuwenhuizen 0a1af11ff8 hurd-boot: Setup/dev/hdX, /dev/hdXsY IDE device node translators.
The gnumach builtin IDE hd devices are still used, unless booting with
"noide".

* gnu/build/hurd-boot.scm (set-hurd-device-translators): Create /dev/hd{0..3},
/dev/hd{0..3}s{0..3}.
2023-10-01 15:51:23 +02:00
Janneke Nieuwenhuizen 030b15d466 hurd-boot: Cater for netdde.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Setup translators for
netdde, eth{0,1}.  Create /servers/socket/{inet,inet6} symlinks.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-07-13 18:59:57 +02:00
Janneke Nieuwenhuizen fe873fb417 hurd-boot: Setup pci-arbiter and rumpdisk translators.
* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Create "servers/bus/pci.
(set-hurd-device-translators): Create transators for pci-arbiter, rumpdisk,
and /dev/wd0..3s1..4.

Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
2023-07-13 18:58:58 +02:00
Josselin Poiret e041801e61 hurd-boot: Symlink /hurd before setting up translators.
* gnu/build/hurd-boot.scm (boot-hurd-system): Symlink /hurd before setting up
translators.

Reviewed-by: Janneke Nieuwenhuizen <janneke@gnu.org>
2023-05-17 22:26:06 +02:00
Ludovic Courtès 69fc67b6bb hurd-boot: Fix list of devices with translators.
Fixes a regression introduced in
450f774028 and
e3c6575ee9, which introduced
unquote-splicing without changing quote to quasiquote.

* gnu/build/hurd-boot.scm (set-hurd-device-translators)[devices]: Use
quasiquote, note quote.
2022-12-24 00:45:47 +01:00
Ludovic Courtès e3c6575ee9 system: hurd: Create more ttys.
* gnu/build/hurd-boot.scm (set-hurd-device-translators)[devices]: Add
more /dev/ttyN nodes.
* gnu/system/hurd.scm (%base-services/hurd): Add more
'hurd-getty-service-type' instances.
2022-11-28 11:19:31 +01:00
Ludovic Courtès b5e334aeb8 hurd-boot: Explain why 'getxattr' cannot be used on GNU/Hurd.
This is a followup to f25e8f76fe.

* gnu/build/hurd-boot.scm (translated?): Clarify why 'getxattr' cannot
be used on GNU/Hurd.
2022-11-28 11:19:30 +01:00
Ludovic Courtès 450f774028 hurd-boot: Create more PTY nodes.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Create more
/dev/ptyp* and /dev/ttyp* nodes.
2022-11-28 11:19:30 +01:00
Maxim Cournoyer 0dc019e19a initrd: Use non-hyphenated kernel command-line parameter names.
This is to make it less surprising, given the common convention sets forth by
the kernel Linux command-line parameters.

* gnu/build/linux-boot.scm (boot-system): Rename '--load', '--repl', '--root'
and '--system' to 'gnu.load', 'gnu.repl', 'root' and 'gnu.system',
respectively.  Adjust doc.
(find-long-option): Adjust doc.
* gnu/installer/parted.scm (installer-root-partition-path): Adjust accordingly.
* gnu/system.scm (bootable-kernel-arguments): Add a VERSION argument and
update doc.  Use VERSION to conditionally return old style vs new style initrd
arguments.
(%boot-parameters-version): Increment to 1.
(operating-system-boot-parameters): Adjust doc.
(operating-system-boot-parameters-file): Likewise.
* gnu/system/linux-initrd.scm (raw-initrd, base-initrd): Likewise.
* doc/guix.texi: Adjust doc.
* gnu/build/activation.scm (boot-time-system): Adjust accordingly.
* gnu/build/hurd-boot.scm (boot-hurd-system): Likewise.
* gnu/packages/commencement.scm (%final-inputs-riscv64): Adjust comment.
2022-03-01 10:30:17 -05:00
Ludovic Courtès 223f1b1eb3 services: static-networking: Change interface to mimic netlink.
* gnu/services/base.scm (<static-networking>)[interface, ip, netmask]
[gateway]: Remove.
[addresses, links, routes]: New fields.
[requirement]: Default to '(udev).
(<network-address>, <network-link>, <network-route>): New record types.
(ensure-no-separate-netmask, %ensure-no-separate-netmask): Remove.
(ipv6-address?, cidr->netmask, ip+netmask->cidr)
(network-set-up/hurd, network-tear-down/hurd)
(network-set-up/linux, network-tear-down/linux)
(static-networking->hurd-pfinet-options): New procedures.
(static-networking-shepherd-service): New procedure.
(static-networking-shepherd-services): Rewrite in terms of the above.
(static-networking-service): Deprecate.  Adjust to new
'static-networking' API.
(%base-services): Likewise.
* gnu/system/install.scm (%installation-services): Likewise.
* gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate
'loopback' from 'networking'.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove
"servers/socket/2".
* gnu/tests/networking.scm (run-openvswitch-test)["networking has
started on ovs0"]: Check for 'networking instead of 'networking-ovs0,
which is no longer provided.
* doc/guix.texi (Networking Setup): Document the new interface.  Remove
documentation of 'static-networking-service'.
(Virtualization Services): Change Ganeti example to use the new
interface.
2021-12-12 23:20:49 +01:00
Ludovic Courtès 3275c9e1f5 hurd-boot: Set pfinet on the right node for AF_INET6.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Fix /servers
file name for AF_INET6.
2021-10-18 10:00:50 +02:00
Ludovic Courtès 57a7aa1ae3 hurd-boot: Set /hurd/magic on /dev/fd.
* gnu/build/hurd-boot.scm (set-hurd-device-translators)[devices]: Add
"/dev/fd".
2020-10-14 15:22:55 +02:00
Ludovic Courtès 44e65a7588 hurd-boot: Create /servers/crash.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Create
/servers/crash.
2020-10-08 12:26:56 +02:00
Jan (janneke) Nieuwenhuizen 65d95e5d85 hurd-boot: Mount /proc, add /etc/mtab.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Mount /proc.  Add
symlink to /etc/mtab into /proc/mounts.
2020-06-27 13:01:40 +02:00
Jan (janneke) Nieuwenhuizen db08a0d203 hurd-boot: Remove duplicate calls to 'scope'.
* gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove duplicate
calls to 'scope'.
2020-06-27 12:59:40 +02:00
Jan (janneke) Nieuwenhuizen f25e8f76fe hurd-boot: Use 'setxattr' instead of invoking settrans.
Note: Using `getxattr' on the Hurd instead of running showtrans does not
work (yet?).

* gnu/build/hurd-boot.scm (setup-translator): Use 'setxattr' instead of
invoking settrans.
* gnu/system.scm (hurd-multiboot-modules): Add --x-xattr-translator-records to
enable xattr-embedding of translators.
2020-06-19 10:40:53 +02:00
Jan (janneke) Nieuwenhuizen 951847ee37 hurd-boot: Create individual translators instead of running MAKEDEV.
* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Do not create
dev/{null,zero,full,random,urandom} mount points.
(passive-translator-xattr?, passive-translator-installed?, translated?,
set-translator, set-hurd-device-translators): New procedures.
(false-if-EEXIST): New macro.
(boot-hurd-system): Use them instead of running MAKEDEV.
2020-06-19 10:38:26 +02:00
Jan (janneke) Nieuwenhuizen 68d8c09465 gnu: services: Add %hurd-startup-service.
This decouples startup of the Hurd from the "hurd" package, moving the RC
script into SYSTEM.

* gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script.
[arguments]: Do not substitute it.  Update "runsystem.sh" to parse kernel
arguments and exec into --system=SYSTEM/rc.
(hurd-rc-script): Move to...
* gnu/services.scm (%hurd-rc-file): ...this new variable.
(hurd-rc-entry): New procedure.
(%hurd-startup-service): Use it in new variable.
* gnu/system.scm (hurd-default-essential-services): Use it.
2020-06-08 14:26:14 +02:00
Jan (janneke) Nieuwenhuizen b37c544196 hurd-boot: Further cleanup of "rc".
* gnu/packages/hurd.scm (hurd-rc-script): Move implementation to ...
* gnu/build/hurd-boot.scm (boot-hurd-system): ...here, new file.
* gnu/build/linux-boot.scm (make-hurd-device-nodes): Move there likewise.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2020-06-08 14:26:14 +02:00