FAQ

From Gentoo Wiki
Jump to: navigation, search
This page is a translated version of the page FAQ and the translation is 54% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎한국어 • ‎português do Brasil • ‎русский • ‎中文(中国大陆)‎

Esta FAQ es una colección de preguntas y respuestas recopiladas de la lista de correo gentoo-dev y de los canales en el chat de FreeNode (Internet Relay Chat, IRC).

Contents

Introducción

Por favor, tenga en cuenta que muchas de estas preguntas se contestan en los documentos y guías oficiales de Gentoo. Ésta es simplemente una lista de preguntas comunes. Por favor, lea la documentación de Gentoo y las páginas del manual (man) para obtener una mayor comprensión de cómo funciona Gentoo y GNU/Linux y para las respuestas a preguntas que no se responden aquí.

Comenzar

¿Cómo se pronuncia Gentoo, y qué significa?

Gentoo se pronuncia "yen-tú" (la "g" en "Gentoo" se pronuncia como la "g", en la palabra ingleas "gentle"). El nombre científico del pingüino Gentoo es Pygoscelis papua. El nombre Gentoo se le da a este pingüino por los habitantes de las islas Malvinas.

¿Qué hace diferente a Gentoo?

Gentoo utiliza un sistema de paquetes parecido al sistema ports de BSD llamado Portage. Portage es un sistema de gestión de paquetes que permite gran flexibilidad al instalar y mantener software en un sistema Gentoo. Proporciona soporte para opciones al compilar (a través de los ajustes USE), dependencias condicionadas, resumen previo a la instalación de paquetes, instalación segura (a través de sandboxing) y desinstalación de software, perfiles de sistema y protección de los archivos de configuración entre otras características.

Por defecto en Gentoo se puede construir el sistema completo desde el código fuente utilizando las opciones de optimización que elija el usuario. Éste tiene completo control sobre los paquetes que se instalan y los que no. Gentoo proporciona numerosas opciones, de manera tal que se pueda instalar Gentoo a gusto del usuario, razón por la que a Gentoo se la conoce como una metadistribución.

Gentoo se desarrolla activamente. Toda distribución utiliza un estilo de desarrollo rápido: los parches de los paquetes se integran rápidamente en el árbol principal, la documentación se actualiza a diario, con frecuencia se añaden características a Portage y, dos veces al año, se lanzan versiones oficiales.

Instalación

Todo se vuelve realmente inestable cuando se utilizan las optimizaciones "-O9 -ffast-math -fomit-frame-pointer". ¿Qué sucede?

Do not bother using anything higher than -O3 since it is not supported by current versions of GCC. Very aggressive optimizations sometimes cause the compiler to streamline the assembly code to the point where it does not quite do the same thing anymore.

Por favor, intente compilar con CFLAGS -O2 -march=<arquitectura_del_sistema> antes de informar de una incidencia.

¿Cómo cambio la contraseña de root (o de cualquier otro usuario)?

Use the passwd command to change the password for the user that is logged in. The root user can change user's password by issuing the command passwd username. For extra options and settings see passwd's manual page (man passwd).

¿Cómo añado un usuario normal?

The command useradd larry will add a user called "larry". However, this method does not give the user many of the rights needed to work properly on the system, so the following command is preferred:

root #useradd -m -G users,audio,wheel larry

This will add a user called "larry". The -G option adds the user to a number of groups:

  • users which is the standard group for interactive users on the system
  • audio which allows the user to access sound devices
  • wheel which allows the user to execute the su command to gain root privileges (if he knows the root password)

¿Por qué no puede el usuario convertirse en root con la orden "su"?

For security reasons, users may only su to root if they belong to the wheel group. To add a username to the wheel group, issue the following command as root:

root #gpasswd -a <usuario> wheel

¿Puedo actualizar Gentoo de una versión a otra sin reinstalar?

In fact, there is no difference between the various releases after they have been installed. Gentoo 1.4 and later are glibc-2.3.x (or higher) based. As such, running emerge --sync && emerge -uDN @world will bring the entire system up to speed with the "latest Gentoo". The differences between individual releases lie in the installation medium and pre-compiled packages. See the Gentoo Upgrading Guide for more information about profiles and their role in upgrading.

Also note that the emerge -uDN world command updates the installed packages as well as their dependencies, but not the build-time dependencies (packages needed during builds but not when the software is installed). To update those as well, add the --with-bdeps=y option.

Mi núcleo no arranca, ¿Qué debo hacer ahora?

It isn't obligatory to redo every step of the installation. However, investigating the kernel and all associated steps is necessary. Suppose that Gentoo is installed on /dev/sda1 (/boot) and /dev/sda3 (/) with /dev/sda2 being the swap space.

Boot from the install CD and wait until a command prompt shows up.

En primer lugar, montamos todas las particiones:

root #mount /dev/sda3 /mnt/gentoo
root #mount /dev/sda1 /mnt/gentoo/boot
root #swapon /dev/sda2
root #mount -t proc none /mnt/gentoo/proc

Entonces hacemos chroot en el entorno Gentoo y configuramos el núcleo:

root #chroot /mnt/gentoo /bin/bash
root #env-update && source /etc/profile
root #cd /usr/src/linux
root #make menuconfig

Ahora seleccionamos o deseleccionamos cualquier opción que se haya configurado erróneamente en el intento anterior, salir y construir de nuevo el núcleo:

root #make && make modules_install

Ahora copie el fichero bzImage, sobrescribiendo el anterior:

root #cp arch/i386/boot/bzImage /boot/<nombre_del_núcleo>

Si se utilizar LILO como cargador de arranque, lance de nuevo lilo. Los usuarios de GRUB deben saltarse este paso:

root #/sbin/lilo

Ahora se debe salir del entorno chroot y reiniciar el sistema.

root #exit
root #umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo
root #reboot

If, on the other hand, the problem lies with the bootloader configuration, follow the same steps, but instead of configuring and compiling the kernel, reconfigure the bootloader (recompilation of the bootloader is usually not necessary).

Mi proxy necesita autenticación, ¿Qué debo hacer?

Para hacer que portage utilice esta disposición de forma automática, defínalo en /etc/portage/make.conf:

ARCHIVO /etc/portage/make.confPoner en marcha un proxy
http_proxy="http://nombredeusuario:contraseña@suequipoproxy.org:numerodepuerto"
ftp_proxy="ftp://nombredeusuario:contraseña@suequipoproxy.org:numerodepuerto"
RSYNC_PROXY="rsync://nombredeusuario:contraseña@suequipoproxy.servidor:numerodepuerto"

¿Cómo grabo un fichero ISO?

ISO files must be burned in raw mode. This means the file should not just be placed on the CD, but interpreted as an entire CD.

Existen muchas herramientas de grabación de CD disponibles; hablar de todas ellas sería un dilema sisifeano. En cambio, describir unas cuantas populares nunca hace daño:

  • With EasyCD Creator select File, Record CD from CD image. Then change the Files of type to ISO image file. Then locate the ISO file and click Open. After clicking Start recording the ISO image will be burned correctly onto the CD/DVD.
  • With Nero Burning ROM, cancel the wizard which automatically pops up and select Burn Image from the File menu. Select the image to burn and click Open. Now click the Burn button and watch the brand new Gentoo Live CD being burnt.
  • With cdrecord, simply type cdrecord dev=/dev/cdrom (replace /dev/cdrom with the CDROM drive's device path) followed by the path to the ISO file.
  • With K3B, select ToolsCDBurn CD Image. Then locate the ISO file within the 'Image to Burn' area. Click Start to begin the burn process.
  • With Mac OS X Panther, launch Disk Utility from Applications/Utilities, select Open from the Images menu, select the mounted disk image in the main window and select Burn in the Images menu.
  • With Mac OS X Jaguar, launch Disk Copy from Applications/Utilities, select Burn Image from the File menu, select the ISO and click the Burn button.

¿Qué CD o stage debería utilizar para mi CPU?

First find out what CPU is in the system Gentoo is to be installed on (for instance a Pentium-M). Next find out what CPU type it is compatible with (instruction-wise) to find a proper match with Gentoo's CD or stages. Consulting the CPU's vendor website for this information usually works, although querying a search engine of choice is usually more efficient.

When uncertain, take a "lower" CD/stage file, for instance a i686 or even generic x86 (or the equivalent in the system's arch). This will ensure that the system will work, but may not be as fast as further optimizations.

Please note that many more options exist than those for which Gentoo builds binary stages. Please see the GCC guide for setting the -march flag.

The Internet does not work after rebooting. What is wrong?

First verify that the network card is discovered properly by the kernel. Run ifconfig -a and look for network interfaces. Something such as eth0, eno1, enp2s0, enp0s8, wlan0 (in case of certain wireless network cards) should be present. Specific kernel modules may be required for the kernel to properly detect the network card. If that is the case, make sure that the required kernel modules are listed in the /etc/conf.d/modules file.

If support for the system's network card has been left out of the kernel, it will need to be reconfigured and, in some cases, recompiled.

If the network card is found by the kernel, but the network configuration has been set to use DHCP, a DHCP client might not have been installed on the system. There are many DHCP clients available in Gentoo, a common one being dhcpcd. If necessary to get the connection to the Internet working reboot to the installation CD and emerge -a dhcpcd.

Information on how to rescue the system using the installation CD is available here as well.

Attempting to boot Windows from GRUB or LILO only shows a black screen. What should I do?

This is a known problem. Windows refuses to boot when it is not installed on the first hard drive and shows a black/blank screen. To handle this, it is necessary to "fool" Windows into believing that it is installed on the first hard drive with a little tweak in the boot loader configuration. Please note that in the below example, Gentoo is installed on /dev/sda (first disk) and Windows on /dev/sdb (second disk). Adjust the configuration as needed:

ARCHIVO /boot/grub/grub.confExample dual boot entry for Windows in grub.conf
title Windows XP
     map (hd1) (hd0)
     map (hd0) (hd1)
     rootnoverify (hd1,0)
     chainloader +1
Nota
The above example is for GRUB Legacy bootloader, not GRUB2. For information on how to dual boot Windows with GRUB2 see the GRUB2 article.
ARCHIVO /etc/lilo.confExample dual boot entry for Windows in lilo.conf
other=/dev/sdb1
     label=WindowsXP
     table=/dev/sdb
     map-drive = 0x80
     to = 0x81
     map-drive = 0x81
     to = 0x80

This will make Windows believe it is installed on the first hard drive and boot without problems. More information can be found in official GRUB documentation and in man lilo.conf.

How do I install Gentoo using a stage1 or stage2 tarball?

The Gentoo Handbook only describes a Gentoo installation using a stage3 tarball. However, Gentoo still provides stage1 and stage2 tarballs. This is for development purposes (the Release Engineering team starts from a stage1 tarball to obtain a stage3) but should not be used by users: a stage3 tarball can very well be used to bootstrap the system. A working Internet connection is a requirement.

Bootstrapping means building the toolchain (the C library and compiler) for the system after which all core system packages are installed. To bootstrap the system, perform a stage3 installation. Before starting the chapter on Configuring the Kernel, it might be necessary to modify the bootstrap.sh script to match personal requirements:

root #cd /usr/portage/scripts
root #vi bootstrap.sh

Después de realizar las modificaciones, lance el guión.

root #./bootstrap.sh

A continuación reconstruya todos los paquetes básicos del sistema con el conjunto de herramientas que acaba de construir. Necesitamos reconstruirlos ya que se ofrecen desde el stage3:

root #emerge -e system

Now continue with Configuring the Kernel.

Package management

¿De qué forma se almacenan los paquetes?

Packages are not "stored" per se. Instead, Gentoo provides a set of scripts which can resolve dependencies, fetch source code, and compile a version of the package tailored to the user his needs. Generally Gentoo only builds binaries for releases and snapshots. The Gentoo Developer Manual covers the contents of an ebuild script in detail.

For full ISO releases, a full suite of binary packages will be created using an enhanced .tbz2 format, which is .tar.bz2 compatible with meta-information attached to the end of the file. These can be used to install a working (though not fully optimized) version of the package quickly and efficiently.

Es posible crear RPMs (ficheros del gestor de paquetes de Red Hat) utilizando el sistema portage de Gentoo, aunque actualmente no es posible utilizar todos los RPMs existentes para instalar paquetes.

Quiero realizar el paso ./configure yo mismo. ¿Puedo?

Yes, but it is not trivial, nor is it recommended. Since the method to do this requires a good understanding of Portage internals and commands, it is instead recommended that the ebuild is patched to do whatever it is that the user wants and place it in a Portage overlay (that is why overlays exist). This is much better for maintainability, and usually easier. See the Gentoo Developer Manual for more information.

What if rsync does not work for me?

When behind a firewall that does not permit rsync traffic through port 873, the emerge-webrsync command can be used to fetch and install a Portage snapshot through regular HTTP. See this section for information on downloading source files and Portage snapshots via a proxy.

I have a slow (or no) Internet connection at home. Can I download sources somewhere else and add them to my system?

Definitely. Run emerge --pretend package/atom to see what programs are going to be installed. To find out the sources for those packages and where to download the sources from, run emerge -fp package/atom. Download sources and bring them on any media home. Put the sources into the /usr/portage/distfiles/ folder and then simply run emerge package/atom. Be warned: this can be a very tedious process.

Los paquetes de fuentes se están acumulando en /usr/portage/distfiles/. ¿Es seguro eliminar estos archivos?

Deleting these files will have no negative impact on day-to-day performance. However, it might be wise to keep the most recent version of the files; often several ebuilds will be released for the same version of a specific piece of software. If the archive is deleted and the software is upgraded or rebuilt it will be necessary to download them from the Internet again.

Use the eclean script from app-portage/gentoolkit to manage the contents of /usr/portage/distfiles/ and a few other locations. Please read man eclean to learn more about its usage, as well as the Gentoolkit article.

What is in /var/tmp/portage? Is it safe to delete the files and directories in /var/tmp/portage?

During compilation, Gentoo saves the sources of the package in /var/tmp/portage. These files and folder are usually deleted upon a successful merge, but this sometimes fails. It is safe to clean out all contents of this directory if the emerge command is not running. Be sure to always pgrep emerge before cleaning out this directory.

Utilización

¿Cómo configuro una distribución de teclado internacional?

Edit the keymap variable in /etc/conf.d/keymaps. To have console working correctly with extended characters in the keymap, it might be necessary to set up the variables consolefont and consoletransation in the /etc/conf.d/consolefont file (for further information on localizing the environment, refer to the localization guide). Then, issue a reboot, or restart the keymaps and consolefont scripts:

root #/etc/init.d/keymaps restart
root #/etc/init.d/consolefont restart

La resolución de nombres DNS únicamente funciona para el usuario root

/etc/resolv.conf has the wrong permissions; chmod it as follows:

root #chmod 0644 /etc/resolv.conf

¿Por qué mi usuario no puede utilizar su propio crontab?

Add that user to the cron group:

root #gpasswd -a <nombredeusuario> cron

¿Cómo consigo que el bloqueo del teclado numérico (Bloq Num) se active al cargarse el sistema?

The following command will add the numlock service to the default runlevel, enabling numlock at boot:

root #rc-update add numlock default
root #/etc/init.d/numlock start

Each GUI provides different tools for this sort of thing; please check the help section or online manuals for the GUI of choice for further assistance.

¿Cómo consigo dejar mi terminal limpio al salir?

To have the terminal cleared, add the clear command to the user's ~/.bash_logout script:

user $echo clear >> ~/.bash_logout

To have this happen automatically when adding a new user, do the same for the /etc/skel/.bash_logout file:

root #echo clear >> /etc/skel/.bash_logout

Mantenimiento

ReiserFS and filesystem corruption issues - how to fix them, etc

If the ReiserFS partition is corrupt, try booting the Gentoo Install CD and run reiserfsck --rebuild-tree on the corrupted filesystem. This should make the filesystem consistent again, although there may be some lost files or directories due to the corruption.

Desarrollo

¿Dónde puedo reportar fallos?

Use the Bugzilla site to report bugs. Visit #gentoo on the Freenode IRC network and ask around if it is unclear whether an issue is really a bug or not.

¿Con qué frecuencia se realizan nuevos lanzamientos?

Gentoo's packages are usually updated shortly after the upstream authors release new code. As for when Gentoo itself makes new stage/profile/ISO releases, check the Release Engineering Project page. New releases are announced on the gentoo-announce mailing list. See this section for more information.

Mi altavoz pita como loco. ¿Cómo desactivo los pitidos de la consola?

Los pitidos de consola se pueden desactivar con setterm, así:

root #setterm -blength 0

To turn off the console beeps on boot, put the following command in the /etc/conf.d/local.start file. However, this only disables beeps for the current terminal. To disable beeps for other terminals, pipe the command output to the target terminal, like this:

root #setterm -blength 0 >/dev/vc/1

Replace /dev/vc/1 with the terminal for which console beeps need to be disabled.

Recursos

¿Dónde puedo encontrar más información sobre Gentoo Linux?

Much of the official Gentoo documentation can be found here on the Wiki. Some older documentation is still available at http://wwwold.gentoo.org/doc/en/.

¿Puedo comprar un CD de Gentoo Linux?

Users who are not able to download and burn installation CDs personally might find one through one of our licensed stores. However, most stores have dropped offering CDs and DVDs as these installation media quickly become obsolete.

Las tiendas con licencia se listan en la página de tiendas.

This FAQ has not answered my question. What do I do now?

A good first step is to browse through the relevant documentation, failing that, the various Gentoo Linux mailing lists listed on Google. To search through the Gentoo mailing lists, enter "site:lists.gentoo.org foo" to search for "foo". If all else fails, or to just hang out with Gentoo folks, visit us on the #gentoo Freenode IRC channel.
This article is based on a document formerly found on our main website gentoo.org.
The following people have contributed to the original document: Daniel Robbins, Colin Morey, John P. Davis, Eric Stockbridge, Stoyan Zhekov, Carl Anderson, Jorge Paulo, Sven Vermeulen, Benny Chuang, Jonathan Smith, nightmorph
They are listed here as the Wiki history does not provide for any attribution. If you edit the Wiki article, please do not add yourself here, your contributions are recorded on the history page.