summaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-02-11 12:57:29 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-03-02 23:24:47 -0500
commitcc9b889e8f285719645b5a86f2583d7f1b2aef01 (patch)
tree54b09e6765273df2271b704096421202f6428cfa /gnu/build
parent754c12041deec4f797504854b565add029ed3ca5 (diff)
downloadguix-patches-cc9b889e8f285719645b5a86f2583d7f1b2aef01.tar
guix-patches-cc9b889e8f285719645b5a86f2583d7f1b2aef01.tar.gz
linux-boot: Ensure volatile root is mounted read-only.
* gnu/build/linux-boot.scm (mount-root-file-system): Ensure MS_RDONLY is present among the root file system flags when VOLATILE-ROOT? is #t.
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/linux-boot.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 3d40a7d05d..4fb711b8f2 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -362,12 +362,12 @@ the last argument of `mknod'."
"Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROOT? is
true, mount ROOT read-only and make it an overlay with a writable tmpfs using
the kernel built-in overlayfs. FLAGS and OPTIONS indicates the options to use
-to mount ROOT."
+to mount ROOT, and behave the same as for the `mount' procedure."
(if volatile-root?
(begin
(mkdir-p "/real-root")
- (mount root "/real-root" type MS_RDONLY options)
+ (mount root "/real-root" type (logior MS_RDONLY flags) options)
(mkdir-p "/rw-root")
(mount "none" "/rw-root" "tmpfs")