HOWTO: Install Gentoo & Win the 100m Dash

Gentoo is simply the best distro out there so in an attempt to simplify the installation I’m going to summarise the entire thing so that you can install Gentoo the right way the first time and avoid trouble later on. The official Gentoo documentation is obviously the best place to go to get the latest info on the install process but if you’re like me and spend alot of time installing Gentoo on multiple machines and end up reading the documentation over and over again you know how tedious it can get with the amount of explaining they do on every little detail so my install summary should help those out that don’t want to wade through all the sludge just to get a squeaky clean installation. In other words I’m cutting through all the clutter, and I mean ALL of it.

This is the most basic install procedure as it relates to stock standard x86 hardware. It’s just pure coincidence that this worked out to be exactly 50 steps :)


Enter these commands exactly as shown:

  • 1. Download and burn the ‘universal livecd’. Boot up from it and get to the boot prompt.
  • 2. gentoo-nofb
  • 3. fdisk /dev/hda
  • 4. d, 1, d, 1, n, p, 1, enter, +32M, n, p, 2, enter, +512M, n, p, 3, enter, enter, w, quit (Delete as many partitions as you have)
  • 5. mke2fs /dev/hda1
  • 6. mke2fs -j /dev/hda3
  • 7. mkswap /dev/hda2
  • 8. swapon /dev/hda2
  • 9. mount /dev/hda3 /mnt/gentoo.
  • 10. mkdir /mnt/gentoo/boot.
  • 11. mount /dev/hda1 /mnt/gentoo/boot
  • 12. date 013015002005 for January 30th 3pm 2005
  • 13. cd /mnt/gentoo
  • 14. tar -xvjpf /mnt/cdrom/stages/stage3-<subarch>-2005.1.tar.bz2
  • 15. tar -xvjf /mnt/cdrom/snapshot/portage-2005.1.tar.bz2 -C /mnt/gentoo/usr
  • 16. mkdir /mnt/gentoo/usr/portage/distfiles (skip this step if distfiles is already there)
  • 17. cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles/
  • 18. nano -w /mnt/gentoo/etc/make.conf (add MAKEOPTS=”-j2″ at the bottom)
  • 19. mount -t proc none /mnt/gentoo/proc
  • 20. cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
  • 21. chroot /mnt/gentoo /bin/bash
  • 22. env-update
  • 23. source /etc/profile
  • 24. nano -w /etc/make.conf (add USE=”-gtk -gnome qt kde dvd alsa cdr -kde -X” at the bottom)
  • 25. ls /usr/share/zoneinfo
  • 26. ln -sf /usr/share/zoneinfo/GMT /etc/localtime (Replace GMT with your timezone from step 25)
  • 27. emerge gentoo-sources
  • 28. cd /usr/src/linux
  • 29. make menuconfig (make necessary changes here according to your needs, don’t forget to include NIC drivers)
  • 30. make && make modules_install
  • 31. cp arch/i386/boot/bzImage /boot/linux-2.6.11-gentoo-r3
  • 32. cp .config /boot/config-2.6.11-gentoo-r3
  • 33. nano -w /etc/fstab (change BOOT, SWAP AND ROOT to their hda equivalents)
  • 34. nano -w /etc/conf.d/hostname (make necessary changes)
  • 35. nano -w /etc/conf.d/domainname (make necessary changes)
  • 36. rc-update add domainname default
  • 37. nano -w /etc/conf.d/net (add config_eth0=( “dhcp” ) at the bottom)
  • 38. rc-update add net.eth0 default
  • 39. passwd (change root password)
  • 40. emerge syslog-ng
  • 41. rc-update add syslog-ng default
  • 42. emerge vixie-cron
  • 43. rc-update add vixie-cron default
  • 44. emerge slocate
  • 45. emerge dhcpcd
  • 46. emerge grub
  • 47. nano -w /boot/grub/grub.conf (add the following:)

default 0
timeout 10
title=Gentoo Linux 2.6.x
root (hd0,0)
kernel /linux-2.6.11-gentoo-r11 root=/dev/hda3

  • 48. cp /proc/mounts /etc/mtab
  • 49. grub-install /dev/hda
  • 50. exit, umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo, reboot

Voila you’re done. Now go and emerge whatever software you need. Check out the Gentoo-Wiki for some great tips & tricks.

If you find any typos or anything wrong with this most basic of how-to’s please drop me a line at copelandj@’N.O.S.P.A.M’gmail.com. Leave out the N.O.S.P.A.M part.

This summarised guide can be expanded upon here with the official Gentoo Install Handbook.
This article is free to be used by anyone, anytime, anywhere and is NOT governed by any license agreement, just be a gentleman and give me credit m’kaay.

Update 4 August 2008: Re-positioning my old articles on the new blog site.  Yep you guessed it, another old and mostly irrelevant article.

Leave a Reply