FAQ
Core systemHardwareSoftwareDesktopServer & SecurityProject & Community
emerge — configuration — ebuild repository — dispatch-conf
world file — USE flags — ebuilds — profiles
upgrades — using testing packages — binary packages
tools — gentoolkit — eselect
Portage FAQ — cheat sheet — FAQ
all articles
Questa FAQ è una collezione di domande comuni su Gentoo e le corrispondenti risposte .
Ti preghiamo di notare che molte di queste domande sono state risolte all'interno della documentazione ufficiale di Gentoo e nelle guide. Questa è solo un riferimento per i problemi più comuni. Ti preghiamo di leggere la documentazione di Gentoo e le pagine man per ottenere una migliore comprensione di come Gentoo e GNU/Linux funzionano e per trovare risposte a domande che potrebbero non essere risolte qui.
Read the Gentoo documentation to learn how to use Gentoo, and GNU/Linux more broadly. The main Gentoo documentation is on the wiki, and in the Handbook. More information may be found in man pages, Info pages, /usr/share/doc/, upstream, etc. Many commands also support the
--help
or -h
switches.These questions are often collected from the gentoo-dev mailing list and from Gentoo channels on Internet Relay Chat (IRC).
Per cominciare
Come si pronuncia Gentoo, e cosa significa?
"Gentoo" si pronuncia "gen-tu" (la "g" di "Gentoo" è una "g" dolce, come in "gentile"). Il nome scientifico dei pinguini Gentoo è "Pygoscelis papua". Questa specie di pinguini è stata chiamata così dagli abitanti delle isole Falkland.
Cosa rende Gentoo diverso dalle altre distro?
Gentoo usa un sistema BSD a porte chiamato Portage. Portage è un sistema di gestione dei pacchetti che permette grande flessibilità mentre si installa e si gestisce il software sul sistema Gentoo. Fornisce supporto alle opzioni di compilazione (attraverso le USE flag), alle dipendenze condizionali, ai sommari di pre-installazione dei pacchetti, alle installazioni sicure (tramite le sandbox), ai profili di sistema e alla protezione dei file di configurazione tra le tante altre caratteristiche.
Di default in Gentoo l'intero sistema viene compilato a partire dal codice sorgente, usando le ottimizzazioni scelte dall'utente. L'utente ha il completo controllo su quali pacchetti verranno o meno installati. Gentoo fornisce numerose opzioni, così che gli utenti possano installare Gentoo secondo le loro preferenze, motivo per cui Gentoo viene considerato una meta-distribuzione.
Gentoo permits many alternatives for core (system) software, allowing users to adapt with ease the installation to their own needs and preferences - in fact, the user has almost complete control over which packages are installed, or left out. This is a key difference from many other distributions, which are often built around specific subsystems, which cannot be replaced.
The depth of choice of core software, target architectures, and low-level optimization configuration, is why Gentoo is called a meta-distribution.
Gentoo strives to do things in the simplest possible way, and core Gentoo principles and procedures are easy to understand and master, given just a little effort. The relatively small investment to learn how to use Gentoo will reap dividends for anyone who is to become a substantial user of a Unix(like) operating system. Gentoo may require some reading and a little thought to understand how to use it, but the payoff from the power gained by the new user is considerable.
Gentoo è un progetto attivo in continuo sviluppo. L'intera distribuzione adotta uno stile di sviluppo dal ritmo molto rapido: le patch per i pacchetti software sono velocemente integrate nell'albero principale, la documentazione viene aggiornata quotidianamente, frequentemente vengono aggiunte nuove funzionalità a Portage e rilasci ufficiali avvengono due volte l'anno.
Do not confuse rolling release with bleeding edge. Gentoo updates may be fast-paced, but Gentoo is a stable distribution, with exceptional reliability. All packages are fully tested, and must meet high standards. Quality control is a fundamental priority for the project at large.
See also the pages on the website about Gentoo, the philosophy of Gentoo, and the article on the benefits of Gentoo.
Installazione
Il sistema diventa decisamente instabile quando si usano le ottimizzazioni '-O9 -ffast-math -fomit-frame-pointer'. Quali sono i vantaggi?
While Portage optimizes compilation to a specific processor according to the CFLAGS/CXXFLAGS setting, anything other than the defaults for a given processor risk issues and even performance loss. The goal of the Gentoo project has never specifically been to permit low level optimization, even if its architecture does lend itself to this.
Any required CFLAGS should be set on a per-package basis, system-wide optimization above defaults is not recommended.
Non è consigliato usare un'opzione più alta di -O3
poichè non è supportata dalle versioni attuali di GCC. Ottimizzazioni molto aggressive possono a volte forzare il compilatore a condensare il codice assembly fino a modificarne il comportamento.
Ti preghiamo di compilare con CFLAGS -O2 -march=<architettura_di_sistema>
prima di riportare un bug.
See the GCC optimization article for more details.
Come posso cambiare la password di root (o di un qualsiasi altro utente)?
Usa il comando passwd per cambiare la password dell'utente che ha effettuato il login. L'utente root può cambiare la password di un utente lanciando il comando passwd username. Per opzioni extra e per le impostazioni guarda la pagina di manuale di passwd lanciando il comando (man passwd).
Come aggiungo un utente normale?
Il comando useradd larry aggiungerà un utente chiamato "larry". Comunque , questo metodo non fornisce all'utente molti dei permessi necessari per lavorare in maniera appropriata col sistema, perciò è preferibile usare il seguente comando:
root #
useradd -m -G users,audio,wheel larry
In questo modo viene aggiunto un utente chiamato "larry". L'opzione -G
inserisce l'utente in alcuni gruppi:
users
che rappresenta il gruppo standard per gli utenti interattivi sul sistemaaudio
che permette all'utente di accedere ai device dell'audiowheel
che permette all'utente di eseguire il comando su per ottenere privilegi di root (sempre che conosca la password di root)
Perchè l'utente non può ottenere i privilegi di amministratore tramite su?
Per ragioni di sicurezza, solamente gli utenti appartenenti al gruppo wheel possono ottenere privilegi di amministrazione lanciando il comando su. Per aggiungere uno username al gruppo wheel, si deve lanciare il seguente comando da root:
root #
gpasswd -a <username> wheel
Posso aggiornare Gentoo passando da una release ad un'altra senza doverlo reinstallare?
Core packages will be updated from time to time, and new profiles will be created, but there will be no specific events that could be termed versions, releases, editions, variants etc.
Gentoo packages are updated continually: it is a rolling release distribution.
Gentoo should be updated regularly (updating daily or every few days is not unreasonable) for security reasons, and to avoid updates becoming complex. See the Gentoo Upgrading Guide for how to keep things in order. Each time the Gentoo ebuild repository is synchronized, and the system updated, everything will be "up to date".
Gentoo requires Internet access, with sufficient stability and capacity, for both installation and updates.
The Release Engineering Project page, the gentoo-announce mailing list, and the Gentoo ebuild repository news items provide information on important changes to Gentoo Linux.
Il mio kernel non esegue correttamente la procedura di boot, cosa dovrei fare adesso?
Non è obbligatorio ripetere tutti i passaggi dell'installazione. Tuttavia è necessario ricontrollare il kernel e tutti i relativi passaggi. Supponendo che Gentoo sia installato su /dev/sda1 (/boot) e /dev/sda3 (/) con /dev/sda2 come partizione di swap.
Fai il boot dal CD di installazione e aspetta finchè una linea di comando non appare.
Per prima cosa effettua il mount di tutte le partizioni:
root #
mount /dev/sda3 /mnt/gentoo
root #
mount /dev/sda1 /mnt/gentoo/boot
root #
swapon /dev/sda2
root #
mount -t proc proc /mnt/gentoo/proc
root #
mount --rbind /sys /mnt/gentoo/sys
root #
mount --make-rslave /mnt/gentoo/sys
root #
mount --rbind /dev /mnt/gentoo/dev
root #
mount --make-rslave /mnt/gentoo/dev
Poi ci si deve spostare nell'ambiente Gentoo con chroot e si deve configurare il kernel:
root #
chroot /mnt/gentoo /bin/bash
root #
env-update && source /etc/profile
root #
cd /usr/src/linux
root #
make menuconfig
Ora (de)seleziona qualsiasi cosa che fosse stata (de)selezionata erratamente nel precedente tentativo, esci, e compila il kernel:
root #
make && make modules_install
Se LILO è stato scelto come bootloader, lancia nuovamente lilo - gli utenti di GRUB possono saltare questo step:
root #
/sbin/lilo
Esci dal chroot e riavvia il sistema.
root #
exit
root #
umount -l /mnt/gentoo/dev /mnt/gentoo/sys
root #
umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo
root #
reboot
Please see this article from the Knowledge Base for further details.
Se, d'altra parte, il problema nasce dalla configurazione del bootloader, segui gli stessi step, ma invece di compilare e configurare il kernel, riconfigura il bootloader (ricompilare il bootloader solitamente non è necessario).
Il mio proxy richiede l'autenticazione, cosa devo fare?
Per fare in modo che Portage usi automaticamente questo schema, definiscilo in /etc/portage/make.conf:
/etc/portage/make.conf
Impostazioni dei proxyhttp_proxy="http://username:password@yourproxybox.org:portnumber" ftp_proxy="ftp://username:password@yourproxybox.org:portnumber" RSYNC_PROXY="rsync://username:password@yourproxybox.server:portnumber"
Ricorda sempre che il server proxy deve supportare il metodo CONNECT per la/e porta/e rsync.
Beware of the risks of storing passwords in configuration files. It is bad practice in general, and in some situations can be a huge security problem. Alternative, more secure methods, are advised.
Come posso masterizzare un file ISO?
I file ISO devono essere masterizzati in modalità raw. Ciò significa che il file non dovrebbe solamente essere inserito nel CD ma deve essere interpretato come l'intero CD.
Esistono e sono disponibili moltissimi strumenti per masterizzare CD; coprirli tutti con una spiegazione risulterebbe un'impresa di Sisifo. In ogni modo, descrivere alcuni dei più popolari non può mai far male:
- Con EasyCD Creator seleziona File, Record CD from CD image. Modifica Files of type sostituendolo con ISO image file. Trova il tuo file ISO e clicca su Open. Dopo aver cliccato su Start recording l'immagine ISO sarà masterizzata correttamente sul CD/DVD.
- Con Nero Burning ROM, salta il wizard che appare automaticamente e seleziona Burn Image dal menu File. Seleziona l'immagine da masterizzare e clicca su Open. Ora clicca sul bottone Burn e osserva la tua copia nuova di zecca del Gentoo Live CD mentre viene masterizzata.
- Con cdrecord, digita semplicemente cdrecord dev=/dev/cdrom (sostituisci /dev/cdrom con il percorso del lettore CDROM) seguito dal percorso del file ISO.
- Con K3B, seleziona Tools → CD → Burn CD Image. Trova il file ISO all'interno dell'area 'Image to Burn'. Clicca su Start per far partire il processo di masterizzazione.
- Con Mac OS X Panther, lancia la Disk Utility dal menu Applications/Utilities, seleziona Open dal menu Images, seleziona l'immagine del disco montata dalla finestra principale e seleziona Burn nel menu Images.
- Con Mac OS X Jaguar, lancia Disk Copy dal menu Applications/Utilities, seleziona Burn Image dal menu File, seleziona la ISO e clicca sul bottone Burn.
See LiveUSB for information on writing iso files to USB devices.
Quale CD/stage dovrei usare per la mia 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 ISO 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" ISO or 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 Handbook has further information on selecting the correct tarball and choosing the right installation medium.
Internet non funziona dopo il riavvio. Cos'è che è andato storto?
First follow standard troubleshooting practices (cables, routers working etc.).
Per prima cosa verificare che la scheda di reta venga rilevata dal kernel. Eseguire ifconfig -a e cercare le interfacce di rete. Qualcosa come eth0, eno1, enp2s0, enp0s8, wlan0 (per determinate schede wireless) dovrebbero essere presenti. Moduli del kernel specifici potrebbero essere richiesti dal kernel per rilevare la scheda di rete. In questo caso controllare che i moduli del kernel richiesti siano presenti nel file /etc/conf.d/modules
Se il supporto per la scheda di rete del sistema è stato rimosso dal kernel, necessiterà di essere riconfigurato e, in alcuni casi, ricompilato.
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 install net-misc/dhcpcd.
Informazioni su come recuperare il sistema usando il CD di installazione sono disponibili anche qui.
The Handbook contains information on network setup, while the wiki has information on Ethernet, WiFi, and network management.
È possibile un dual boot con Windows o con altri sistemi operativi?
Si! Probabilmente il metodo più veloce per farlo è quello di installare GRUB2 con sys-boot/os-prober. Leggi a riguardo nel GRUB2 articolo ed in particolar modo sul dual boot con GRUB2 qui.
Il tentativo di avvio di Windows da GRUB legacy o LILO mostra solo una schermata nera. Cosa devo fare?
This is a known problem and only applies to older bootloaders such as GRUB Legacy and LILO. 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:
/boot/grub/grub.conf
Example dual boot entry for Windows in grub.conftitle Windows XP map (hd1) (hd0) map (hd0) (hd1) rootnoverify (hd1,0) chainloader +1
The above example is for GRUB Legacy bootloader, not GRUB2. For information on how to dual boot Windows with GRUB see the GRUB article.
/etc/lilo.conf
Example dual boot entry for Windows in lilo.confother=/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.
Come installo Gentoo usando i tarball stage 1 o stage 2?
Il manuale Gentoo descrive solo un'installazione Gentoo utilizzando lo stage3 tarball. Gentoo fornisce tuttavia ancora tarball stage1 e stage2. Questo è per scopi di sviluppo (il Release Engineering team inizia da un tarball stage1 per ottenere uno stage3) ma non deve essere utilizzato dagli utenti: un archivio stage3 può ben essere utilizzato per fare il bootstrap del sistema. Una connessione Internet funzionante è un requisito.
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
Dopo aver effettuato le dovute modifiche, esegui lo script.
root #
./bootstrap.sh
Poi, esegui il rebuild di tutti i pacchetti del core delsistema con la catena di strumenti appena creata. É necessario farne il rebuild poichè già la tarball dello stage3 tarball li offre:
root #
emerge -e @system
Ora continua con Configuring the Kernel.
Gestione dei pacchetti
In quale forma vengono salvati i pacchetti?
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's 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.
It is possible to create RPMs (Red Hat package manager files) using Gentoo's Portage, but it is not currently possible to use existing RPMs to install packages.
I want to perform the ./configure step myself. Can I?
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?
It is possible to download packages manually and copy them to an appropriate location to be used for installation, however this can be a very tedious process.
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 /var/cache/distfiles/ folder and then simply run emerge package/atom.
Source tarballs are collecting in /var/cache/distfiles/. Is it safe to delete these files?
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 /var/cache/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 (or in $PORTAGE_TMPDIR/portage if the default is changed). These files and folder are usually deleted upon a successful emerge, 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.
Usage
Come faccio ad impostare il layout della tastiera internazionale ?
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 the consolefont and consoletransation variables 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
See keyboard layout switching for more information.
DNS name resolution works for root only
/etc/resolv.conf ha i permessi errati; usa chmod come segue:
root #
chmod 0644 /etc/resolv.conf
See also resolv.conf.
Why can't my user use their own crontab?
Add that user to the cron group:
root #
gpasswd -a <username> cron
How do I get numlock to start on boot?
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.
How do I have my terminal cleared when I log out?
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
Maintenance
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.
Sviluppo
Dove posso segnalare i bug?
Utilizza il sito Bugzilla per segnalre i bug.Visita #gentoo (webchat) sulla rete IRC Freenode per chiarire se effettivamente un problema dipende da un bug o no.
How often are new releases made?
Gentoo's packages are usually updated shortly after the upstream authors release new code, see this section for more information.
The Release Engineering Project page, the gentoo-announce mailing list, and the Gentoo ebuild repository news items provide information on important changes to Gentoo Linux.
My speaker beeps like crazy. How do I disable console beeps?
Console beeps can be turned off using setterm, like this:
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.
See this article for more details.
Trivia
Why is the letter 'e' in the name of many Gentoo-specific tools and functions?
The 'e' became a thing because Gentoo originally started as Enoch Linux. Many of Gentoo's tools and function names maintained the prefix 'e' for this reason.
Here's a quote from Daniel Robbins (Daniel Robbins) : "I think the 'e' likely came from enoch, and was picked as a single-character prefix in the vein of the 'iMac', which was initially released in August 1998. Enoch began in early 1999. (see https://www.funtoo.org/Funtoo_Linux_History)."
Risorse
Posso acquistare un CD di Gentoo Linux?
Most stores have stopped offering CDs and DVDs. With the short window between Gentoo ISO releases and technological advancements (especially higher internet bandwidth for the masses) these forms of installation media are now artifacts of history. Bootable media are readily available on our mirrors and accessible via the downloads page.
Licensed stores for official merchandise of other types are listed on the stores page.
Questa FAQ non ha risposto alla mia domanda. Cosa devo fare adesso?
A good first step is to browse through the relevant documentation, on the Gentoo wiki, in man pages, Info, /usr/share/doc/, etc. Many commands also support the --help or -h switches.
The various Gentoo Linux mailing lists, or the forums could help. Questions may be put to the Gentoo community on IRC - visit us on the #gentoo (webchat) Libera.Chat IRC channel.
The Gentoo bug tracking system contains information on many issues. Searching the web may yield good results for some questions. If having trouble with a particular package, check upstream documentation.
See the support article if having a particular issue.
This page is based on a document formerly found on our main website gentoo.org.
The following people contributed to the original document: Daniel Robbins (Daniel Robbins) , Colin Morey, John P. Davis, Eric Stockbridge, Stoyan Zhekov, Carl Anderson, Jorge Paulo, Benny Chuang, Jonathan Smith,
They are listed here because wiki history does not allow for any external attribution. If you edit the wiki article, please do not add yourself here; your contributions are recorded on each article's associated history page.