Skip to content

Switch back to using pivot_root #119

@deliciouslytyped

Description

@deliciouslytyped

xred #23 , xref probably #102
@jD91mZM2

pivot_root should probably be used over chroot. I don't understand why pivot_root was used at some point originally, and then switched back.

The unshare man page says:

       EPERM (since Linux 3.9)
              CLONE_NEWUSER was specified in flags and the caller is in
              a chroot environment (i.e., the caller's root directory
              does not match the root directory of the mount namespace
              in which it resides).

This prevents using unshare in nix-user-chroot, which would be nice to have working.

Apparently container solutions also normally use pivot_root instead of chroot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions