From Gentoo Wiki
Jump to: navigation, search

Bootstrapping in general


Bootstrapping is the process required to get Prefixed Portage installed on your system. For several years since its existence, the Gentoo Prefix team has documented the exact process for bootstrapping a system, on a per platform basis. Those instructions often became outdated and differed in subtle ways between platforms. Because maintenance of this became too high and errors became too much a barrier for new users to join, the Gentoo Prefix team has switched to an almost fully automated bootstrap process. The old step-by-step, and package-by-package instructions are no longer supported, and all users are highly encouraged to use the automated bootstrap process.

Bootstrap script

The script contains all the necessary bits to bootstrap a Gentoo Prefix system. It uses a trial-and-error approach to avoid having to make assumptions about the system being bootstrapped at where possible.

Simply running the script, launches the interactive installer. This installer will ask for some information, and discuss some options based on the system being bootstrapped on. Running this interactive installer is the easiest way to bootstrap a Gentoo Prefix system, since it caters for the entire process up to the point where the Prefix can be used.

In case the interactive installer is not desired due to automation, or what reason else, the process of bootstrapping can be performed in roughly 4 stages. These stages are performed by the interactive installer. Running these stages manually is not recommended, and only meant for special cases, such as debugging problems, e.g. when the interactive installer fails to finish the bootstrap.

Performing a Gentoo Prefix bootstrap using the interactive installer (recommended)

The requires a working version of the GNU Bourne Again SHell (bash). If you don't have bash available on your system, you will have to bootstrap a bash binary first. Systems that often lack bash are the *BSD systems such as FreeBSD. If you don't have bash installed, download the script from [1]. You can use wget, curl, fetch or ftp if they are available. Downloading the script with a web-browser, and/or copying via scp/ftp/NFS is also fine.

CODE Bootstrap bash (ONLY if no bash exists on the system)
$ chmod 755
$ ./ /var/tmp/bash
$ export PATH="/var/tmp/bash/usr/bin:${PATH}"
You ONLY have to bootstrap bash if you don't have bash yet on your system! It is NOT necessary to run bash as your login shell. tcsh users should use setenv PATH "/var/tmp/bash/bin:${PATH}" to update their path instead of the export.

Download the Gentoo Prefix bootstrap script from [2]. Like mentioned above, you can use various ways to obtain the script and get it to a place where you can execute it. Once in position, preform the following commands:

CODE Start the interactive bootstrap script
$ chmod 755
$ ./
(follow the instructions)

That's all! The script will guide you through the full process, and tells you how to start your freshly bootstrapped Gentoo Prefix system if it successfully runs up til the end. In normal cases, you don't need any more than just this. You can stop reading here if this works fine for you.

Performing a Gentoo Prefix manually

If you want or need to perform a Gentoo Prefix bootstrap manually, follow the instructions for bootstrapping on UNIX-like systems.


We would like to thank the following authors and editors for their contributions to this guide:

  • Fabian Groffen