This script can be used as LXC template to install a Debian into a
directory using `mmdebstrap`. It's intended use is to create a container
filesystem with appropriate uids/gids for use in an unprivileged
container. The script assumes that it runs as root and only changes the
userns to install Debian.
I've used this script to remap files' uids/gids of containers created
without a custom userns into their new range. It's inferior to
`fuidshift` from the `lxc` project in that it doesn't handle ACLs and is
quite slow - probably because it calls a binary for every file.
By default, it runs in debug mode only printing the chown command
instead of executing it. You need to edit the file to use it.
It also only works with LVs (logical volumes from LVM), mounting them
automatically.