Package: guixVersion: 0.16.0 I specified a needed-at-boot bind mount from "/x/y" to "/y" but thisfailed with the error: ERROR: In procedure stat:In procedure stat: No such file or directory: "/x/y" At boot "/x" is actually mounted at "/root/x" so the bind mount pathshould be "/root/x/y" -- making such a change causes the boot to work. User defined filesystems with non-dev paths added to the boot mountsshould either automatically get "/root" prepended to the device path orelse the fact that they need to be prepended should be included in thedocumentation, since there's no other way to discover this (other thanreading the source and trial/error). For people hitting the same error, you can double check the mount pointsat the repl you're dropped into with: (use-modules (ice-9 ftw))(scandir "/root")
I believe my issue is the same and that I could narrow it down more. The `mount --bind /nixos/nix /nix` command works, but if I put a line`"/nixos/nix /nix bind defaults"` in `/etc/fstab`, then mount will insteadfail with: `mount: /nix: unknown filesystem type 'bind'.` If instead in fstab I use type `none` and put `bind` in the options,then `mount /nix` works at the command-line but interestlingly`guix system reconfigure guix-config.scm` still fails with:```guix system: warning: exception caught while executing 'start' onservice 'file-system-/nix':In procedure mount: mount "/nixos/nix" on "///nix": No such deviceguix system: warning: some services could not be upgraded``` Below is the `file-systems` definition of my `guix-config.scm`, in an attemptto share the `/nix` directory of my NixOS installation with GuixSD, just likeI share the /guix directory of my GuixSD installation with NixOS: ``` (file-systems (append (let* ((boot (file-system ;;(uuid "C1D9-0574") (device "/dev/nvme0n1p1") (mount-point "/boot") (type "vfat"))) (root (file-system ;;(device "/dev/mapper/yew-guix") (device (uuid "43f7ca3e-c107-4f15-9756-5d3cbacad0a0")) (mount-point "/") (type "btrfs") #;(flags '(no-atime)) (options "compress=zstd") (dependencies mapped-devices))) (home (file-system ;;(device "/dev/yew/home") (device (uuid "a3602532-3527-4afc-9b40-5d01c58b5aa8")) (mount-point "/home") (type "ext4") (dependencies mapped-devices))) (nixos (file-system (device (uuid "ab3d691b-227a-4a05-a084-6928abbf0959")) (mount-point "/nixos") (type "ext4") (dependencies mapped-devices))) (nix (file-system (device "/nixos/nix") (mount-point "/nix") ;;(type "bind") ;; fails both at CLI and during reconfigure (type "none") (option "bind") ;; CLI OK, reconfigure FAIL (dependencies (list nixos))))) (append (list boot root home nixos nix) %base-file-systems))))``` Note that neither bind nor none appear in `/proc/filesystem` nor in`/run/booted-system/kernel/lib/modules/5.13.8/kernel/fs` — but thenneither do they on NixOS and yet it all works there.
Indeed bind-mount is mentioned there, but vastly under-documented,especially since the guix paragraph refers to some glibc documentationfor mount(2) for details, and those details saying nothing whatsoeverabout bind.
Toggle quote (9 lines)> I specified a needed-at-boot bind mount from "/x/y" to "/y" but this> failed with the error:> > ERROR: In procedure stat:> In procedure stat: No such file or directory: "/x/y"> > At boot "/x" is actually mounted at "/root/x" so the bind mount path> should be "/root/x/y" -- making such a change causes the boot to work.
To reproduce this bug: # mkdir -p /foo/bar# mkdir -p /bar Add this to the file-systems field of your config.scm: (file-system (device "/foo/bar") (mount-point "/bar") (type "none") (check? #f) (needed-for-boot? #t) (flags '(bind-mount))) Your system should fail to boot.
My apologies: I was just confused about the syntax of bind entries in/etc/fstab. "bind" goes in the options field (no ",defaults" needed), whereas"none" goes in the type field. I tried it this way and mount worksjust fine on Guix as well as on NixOS and Debian and other Linuxvariants; and with my incorrect syntax (with "bind" in the type field)it fails on all of them. Now, whereas the guix manual does need clarification about"bind-mount", I see that there is a recipe in the cookbook thatspecifically explains how to declare bind entries in Guix.