During last months I used chroot functionality many times — mostly to test my cross compilers in clean environment. In that time I collected list of hints for having less work.
- Use APT proxy. I am using APT-Cacher NG for all my machines and chroots. This allows for APT lines like
http://localhost:3142/pl.archive.ubuntu.com/ubuntuand gives 30MB/s download speed when I need to install something.
- Disable installing of recommended packages. Most of time I do not need those and installing “texlive-extra-doc” takes precious megabytes. Just create
/dev/ptsfilesystems — some packages depend on them during installation.
- Set locale to “C” — simple
export LC_ALL=Cis enough. Otherwise applications will complain about missing l18n informations.
- Create user with same UID/GID as your host one and use it for any work — will allow to use editors from host system to edit files.
- Kill each daemon which started after installation — who needs several Samba daemons on one machine?