aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2022-11-12 21:59:26 +0800
committerLudovic Courtès <ludo@gnu.org>2022-11-18 15:44:38 +0100
commita6da50d60a2cc3d0f218e38cbc197011b8151554 (patch)
tree969d671775c4f966a2b1d8bb72f29a910f883f54 /gnu/system
parent383b0f05904c5dac8238eeff96ca16873d9c5984 (diff)
downloadguix-a6da50d60a2cc3d0f218e38cbc197011b8151554.tar.gz
guix-a6da50d60a2cc3d0f218e38cbc197011b8151554.zip
linux-initrd: raw-initrd: Add keyword argument #:pre-mount.
* gnu/system/linux-initrd.scm (raw-initrd): Add keyword argument #:pre-mount. Document it. * doc/guix.texi (initial RAM disk): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/linux-initrd.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 4c4c78e444..58e95a1312 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -172,6 +172,7 @@ MODULES and taken from LINUX."
#:key
(linux linux-libre)
(linux-modules '())
+ (pre-mount #t)
(mapped-devices '())
(keyboard-layout #f)
(helper-packages '())
@@ -183,7 +184,8 @@ modules taken from LINUX. 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 'root'. LINUX-MODULES is a list of kernel
modules to be loaded at boot time. MAPPED-DEVICES is a list of device
-mappings to realize before FILE-SYSTEMS are mounted.
+mappings to realize before FILE-SYSTEMS are mounted. PRE-MOUNT is a
+G-expression to evaluate before realizing MAPPED-DEVICES.
HELPER-PACKAGES is a list of packages to be copied in the initrd. It may include
e2fsck/static or other packages needed by the initrd to check root partition.
@@ -255,7 +257,8 @@ upon error."
(map spec->file-system
'#$(map file-system->spec file-systems))
#:pre-mount (lambda ()
- (and #$@device-mapping-commands
+ (and #$pre-mount
+ #$@device-mapping-commands
#$@file-system-scan-commands))
#:linux-modules '#$linux-modules
#:linux-module-directory '#$kodir