summary refs log tree commit diff
path: root/gnu/build/linux-boot.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-05-28 20:45:37 -0400
committerMark H Weaver <mhw@netris.org>2018-05-28 20:45:37 -0400
commit82b695b834f88c5561de40e68f3fe7aa24d3b796 (patch)
tree41743fff1013584ee4a50852a94cff01c3cc3d1c /gnu/build/linux-boot.scm
parentfe365a3d0e4df7445bf16d3bb422a0bc6bb68ceb (diff)
parentee3c8fbee21299ce105bafca7dc63bfb096cd7c5 (diff)
downloadguix-82b695b834f88c5561de40e68f3fe7aa24d3b796.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/build/linux-boot.scm')
-rw-r--r--gnu/build/linux-boot.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 18d87260a9..44b3506284 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -507,9 +507,15 @@ upon error."
            (error "pre-mount actions failed")))
 
        (if root
-           (mount-root-file-system (canonicalize-device-spec root)
-                                   root-fs-type
-                                   #:volatile-root? volatile-root?)
+           ;; The "--root=SPEC" kernel command-line option always provides a
+           ;; string, but the string can represent a device, a UUID, or a
+           ;; label.  So check for all three.
+           (let ((root (cond ((string-prefix? "/" root) root)
+                             ((uuid root) => identity)
+                             (else (file-system-label root)))))
+             (mount-root-file-system (canonicalize-device-spec root)
+                                     root-fs-type
+                                     #:volatile-root? volatile-root?))
            (mount "none" "/root" "tmpfs"))
 
        ;; Mount the specified file systems.