From 9ea6ba31b92ca2e20cf41ca40860178da5838104 Mon Sep 17 00:00:00 2001 From: nckx Date: Sun, 29 Mar 2026 13:12:19 +0200 Subject: [PATCH] revert 7e7487166b02aa41d42e96a1dfccaceda7fefc12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit 7e7487166b02aa41d42e96a1dfccaceda7fefc12, Guix System treats devices starting with "/dev/" as special and won't even try to mount them if the whole string isn't an existing file name. This strict naming policy is (AFAIK?) Guix-specific and breaks things like booting multi-device bcachefs file systems: waiting for partition '/dev/sda1:/dev/sdb1' to appear... waiting for partition '/dev/sda1:/dev/sdb1' to appear... …ad infinitum until crashing to a Guile prompt. Guix must not enforce custom naming policies like this. On the contrary: we should defer mounting to the kernel whenever possible, and handle failures only when they occur. We can still delay mounts, retry failed mounts, and try to set up favourable mount conditions based on what we think the mount(2) SOURCE looks like, without adding our own arbitrary rules. --- gnu/build/file-systems.scm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 33b035aa96..72d7f5f260 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -1220,16 +1220,15 @@ file name or an nfs-root containing ':/')." (sleep 1) (loop (+ 1 count)))))))) - (define (device-exists? device) - (and (file-exists? device) - device)) - (match spec ((? string?) - (if (string-prefix? "/dev/" spec) + (if (or (string-contains spec ":/") ;nfs + (and (>= (string-length spec) 2) + (equal? (string-take spec 2) "//")) ;cifs + (string=? spec "none")) + spec ; do not resolve NFS / CIFS / tmpfs devices ;; Nothing to do, but wait until SPEC shows up. - (resolve device-exists? spec identity) - spec)) ; do not resolve NFS / CIFS / tmpfs devices + (resolve identity spec identity))) ((? file-system-label?) ;; Resolve the label. (resolve find-partition-by-label