From 615a89e3101b1a512008a3ca3239035674c7d098 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 27 Feb 2018 11:16:37 +0100 Subject: linux-initrd: Separate file system module logic. * gnu/system/linux-initrd.scm (vhash, lookup-procedure): New macros. (file-system-type-modules, file-system-modules): New procedures. (base-initrd)[cifs-modules, virtio-9p-modules]: Remove. [file-system-type-predicate]: Remove. Use 'file-system-modules' instead of 'find' + 'file-system-type-predicate'. --- gnu/system/linux-initrd.scm | 60 +++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 24 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 330438bce40..830445ac839 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -39,6 +39,7 @@ #:use-module (gnu system mapped-devices) #:use-module (ice-9 match) #:use-module (ice-9 regex) + #:use-module (ice-9 vlist) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (expression->initrd @@ -242,6 +243,40 @@ FILE-SYSTEMS." (list btrfs-progs/static) '()))) +(define-syntax vhash ;TODO: factorize + (syntax-rules (=>) + "Build a vhash with the given key/value mappings." + ((_) + vlist-null) + ((_ (key others ... => value) rest ...) + (vhash-cons key value + (vhash (others ... => value) rest ...))) + ((_ (=> value) rest ...) + (vhash rest ...)))) + +(define-syntax lookup-procedure + (syntax-rules (else) + "Return a procedure that lookups keys in the given dictionary." + ((_ mapping ... (else default)) + (let ((table (vhash mapping ...))) + (lambda (key) + (match (vhash-assoc key table) + (#f default) + (value value))))))) + +(define file-system-type-modules + ;; Given a file system type, return the list of modules it needs. + (lookup-procedure ("cifs" => '("md4" "ecb" "cifs")) + ("9p" => '("9p" "9pnet_virtio")) + ("btrfs" => '("btrfs")) + ("iso9660" => '("isofs")) + (else '()))) + +(define (file-system-modules file-systems) + "Return the list of Linux modules needed to mount FILE-SYSTEMS." + (append-map (compose file-system-type-modules file-system-type) + file-systems)) + (define* (base-initrd file-systems #:key (linux linux-libre) @@ -272,18 +307,6 @@ loaded at boot time in the order in which they appear." '("virtio_pci" "virtio_balloon" "virtio_blk" "virtio_net" "virtio_console")) - (define cifs-modules - ;; Modules needed to mount CIFS file systems. - '("md4" "ecb" "cifs")) - - (define virtio-9p-modules - ;; Modules for the 9p paravirtualized file system. - '("9p" "9pnet_virtio")) - - (define (file-system-type-predicate type) - (lambda (fs) - (string=? (file-system-type fs) type))) - (define linux-modules ;; Modules added to the initrd and loaded from the initrd. `("ahci" ;for SATA controllers @@ -298,18 +321,7 @@ loaded at boot time in the order in which they appear." ,@(if (or virtio? qemu-networking?) virtio-modules '()) - ,@(if (find (file-system-type-predicate "cifs") file-systems) - cifs-modules - '()) - ,@(if (find (file-system-type-predicate "9p") file-systems) - virtio-9p-modules - '()) - ,@(if (find (file-system-type-predicate "btrfs") file-systems) - '("btrfs") - '()) - ,@(if (find (file-system-type-predicate "iso9660") file-systems) - '("isofs") - '()) + ,@(file-system-modules file-systems) ,@(if volatile-root? '("overlay") '()) -- cgit v1.2.3 From bc499b113a598c0e7863da9887a4133472985713 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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. --- doc/guix.texi | 40 ++++++++++++++++++++++++++++++++-------- gnu/system.scm | 7 +++++++ gnu/system/install.scm | 7 ++----- gnu/system/linux-initrd.scm | 34 ++++++++++++++++++++++------------ gnu/tests/install.scm | 11 +++++------ 5 files changed, 68 insertions(+), 31 deletions(-) (limited to 'gnu/system') diff --git a/doc/guix.texi b/doc/guix.texi index d35ce0e26b4..70e53b3825f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8889,11 +8889,16 @@ the command-line of the kernel---e.g., @code{("console=ttyS0")}. @item @code{bootloader} The system bootloader configuration object. @xref{Bootloader Configuration}. -@item @code{initrd} (default: @code{base-initrd}) +@item @code{initrd-modules} (default: @code{%base-initrd-modules}) @cindex initrd @cindex initial RAM disk -A two-argument monadic procedure that returns an initial RAM disk for -the Linux kernel. @xref{Initial RAM Disk}. +The list of Linux kernel modules that need to be available in the +initial RAM disk. @xref{Initial RAM Disk}. + +@item @code{initrd} (default: @code{base-initrd}) +A monadic procedure that returns an initial RAM disk for the Linux +kernel. This field is provided to support low-level customization and +should rarely be needed for casual use. @xref{Initial RAM Disk}. @item @code{firmware} (default: @var{%base-firmware}) @cindex firmware @@ -19768,7 +19773,27 @@ root file system as well as an initialization script. The latter is responsible for mounting the real root file system, and for loading any kernel modules that may be needed to achieve that. -The @code{initrd} field of an @code{operating-system} declaration allows +The @code{initrd-modules} field of an @code{operating-system} +declaration allows you to specify Linux-libre kernel modules that must +be available in the initrd. In particular, this is where you would list +modules needed to actually drive the hard disk where your root partition +is---although the default value of @code{initrd-modules} should cover +most use cases. For example, assuming you need the @code{megaraid_sas} +module in addition to the default modules to be able to access your root +file system, you would write: + +@example +(operating-system + ;; @dots{} + (initrd-modules (cons "megaraid_sas" %base-initrd-modules))) +@end example + +@defvr {Scheme Variable} %base-initrd-modules +This is the list of kernel modules included in the initrd by default. +@end defvr + +Furthermore, if you need lower-level customization, the @code{initrd} +field of an @code{operating-system} declaration allows you to specify which initrd you would like to use. The @code{(gnu system linux-initrd)} module provides three ways to build an initrd: the high-level @code{base-initrd} procedure and the low-level @@ -19781,11 +19806,10 @@ system declaration like this: @example (initrd (lambda (file-systems . rest) - ;; Create a standard initrd that has modules "foo.ko" - ;; and "bar.ko", as well as their dependencies, in - ;; addition to the modules available by default. + ;; Create a standard initrd but set up networking + ;; with the parameters QEMU expects by default. (apply base-initrd file-systems - #:extra-modules '("foo" "bar") + #:qemu-networking? #t rest))) @end example diff --git a/gnu/system.scm b/gnu/system.scm index 71beee8259d..1bcc1e13840 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")))) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index b61660b4b92..37c591ec3a1 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Marius Bakke @@ -396,10 +396,7 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET." (kernel-arguments (cons (string-append "console=" tty) (operating-system-user-kernel-arguments installation-os))) - (initrd (lambda (fs . rest) - (apply base-initrd fs - #:extra-modules extra-modules - rest))))) + (initrd-modules (append extra-modules %base-initrd-modules)))) (define beaglebone-black-installation-os (embedded-installation-os u-boot-beaglebone-black-bootloader diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 830445ac839..e7f97bb88d6 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -43,6 +43,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (expression->initrd + %base-initrd-modules raw-initrd file-system-packages base-initrd)) @@ -277,14 +278,31 @@ FILE-SYSTEMS." (append-map (compose file-system-type-modules file-system-type) file-systems)) +(define* (default-initrd-modules #:optional (system (%current-system))) + "Return the list of modules included in the initrd by default." + `("ahci" ;for SATA controllers + "usb-storage" "uas" ;for the installation image etc. + "usbhid" "hid-generic" "hid-apple" ;keyboards during early boot + "dm-crypt" "xts" "serpent_generic" "wp512" ;for encrypted root partitions + "nls_iso8859-1" ;for `mkfs.fat`, et.al + ,@(if (string-match "^(x86_64|i[3-6]86)-" system) + '("pata_acpi" "pata_atiixp" ;for ATA controllers + "isci") ;for SAS controllers like Intel C602 + '()))) + +(define-syntax %base-initrd-modules + ;; This more closely matches our naming convention. + (identifier-syntax (default-initrd-modules))) + (define* (base-initrd file-systems #:key (linux linux-libre) + (linux-modules '()) (mapped-devices '()) qemu-networking? volatile-root? (virtio? #t) - (extra-modules '()) + (extra-modules '()) ;deprecated (on-error 'debug)) "Return a monadic derivation that builds a generic initrd, with kernel modules taken from LINUX. FILE-SYSTEMS is a list of file-systems to be @@ -307,17 +325,9 @@ loaded at boot time in the order in which they appear." '("virtio_pci" "virtio_balloon" "virtio_blk" "virtio_net" "virtio_console")) - (define linux-modules + (define linux-modules* ;; Modules added to the initrd and loaded from the initrd. - `("ahci" ;for SATA controllers - "usb-storage" "uas" ;for the installation image etc. - "usbhid" "hid-generic" "hid-apple" ;keyboards during early boot - "dm-crypt" "xts" "serpent_generic" "wp512" ;for encrypted root partitions - "nls_iso8859-1" ;for `mkfs.fat`, et.al - ,@(if (string-match "^(x86_64|i[3-6]86)-" (%current-system)) - '("pata_acpi" "pata_atiixp" ;for ATA controllers - "isci") ;for SAS controllers like Intel C602 - '()) + `(,@linux-modules ,@(if (or virtio? qemu-networking?) virtio-modules '()) @@ -332,7 +342,7 @@ loaded at boot time in the order in which they appear." (raw-initrd file-systems #:linux linux - #:linux-modules linux-modules + #:linux-modules linux-modules* #:mapped-devices mapped-devices #:helper-packages helper-packages #:qemu-networking? qemu-networking? diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 3ac4a579da1..e3bb1b46afd 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -565,11 +565,10 @@ where /gnu lives on a separate partition.") (bootloader grub-bootloader) (target "/dev/vdb"))) (kernel-arguments '("console=ttyS0")) - (initrd (lambda (file-systems . rest) - ;; Add a kernel module for RAID-0 (aka. "stripe"). - (apply base-initrd file-systems - #:extra-modules '("raid0") - rest))) + + ;; Add a kernel module for RAID-0 (aka. "stripe"). + (initrd-modules (cons "raid0" %base-initrd-modules)) + (mapped-devices (list (mapped-device (source (list "/dev/vda2" "/dev/vda3")) (target "/dev/md0") -- cgit v1.2.3 From 424cea8083a4cee63290c80235aed61bd12affb1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 27 Feb 2018 14:55:43 +0100 Subject: guix system: Check for the lack of modules in the initrd. * guix/scripts/system.scm (check-mapped-devices): Take an OS instead of a list of . Pass #:needed-for-boot? and #:initrd-modules to CHECK. (check-initrd-modules): New procedure. (perform-action): Move 'check-mapped-devices' call first. Add call to 'check-initrd-modules'. * gnu/system/mapped-devices.scm (check-device-initrd-modules): New procedure. (check-luks-device): Add #:initrd-modules and #:needed-for-boot?. Use them to call 'check-device-initrd-modules'. --- gnu/system/mapped-devices.scm | 53 +++++++++++++++++++++++++--------- guix/scripts/system.scm | 67 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 96 insertions(+), 24 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index dbeb0d34364..5ceb5e658cb 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Mark H Weaver ;;; @@ -30,9 +30,12 @@ #:use-module (gnu services shepherd) #:use-module (gnu system uuid) #:autoload (gnu build file-systems) (find-partition-by-luks-uuid) + #:autoload (gnu build linux-modules) + (device-module-aliases matching-modules) #:autoload (gnu packages cryptsetup) (cryptsetup-static) #:autoload (gnu packages linux) (mdadm-static) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) @@ -151,19 +154,43 @@ #~(zero? (system* #$(file-append cryptsetup-static "/sbin/cryptsetup") "close" #$target))) -(define (check-luks-device md) +(define (check-device-initrd-modules device linux-modules location) + "Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate. +DEVICE must be a \"/dev\" file name." + (let ((modules (delete-duplicates + (append-map matching-modules + (device-module-aliases device))))) + (unless (every (cute member <> linux-modules) modules) + (raise (condition + (&message + (message (format #f (G_ "you may need these modules \ +in the initrd for ~a:~{ ~a~}") + device modules))) + (&error-location + (location (source-properties->location location)))))))) + +(define* (check-luks-device md #:key + needed-for-boot? + (initrd-modules '()) + #:allow-other-keys + #:rest rest) "Ensure the source of MD is valid." - (let ((source (mapped-device-source md))) - (or (not (uuid? source)) - (not (zero? (getuid))) - (find-partition-by-luks-uuid (uuid-bytevector source)) - (raise (condition - (&message - (message (format #f (G_ "no LUKS partition with UUID '~a'") - (uuid->string source)))) - (&error-location - (location (source-properties->location - (mapped-device-location md))))))))) + (let ((source (mapped-device-source md)) + (location (mapped-device-location md))) + (or (not (zero? (getuid))) + (if (uuid? source) + (match (find-partition-by-luks-uuid (uuid-bytevector source)) + (#f + (raise (condition + (&message + (message (format #f (G_ "no LUKS partition with UUID '~a'") + (uuid->string source)))) + (&error-location + (location (source-properties->location + (mapped-device-location md))))))) + ((? string? device) + (check-device-initrd-modules device initrd-modules location))) + (check-device-initrd-modules source initrd-modules location))))) (define luks-device-mapping ;; The type of LUKS mapped devices. diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 999ffb010bc..ff322ec785e 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -41,6 +41,10 @@ #:use-module (gnu build install) #:autoload (gnu build file-systems) (find-partition-by-label find-partition-by-uuid) + #:autoload (gnu build linux-modules) + (device-module-aliases matching-modules) + #:autoload (gnu system linux-initrd) + (base-initrd default-initrd-modules) #:use-module (gnu system) #:use-module (gnu bootloader) #:use-module (gnu system file-systems) @@ -624,21 +628,61 @@ any, are available. Raise an error if they're not." ;; Better be safe than sorry. (exit 1)))) -(define (check-mapped-devices mapped-devices) +(define (check-mapped-devices os) "Check that each of MAPPED-DEVICES is valid according to the 'check' procedure of its type." + (define boot-mapped-devices + (operating-system-boot-mapped-devices os)) + + (define (needed-for-boot? md) + (memq md boot-mapped-devices)) + + (define initrd-modules + (operating-system-initrd-modules os)) + (for-each (lambda (md) (let ((check (mapped-device-kind-check (mapped-device-type md)))) ;; We expect CHECK to raise an exception with a detailed - ;; '&message' if something goes wrong, but handle the case - ;; where it just returns #f. - (unless (check md) - (leave (G_ "~a: invalid '~a' mapped device~%") - (location->string - (source-properties->location - (mapped-device-location md))))))) - mapped-devices)) + ;; '&message' if something goes wrong. + (check md + #:needed-for-boot? (needed-for-boot? md) + #:initrd-modules initrd-modules))) + (operating-system-mapped-devices os))) + +(define (check-initrd-modules os) + "Check that modules needed by 'needed-for-boot' file systems in OS are +available in the initrd. Note that mapped devices are responsible for +checking this by themselves in their 'check' procedure." + (define (file-system-/dev fs) + (let ((device (file-system-device fs))) + (match (file-system-title fs) + ('device device) + ('uuid (find-partition-by-uuid device)) + ('label (find-partition-by-label device))))) + + (define (check-device device location) + (let ((modules (delete-duplicates + (append-map matching-modules + (device-module-aliases device))))) + (unless (every (cute member <> (operating-system-initrd-modules os)) + modules) + (raise (condition + (&message + (message (format #f (G_ "you need these modules \ +in the initrd for ~a:~{ ~a~}") + device modules))) + (&error-location (location location))))))) + + (define file-systems + (filter file-system-needed-for-boot? + (operating-system-file-systems os))) + + (for-each (lambda (fs) + (check-device (file-system-/dev fs) + (source-properties->location + (file-system-location fs)))) + file-systems)) ;;; @@ -730,9 +774,10 @@ output when building a system derivation, such as a disk image." ;; instantiating a broken configuration. Assume that we can only check if ;; running as root. (when (memq action '(init reconfigure)) + (check-mapped-devices os) (when (zero? (getuid)) - (check-file-system-availability (operating-system-file-systems os))) - (check-mapped-devices (operating-system-mapped-devices os))) + (check-file-system-availability (operating-system-file-systems os)) + (check-initrd-modules os))) (mlet* %store-monad ((sys (system-derivation-for-action os action -- cgit v1.2.3 From 3cb3a4e6e5c8252829a4ef9fd3d0f897c0c5e53f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 3 Mar 2018 00:04:17 +0100 Subject: linux-initrd: 'file-system-modules' returns the right module list. Fixes a bug whereby, for an "iso9660" file system, it would return '("iso9660" "isofs"), i.e., both the key and the value. Reported by Danny Milosavljevic at . * gnu/system/linux-initrd.scm (lookup-procedure): 'vhash-assoc' returns a key/value pair; match it. --- gnu/system/linux-initrd.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index e7f97bb88d6..7a7592bf0a1 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -262,8 +262,8 @@ FILE-SYSTEMS." (let ((table (vhash mapping ...))) (lambda (key) (match (vhash-assoc key table) - (#f default) - (value value))))))) + (#f default) + ((key . value) value))))))) (define file-system-type-modules ;; Given a file system type, return the list of modules it needs. -- cgit v1.2.3 From 5a3716aebfa3a967165499589f044514dc1d98d7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 3 Mar 2018 01:25:15 +0100 Subject: vm: Add missing modules to the 'expression->derivation-in-linux-vm' initrd. Fixes a regression introduced in bc499b113a598c0e7863da9887a4133472985713, whereby the default initrd used by 'expression->derivation-in-linux-vm' would lack all the usual modules: virtio, nls_iso8859-1, etc. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass #:linux-modules to 'base-initrd'. --- gnu/system/vm.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/system') diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 345cecedd89..db29fd5ce93 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -143,6 +143,7 @@ made available under the /xchg CIFS share." (return initrd) (base-initrd %linux-vm-file-systems #:linux linux + #:linux-modules %base-initrd-modules #:virtio? #t #:qemu-networking? #t)))) -- cgit v1.2.3 From f850e0da8e56b8e38b0a6c49f4c0618f16c8c572 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 3 Mar 2018 01:29:18 +0100 Subject: system: beaglebone-black: Use 'initrd-modules'. * gnu/system/examples/beaglebone-black.tmpl: Use 'initrd-modules' instead of 'initrd'. --- gnu/system/examples/beaglebone-black.tmpl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/examples/beaglebone-black.tmpl b/gnu/system/examples/beaglebone-black.tmpl index 4b090e0fb73..97201330c7e 100644 --- a/gnu/system/examples/beaglebone-black.tmpl +++ b/gnu/system/examples/beaglebone-black.tmpl @@ -15,11 +15,10 @@ (bootloader (bootloader-configuration (bootloader u-boot-beaglebone-black-bootloader) (target "/dev/mmcblk1"))) - (initrd (lambda (fs . rest) - (apply base-initrd fs - ;; This module is required to mount the sd card. - #:extra-modules (list "omap_hsmmc") - rest))) + + ;; This module is required to mount the SD card. + (initrd-modules (cons "omap_hsmmc" %base-initrd-modules)) + (file-systems (cons (file-system (device "my-root") (title 'label) -- cgit v1.2.3 From eac026e5c80caae88a6cef317a46007dca343578 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 3 Mar 2018 09:33:34 +0100 Subject: linux-initrd: Add virtio modules to '%base-initrd-modules'. Fixes a regression in installation tests, whereby 'guix system init' would report that virtio modules are missing for the target devices. In practice virtio modules were always available since 'base-initrd' was always called with #:virtio? #t. This commit simply moves them to '%base-initrd-modules' so that 'guix system' knows they're available. Reported by Danny Milosavljevic at . * gnu/system/linux-initrd.scm (default-initrd-modules): Add virtio modules. (base-initrd): Remove #:virtio? and 'virtio-modules'. * gnu/system/vm.scm (expression->derivation-in-linux-vm) (system-qemu-image, virtualized-operating-system): Remove uses of #:virtio?. * doc/guix.texi (Initial RAM Disk): Update 'base-initrd' doc. --- doc/guix.texi | 18 +++++++++--------- gnu/system/linux-initrd.scm | 26 ++++++++++---------------- gnu/system/vm.scm | 9 +-------- 3 files changed, 20 insertions(+), 33 deletions(-) (limited to 'gnu/system') diff --git a/doc/guix.texi b/doc/guix.texi index 70e53b3825f..50438f7cb4f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -19893,18 +19893,18 @@ to it are lost. @deffn {Monadic Procedure} base-initrd @var{file-systems} @ [#:mapped-devices '()] [#:qemu-networking? #f] [#:volatile-root? #f]@ - [#:virtio? #t] [#:extra-modules '()] -Return a monadic derivation that builds a generic initrd. @var{file-systems} is -a list of file systems to be mounted by the initrd like for @code{raw-initrd}. -@var{mapped-devices}, @var{qemu-networking?} and @var{volatile-root?} -also behaves as in @code{raw-initrd}. + [#:linux-modules '()] +Return a monadic derivation that builds a generic initrd, with kernel +modules taken from @var{linux}. @var{file-systems} is a list of file-systems to be +mounted by the initrd, possibly in addition to the root file system specified +on the kernel command line via @code{--root}. @var{mapped-devices} is a list of device +mappings to realize before @var{file-systems} are mounted. -When @var{virtio?} is true, load additional modules so that the -initrd can be used as a QEMU guest with para-virtualized I/O drivers. +@var{qemu-networking?} and @var{volatile-root?} behaves as in @code{raw-initrd}. The initrd is automatically populated with all the kernel modules necessary -for @var{file-systems} and for the given options. However, additional kernel -modules can be listed in @var{extra-modules}. They will be added to the initrd, and +for @var{file-systems} and for the given options. Additional kernel +modules can be listed in @var{linux-modules}. They will be added to the initrd, and loaded at boot time in the order in which they appear. @end deffn diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 7a7592bf0a1..e0cb59c0098 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -280,6 +280,11 @@ FILE-SYSTEMS." (define* (default-initrd-modules #:optional (system (%current-system))) "Return the list of modules included in the initrd by default." + (define virtio-modules + ;; Modules for Linux para-virtualized devices, for use in QEMU guests. + '("virtio_pci" "virtio_balloon" "virtio_blk" "virtio_net" + "virtio_console")) + `("ahci" ;for SATA controllers "usb-storage" "uas" ;for the installation image etc. "usbhid" "hid-generic" "hid-apple" ;keyboards during early boot @@ -288,7 +293,9 @@ FILE-SYSTEMS." ,@(if (string-match "^(x86_64|i[3-6]86)-" system) '("pata_acpi" "pata_atiixp" ;for ATA controllers "isci") ;for SAS controllers like Intel C602 - '()))) + '()) + + ,@virtio-modules)) (define-syntax %base-initrd-modules ;; This more closely matches our naming convention. @@ -301,7 +308,6 @@ FILE-SYSTEMS." (mapped-devices '()) qemu-networking? volatile-root? - (virtio? #t) (extra-modules '()) ;deprecated (on-error 'debug)) "Return a monadic derivation that builds a generic initrd, with kernel @@ -312,25 +318,13 @@ mappings to realize before FILE-SYSTEMS are mounted. QEMU-NETWORKING? and VOLATILE-ROOT? behaves as in raw-initrd. -When VIRTIO? is true, load additional modules so the initrd can -be used as a QEMU guest with the root file system on a para-virtualized block -device. - The initrd is automatically populated with all the kernel modules necessary -for FILE-SYSTEMS and for the given options. However, additional kernel -modules can be listed in EXTRA-MODULES. They will be added to the initrd, and +for FILE-SYSTEMS and for the given options. Additional kernel +modules can be listed in LINUX-MODULES. They will be added to the initrd, and loaded at boot time in the order in which they appear." - (define virtio-modules - ;; Modules for Linux para-virtualized devices, for use in QEMU guests. - '("virtio_pci" "virtio_balloon" "virtio_blk" "virtio_net" - "virtio_console")) - (define linux-modules* ;; Modules added to the initrd and loaded from the initrd. `(,@linux-modules - ,@(if (or virtio? qemu-networking?) - virtio-modules - '()) ,@(file-system-modules file-systems) ,@(if volatile-root? '("overlay") diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index db29fd5ce93..91ff32ce9a5 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -144,7 +144,6 @@ made available under the /xchg CIFS share." (base-initrd %linux-vm-file-systems #:linux linux #:linux-modules %base-initrd-modules - #:virtio? #t #:qemu-networking? #t)))) (define builder @@ -513,12 +512,7 @@ of the GNU system as described by OS." (let ((os (operating-system (inherit os) - ;; Use an initrd with the whole QEMU shebang. - (initrd (lambda (file-systems . rest) - (apply (operating-system-initrd os) - file-systems - #:virtio? #t - rest))) + ;; Assume we have an initrd with the whole QEMU shebang. ;; Force our own root file system. Refer to it by UUID so that ;; it works regardless of how the image is used ("qemu -hda", @@ -615,7 +609,6 @@ environment with the store shared with the host. MAPPINGS is a list of (apply (operating-system-initrd os) file-systems #:volatile-root? #t - #:virtio? #t rest))) ;; Disable swap. -- cgit v1.2.3 From 6c4458172d12dbda969c2eae5b3b6be19a068780 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès 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/services/base.scm | 64 +++++++++++++++++++++++--------------------------- gnu/system.scm | 3 +-- gnu/system/install.scm | 2 +- 3 files changed, 32 insertions(+), 37 deletions(-) (limited to 'gnu/system') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 69e211ffa31..be30f2d9c3f 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -55,7 +55,6 @@ #:export (fstab-service-type root-file-system-service file-system-service-type - user-unmount-service swap-service user-processes-service-type host-name-service @@ -464,7 +463,36 @@ FILE-SYSTEM." (start #~(const #t)) (stop #~(const #f)))) - (cons sink (map file-system-shepherd-service file-systems)))) + (define known-mount-points + (map file-system-mount-point file-systems)) + + (define user-unmount + (shepherd-service + (documentation "Unmount manually-mounted file systems.") + (provision '(user-file-systems)) + (start #~(const #t)) + (stop #~(lambda args + (define (known? mount-point) + (member mount-point + (cons* "/proc" "/sys" '#$known-mount-points))) + + ;; Make sure we don't keep the user's mount points busy. + (chdir "/") + + (for-each (lambda (mount-point) + (format #t "unmounting '~a'...~%" mount-point) + (catch 'system-error + (lambda () + (umount mount-point)) + (lambda args + (let ((errno (system-error-errno args))) + (format #t "failed to unmount '~a': ~a~%" + mount-point (strerror errno)))))) + (filter (negate known?) (mount-points))) + #f)))) + + (cons* sink user-unmount + (map file-system-shepherd-service file-systems)))) (define file-system-service-type (service-type (name 'file-systems) @@ -483,38 +511,6 @@ FILE-SYSTEM." "Provide Shepherd services to mount and unmount the given file systems, as well as corresponding @file{/etc/fstab} entries."))) -(define user-unmount-service-type - (shepherd-service-type - 'user-file-systems - (lambda (known-mount-points) - (shepherd-service - (documentation "Unmount manually-mounted file systems.") - (provision '(user-file-systems)) - (start #~(const #t)) - (stop #~(lambda args - (define (known? mount-point) - (member mount-point - (cons* "/proc" "/sys" '#$known-mount-points))) - - ;; Make sure we don't keep the user's mount points busy. - (chdir "/") - - (for-each (lambda (mount-point) - (format #t "unmounting '~a'...~%" mount-point) - (catch 'system-error - (lambda () - (umount mount-point)) - (lambda args - (let ((errno (system-error-errno args))) - (format #t "failed to unmount '~a': ~a~%" - mount-point (strerror errno)))))) - (filter (negate known?) (mount-points))) - #f)))))) - -(define (user-unmount-service known-mount-points) - "Return a service whose sole purpose is to unmount file systems not listed -in KNOWN-MOUNT-POINTS when it is stopped." - (service user-unmount-service-type known-mount-points)) ;;; diff --git a/gnu/system.scm b/gnu/system.scm index 1bcc1e13840..eb4b63c428f 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 diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 37c591ec3a1..97f5abe0b6c 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -133,7 +133,7 @@ the given target.") (stop #~(lambda (target) ;; Delete the temporary directory, but leave everything ;; mounted as there may still be processes using it since - ;; 'user-processes' doesn't depend on us. The 'user-unmount' + ;; 'user-processes' doesn't depend on us. The 'user-file-systems' ;; service will unmount TARGET eventually. (delete-file-recursively (string-append target #$%backing-directory)))))))) -- cgit v1.2.3 From ca23693d280de5c4031058da4d3041d830080484 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 7 Mar 2018 10:41:06 +0100 Subject: linux-initrd: Factorize 'check-device-initrd-modules'. * gnu/system/mapped-devices.scm (check-device-initrd-modules): Move to... * gnu/system/linux-initrd.scm (check-device-initrd-modules): ... here. New procedure. * po/guix/POTFILES.in: Add it. * guix/scripts/system.scm (check-initrd-modules)[check-device]: Remove. Use 'check-device-initrd-modules' instead. --- gnu/system/linux-initrd.scm | 24 +++++++++++++++++++++++- gnu/system/mapped-devices.scm | 19 ++----------------- guix/scripts/system.scm | 23 +++++------------------ po/guix/POTFILES.in | 1 + 4 files changed, 31 insertions(+), 36 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index e0cb59c0098..d75caed83e5 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -24,6 +24,7 @@ #:use-module (guix store) #:use-module (guix gexp) #:use-module (guix utils) + #:use-module (guix i18n) #:use-module ((guix store) #:select (%store-prefix)) #:use-module ((guix derivations) @@ -37,16 +38,22 @@ #:select (%guile-static-stripped)) #:use-module (gnu system file-systems) #:use-module (gnu system mapped-devices) + #:autoload (gnu build linux-modules) + (device-module-aliases matching-modules) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 vlist) + #:use-module (ice-9 format) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) + #:use-module (srfi srfi-35) #:export (expression->initrd %base-initrd-modules raw-initrd file-system-packages - base-initrd)) + base-initrd + check-device-initrd-modules)) ;;; Commentary: @@ -343,4 +350,19 @@ loaded at boot time in the order in which they appear." #:volatile-root? volatile-root? #:on-error on-error)) +(define (check-device-initrd-modules device linux-modules location) + "Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate. +DEVICE must be a \"/dev\" file name." + (let ((modules (delete-duplicates + (append-map matching-modules + (device-module-aliases device))))) + (unless (every (cute member <> linux-modules) modules) + (raise (condition + (&message + (message (format #f (G_ "you may need these modules \ +in the initrd for ~a:~{ ~a~}") + device modules))) + (&error-location + (location (source-properties->location location)))))))) + ;;; linux-initrd.scm ends here diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index 5ceb5e658cb..e6ac6352314 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -29,9 +29,9 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system uuid) + #:use-module ((gnu system linux-initrd) + #:select (check-device-initrd-modules)) #:autoload (gnu build file-systems) (find-partition-by-luks-uuid) - #:autoload (gnu build linux-modules) - (device-module-aliases matching-modules) #:autoload (gnu packages cryptsetup) (cryptsetup-static) #:autoload (gnu packages linux) (mdadm-static) #:use-module (srfi srfi-1) @@ -154,21 +154,6 @@ #~(zero? (system* #$(file-append cryptsetup-static "/sbin/cryptsetup") "close" #$target))) -(define (check-device-initrd-modules device linux-modules location) - "Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate. -DEVICE must be a \"/dev\" file name." - (let ((modules (delete-duplicates - (append-map matching-modules - (device-module-aliases device))))) - (unless (every (cute member <> linux-modules) modules) - (raise (condition - (&message - (message (format #f (G_ "you may need these modules \ -in the initrd for ~a:~{ ~a~}") - device modules))) - (&error-location - (location (source-properties->location location)))))))) - (define* (check-luks-device md #:key needed-for-boot? (initrd-modules '()) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index ff322ec785e..acfccce96d1 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -43,8 +43,7 @@ (find-partition-by-label find-partition-by-uuid) #:autoload (gnu build linux-modules) (device-module-aliases matching-modules) - #:autoload (gnu system linux-initrd) - (base-initrd default-initrd-modules) + #:use-module (gnu system linux-initrd) #:use-module (gnu system) #:use-module (gnu bootloader) #:use-module (gnu system file-systems) @@ -661,27 +660,15 @@ checking this by themselves in their 'check' procedure." ('uuid (find-partition-by-uuid device)) ('label (find-partition-by-label device))))) - (define (check-device device location) - (let ((modules (delete-duplicates - (append-map matching-modules - (device-module-aliases device))))) - (unless (every (cute member <> (operating-system-initrd-modules os)) - modules) - (raise (condition - (&message - (message (format #f (G_ "you need these modules \ -in the initrd for ~a:~{ ~a~}") - device modules))) - (&error-location (location location))))))) - (define file-systems (filter file-system-needed-for-boot? (operating-system-file-systems os))) (for-each (lambda (fs) - (check-device (file-system-/dev fs) - (source-properties->location - (file-system-location fs)))) + (check-device-initrd-modules (file-system-/dev fs) + (operating-system-initrd-modules os) + (source-properties->location + (file-system-location fs)))) file-systems)) diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 6510b99e8f5..ba096053751 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -5,6 +5,7 @@ gnu/packages.scm gnu/services.scm gnu/system.scm gnu/services/shepherd.scm +gnu/system/linux-initrd.scm gnu/system/shadow.scm guix/scripts.scm guix/scripts/build.scm -- cgit v1.2.3 From abfbdafd0ee331770f783a75cff29aada9fbf4ae Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 7 Mar 2018 11:00:44 +0100 Subject: linux-initrd: Add a hint for the missing module error. * gnu/system/linux-initrd.scm (check-device-initrd-modules): Add a '&fix-hint'. --- gnu/system/linux-initrd.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gnu/system') diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index d75caed83e5..1eb5f5130d6 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -362,6 +362,18 @@ DEVICE must be a \"/dev\" file name." (message (format #f (G_ "you may need these modules \ in the initrd for ~a:~{ ~a~}") device modules))) + (&fix-hint + (hint (format #f (G_ "Try adding them to the +@code{initrd-modules} field of your @code{operating-system} declaration, along +these lines: + +@example + (operating-system + ;; @dots{} + (initrd-modules (append (list~{ ~s~}) + %base-initrd-modules))) +@end example\n") + modules))) (&error-location (location (source-properties->location location)))))))) -- cgit v1.2.3 From dffc5ab5e47e45b94188828205c8d567994926ad Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 8 Mar 2018 11:55:06 +0100 Subject: vm: Use 9p mount tags below 32 chars. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Björn Höfling . * gnu/system/vm.scm (file-system->mount-tag): Use 'sha1' to compute the tag. --- gnu/system/vm.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 91ff32ce9a5..ae8780d2e18 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -30,6 +30,8 @@ #:use-module (guix records) #:use-module (guix modules) #:use-module (guix utils) + #:use-module (guix hash) + #:use-module (guix base32) #:use-module ((gnu build vm) #:select (qemu-command)) @@ -544,13 +546,13 @@ of the GNU system as described by OS." (define (file-system->mount-tag fs) "Return a 9p mount tag for host file system FS." - ;; QEMU mount tags cannot contain slashes and cannot start with '_'. - ;; Compute an identifier that corresponds to the rules. + ;; QEMU mount tags must be ASCII, at most 31-byte long, cannot contain + ;; slashes, and cannot start with '_'. Compute an identifier that + ;; corresponds to the rules. (string-append "TAG" - (string-map (match-lambda - (#\/ #\_) - (chr chr)) - fs))) + (string-drop (bytevector->base32-string + (sha1 (string->utf8 fs))) + 4))) (define (mapping->file-system mapping) "Return a 9p file system that realizes MAPPING." -- cgit v1.2.3 From 8d5c14edf5a6d01f859b1aa00c836ffdb5ddecf4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 10 Mar 2018 00:15:59 +0100 Subject: linux-initrd: Skip initrd module check when 'modules.alias' can't be found. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . Reported by Tomáš Čech . * gnu/system/linux-initrd.scm (check-device-initrd-modules): Call 'known-module-aliases' and catch 'system-error around it. Pass it to 'matching-modules'. --- gnu/system/linux-initrd.scm | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 1eb5f5130d6..16a8c437538 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -353,17 +353,27 @@ loaded at boot time in the order in which they appear." (define (check-device-initrd-modules device linux-modules location) "Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate. DEVICE must be a \"/dev\" file name." - (let ((modules (delete-duplicates - (append-map matching-modules - (device-module-aliases device))))) - (unless (every (cute member <> linux-modules) modules) - (raise (condition - (&message - (message (format #f (G_ "you may need these modules \ + (define aliases + ;; Attempt to load 'modules.alias' from the current kernel, assuming we're + ;; on GuixSD, and assuming that corresponds to the kernel we'll be + ;; installing. Skip the whole thing if that file cannot be read. + (catch 'system-error + (lambda () + (known-module-aliases)) + (const #f))) + + (when aliases + (let ((modules (delete-duplicates + (append-map (cut matching-modules <> aliases) + (device-module-aliases device))))) + (unless (every (cute member <> linux-modules) modules) + (raise (condition + (&message + (message (format #f (G_ "you may need these modules \ in the initrd for ~a:~{ ~a~}") - device modules))) - (&fix-hint - (hint (format #f (G_ "Try adding them to the + device modules))) + (&fix-hint + (hint (format #f (G_ "Try adding them to the @code{initrd-modules} field of your @code{operating-system} declaration, along these lines: @@ -373,8 +383,8 @@ these lines: (initrd-modules (append (list~{ ~s~}) %base-initrd-modules))) @end example\n") - modules))) - (&error-location - (location (source-properties->location location)))))))) + modules))) + (&error-location + (location (source-properties->location location))))))))) ;;; linux-initrd.scm ends here -- cgit v1.2.3 From 0803ddf2677ead5e9d8ef698316125e0c8b9c998 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sat, 10 Mar 2018 09:23:00 +0100 Subject: linux-initrd: Autoload known-module-aliases. * gnu/system/linux-initrd.scm: Autoload known-module-aliases. --- gnu/system/linux-initrd.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/system') diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 16a8c437538..410484390c5 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -39,7 +39,7 @@ #:use-module (gnu system file-systems) #:use-module (gnu system mapped-devices) #:autoload (gnu build linux-modules) - (device-module-aliases matching-modules) + (device-module-aliases matching-modules known-module-aliases) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 vlist) -- cgit v1.2.3