From Gentoo Wiki
Jump to:navigation Jump to:search

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)

Systems without Bash already available

Skip this section and head to Bootstrapping Prefix when using Cygwin.

The requires a working version of the GNU Bourne Again SHell (bash). For systems that do not include bash, a bash binary will need to be bootstrapped by downloading the script. Systems that often lack bash are the *BSD systems such as FreeBSD. Cygwin includes bash by default. wget, curl, fetch, or ftp for the download if they are available. Downloading the script with a web-browser, and/or copying via scp/ftp/NFS will also work.

user $wget
user $chmod +x
user $./ /var/tmp/bash
user $export PATH="/var/tmp/bash/usr/bin:${PATH}"
bash only needs to be bootstrapped if it is not yet already available on the system! It is NOT necessary to run bash as the login shell. tcsh users should use setenv PATH "/var/tmp/bash/bin:${PATH}" to update the path instead of the the export built-in.

Bootstrapping Prefix

Download the Gentoo Prefix Like mentioned above, various methods can be employed to obtain the script and ready it for execution. Once in position, preform the following commands:

user $wget
user $chmod +x
user $./

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.

This page is based on a document formerly found on our main website
The following people contributed to the original document: Fabian Groffen (grobian)
They are listed here because wiki history does not allow for any external attribution. If you edit the wiki article, please do not add yourself here; your contributions are recorded on each article's associated history page.