From bc499b113a598c0e7863da9887a4133472985713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 27 Feb 2018 11:42:09 +0100 Subject: system: Add 'initrd-modules' field. * gnu/system.scm ()[initrd-modules]: New field. (operating-system-initrd-file): Pass #:linux-modules to 'make-initrd'. * gnu/system/linux-initrd.scm (default-initrd-modules): New procedure. (%base-initrd-modules): New macro. (base-initrd): Add #:linux-modules and honor it. * gnu/system/install.scm (embedded-installation-os): Use 'initrd-modules' instead of 'initrd'. * gnu/tests/install.scm (%raid-root-os): Likewise. * doc/guix.texi (operating-system Reference): Add 'initrd-modules'. (Initial RAM Disk): Document it. Adjust example to not use #:extra-modules. --- gnu/system.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index 71beee8259..1bcc1e1384 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -74,6 +74,7 @@ operating-system-kernel operating-system-kernel-file operating-system-kernel-arguments + operating-system-initrd-modules operating-system-initrd operating-system-users operating-system-groups @@ -154,6 +155,10 @@ booted from ROOT-DEVICE" (initrd operating-system-initrd ; (list fs) -> M derivation (default base-initrd)) + (initrd-modules operating-system-initrd-modules ; list of strings + (thunked) ; it's system-dependent + (default %base-initrd-modules)) + (firmware operating-system-firmware ; list of packages (default %base-firmware)) @@ -846,6 +851,8 @@ hardware-related operations as necessary when booting a Linux container." (mlet %store-monad ((initrd (make-initrd boot-file-systems #:linux (operating-system-kernel os) + #:linux-modules + (operating-system-initrd-modules os) #:mapped-devices mapped-devices))) (return (file-append initrd "/initrd")))) -- cgit v1.2.3 From 6c4458172d12dbda969c2eae5b3b6be19a068780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 7 Mar 2018 10:00:07 +0100 Subject: services: file-systems: Include 'user-file-systems' service. Previously the KNOWN-FS value used in 'essential-services' would be incomplete: it would lack all the file systems provided by services that extend 'file-system-service-type' (/sys/fs/cgroup, /proc/sys/fs/binfmt_misc, etc.) Consequently, upon shutdown, 'user-processes' would unmount these file systems before their corresponding service had been stopped; when their corresponding (e.g., 'file-system-/proc/sys/fs/binfmt_misc') was stopped, its 'umount' call would fail. This was harmless in practice, but this patch makes sure things work as intended and file systems are unmounted in the right order. * gnu/services/base.scm (file-system-shepherd-services): Instantiate 'user-file-systems' Shepherd service from here. (user-unmount-service-type, user-unmount-service): Remove. * gnu/system.scm (essential-services): Remove call to 'user-unmount-service'. * gnu/system/install.scm (cow-store-service-type): Adjust comment. --- gnu/system.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index 1bcc1e1384..eb4b63c428 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -453,7 +453,6 @@ a container or that of a \"bare metal\" system." (let* ((mappings (device-mapping-services os)) (root-fs (root-file-system-service)) (other-fs (non-boot-file-system-service os)) - (unmount (user-unmount-service known-fs)) (swaps (swap-services os)) (procs (service user-processes-service-type)) (host-name (host-name-service (operating-system-host-name os))) @@ -478,7 +477,7 @@ a container or that of a \"bare metal\" system." (service fstab-service-type '()) (session-environment-service (operating-system-environment-variables os)) - host-name procs root-fs unmount + host-name procs root-fs (service setuid-program-service-type (operating-system-setuid-programs os)) (service profile-service-type -- cgit v1.2.3