This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

FAQ

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page FAQ and the translation is 65% complete.

Questa FAQ è una collezione di domande e risposte raccolte dalla mailing list "gentoo-dev" e dai canali Gentoo presenti su Freenode Internet Relay Chat (IRC).

Introduzione

Ti preghiamo di notare che molte di queste domande sono state risolte all'interno dei documenti ufficiali di Gentoo e nelle guide. Questa semplicemente è una lista di domande frequenti. Ti preghiamo di leggere la documentazione di Gentoo e le pagine di man per ottenere una migliore comprensione di come Gentoo e GNU/Linux funzionano e per trovare risposte a domande che potrebbero non essere risolte con la presente FAQ.

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

Installazione

Il sistema diventa decisamente instabile quando si usano le ottimizzazioni '-O9 -ffast-math -fomit-frame-pointer'. Quali sono i vantaggi?

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.

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 sistema
  • audio che permette all'utente di accedere ai device dell'audio
  • wheel 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?

In realtà, non esiste alcuna differenza tra i vari rilasci una volta installati. Gentoo 1.4 e successivi sono basati su glibc-2.3.x (o superiori). Come tale eseguendo emerge --sync && emerge -uDN @world si porterà il sistema di pari passo con "l'ultima Gentoo". Le differenze fra le versioni individuali si trovano nel supporto di installazione e nei pacchetti pre-compilati. Vedere Gentoo Upgrading Guide per ulteriori informazioni riguardanti i profili ed il loro ruolo nell'aggiornamento.

Da notare che il comando emerge -uDN @world aggiorna i pacchetti installati, nonché le relative dipendenze, ma non le dipendenze richieste durante la compilazione (pacchetti necessari durante la compilazione, ma non quando il software è installato). Per aggiornare anche queste aggiungere l'opzione --with-bdeps=y

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

Ora copia il file bzImage, sovrascrivendo il precedente:

root #cp arch/i386/boot/bzImage /boot/<kernel_name>

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

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:

FILE /etc/portage/make.confImpostazioni dei proxy
http_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.

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

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

Internet non funziona dopo il riavvio. Cos'è che è andato storto?

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.

È 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:

FILE /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
Note
The above example is for GRUB Legacy bootloader, not GRUB2. For information on how to dual boot Windows with GRUB2 see the GRUB2 article.
FILE /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.

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?

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.

Source tarballs are collecting in /usr/portage/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 /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.

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

DNS name resolution works for root only

/etc/resolv.conf ha i permessi errati; usa chmod come segue:

root #chmod 0644 /etc/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 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. 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.

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.

Risorse

Where can I find more information about Gentoo Linux?

Much of the official Gentoo documentation can be found here on the Wiki.

Posso acquistare un CD di 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.

The licensed stores 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, failing that, the various Gentoo Linux mailing lists listed here. If all else fails, or to just hang out with Gentoo folks, visit us on the #gentoo Freenode IRC channel.


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, Colin Morey, John P. Davis, Eric Stockbridge, Stoyan Zhekov, Carl Anderson, Jorge Paulo, Benny Chuang, Jonathan Smith, nightmorph
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.