Using fakeroot
and fakechroot
, it is possible to setup and use a chroot environemnt without ever becoming root. The following will build a new installation in chroot/
and after installation will switch into that installation (do all this as non-root):
$ PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH HOME=/ LOGNAME=root \ fakeroot -s chroot.save fakechroot \ debootstrap --variant=fakechroot etch chroot/ http://ftp2.de.debian.org/debian $ PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH HOME=/ LOGNAME=root \ fakeroot -i chroot.save fakechroot chroot chroot/ /bin/bash