Gentoo Linux Frequently Asked Questions Daniel Robbins Colin Morey John P. Davis Eric Stockbridge Stoyan Zhekov Carl Anderson Jorge Paulo Sven Vermeulen Benny Chuang Jonathan Smith This FAQ is a collection of questions and answers collected from the gentoo-dev mailing list and from IRC. 3.0.6 2005-07-14 Questions:
Getting Started

Please note that many of these questions are answered within the official Gentoo documents and guides. This is simply a list of common questions. Please read the documentation and/or man pages to gain a greater understanding of how Gentoo and GNU/Linux works, and for answers to questions which may not be answered here.

  • How is Gentoo pronounced, and what does it mean?
  • What makes Gentoo different?
Installation
  • Things are really unstable and I'm using "-O9 -ffast-math -fomit-frame-pointer" optimizations. What gives?
  • How can I change the root (or any other user's) password?
  • How do I add a normal user?
  • Why can't a user su to root?
  • How do I disable devfs?
  • Can I upgrade Gentoo from one release to another without reinstalling?
  • My kernel doesn't boot (properly), what should I do now?
  • My proxy requires authentication, what do I have to do?
  • How do I burn an ISO file?
  • What CD/stage should I use for my CPU?
Package Management
  • In what format are the packages stored?
  • I want to perform the ./configure step myself. Can I?
  • How do I use emerge from behind a firewall?
  • What if rsync doesn't work for me?
  • I have only slow modem connection at home. Can I download sources somewhere else and add them to my system?
  • Source tarballs are collecting in /usr/portage/distfiles. Is it safe to delete these files?
  • What's in /var/tmp/portage? Is it safe to delete the files and directories in /var/tmp/portage?
Usage
  • How do I set up an International Keyboard Layout?
  • DNS name resolution works for root only.
  • Why can't my user use their own crontab?
  • How do I get numlock to start on boot?
  • How do I have my terminal cleared when I log out?
  • I'm not able to run X applications as root after su'ing
Maintenance
  • ReiserFS and filesystem corruption issues -- how to fix them, etc.
Development
  • Where can I report bugs?
  • How often are new releases made?
  • My speaker beeps like crazy. How do I disable console beeps?
Resources
  • Where can I find more information about Gentoo Linux?
  • Can I buy a CD of Gentoo Linux?
  • This FAQ hasn't answered my question. What do I do now?
Getting Started
How is Gentoo pronounced, and what does it mean?

A Gentoo is a species of a small, fast penguin, pronounced "gen-too" (the "g" in "Gentoo" is a soft "g", as in "gentle"). The scientific name of the Gentoo penguin is Pygoscelis papua. The name Gentoo has been given to the penguin by the inhabitants of the Falkland Islands (Islas Malvinas).

What makes Gentoo different?

Gentoo uses a BSD ports-like system called Portage. Portage is a package management system that allows great flexibility while installing and maintaining software on a Gentoo system. It provides compile-time option support (through USE flags), conditional dependencies, pre-package installation summary, safe installation (through sandboxing) and uninstallation of software, system profiles, configuration file protection amongst several other features.

With Gentoo you can build your entire system from source, using your choice of optimizations. You have complete control over what packages are or aren't installed. Gentoo provides you with numerous choices, so you can install Gentoo to your own preferences, which is why Gentoo is called a meta-distribution.

Gentoo is actively developed. The entire distribution uses a rapid pace development style: patches to the packages are quickly integrated in the mainline tree, documentation is updated on daily basis, Portage features are added frequently, and official releases occur twice per year.

Installation
Things are really unstable and I'm using -O9 -ffast-math -fomit-frame-pointer optimizations. What gives?

Don't bother using anything higher than -O3 since it isn't supported by current versions of gcc. Very aggressive optimizations sometimes cause the compiler to streamline the assembly code to the point where it doesn't quite do the same thing anymore.

Please try to compile with CFLAGS -O2 -march=<your_arch> before reporting a bug.

How do I change the root (or any other user's) password?

You can use passwd to change the password for the user you are logged into. As root, you can change any user password by issuing the command passwd username For extra options and setting, please man passwd.

How do I add a normal user?

The command adduser username will add a user called "username". However, this method does not give the user many of the rights you might want to grant him, so the following command is preferred:

# useradd -m -G users,audio,wheel username

This will add a user named "username". The option audio adds them to the audio group and allows the user to access sound devices. The option wheel adds the user to the wheel group, which allows the user to execute the command su, which in turn allows them to gain the privileges of the root user.

Why can't a user su to root?

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:

# gpasswd -a username wheel
How do I disable devfs?

Gentoo requires either devfs kernel support or udev userland support to function correctly. With the advent of the 2.6 kernel being stable on most archs, udev is recommended. Please see the udev guide for information on configuring udev.

Can I upgrade Gentoo from one release to another without reinstalling?

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 based. As such, running emerge --sync && emerge -uDN world will bring your 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.

My kernel doesn't boot, what should I do now?

You don't need to redo every step of the installation, but investigating the kernel and all associated steps is necessary. Suppose you have installed Gentoo on /dev/hda1 (/boot) and /dev/hda3 (/) with /dev/hda2 being the swap space:

Boot from the Install CD and wait until you receive a prompt
We first mount all partitions:
# mount /dev/hda3 /mnt/gentoo
# mount /dev/hda1 /mnt/gentoo/boot
# swapon /dev/hda2
# mount -t proc none /mnt/gentoo/proc
Then we chroot into our Gentoo environment and configure the kernel:
# chroot /mnt/gentoo /bin/bash
# env-update && source /etc/profile
# cd /usr/src/linux
# make menuconfig
Now (de)select anything you have (de)selected wrongly at your
previous attempt. Then quit and compile your kernel:
# make && make modules_install
Now copy over your bzImage file, overwriting your previous one:
# cp arch/i386/boot/bzImage /boot
If you use LILO, rerun lilo -- GRUB users should skip this:
# /sbin/lilo
Now exit the chroot and reboot.
# exit
# umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo
# reboot

If, on the other hand, the problem lays with your bootloader configuration, follow the same steps, but instead of configuring/compiling your kernel, you should reconfigure your bootloader (recompilation isn't necessary).

My proxy requires authentication, what do I have to do?

To have Portage automatically use this scheme, define it in /etc/make.conf:

HTTP_PROXY="http://username:password@yourproxybox.org:portnumber"
FTP_PROXY="ftp://username:password@yourproxybox.org:portnumber"
RSYNC_PROXY="rsync://username:password@yourproxybox.server:portnumber"
How do I burn an ISO file?

You need to burn the file in raw mode. This means that you should not just place the file on the CD, but interpret the file as an entire CD.

There are lots of CD burning tools available; covering them all would be a Sisyphean problem. However, describing a few popular tools never hurts:

  • With EasyCD Creator you select File, Record CD from CD image. Then you change the Files of type to ISO image file. Then locate the ISO file and click Open. When you click on Start recording the ISO image will be burned correctly onto the CD-R.
  • With Nero Burning ROM, cancel the wizard which automatically pops up and select Burn Image from the File menu. Select the image you want to burn and click Open. Now hit the Burn button and watch your brand new CD being burnt.
  • With cdrecord, you simply type cdrecord dev=/dev/hdc (replace /dev/hdc with your CD-RW drive's device path) followed by the path to the ISO file :)
  • With K3B, select Tools > CD > Burn CD Image. Then you can locate your ISO file within the 'Image to Burn' area. Finally click Start.
  • 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.
What CD/stage should I use for my CPU?

First you need to find our what CPU you use. Suppose it's a Pentium-M. Then you need to find out what CPU it is, instruction-wise, compatible with. You may need to consult the CPUs vendor website for this, although Google is at least as efficient :-).

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

If you are building from a Stage 1, please note that many more options exist than those for which Gentoo builds binary stages. Please see the gcc guide for setting -march.

Package Management
In what form are the packages stored?

Packages aren't "stored" per se. Instead, Gentoo provides a set of scripts which can resolve dependencies, fetch source code, and compile a version of the package specifically for your needs. We generally only build binaries for releases and snapshots. The Gentoo Ebuild HOWTO covers the contents of an ebuild script in detail.

For full ISO releases, we create a full suite of binary packages in 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 (Redhat package manager files) using Gentoo's Portage, but it is not currently possible to use already 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 you patch the ebuild to do whatever it is that you want and place it in the Portage overlay (that's why it exists). This is much better for maintainability, and usually easier. See the Ebuild HOWTO for more information.

How do I use emerge from behind a firewall?

See the questions on proxies, rsync, and downloading source files manually.

What if rsync doesn't work for me?

If you're behind a firewall that doesn't permit rsync traffic, then you can use emerge-webrsync which will fetch and install a Portage snapshot for you through regular HTTP. See the proxy section of this document for information on downloading source files and Portage snapshots via a proxy.

I have only slow modem connection at home. Can I download sources somewhere else and add them to my system?

Definitely. You can run emerge --pretend package to see what programs are going to be installed. To find out the sources for those packages and where to download the sources from, you can run emerge -fp package. Download sources and bring them on any media home. Put the sources into /usr/portage/distfiles/ and then simply run emerge package. Be warned, however, that this is a 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 you have deleted the archive and you upgrade the software it will be necessary to download them from the internet again. There are programs which users have developed to clean out all but the most recent version of sourcefiles. Note that while this seems to work, it is not officially maintained. Use at your own risk.

What's 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 emerge is not running. Just to be sure, always pgrep emerge before cleaning out this directory.

Usage
How do I set up an International Keyboard Layout?

Edit the KEYMAP variable in /etc/conf.d/keymaps. Then, either reboot or restart the keymaps script:

# /etc/init.d/keymaps restart
DNS name resolution works for root only

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

# chmod 0644 /etc/resolv.conf
Why can't my user use their own crontab?

You need to add that user to the cron group.

How do I get numlock to start on boot?

If you work in command line, you only need to rc-update add numlock default &&/etc/init.d/numlock start.

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

How do I have my terminal cleared when I log out?

To have your terminal cleared, add clear to your ~/.bash_logout script:

$ echo clear >> ~/.bash_logout

If you want this to happen automatically when you add a new user, do the same for the /etc/skel/.bash_logout:

# echo clear >> /etc/skel/.bash_logout
I'm not able to run X applications as root after su'ing

This issue seems only to occur when you log on graphically. startx users don't have this behaviour. The problem is a bug in Gentoo's PAM, the solution however is quite simple: add the following line to /etc/profile.

export XAUTHORITY="${HOME}/.Xauthority"
Maintenance
ReiserFS and filesystem corruption issues -- how to fix them, etc

If your 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 you may have lost some files or directories due to the corruption.

Development
Where can I report bugs?

Use our Bugzilla. If you are unsure if your problem is an actual bug, you can visit #gentoo on the FreeNode IRC network.

How often are new releases made?

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

My speaker beeps like crazy. How do I disable console beeps?

Console beeps can be turned off using setterm, like this:

# setterm -blength 0

If you would like to turn off the console beeps on boot, you need to put this command in /etc/conf.d/local.start. 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:

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

You need to replace /dev/vc/1 with the terminal you would like to disable console beeps for.

Resources
Where can I find more information about Gentoo Linux?

The official Gentoo documentation can be found at http://docs.gentoo.org.

Can I buy a CD of Gentoo Linux?

Install CDs for all supported architectures are available on our Gentoo Store. When you purchase a CD from our store, you are also supporting our development. So, please consider buying from our store if possible.

You can also find fresh CDs from various resellers listed on our Get Gentoo! page.

This FAQ hasn't 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, just enter "lists.gentoo.org foo" to search for "foo". If all else fails, or you just want to hang out with Gentoo folks, visit us on irc: #gentoo on irc.freenode.net.