Project:X86/Chroot Guide

This guide will show you how to create chroots to assist in testing packages for stablization.

What is a Chroot?
A chroot is a operation to change the root directory of the current process and the children spawned from it. In the simplest terms, it allows us to setup a completely separate install inside the one that you are already running.

Setting up your Chroot for a new install
The first thing that you need to do is create a directory for your chroot to reside; it needs to have enough space for a second install.

The next step is to download a stage three tarball to the chroot and untar it.

To actually proceed with the install at this point, you need to mount a few directories from your live system to the chroot.

As you will notice this is by no means a secure chroot but for what we need it doesn't need to be. With all that mounted you can actually go into your new setup.

As you are now in your new chroot, you can start a standard install from Configuring Portage.

Running X apps inside your chroot
In order to be able to launch applications with a GUI from inside your chroot when your X session was started outside the chroot, there are a few extra steps you must follow.

First, you must be using  from outside the chroot (see above). Second, since  is a separate filesystem to   you will need to mount that as well.

You will also need to copy your  file to the home directory of your user in the chroot.

Finally, when you are inside your chroot, you need to set the  environment variable.