User:SwifT/Complete Handbook/Versions media installation concerns

Gentoo versions
One of Gentoo's major advantages is that it does not really know versions. Once installed, you have a Gentoo installation, not a Gentoo 2005.1 or 2004.3 installation. Therefore you will continue to benefit from the Gentoo development with every system update you perform - there is no need to run through a specific upgrade procedure every time Gentoo makes a new release.

Yes, Gentoo does release often - twice a year to be exact. Such a release brings you an up to date installation CD with the latest hardware drivers and features that might improve your installation experience. It can also contain a set of prebuilt packages, helping you to install Gentoo quickly and efficiently.

When you hear someone talk about a specific Gentoo release (Gentoo 2005.1 for instance) they are talking about the installation CDs and set of prebuilt packages, not about the state Gentoo is at at a certain point in time. Gentoo evolves on a daily basis, but can't develop, package, test and release new installation CDs and prebuilt packages every time Gentoo changes...

Gentoo release media
By default, Gentoo releases installation CDs: bootable CDs allowing you to immediately boot in a Gentoo Linux environment containing the necessary tools to help you install Gentoo on your system. Such CDs shouldn't be read from any other operating system but immediately booted from.

For each architecture (see the note below) you will find two installation CDs: a minimal installation CD and a universal one. They both contain the same hardware support drivers (Linux kernel and additional kernel modules) and tools; the universal installation CD however also contains the necessary files to allow any user to install Gentoo without requiring a working Internet connection.

It is important to understand that:

You will also find a packages CD. As the name implies, this CD contains prebuilt packages you can quickly install to get a working Gentoo installation without going through much software building.
 * the Gentoo installation procedure is a manual procedure, requiring lots of input from the administrator
 * there is support for a networkless installation if you use the universal installation CD and the stage-3 installation approach (which will be discussed later), but that Gentoo should not be considered if you don't have a working Internet connection

However, these software packages are only available for those who perform a networkless installation and are not maintained by the Gentoo project at all: they are only meant for use during the initial installation of Gentoo. Once installed, your system is not different from any other Gentoo installation.

This part will not talk about the networkless installation. We have decided to postpone any information regarding prebuilt packages to a later stage because of the following reasons:


 * The networkless installation instructions are limiting the user's choices. Only a fraction of the software which a user can (and should) install during installation is available and the user might not be able to deviate from the standard installation routine.
 * The set of prebuilt software is quickly outdated. As Gentoo does not offer a continuously maintained repository of prebuilt packages, any user who does a networkless installation might be facing an installation with insecure software for the time between the (quick) installation and (slower) upgrading.
 * The available prebuilt software differs from architecture to architecture, from release to release. If one wants to have pseudo-static documentation on the Gentoo installation procedure, such variable information should be eliminated.

Introduction
You should understand that the Gentoo installation procedure - at least the officially publicised one - is quite different from most other Linux distributions: where other distributions try to perform most steps for you, Gentoo Linux asks you politely (but firmly) to do things yourself.

Getting the hardware up and running, configuring the network, partitioning your disk(s), copying over the initial files, building additional software (including the kernel), ... all these steps should be performed before you can finally boot in a minimal Gentoo environment. Not that all these steps can't be automated (Gentoo even offers tools to automate a few of those steps and you'll find a lot of unofficial installers that automate most - if not all - steps) but by documenting these steps in great detail Gentoo almost forces you to learn various Linux-related procedures.

Another advantage of letting the user perform all steps himself is that the user can now decide himself how he wants to install Gentoo - the options are there, the user needs to make a choice, over and over again. By clearly identifying the options and documenting the possible roads Gentoo hopes that the user is not scared but rather impressed.

For instance, Gentoo offers the user with three initial system states where the user can start from to install Gentoo. These states are called stages: stage-1, stage-2 and stage-3.

Easy and fast: stage-3
The stage-3 system state starts from a minimal Gentoo environment, containing the core system utils that anyone would need to get Gentoo up and running. This is the preferred initial state for most users and also the quickest way to install Gentoo. From this stage onward, the user installs the additional tools he requires (such as certain networking tools for automated IP information retrieval, cron jobs for scheduled process execution, system logger for keeping track of all log events, ...) and builds a Linux kernel to boot from.

When you want to install Gentoo without a working Internet connection (the networkless installation approach) you must use the stage-3 approach since the universal installation CD only contains source code for the additional tools you should install - not for the tools already available in the stage file.

Although the stage-3 system state is the most full-featured one, many users often take this as a bloated stage thinking they can't tweak as much as they can with the other stages. This is wrong, as you can easily rebuild the entire system with new (compiler and USE) settings - and in many occasions faster too!

Tweaking the system: stage-2
The stage-2 system state contains a built and functional toolchain but no system utilities. This is an intermediate state between a stage-1 and stage-3 and also the least often used approach to install Gentoo with. Those who do consider using this stage often alter their profile with respect to base system packages and perform major tweaks with the CFLAGS, CXXFLAGS and USE variables.

Although Gentoo offers a stage-2 initial system state, you should consider performing a stage-2 installation with a stage-3 initial system state. This will preserve you from possible circular dependency issues that are inherent with the stage-2 build.

Tweaking the bootstrapping procedure: stage-1
The stage-1 system state contains a non-optimized toolchain with no system utilities. This is the state where Gentoo Release Engineering developers start from to move to a stage-3 state by rebuilding the toolchain for the specific architecture (migrating to a stage-2) and using this newly rebuilt toolchain to install the system core utilities (migrating to a stage-3).

This state is only interesting for those attempting to change the bootstrapping procedure (by changing the script) or want to build a non-default Gentoo environment (for instance using a completely different toolchain).

Although Gentoo offers a stage-1 initial system state, you should consider performing a stage-1 installation with a stage-3 initial system state. This will preserve you from possible circular dependency issues and bootstrapping failures inherent with the stage-1 procedure (which is quite complex).

Download the media
With the information handed to you in the previous sections you should have an idea what CD(s) you need to download. Gentoo provides the CDs both as an FTP/HTTP download or through the BitTorrent peer-to-peer network. Pick the latest version available (as that one contains the most up-to-date hardware support and additional features) although this is not mandatory: you can easily install a (current) Gentoo from an older installation CD.

As the directory structure on the FTP/HTTP mirrors suggests, you'll find the CDs in the directory.

Each CD is fully contained within an ISO file. Such a file contains all the content of a CD and should be burned on the CD using a specific (but well supported) procedure. Most CD/DVD burning tools call it Burn ISO or Raw burning; it differs from the regular burning methods used that it burns the content of the file on the CD, not the file as-is (i.e. the end result is not that you just see the single file on the burnt CD).

If you want, you can verify the downloaded ISO file using the file we provide. This file contains an Message Digest 5 checksum of the file, a known mathematical result of the entire CD that is practically unique to every file. In other words, you won't find a file anywhere with the same checksum unless that file is identical. Under Linux, you can use the md5sum tool to verify the checksum.

We also provide a digital signature of the file made with our private Release Engineering key. This digital signature can be used to validate the origin of the ISO file: if the digital signature matches the public key of the Release Engineering team, then the file is authentic. Under Linux, you can use the gpg tool to verify the checksum.

Booting the CD
To get in the initial Gentoo environment, you need to boot from the installation CD. How to achieve this depends on the architecture you are using. The first appendix in this book covers the various architecture-specific aspects of a Linux system, including booting CDs.

Once booted, you will see that the installation CD already tried to load the necessary drivers and hands you over to a root prompt, indicating that the system is waiting for further input:

This is the command-line prompt. You are now booted in the initial Gentoo environment, ready to continue.