summary refs log tree commit diff
path: root/gnu/build
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-06-06 21:16:32 +0200
committerMarius Bakke <marius@gnu.org>2021-06-06 21:16:32 +0200
commit8d59c262ada2e2167196a8fb8cbebd9c329a79dd (patch)
tree85a74de8cc23a2f0179c0b9f0adfa4c274449a0c /gnu/build
parente7f0835b07d868fd447aa64c873174fa385e1699 (diff)
parenta068ed6a5f5b3535fce49ac4eca1fec82edd6fdc (diff)
downloadguix-8d59c262ada2e2167196a8fb8cbebd9c329a79dd.tar.gz
Merge branch 'master' into core-updates
 Conflicts:
	gnu/local.mk
	gnu/packages/algebra.scm
	gnu/packages/bioinformatics.scm
	gnu/packages/curl.scm
	gnu/packages/docbook.scm
	gnu/packages/emacs-xyz.scm
	gnu/packages/maths.scm
	gnu/packages/plotutils.scm
	gnu/packages/python-web.scm
	gnu/packages/python-xyz.scm
	gnu/packages/radio.scm
	gnu/packages/readline.scm
	gnu/packages/tls.scm
	gnu/packages/xml.scm
	gnu/packages/xorg.scm
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/linux-boot.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index f20eeaac9f..7d1b3ee835 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016, 2017, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2017, 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
 ;;;
@@ -411,11 +411,13 @@ the last argument of `mknod'."
           (filter-map string->number (scandir "/proc")))))
 
 (define* (mount-root-file-system root type
-                                 #:key volatile-root? (flags 0) options)
+                                 #:key volatile-root? (flags 0) options
+                                 check?)
   "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, and behave the same as for the `mount' procedure."
+to mount ROOT, and behave the same as for the `mount' procedure.
+If CHECK? is true, first run ROOT's fsck tool (if any) non-interactively."
 
   (if volatile-root?
       (begin
@@ -436,7 +438,8 @@ to mount ROOT, and behave the same as for the `mount' procedure."
         (mount "none" "/root" "overlay" 0
                "lowerdir=/real-root,upperdir=/rw-root/upper,workdir=/rw-root/work"))
       (begin
-        (check-file-system root type)
+        (when check?
+          (check-file-system root type))
         (mount root "/root" type flags options)))
 
   ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts.
@@ -600,7 +603,10 @@ upon error."
                                     root-fs-type
                                     #:volatile-root? volatile-root?
                                     #:flags root-fs-flags
-                                    #:options root-options)
+                                    #:options root-options
+                                    #:check? (if root-fs
+                                                 (file-system-check? root-fs)
+                                                 #t))
             (mount "none" "/root" "tmpfs"))
 
         ;; Mount the specified file systems.