summaryrefslogtreecommitdiff
path: root/gnu/build/linux-boot.scm
diff options
context:
space:
mode:
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.