mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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.
This commit is contained in:
parent
754c12041d
commit
cc9b889e8f
1 changed files with 2 additions and 2 deletions
|
@ -362,12 +362,12 @@ (define* (mount-root-file-system root type
|
|||
"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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue