A complement to the official Gentoo Install Handbook: Difference between revisions

From Elvanör's Technical Wiki
Jump to navigation Jump to search
Line 69: Line 69:
* Install all the packages that you need. [http://gentoo-wiki.com/TIP_Integrate_Thunderbird_and_Firefox Integrate Thunderbird and Firefox.]
* Install all the packages that you need. [http://gentoo-wiki.com/TIP_Integrate_Thunderbird_and_Firefox Integrate Thunderbird and Firefox.]


  emerge -a acroread ark wine mozilla-thunderbird k3b mplayer eclipse-sdk filezilla xchat kopete amarok openoffice-bin kdesvn
emerge -a gentoolkit layman eix
  emerge -a acroread ark wine mozilla-thunderbird k3b mplayer vlc eclipse-sdk filezilla xchat kopete amarok openoffice-bin kdesvn


* [http://www.gentoo.org/doc/en/printing-howto.xml Setup printers, if needed.]
* [http://www.gentoo.org/doc/en/printing-howto.xml Setup printers, if needed.]

Revision as of 11:45, 10 January 2009

This is a step by step guide while installing Gentoo on a new box. Follow the instructions along with the official Installation Handbook from Gentoo.

Correctly choosing your hardware

Search the Internet before buying any hardware. Most hardware devices will work with Linux nowadays, but it is still better to buy hardware that has open-source drivers. You will also need to know which chipsets are on your hardware to correctly configure the kernel.

Choosing from which installation CD you will boot

Choosing an installation CD seems harder that it first seems. For example, an installation CD for an x86 architecture won't work, if you want to install an AMD64 Gentoo.

  • The installation CDs from Gentoo work fine, but they don't include X. You can still surf the web with links -g, and they contain relatively recent kernel, so it is not a bad choice.
  • Apparently, there are now Live CDs from Gentoo, but I have not tried them yet.
  • Knoppix Live CDs are good, but only for x86 (no amd64).
  • Ubuntu Live CDs are probably the best choice. You can order them free of charge, and there is an amd64 live CD. On the latest Ubuntu CDs you can even get wifi networking painlessly! The only problem is that the root account is locked on Ubuntu, so you must use sudo all the time.

Installation following Gentoo's instructions

Useful configuration files from other Gentoo installs

  • The following files can be useful on a USB key, to serve as a skeleton for the new install:
    • /etc/make.conf (to get your USE flags)
    • /var/lib/portage/world (a list of useful packages)
    • /usr/src/linux/.config (a kernel configuration)

Notes on official Gentoo's instructions

  • At this point, boot from the CD, and setup the network (except if you booted with a Gentoo CD containing the handbook directly on it).
  • Launch links -g (or better, Firefox if you booted into a CD offering X) to point a browser to the Gentoo Handbook. Once you have the handbook opened in a browser, follow the instructions.
  • Partition your disk, format the partitions. Mount the root partition.
  • Install the stage 3. With the new system, stage 3 tarballs are produced every week. Warning: get the correct stage 3 tarball! On x86 choose i686, not x86, for recent hardware. Then install a Portage snapshot.
  • Configure /etc/make.conf. Don't forget to set:
    • correct CHOST;
    • correct CFLAGS;
    • your USE flags;
  • chroot into the new partition. emerge --sync. Configure the kernel. It is important to disable the nvidia framebuffer support; enable the VESA one though. For NLS, choose the default NLS as "utf8", not "utf-8".
  • Configure /etc/fstab, the network (don't forget to emerge dhcpcd if needed), /etc/rc.conf. If using DHCP, do not set "nodns" as an option on /etc/conf.d/net (even if it is the case on the handbook), or it will not setup DNS automatically. When choosing your HOSTNAME, be very careful not to include spaces! This will lead to severe failure later and KDE login will not work.
  • Change the root password, add a normal user. Make sure the user has write permissions on its directory. Typically, if he doesn't, login into KDE will fail. The following groups should be added to this user:
wheel cdrom audio video games cdrw plugdev haldaemon messagebus portage
  • Install and configure GRUB. The important thing is to add support for the framebuffer; if we don't, we won't be able to correctly use links when we reboot. Usually we will use a VESA framebuffer, although a new replacement exists called uvesa. This Wikipedia article lists some of the VESA modes; one way to obtain a list of VESA modes supported by this graphic card / BIOS is to put a wrong number. Then GRUB will display a list of available modes for this hardware.
  • Reboot! On the BIOS, setup the clock according to the correct parameters in etc/conf.d/clock (UTC, or local time).

Installing packages and configuring the system

At this point, the goal is to get a working web browser again. So the first emerge should be something like emerge links. Be aware that some packages (from Sun, for example), need to be manually downloaded... and you don't have a browser yet! So you should add USE="-doc -java" to the first emerge. Alternatively, check if the package needs to be downloaded before the emerge (a F will appear next to the package). I recommend to use the emerge option "fetchonly" to see if everything was fetched correctly, before actually building.

Once links is emerged and works, the remaining of the installation is easier, since we have access to the web and Google.

  • Install KDE and some web browsers: emerge kdebase-meta konqueror mozilla-firefox. This should again emerge a lot of packages. Don't forget to install the Flash plugin for Firefox, and the Java plugin as well. Note that installing kdebase-meta is mandatory, even with the kde USE flag the packages pulled in when you emerge konqueror are not enough to get a working KDE desktop.
  • Configure X (Xorg -configure), add xdm to the runlevels: rc-update add xdm default. At this point we may even already switch to the nvidia driver for X. Edit the file /etc/modules.autoload.d/kernel-2.6 to get it automatically loaded.
  • Allow your user to sudo. This is as simple as emerge sudo, and typing visudo as root to edit the configuration file (/etc/sudoers: do not edit this file by hand!).
emerge -a gentoolkit layman eix 
emerge -a acroread ark wine mozilla-thunderbird k3b mplayer vlc eclipse-sdk filezilla xchat kopete amarok openoffice-bin kdesvn
  • If you need to mount NFS shares, add the portmap and nfs scripts to the default runlevel.
  • Optionally, install Beryl. Install Aquamarine along with Beryl, and install gtk-engines-qt in order to get your GTK applications use the KDE themes. UPDATE: install QtCurve rather than GTK-Qt; also you can use Xorg transparency effects rather than Beryl's one, they are stabler. For more information, see this page.