How to build a Gentoo chroot environment

By  •  Gentoo

You can create a base Gentoo system by using the stage 3 installer. You will have to also mount both dev and proc filesystem for your base system to be usable for chroot. These are the outline of the process.

  1. Create your chroot folder

    $ mkdir chroot-gentoo
  2. Download Gentoo stage 3 installer

    $ wget
  3. Extract it

    $ tar xf stage3-x86-2008.0.tar.bz2 -C chroot-gentoo
  4. Mount proc and dev filesystem.

    $ sudo mount -o bind /dev chroot-gentoo/dev
    $ sudo mount -o bind /proc chroot-gentoo/proc
  5. Start chrooting

    $ sudo chroot chroot-gentoo /bin/bash
  6. Unmount the dev and proc filesystem once you exited your chroot environment.

    $ sudo umount chroot-gentoo/dev chroot-gentoo/proc