Gentoo Logo

Gentoo Prefix Bootstrap Process

1.  Bootstrapping in general

Global

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 bootstrap-prefix.sh 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 bootstrap-prefix.sh 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 bootstrap-prefix.sh 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 bootstrap-bash.sh script from http://prefix.gentooexperimental.org/hg/prefix-tree/raw-file/default/scripts/bootstrap-bash.sh. 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 Listing 1.1: Bootstrap bash (ONLY if no bash exists on the system)

$ chmod 755 bootstrap-bash.sh
$ ./bootstrap-bash.sh /var/tmp/bash
$ export PATH="/var/tmp/bash/usr/bin:${PATH}"
        

Note: 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 http://prefix.gentooexperimental.org/hg/prefix-tree/raw-file/default/scripts/bootstrap-prefix.sh. 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 Listing 1.2: Start the interactive bootstrap script

$ chmod 755 bootstrap-prefix.sh
$ ./bootstrap-prefix.sh
(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.



Print

Page updated January 24, 2014

Summary: How to bootstrap Gentoo Prefix on your system

Fabian Groffen
Author

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.