The online Gentoo install only "officially" supports a Stage Three install, then recommends you "recompile" after setting your environment. I've tried that method and find it like taking a bath in sand. Where it "may" save you a minimal amount of time over a Stage One I find it creates needless headaches. Basically I compare it to buying a house for the purpose of gutting it down to the frame and foundation then only to rebuild it. Why? Just like the current effort on a "GUI" installer going on, waste of time IMO. Anyway that's a rant for another occasion, now back to the subject at hand.
Now the advantage of Boot Strapping and doing a Stage One is the entire system is built from the ground up to your specific needs/wants and environment. It's not difficult and the benefits are worth it in my opinion, so let us begin.
Preparation
1. In the Linode Dashboard Create the Disk/Disks you're going to install Gentoo to
2. Create a "Configuration Profile" with the Finnix kernel booting to the Finnix recovery iso
3. Assign the newly created Disk/Disks to /dev/xvdb and so on
4. Save
Install
1. Boot to the Finnix profile you created
2. Mount the disk, example -
Code:
cd /mnt
Code:
mkdir gentoo
Code:
mount /dev/xvdb /mnt/gentoo
3. Insure the date is correct
Code:
date
If not correct with the date command
4. Retrieve the Stage one image, example -
Code:
cd /mnt/gentoo
Code:
wget http://gentoo.osuosl.org/releases/x86/2008.0/stages/stage1-x86-2008.0.tar.bz2
For a list of the Gentoo mirrors see
Gentoo Mirrors5. Extract the image
Code:
tar -zxvf stage1-x86-2008.0.tar.bz2
Note- Don't forget to remove the tarball after you extract it

6. Set up your make.conf file
Code:
nano /mnt/gentoo/etc/make.conf
Here is a good make.conf file for Bootstrapping your Linode
Code:
FLAGS="-march=prescott -fomit-frame-pointer -O2 -pipe -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
ACCEPT_KEYWORDS="x86"
PORTAGE_TMPDIR=/var/tmp
PORTDIR=/usr/portage
DISTDIR=${PORTDIR}/distfiles
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPESS_FLAGS="-9"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
AUTOCLEAN="yes"
LINGUAS="en_US en"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
FEATURES="sandbox parallel-fetch"
USE="-acpi -alsa -arts bzip2 bash-completion bcmath -berkdb chroot curl curlwrappers \
dbus hal xml -ipv6 gmp -gnome -gtk -kde minimal mmx nptl nptlonly pam sse sse2 ssse3 \
ssl unicode -X X509 xattr zip zlib"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirrors.cs.wmich.edu/gentoo http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.mirrors.tds.net/gentoo
7. Mount proc
Code:
mount -t proc proc /mnt/gentoo/proc
8. Copy DNS info
Code:
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
9. Chroot
Code:
chroot /mnt/gentoo /bin/bash
10. Rehash the $path and environment
Code:
env-update && source /etc/profile
11. Create your package.use file
Code:
nano /etc/portage/package.use
Put in the values
Code:
net-misc/curl gnutls kerberos libssh2 ldn
net-misc/ntp opentpd
sys-apps/iproute2 -minimal
sys-libs/glibc glibc-omitfp
12. Get the Portage Tree
Code:
emerge --sync
Note - you "may" need to refresh portage, if so just "emerge portage" then continue on
13. Set up your Locale
Code:
nano /etc/locale.gen
14. Set the "Profile", I recommend/use the server profile. The only "Caveat" is this sets the "minimal" use flag system wide which is good. But you need to be aware that for specific packages like MySQL you need to set "-minimal" in /etc/portage/package.use to install/run LAMP. Also the same thing for iproute2 package which iptables depends on
Code:
unlink /etc/make.profile
Code:
ln -s /usr/portage/profiles/default/linux/x86/2008.0/server/ /etc/make.profile
15. Now it's time to Bootstrap and install the system
Code:
env-update && source /etc/profile && emerge --oneshot --nodeps gcc-config
Code:
USE="-* build bootstrap" emerge linux-headers && emerge --nodeps gdbm libperl perl
Code:
/usr/portage/scripts/bootstrap.sh
16. Finish Bootstrapping
Code:
emerge -O libperl && emerge -O python
Code:
emerge shadow && emerge --deep system
Code:
emerge syslog-ng hotplug vixie-cron reiserfsprogs xfsprogs sysfsutils udev
Code:
USE="openntpd" emerge --nodeps ntp
Code:
rc-update add syslog-ng default && rc-update add net.eth0 default && rc-update add vixie-cron default
Code:
rc-update add sshd default && rc-update add hotplug default && rc-update add ntp-client default
17. Set up your "Timezone Link"
Code:
rm /etc/localtime
Code:
ln -s /usr/share/zoneinfo/{path/to/your/timezonefile} /etc/localtime18. Eliminate the clock skew, this is very critical especially with compiling your own OS!!!!
Code:
ntpdate -u -b us.pool.ntp.org
19. Configure your NIC
Code:
nano /etc/conf.d/net
example -
Code:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "100.20.3.1/24" )
routes_eth0=( "default via 100.20.192.5" )
20. Set up your environment in the following places
/etc/rc.conf
/etc/conf.d/clock
/etc/conf.d/ntp-client
/etc/conf.d/rc
21. Edit your /etc/fstab appropriately
Example -
Code:
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/xvdb / ext3 noatime 0 1
/dev/xvdf none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
proc /proc proc defaults 0 0
Now a "Caveat"I found that in Linode's console environment the base system didn't completely compile. It seemed to puke in the Linode console environment on one of the /dev/tty's being used during a chmod. To work around this I had to "emerge util-linux" for it was missing numerous things like "mount". So after you have completed editing your fstab and saving do the following -
Code:
emerge util-linux
A. Assign yourself a "root" password while in the chroot environment, this is a must
Code:
passwd
B. Exit out of your chroot
Code:
exit
C. Unmount the file systems
Code:
umount /mnt/gentoo/proc
Code:
umount /mnt/gentoo
D. Shutdown the system
E. Create the "Gentoo" Profile in the Linode Manager
F. Boot the new "Gentoo" Profile
G. Log into the booted image via the Linode Console
H. Emerge the system then world
Code:
emerge -e system
Code:
env-update && source /etc/profile
Code:
emerge -e world
Now this is going to take a little bit but it insures everything has been installed and compiled correctly.
Then to finish everything off run the following to complete the install.
Code:
emerge --sync
Code:
emerge -avuDN world
Code:
emerge -av gentoolkit
Code:
emerge --depclean
Code:
revdep-rebuild
Now you have a base image for the Linode environment. There are a couple of tools you may choose to install, here are the basic ones that I would recommend you to "emerge"
Code:
emerge -avD tcpdump bind-tools iproute2 eselect slocate
I would also recommend running mirrorselct to select the fastest/best Gentoo mirror's locations
Code:
mirrorselect -s4 -o -D >> /etc/make.conf
Don't forget to remove the old Gentoo mirror's in your make.conconf
This will give you very clean basic foundation to build a server streamlined to your specific needs/wants and desires.
Enjoy -