unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan <stefan-guix@vodafonemail.de>
To: 40879@debbugs.gnu.org
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	[thread overview]
Message-ID: <29B6FCE4-CD82-4BEA-A00B-9D1C6EAFE4A9@vodafonemail.de> (raw)

* 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	other threads:[~2020-04-26 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 19:21 Stefan [this message]
2020-05-02 14:22 ` bug#40879: [PATCH] gnu: linux-boot: Allow to mount the root file system via nfs Ludovic Courtès
2020-05-02 22:19   ` [bug#40879] " Danny Milosavljevic
2020-05-04 14:11     ` Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29B6FCE4-CD82-4BEA-A00B-9D1C6EAFE4A9@vodafonemail.de \
    --to=stefan-guix@vodafonemail.de \
    --cc=40879@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).