diff mbox series

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

Message ID 29B6FCE4-CD82-4BEA-A00B-9D1C6EAFE4A9@vodafonemail.de
State Accepted
Headers show
Series [bug#40879] gnu: linux-boot: Allow to mount the root file system via nfs | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Stefan April 26, 2020, 7:21 p.m. UTC
* 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(-)

Comments

Ludovic Courtès May 2, 2020, 2:22 p.m. UTC | #1
Hi Stefan,

Stefan <stefan-guix@vodafonemail.de> skribis:

> * 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.

I slightly tweaked the subject line and applied, thank you!

Ludo’.
diff mbox series

Patch

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