Handbook:Parts/Installation/Base/it

File di distribuzione
Per scaricare rapidamente il codice sorgente si raccomanda di selezionare un mirror (distributore) veloce. Portage cercherà la variabile GENTOO_MIRRORS nel file ed utilizzerà i mirror lì elencati. È possibile navigare nella lista dei mirror di Gentoo e cercare un mirror (o più mirror) vicino alla posizione geografica del sistema (in quanto quelli risulteranno solitamente più veloci). Tuttavia, forniamo anche uno strumento utile chiamato che fornisce agli utenti una comoda interfaccia per selezionare i mirror necessari. Basta semplicemente navigare sui mirror prescelti e premere per selezionare uno o più mirror.

Repository delle ebuild di Gentoo
Un altro passo importante durante la selezione dei mirror è la configurazione dei repository delle ebuild di Gentoo tramite il file. Questo file contiene le informazioni di sincronizzazione necessarie per aggiornare il repository dei pacchetti (la raccolta di ebuild e di file correlati contenenti tutte le informazioni di cui Portage ha bisogno per scaricare ed installare i pacchetti software).

La configurazione del repository può essere fatta in pochi semplici passi. Prima, se non esiste, creare il percorso :

Successivamente, copiare il file di configurazione dei repository di Gentoo fornito da Portafe nel percorso (appena creato) :

Take a peek with a text editor or by using the command. The inside of the file should be in format and look like this:

Il valore predefinito della variabile sync-uri elencato sopra determinerà una posizione del mirror basata sulla rotazione. In tal modo, la connessione sarà ottimizzata e sarà a prova di guasti nel caso in cui uno specifico mirror sia offline. Si raccomanda di conservare l'URI predefinito a meno che non venga usato un mirror di Portage locale e privato.

Copiare le informazioni del DNS
Rimane da fare ancora una cosa prima di entrare nel nuovo ambiente, e cioè copiare le informazioni del DNS nel file. Ciò va fatto per assicurarsi che la rete funzioni anche dopo che si è entrati nel nuovo ambiente. contiene i name server per la rete.

Per copiare questa informazione, si raccomanda di passare l'opzione  al comando. Ciò fa sì che, se è un collegamento simbolico, sia copiato il file bersaglio del collegamento invece del collegamento simbolico stesso. Altrimenti, nel nuovo ambiente, il collegamento simbolico punterebbe ad un file inesistente (in quanto il puntatore del collegamento non è disponibile nel nuovo ambiente).

Montaggio dei fileystem necessari
Fra poco, la radice verrà cambiata per puntare nella nuova posizione. Per assicurarsi che il nuovo ambiente funzioni correttamente, devono essere disponibili alcuni file system.

I filesystem che devono essere disponibili sono:


 * che è uno pseudo filesystem (sembra come se fosse un file normale, ma in realtà è generato al volo) da cui il kernel Linux espone le informazioni all'ambiente
 * che è uno pseudo filesystem, come  che doveva un tempo sostituire, ed è più strutturato di
 * è un filesystem normale, parzialmente gestito dal gestore dei dispositivi di Linux (solitamente ), che contiene tutti i file dei dispositivi

The location will be mounted on  whereas the other two are bind-mounted. The latter means that, for instance, will actually be  (it is just a second entry point to the same filesystem) whereas  is a new mount (instance so to speak) of the filesystem.

Entering the new environment
Now that all partitions are initialized and the base environment installed, it is time to enter the new installation environment by chrooting into it. This means that the session will change its root (most top-level location that can be accessed) from the current installation environment (installation CD or other installation medium) to the installation system (namely the initialized partitions). Hence the name, change root or chroot.

This chrooting is done in three steps:


 * 1) The root location is changed from  (on the installation medium) to  (on the partitions) using chroot
 * 2) Some settings (those in ) are reloaded in memory using the  command
 * 3) The primary prompt is changed to help us remember that this session is inside a chroot environment.

From this point, all actions performed are immediately on the new Gentoo Linux environment. Of course it is far from finished, which is why the installation still has some sections left!

Installing an ebuild repository snapshot from the web
Next step is to install a snapshot of the main ebuild repository. This snapshot contains a collection of files that informs Portage about available software titles (for installation), which profiles the system administrator can select, package or profile specific news items, etc.

The use of is recommended for those who are behind restrictive firewalls (because it uses HTTP/FTP protocols for downloading the snapshot) and saves network bandwidth. Readers who have no network or bandwidth restrictions can happily skip down to the next section.

This will fetch the latest snapshot (which is released on a daily basis) from one of Gentoo's mirrors and install it onto the system:

From this point onward, Portage might mention that certain updates are recommended to be executed. This is because system packages installed through the stage file might have newer versions available; Portage is now aware of new packages because of the repository snapshot. Package updates can be safely ignored for now; updates can be delayed after the Gentoo installation has finished.

Optional: Updating the Gentoo ebuild repository
It is possible to update the Gentoo ebuild repository to the latest version. The previous command will have installed a very recent snapshot (usually recent up to 24h) so this step is definitely optional.

Suppose there is a need for the last package updates (up to 1 hour), then use. This command will use the rsync protocol to update the Gentoo ebuild repository (which was fetched earlier on through ) to the latest state.

On slow terminals, like some framebuffers or serial consoles, it is recommended to use the  option to speed up the process:

Reading news items
When the Gentoo ebuild repository is synchronized to the system, Portage may warn the user with messages similar to the following:

News items were created to provide a communication medium to push critical messages to users via the rsync tree. To manage them, use. The application is a Gentoo application that allows for a common management interface towards system changes and operations. In this case, is asked to use its   module.

For the  module, three operations are most used:


 * With  an overview of the available news items is displayed.
 * With  the news items can be read.
 * With  news items can be removed once they have been read and will not be reread anymore.

More information about the newsreader is available through its manual page:

Choosing the right profile
A profile is a building block for any Gentoo system. Not only does it specify default values for USE, CFLAGS , and other important variables, it also locks the system to a certain range of package versions. These settings are all maintained by Gentoo's Portage developers.

You can see what profile the system is currently using with, now using the  module:

As can be seen, there are also desktop subprofiles available for some architectures.

After viewing the available profiles for the architecture, users can select a different profile for the system:

Updating the @world set
At this point, if a new system profile has been chosen, it is wise to update the system's @world set so that a base can be established for the new profile.

This following step is necessary for those who have selected a profile with  in the title (since all of Gentoo's official stage tarballs use OpenRC as the default init system), however it is optional for the other profiles:

Configurare la variabile USE
USE is one of the most powerful variables Gentoo provides to its users. Several programs can be compiled with or without optional support for certain items. For instance, some programs can be compiled with support for GTK+ or with support for Qt. Others can be compiled with or without SSL support. Some programs can even be compiled with framebuffer support (svgalib) instead of X11 support (X-server).

Most distributions compile their packages with support for as much as possible, increasing the size of the programs and startup time, not to mention an enormous amount of dependencies. With Gentoo users can define what options a package should be compiled with. This is where USE comes into play.

In the USE variable users define keywords which are mapped onto compile-options. For instance,  will compile SSL support in the programs that support it. will remove X-server support (note the minus sign in front). will compile programs with GNOME (and GTK+) support, and not with KDE (and Qt) support, making the system fully tweaked for GNOME (if the architecture supports it).

The default USE settings are placed in the files of the Gentoo profile used by the system. Gentoo uses a (complex) inheritance system for its profiles, which we will not dive into at this stage. The easiest way to check the currently active USE settings is to run and select the line that starts with USE:

A full description on the available USE flags can be found on the system in.

Inside the command, scrolling can be done using the  and  keys, and exited by pressing.

As an example we show a USE setting for a KDE-based system with DVD, ALSA, and CD recording support:

When USE is defined in it is added (or removed if the USE flag starts with the  sign) from that default list. Users who want to ignore any default USE settings and manage it completely themselves should start the USE definition in with  :

Ora locale
Select the timezone for the system. Look for the available timezones in, then write it in the file.

Suppose the timezone of choice is Europe/Brussels:

Please avoid the timezones as their names do not indicate the expected zones. For instance, is in fact.

Next, reconfigure the package, which will update the  file for us, based on the  entry. The file is used by the system C library to know the timezone the system is in.

Configurare le lingue
La maggior parte degli utenti intende usare solo una o due lingue sui loro sistemi.

Le lingue non specificano solamente la lingua che dovrebbe usare l'utente per interagire con il sistema, ma anche quali regole utilizzare per ordinare le stringhe, mostrare le date e le ore, ecc.

Le lingue che dovrebbe supportare un sistema dovrebbero essere menzionate nel file.

Le lingue seguenti sono un esempio per avere sia l'inglese (Stati Uniti) sia il tedesco (Germania) con i formati di carattere corrispondenti (per esempio UTF-8).

The next step is to run. It will generate all the locales specified in the file.

To verify that the selected locales are now available, run.

Once done, it is now time to set the system-wide locale settings. Again we use for this, now with the   module.

With, the available targets are displayed:

With the correct locale can be set:

Manually, this can still be accomplished through the file:

Make sure a locale is set, as the system would otherwise display warnings and errors during kernel builds and other software deployments later in the installation.

Now reload the environment:

We made a full Localization guide to help the user guide through this process. Another interesting article is the UTF-8 guide for very specific information to enable UTF-8 on the system.