aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-01-31 14:26:30 +0100
committerLudovic Courtès <ludo@gnu.org>2014-01-31 14:26:30 +0100
commit44ddf33ed5b86fd79921aba5572a82c2a940808c (patch)
treea4f49fcae010eaaae809d93753a726b8bdb103a5 /gnu/system
parent70b33d81cfe4f2192a2167a82e55aabc4401c8a6 (diff)
downloadguix-44ddf33ed5b86fd79921aba5572a82c2a940808c.tar.gz
guix-44ddf33ed5b86fd79921aba5572a82c2a940808c.zip
gnu: linux-initrd: Allow the root file system to be volatile.
* gnu/system/linux-initrd.scm (qemu-initrd): Add 'volatile-root?' parameter. * guix/build/linux-initrd.scm (boot-system): Likewise. Honor it.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/linux-initrd.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 1cc1d3b147..9520473d01 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -191,6 +191,7 @@ list of Guile module names to be embedded in the initrd."
(define* (qemu-initrd #:key
guile-modules-in-chroot?
+ volatile-root?
(mounts `((cifs "/store" ,(%store-prefix))
(cifs "/xchg" "/xchg"))))
"Return a monadic derivation that builds an initrd for use in a QEMU guest
@@ -202,7 +203,10 @@ be mounted atop the root file system, where each item has the form:
When GUILE-MODULES-IN-CHROOT? is true, make core Guile modules available in
the new root. This is necessary is the file specified as '--load' needs
access to these modules (which is the case if it wants to even just print an
-exception and backtrace!)."
+exception and backtrace!).
+
+When VOLATILE-ROOT? is true, the root file system is writable but any changes
+to it are lost."
(define cifs-modules
;; Modules needed to mount CIFS file systems.
'("md4.ko" "ecb.ko" "cifs.ko"))
@@ -229,7 +233,8 @@ exception and backtrace!)."
(boot-system #:mounts ',mounts
#:linux-modules ',linux-modules
#:qemu-guest-networking? #t
- #:guile-modules-in-chroot? ',guile-modules-in-chroot?))
+ #:guile-modules-in-chroot? ',guile-modules-in-chroot?
+ #:volatile-root? ',volatile-root?))
#:name "qemu-initrd"
#:modules '((guix build utils)
(guix build linux-initrd))