guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#40879] [PATCH] gnu: linux-boot: Allow to mount the root file system


From: Stefan
Subject: [bug#40879] [PATCH] gnu: linux-boot: Allow to mount the root file system via nfs
Date: Sun, 26 Apr 2020 21:21:38 +0200

* gnu/build/linux-boot.scm (boot-system) Treat a root option with ":/" as an 
nfs source
and avoid to call 'canonicalize-device-spec' for it.
---
 gnu/build/linux-boot.scm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 4fb711b8f2..05e833c0c6 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -534,10 +534,13 @@ upon error."
             ;; 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)
+            (let ((device-spec (cond ((string-prefix? "/" root) root)
+                                     ((uuid root) => identity)
+                                     ((string-contains root ":/") #f) ; nfs
+                                     (else (file-system-label root)))))
+              (mount-root-file-system (if device-spec
+                                          (canonicalize-device-spec 
device-spec)
+                                          root)
                                       root-fs-type
                                       #:volatile-root? volatile-root?
                                       #:flags root-fs-flags
-- 
2.26.0







reply via email to

[Prev in Thread] Current Thread [Next in Thread]