linux-boot: Allow the root file system to be mounted via NFS.

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

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Stefan 2020-04-26 21:21:38 +02:00 committed by Ludovic Courtès
parent 5af2a8fe96
commit afc57916e5
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -534,10 +534,13 @@ (define root-fs-options
;; 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