1 2008-01-01
Finalizing the Installation The total elapsed time between the display of the boot prompt on the minimal CD and the display of the login prompt after the reboot was 00:42:31 on our test box. Yes, less than one hour! Note that this time also includes the stage3, Portage snapshot and several packages download time and the time spent configuring the kernel.

Log in as root, then add one or more users for daily use with useradd.

(Clean up your known_hosts file because your new box
has generated a new definitive hostkey)
$ nano -w ~/.ssh/known_hosts
(Look for the IP of your new PC and delete the line,
then save the file and exit nano)

(Use the IP address of your new box)
$ ssh root@
The authenticity of host ' (' can't be established.
RSA key fingerprint is 96:e7:2d:12:ac:9c:b0:94:90:9f:40:89:b0:45:26:8f.
Password: type_the_password
mybox ~ # adduser -g users -G lp,wheel,audio,cdrom,portage,cron -m john
mybox ~ # passwd john
New UNIX password: Set John's password
Retype new UNIX password: Type John's password again
passwd: password updated successfully
Last configuration touches

Start by selecting nearby mirrors either by defining the SYNC and GENTOO_MIRRORS variables in /etc/make.conf or by using mirrorselect. You can also define the number of concurrent compilation processes at this point.

mybox ~ # emerge mirrorselect
mybox ~ # mirrorselect -i -o >> /etc/make.conf
mybox ~ # mirrorselect -i -r -o >> /etc/make.conf
(Usually, (the number of processors + 1) is a good value)
mybox ~ # echo 'MAKEOPTS="-j2"' >> /etc/make.conf

Now is a good time to enable or disable some USE flags. Run emerge -vpe world to list all currently installed packages and their enabled and disabled USE flags. Either edit /etc/make.conf or use the following command to define the USE variable:

mybox ~ # emerge -vpe world
(Portage displays the packages and their USE flags, as an example, let's
disable ipv6 and fortran, and enable unicode)
mybox ~ # echo 'USE="nptl nptlonly -ipv6 -fortran unicode"' >> /etc/make.conf

Recent versions of glibc use /etc/locale.gen to define locale settings.

mybox ~ # cd /etc
mybox etc # nano -w locale.gen

Last but not least, you may want to alter the CFLAGS variable in your /etc/make.conf to optimise the code to your specific needs. Please note that using a long list of flags is rarely needed and can even lead to a broken system. It is recommended to specify the processor type in the march option and stick to -O2 -pipe.

You may also want to switch to ~x86. You should only do this if you can deal with the odd broken ebuild or package. If you'd rather keep your system stable, don't add the ACCEPT_KEYWORDS variable. Adding FEATURES="parallel-fetch ccache" is also a good idea.

mybox etc # nano -w make.conf
(Set -march to your CPU type in CFLAGS)
CFLAGS="-O2 -march=athlon-xp -pipe"
(Add the following line)
FEATURES="parallel-fetch ccache"
(Only add the following if you know what you're doing)

You might want to recompile your whole system twice to make full use of your latest configuration changes. It would take quite a long time to complete and yield minimal speed benefits. You can let your system optimise itself gradually over time when new versions of packages are released. However, recompiling is a still good idea from the standpoint of maintaining system consistency. Please see the Gentoo GCC Upgrading Guide for a discussion on the benefits of ensuring a consistently built system and world.

Recompiling only the packages that have already been updated since the release or that are affected by your new USE flags will take enough time. You might also have to remove packages that block your upgrade. Look for "[blocks B ]" in the output of emerge -vpuD --newuse world and use emerge -C to remove them.

(Install ccache)
mybox etc # emerge ccache

(Please note that the switch to ~x86 causes many packages to be upgraded)
mybox etc # emerge -vpuD --newuse world
(Take a good look at the package list and their USE flags,
remove blocking packages if any, and start the lengthy process)
mybox etc # time emerge -vuD --newuse world
(79 packages have been (re)compiled)

real  180m13.276s
user  121m22.905s
sys   36m31.472s

(Remerge libtool to avoid further potential problems)
mybox etc # emerge libtool

(Update config files, make sure you do not let etc-update
update config files you have edited)
mybox etc # etc-update

(If perl has been updated, you should run the perl-cleaner script)
mybox etc # time perl-cleaner all
real  1m6.495s
user  0m42.699s
sys   0m10.641s

(In case of a major upgrade of python, you should run the python-updater script)
mybox etc # python-updater
What to do next

Depending on what your new Gentoo machine is supposed to do, you will probably want to install server applications or a desktop system. Just as an example, emerge gnome and emerge kde have been timed on the ~x86 system installed as describe above. Both have been installed from the same starting point.

You should check our documentation index to find out how to install and configure the applications of your choice.

The following is only an example. It is in no way meant as a recommended setup.
mybox etc # emerge -vp gnome
(Look at the list of packages and their USE flags,
then edit make.conf if required.
mybox etc # nano -w /etc/make.conf
(The following USE flags have been defined)
USE="nptl nptlonly -ipv6 -fortran unicode svg hal dbus \
     -kde -qt3 -qt4 -arts -eds -esd gnome gstreamer gtk firefox"

mybox etc # time emerge gnome
(326 packages have been emerged)

real  520m44.532s
user  339m21.144s
sys   146m22.337s
mybox etc # emerge -vp kde-meta
(Look at the list of packages and their USE flags,
then edit make.conf if required.
mybox etc # nano -w /etc/make.conf
The following USE flags have been defined)
     kde qt3 qt4 -arts -eds -esd -gnome -gstreamer -gtk -firefox"

mybox etc # time emerge kde-meta
(391 packages have been emerged)

real  1171m25.318s
user  851m26.393s
sys   281m45.629s