Handbook:Parts/Installation/Base/pt-br

Opcional: Selecionando espelhos
In order to download source code quickly it is recommended to select a fast mirror. Portage will look in the file for the GENTOO_MIRRORS variable and use the mirrors listed therein. It is possible to surf to the Gentoo mirror list and search for a mirror (or mirrors) that is close to the system's physical location (as those are most frequently the fastest ones). However, we provide a nice tool called which provides users with a nice interface to select the mirrors needed. Just navigate to the mirrors of choice and press to select one or more mirrors.

A second important setting is the SYNC setting in. This variable contains the rsync server to use when updating the Portage tree (the collection of ebuilds and related files containing all the information Portage needs to download and install software). Again, it is possible to manually enter a SYNC server, but can ease that operation considerably:

After running it is advisable to double-check the settings in  !

Copie as informações de DNS
Resta ainda uma coisa a ser feita antes de entrar no novo ambiente que é copiar sobre a informação de DNS em. Isso precisa ser feito para assegurar que a rede ainda funciona mesmo após entrar no novo ambiente. O contém os servidores de nomes da rede.

To copy this information, it is recommended to use the  option to the  command. This ensures that, if is a symbolic link, that the link's target file is copied instead of the symbolic link itself. Otherwise in the new environment the symbolic link would point to a non-existing file (as the link's target is most likely not available inside the new environment).

Montando os sistemas de arquivos necessários
Em alguns momentos, a raiz do Linux será alterada para a nova localidade. Para garantir que o novo ambiente funciona corretamente, alguns sistemas de arquivos precisam estar disponíveis lá também.

The filesystems that need to be made available are:


 * which is a pseudo-filesystem (it looks like regular files, but is actually generated on-the-fly) from which the Linux kernel exposes information to the environment
 * which is a pseudo-filesystem, like which it was once meant to replace, and is more structured than
 * is a regular file system, partially managed by the Linux device manager (usually ), which contains all device files

A localidade será montada em  enquanto as outras duas são montadas como "bind". Isso significa que, por exemplo, será, na verdade,  (sendo na verdade apenas um segundo ponto de entrada para o mesmo sistema de arquivos) enquanto  é uma nova montagem ("instância", para usar o termo) do sistema de arquivo.

Entrando no novo ambiente
Agora que todas as partições estão inicializadas e o ambiente base está instalado, é hora de entrar no novo ambiente de instalação fazendo chroot nele. Isso significa que a sessão irá alterar sua "raiz" (o diretório mais alto que pode ser acessado) do ambiente atual de instalação (CD de instalação ou outra mídia) para o sistema de instalação (as partições inicializadas). Por isso o nome "change root" (trocar a "raiz") ou "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.

A partir deste ponto, todas as ações feitas afetam imediatamente o novo ambiente de instalação do Gentoo Linux. É claro que a instalação ainda está longe de ser concluída, sendo por isso que ainda temos algumas seções restantes.

Installing a Portage snapshot
Next step is to install a Portage snapshot, a collection of files that inform Portage what software titles are available to install, which profiles the administrator can select, etc.

The use of is recommended. This will fetch the latest Portage snapshot (which Gentoo releases 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 certain system packages installed through the stage3 file might have newer versions available, and Portage is now aware of this because a new Portage snapshot is installed. This can be safely ignored for now; the updates can be triggered after the Gentoo installation has finished.

Optional: Updating the Portage tree
It is possible to update the Portage tree to the latest version. The previous command will have installed a very recent Portage 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 Portage tree (which was fetched earlier on through ) to the latest state.

Em terminais lentos, tais como alguns "framebuffers" ou consoles seriais, é recomendado usar a opção  para agilizar o processo:

Lendo itens de notícias
When a Portage tree is synchronized to the system, it might warn the user with a message similar to the following:

Portage 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.

Mais informações sobre o leitor de notícias estão disponíveis através de sua página de manual:

Escolhendo o perfil correto
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. This is all maintained by the Gentoo developers.

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

Como pode ser visto, há também subperfis de desktops disponíveis para algumas arquiteturas.

Depois de visualizar os perfis disponíveis para a arquitetura, os usuários podem selecionar um perfil diferente para usar:

Configurando as variáveis 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 gtk-support, or with qt-support. 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:

Uma descrição completa das flags USE disponíveis pode ser encontrada no sistema em.

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

Como exemplo, mostramos uma configuração USE para um sistema baseado no KDE com suporte a DVD, ALSA e gravação de CD:

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  :

Zona horária
Selecione a zona horário para o sistema. Veja as zonas horárias disponíveis em, e então escreva-a no arquivo.

Suponha que a zona horária escolhida seja Brazil/East:

Por favor evite as zonas horárias pois seus nomes não correspondem às zonas esperadas. Por exemplo, é na verdade.

A seguir, reconfigure o pacote, o que irá atualizar o arquivo para nós, baseado no. O arquivo é usado pela biblioteca C do sistema para saber em qual zona horária o sistema está.

Configurando locais
A maioria dos usuários irá querer usar apenas um ou dois locais em seus sistemas.

Locais especificam não apenas a língua que o sistema deve usar para interagir com o usuário, mas também as regras para ordenar strings, mostrar data e hora, etc.

Os locais que um sistema deve suportar devem ser entrados em.

Os seguintes locais são um exemplo para se obter inglês (Estados Unidos) e alemão (Alemanha) com os correspondentes formatos de caracteres (como o 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:

Manualmente, isso pode ser conseguido através do arquivo :

Certifique-se que um local foi configurado, ou o sistema irá mostrar mensagens de aviso e erro durante a construção do kernel e outras implantações de software mais tarde na instalação.

Agora recarregue o ambiente:

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.