Gentoo – Installation

Gentoo Linux is my OS of choice. It is highly customizable, has no extra bloat, and can be tailored and fine tuned to the system it is running on. If you really want to learn how to use Linux as well as what makes it tick then install Gentoo from scratch! You will be amazed at how much you will learn, not only about Gentoo and Linux, but also about the hardware inside your PC.

The best way to install Gentoo is to follow the handbook for your particular arch found here. Then download the Gentoo Minimal/Install CD found here.

Follow the handbook and it will get you up and running with the latest updated version of Gentoo. I use the handbook for every installation I do, it is an excellent resource. Once you are done you should have a basic Gentoo installation with a user created. When you get to page 12 “Where to go from here?” check out the links it offers then come back and check out the rest of this guide for tips on how to finalize your base installation.

Ok, so you followed the handbook and completed your installation. Now what? Well one of the last things the guide had you do was create a user. Here is some info about the groups that you added your user to and some others that are available. Note that some of these groups may not be available until you install a certain package.

  • disk – Direct access to disks
  • wheel – su (change to super user / root)
  • floppy – Direct access to floppies
  • audio – Access to audio devices
  • cdrom – Direct access to CD-ROM’s (includes CD-RW and DVD-ROM/RAM/RW)
  • video – Access to video capture hardware, hardware acceleration
  • games – Access to all games
  • usb – Use of USB devices
  • users – Standard group of users
  • apache – Allows write access to Apache files
  • mysql – Allows read/write access to MySQL files
  • plugdev – Allows user to mount and use pluggable devices such as cameras and USB sticks

In order to add a user to any of these groups do the following:

  • Log in as root and type:
  • Then log the user out then back in again to have the change take effect.

Ok now that thats done lets update the portage database:

  • Log in as root and type:
  • You will probably be told that you need to update portage so type:

Now its time to get your base install up to date. So type:

This will spew up a long list of packages, review them and make sure that the use flags are correct. If you installed by the manual you will know what I mean. If not go back and read the manual! Then select yes to run the updates. This will probably take a few hours as it is going to download all of the files and compile them. I usually like to run this one right before I go to bed at night and it is usually done by morning.

When the updates are complete you will need to update the config files that need changes. So type:

This will probably spew up a list of files that need changing and you need to go through each one individually. This is one of those the more you do it the easier it gets kind of things. A general rule to follow however is:

Always overwrite files in /etc/init.d/ with the new versions. Sometimes overwrite files in /etc/udev/ or /etc/pam.d/ , and Never overwrite files you changed yourself.

Usually when dealing with these I tend to overwrite anything I did not change myself, then I really have to look at the files I did make changes to, to make sure that the updates they are making are necessary or not. Sometimes they are just comments. If they are necessary then run the interactive merge option in etc-update. Otherwise just use overwrite or replace.

Now we need to remove any of the old packages and dependences that are no longer needed by the system. Type:

Make sure you review the packages before you type yes to make sure its not trying to remove a package that you need.

Next thing to do is to install the gentoolkit package. This package includes revdep-rebuild which is a necessary tool to help fix broken dependencies and packages. Type:

Once the install is done type:

This will take a few mins and if all is good it will just end, if not then it will recompile any necessary packages which could take some time.

Once all this is completed reboot your PC by typing reboot at the command prompt. Make note of those commands since they are the commands you will use every time you want to update your Gentoo install.

To review:

You can also use the following three comands before you use revdep-rebuild to further check and clean your system:

  • – Cleans out obsolete distfiles to free up space
  • – Checks installed packages to see if they have any identified security risks and installs the appropriate updates.