Gentoo Installation Checklist

After installing Gentoo Linux on a large enough number of computers, I decided to put together this brief checklist of the installation procedure, so that I won't have to walk through the entire Gentoo Installation Manual, but still won't risk forgetting one of the steps. I'm putting it up publicly for anyone else who may find it useful.

This installation procedure will get you a Stage 1 Gentoo x86 installation, and require Internet connectivity during the entire procedure. All URLs given point to the servers at the University of Dalarna in Sweden (where applicable), since they are fast (around 700 kB/s) for me. If you need a more local mirror, see Gentoo's mirror list.

Lengthy steps are highlighted, so that you know where to schedule video game breaks. ;-)

Please mail me any corrections.

Notice

I have actually not been using Gentoo for quite a while by the time of writing this notice (2008-06-05), so I do not know if it even works anymore. Still, I'm leaving it up in just case it works and someone is helped by it. If you instead want to follow my path, see my Debian Installation Checklist instead.

Pre-installation steps

  1. If you don't have a Linux system installed on the target system already, get a LiveCD of your choice. Gentoo's official LiveCD is available here. I will assume that you know how to set up the live system.
  2. Partition the hard drive(s), set up filesystems on them and mount them.
  3. Set the system time and date, if necessary.
  4. Get the Stage 1 tarball and unpack it onto your root filesystem. Quick command:
    wget -O - ftp://ftp.du.se/pub/os/gentoo/releases/x86/2005.1/stages/x86/stage1-x86-2005.1.tar.bz2 | bzcat | tar x -C /mnt/gentoo
  5. Get the latest portage snapshot and unpack it to /usr in the Gentoo filesytem. Quick command:
    wget -O - ftp://ftp.du.se/pub/os/gentoo/snapshots/portage-yyyymmdd.tar.bz2 | bzcat | tar x -C /mnt/gentoo/usr
  6. Copy your host system's resolve.conf. Quick commmand:
    cp /etc/resolv.conf /mnt/gentoo/etc
  7. Mount /proc in Gentoo's prefix.
  8. Chroot into the Gentoo environment. Quick command:
    chroot /mnt/gentoo /bin/bash
    env-update
    . /etc/profile
    
  9. Customize /etc/make.conf and set the variables CHOST, CFLAGS (and CXXFLAGS) and MAKEOPTS. These are my defaults (but be wary of CHOST and the -march flag):
    CHOST="i686-pc-linux-gnu"
    CFLAGS="-O3 -march=i686 -pipe"
    MAKEOPTS="-j2"
    

Installation bulk procedure

  1. Check the default profile and see that it is desired.
  2. Configure the USE flags. See /usr/portage/profiles/use.desc and have fun. You may use my askuse script.
  3. Bootstrap the stage 1 system. Quick command:
    cd /usr/portage/scripts
    ./bootstrap.sh
    
  4. Emerge the system profile. Quick command:
    emerge -Nva system
    
  5. Set the timezone, /etc/localtime. Timezones are in /usr/share/zoneinfo.
  6. Emerge your favorite kernel sources, configure them, compile them and install the result.
  7. Emerge coldplug and add it to the boot runlevel.
  8. Emerge hotplug and add it to the default runlevel.
  9. Add your favorite modules to /etc/modules.autoload.d/kernel-2.6. A couple of tips:
    pcspkr
    ide-cd
    snd-mixer-oss
    snd-pcm-oss
    
  10. Set up /etc/fstab. Easily forgotten filesystems include /var/lib/nfs/rpc_pipefs, /proc/fs/nfsd and /dev/shm. /sys and /proc/bus/usb need not be entered manually.
  11. Set hostname and domain names.
  12. Configure networking parameters in /etc/conf.d/net. When in doubt, look at /etc/conf.d/net.example.
  13. Symlink desired /etc/init.d/net.* scripts and add them to the default runlevel.
  14. Set the root password.
  15. Set up /etc/rc.conf, /etc/conf.d/rc, /etc/conf.d/keymaps and /etc/conf.d/clock.
  16. Install syslogger, cron daemon, at daemon, filesystem tools and a DHCP client daemon.
  17. Emerge and configure GRUB. When writing a new GRUB config file, remember at least the timeout and default options. If you enjoy it, configure splashimage as well. Sample config:
    timeout 10
    default 0
    splashimage (hd0,0)/grub/splash.xpm.gz
    
    title Gentoo Linux (Linux 2.6.11.9)
            root (hd0,0)
            kernel /vmlinuz-2.6.11.9 ro root=/dev/sda5
    
  18. You can now boot to your Gentoo system, if you wish.

Post-installation goodies

Useful extra packages

Useful config files

Valid XHTML 1.1! Valid CSS! This site attempts not to be broken.
Author: Fredrik Tolf <fredrik@dolda2000.com>
Last changed: Thu Jun 5 05:06:17 2008