wiki:Linux/Ubuntu/BuildChroot

Build Chroot

A script to automate the creation of a basic chroot environment for any distribution and architecture. Can be used as the basis for creating a pbuilder base (such as when ubuntu+1 packages such as apt aren't available from the repositories). It configures language and timezone, hostname and some default network settings. They might need tweaking once it is done.

The script build_chroot is attached and can be directly downloaded.

To use it, set the two environment variables DIST and ARCH. DIST=edgy|feisty|gutsy|hardy|intrepid ARCH=i386|amd64|lpia|ppc|sparc etc. The script creates the directory ${DIST}-${ARCH} (e.g. intrepid-i386/) and installs into that:

$ DIST=intrepid ARCH=i386 build_chroot

After it has completed it is simple to create a pbuilder base archive:

$ tar -czf /home/all/pbuilder/${DIST}-${ARCH}-base.tgz -C ${DIST}-${ARCH} *

Attachments

  • build_chroot Download (1.2 KB) - added by tj 9 years ago. Build minimal chroot for any release or architecture