summaryrefslogtreecommitdiff
path: root/gnu/build/linux-boot.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-06-11 23:52:15 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-06-11 23:52:15 +0200
commita032b4454b3fc67e11e9fc2d8c2345288065fa29 (patch)
treec208124b79dbd2224b68c52106aa72ff2ebfa7ab /gnu/build/linux-boot.scm
parentb5724230fed2d043206df20d12a45bb962b7ee77 (diff)
parent6321ce42ab4d9ab788d858cb19bde4aa7a0e3ecc (diff)
downloadguix-patches-a032b4454b3fc67e11e9fc2d8c2345288065fa29.tar
guix-patches-a032b4454b3fc67e11e9fc2d8c2345288065fa29.tar.gz
Merge branch 'master' into staging
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.