I am trying to write a bootstrapper for a minimal, from-source linux distribution.
I would like to build in a chroot-like environment. This should simplify packaging. I do not care about security at this point. The bootstrapper should not require any non-standard third-party commands. It would be great if there is no need to be root, either.
This is why fakechroot(1) fakeroot(1) chroot(1) is not exactly what I am looking for.
Is it possible to fake / using unshare(1) and /bin/sh?
unshare(1)
is a rather thin wrapper around a collection of root-only system calls, and (at least on Fedora 18) it isn't SUID, so I doubt very much that that will work for non-root users. – vonbrand Feb 25 '13 at 19:50