Skip to content

build-chroot-dirs causes chroot-construction failure if /dev not listed #218

Closed

Description

@federicosacerdoti

I had a nix-1.6.1 setup with nix.conf containing:

build-chroot-dirs = /bin=/nix/store/7mjplwq1r0agngqj2058hl5z8kb3w15g-bash-4.2-p42/bin

Saw the error

error: failed to set up the build environment for `/nix/store/xxx.drv'

The nix-daemon issues this error

build error: mounting /dev/shm: No such file or directory

strace revealed the mount of /dev/shm fails because chrootRootDir/dev/shm/ does not exist. Adding /dev to build-chroot-dirs fixes it. Other mounts such as /proc do not need to be named, and are mounted properly by default.

Thanks to shlevy on IRC for help with this issue.

Activity

  1. edolstra commented on Feb 27, 2014

    @edolstra
    Member

    Should be fixed in 3fd01b1.

  2. added a commit that references this issue on Jan 1, 2024
  3. added a commit that references this issue on Feb 26, 2025
  4. added a commit that references this issue on Oct 14, 2025
  5. added 2 commits that reference this issue on Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions