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

DoneSubmitted by Stefan.
Details
4 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Marius Bakke
  • Stefan
Owner
unassigned
Severity
normal
S
S
Stefan wrote on 26 Apr 2020 21:21
(address . guix-patches@gnu.org)
29B6FCE4-CD82-4BEA-A00B-9D1C6EAFE4A9@vodafonemail.de
* 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(-)

Toggle diff (24 lines)
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
L
L
Ludovic Courtès wrote on 2 May 2020 16:22
(name . Stefan)(address . stefan-guix@vodafonemail.de)(address . 40879-done@debbugs.gnu.org)
87wo5u5sdg.fsf@gnu.org
Hi Stefan,

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

Toggle quote (3 lines)
> * 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’.
Closed
D
D
Danny Milosavljevic wrote on 3 May 2020 00:19
Re: bug#40879: [PATCH] gnu: linux-boot: Allow to mount the root file system via nfs
(address . 40879-done@debbugs.gnu.org)
20200503001916.3bab3207@scratchpost.org
--- 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.

Nitpick: Comment above it is now outdated ;)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6t8eQACgkQ5xo1VCww
uqUMGwf+M5XoM1OY/v/WzWjgC3hGqnHx5BUXmdlLK2KTmvwBDKt7Q+Ixou6uDBdY
CWEgGrii8JBJQFUX7RcejZtkbnYSX8rtkuuzQpqnNMyDwEcet3NTYWVCE7W5G/5W
QPGkPaQg2Dl5MtiCpPKG/z3WZcId1eghFn6S1oXM4G3SvXi7YRcKJH8ilaKmH3yR
YB+0oG5x/5YNLtH/wqdBwl2dh8ZO8mAaGkdDlgf0SZKmT1L/tsW8s01fycLdBzMo
1oFwRc9O5VRCGCJaDNbXrxPa29xA3jnG9jYAtzBvg2rQqatCwdwVv7vu/YChmt7r
u+AUP53cHAeL0x1DNtkOAhYtn+6nxg==
=qV0z
-----END PGP SIGNATURE-----


Closed
M
M
Marius Bakke wrote on 4 May 2020 16:11
Re: [bug#40879] [PATCH] gnu: linux-boot: Allow to mount the root file system via nfs
(address . 40879-done@debbugs.gnu.org)
87sggf23k0.fsf@devup.no
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (9 lines)
> --- 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.
>
> Nitpick: Comment above it is now outdated ;)

Can you update it? :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6wIn8ACgkQoqBt8qM6
VPo/1Af+PPTHCx/8bgCqUaPmpEdkyRGmQpWNOddfxmzotzvcIl0qSQWXuYUtKwzC
nDhWH2MOzME4bnWuY6Ir1xNdVIhvX+khPa9FGmW03Qy1XDo0+d2Lsgg5ubayAFrn
rJ/leQVdWx5n/UaKjBnBphRPLBY6ES2SBPJ6EIt+I6RNALOZB11MjCGfJU5ofMWa
X52G0uB/nh601Ba5Se2S0AHoMmPZ7r4PG08Y8nMR6+Kt6X0R4xAaGk0zXiIrXu6v
Fa86uB57Np0QK03uJF+D9+VYtHRs7V88b9PgX5qcWuTKCWDlr58bBN/PW9ocgyrr
0GVR2J4aTfR37vIwscvVMw4NNSWwHw==
=OT4N
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 40879@debbugs.gnu.org