The Gentoo Installation Approaches
Introduction
Gentoo Linux can be installed using one of three stage tarball files.
A stage file is a tarball (compressed archive) that contains a minimal
environment.
-
A stage1 file contains nothing more than a compiler, Portage (Gentoo's
software management system) and a couple of packages on which the compiler
or Portage depends.
-
A stage2 file contains a so-called bootstrapped system, a minimal
environment from which one can start building all other necessary
applications that make a Gentoo environment complete.
-
A stage3 file contains a prebuilt minimal system which is almost fully
deployable. It only lacks a few applications where you, the Gentoo user,
needs to choose which one you want to install.
To help you decide what stage file you want to use, we have written down the
major advantages and disadvantages of each stage file.
A Stage1 Approach
A stage1 is used when you want to bootstrap and build the entire system
from scratch.
Starting from a stage1 allows you to have total control over the
optimization settings and optional build-time functionality that is
initially enabled on your system. This makes stage1 installs good for
power users who know what they are doing. It is also a great
installation method for those who would like to know more about the
inner workings of Gentoo Linux.
| Stage1 |
Pros and Cons |
| + |
Allows you to have total control over the optimization settings and optional
build-time functionality that is initially enabled on your system
| + |
Suitable for powerusers that know what they are doing
| + |
Allows you to learn more about the inner workings of Gentoo
| - |
Takes a long time to finish the installation
| - |
If you don't intend to tweak the settings, it is a waste of time
A Stage2 Approach
A stage2 is used for building the entire system from a bootstrapped
"semi-compiled" state.
Stage2 installs allow you to skip the bootstrap process; doing this
is fine if you are happy with the optimization settings that we chose
for your particular stage2 tarball.
| Stage2 |
Pros and Cons |
| + |
You don't need to bootstrap
| + |
Faster than starting with stage1
| + |
You can still tweak your settings
| - |
You cannot tweak as much as with a stage1
| - |
It's still not the fastest way to install Gentoo
| - |
You have to accept the optimizations we chose for the bootstrap
A Stage3 Approach
A stage3 installation contains a basic Gentoo Linux system that has been
built for you. You will only need to build a few packages of which we can't
decide for you which one to choose.
Choosing to go with a stage3 allows for the fastest install of Gentoo
Linux, but also means that your base system will have the optimization
settings that we chose for you (which to be honest, are good settings
and were carefully chosen to enhance performance while maintaining
stability). Stage3 is also required if you want to install Gentoo using
prebuilt packages or without a network connection.
| Stage3 |
Pros and Cons |
| + |
Fastest way to get a Gentoo base system
| - |
You cannot tweak the base system - it's built already
You might be interested to know that, if you decide to use different
optimization settings after having installed Gentoo, you will be able to
recompile your entire system with the new optimization settings.
The Gentoo LiveCDs
Introduction
The Gentoo LiveCDs are bootable CDs which contain a
self-sustained Gentoo environment. They allow you to boot Linux from the CD.
During the boot process your hardware is detected and the appropriate drivers
are loaded. They are maintained by Gentoo developers.
All LiveCDs allow you to boot, set up networking, initialize your
partitions and start installing Gentoo from the Internet. We currently provide
two LiveCDs which are equaly suitable to install Gentoo from, as long as you're
planning on performing an Internet-based installation using the latest version
of the available packages.
If you wish to install Gentoo without a working Internet connection, please use
the installation instructions described in the Gentoo 2004.3 Handbooks.
The two LiveCDs that we currently provide are:
-
The Gentoo Minimal LiveCD, a small, no-nonsense, bootable CD which
sole purpose is to boot the system, prepare the networking and continue with
the Gentoo installation.
-
The Gentoo Universal LiveCD, a bootable CD with the same abilities as
the Minimal LiveCD. Additionally, it contains a stage1 and several stage3
tarballs (optimized for the individual subarchitectures).
To help you decide which LiveCD you need, we have written down the major
advantages and disadvantages of each LiveCD.
Gentoo's Minimal LiveCD
The Minimal LiveCD is called install-ppc-minimal-2004.3.iso and
takes up only 52 MB of diskspace. You can use this LiveCD to install Gentoo,
but always with a working Internet connection only.
| Minimal LiveCD |
Pros and Cons |
| + |
Smallest download
| + |
You can do a stage1, stage2 or stage3 by getting the stage tarball off the
net
| - |
Contains no stages, no Portage snapshot, no prebuilt packages and is
therefore not suitable for networkless installation
Gentoo's Universal LiveCD
The Universal LiveCD is called install-ppc-universal-2004.3.iso and
consumes the entire surface of a 650 MB CD. You can use this LiveCD to install
Gentoo, and you can even use it to install Gentoo without a working internet
connection, just in case you want to bring Gentoo to another PC than the one you
are currently installing Gentoo on :)
| Universal LiveCD |
Pros and Cons |
| + |
Contains everything you need. You can even install without a network
connection.
| - |
Huge download
Other CDs
You might find a so-called Package CD on one of our mirrors. This CD is
no LiveCD but an additional resource that can be exploited during a networkless
installation. It contains prebuilt packages (the so-called GRP set) that allows
you to easily and quickly install additional applications (such as
OpenOffice.org, KDE, GNOME, ...) immediately after the networkless Gentoo
installation.
Download, Burn and Boot a Gentoo LiveCD
Downloading and Burning the LiveCDs
You have chosen to use a Gentoo LiveCD. We'll first start by downloading and
burning the chosen LiveCD. We previously discussed the several available
LiveCDs, but where can you find them?
You can download any of the LiveCDs (and, if you want to, a Packages CD as
well) from one of our mirrors. The
LiveCDs are located in the releases/ppc/2004.3/livecd directory.
Inside that directory you'll find so-called ISO-files. Those are full CD images
which you can write on a CD-R.
In case you wonder if your downloaded file is corrupted or not, you can
check its MD5 checksum and compare it with the MD5 checksum we provide (such as
install-ppc-minimal-2004.3.iso.md5). You can check the MD5 checksum
with the md5sum tool under Linux/Unix or md5sum for Windows.
Another way to check the validity of the downloaded file is to use GnuPG to
verify the cryptographic signature that we provide (the file ending with
.asc). Download the signature file and obtain the public key:
$ gpg --keyserver pgp.mit.edu --recv-keys 17072058
Now verify the signature:
$ gpg --verify <signature file> <downloaded iso>
To burn the downloaded ISO(s), you have to select raw-burning. How you
do this is highly program-dependent. We will discuss cdrecord and
K3B here; more information can be found in our Gentoo FAQ.
-
With cdrecord, you simply type cdrecord dev=/dev/hdc <downloaded iso
file> (replace /dev/hdc with your CD-RW drive's
device path).
-
With K3B, select Tools > CD > Burn Image. Then
you can locate your ISO file within the 'Image to Burn' area. Finally click
Start.
Default: Booting the LiveCD on a Apple/IBM
On NewWorld machines place the LiveCD in the CD-ROM and reboot the system. When
the system-start-bell sounds, simply hold down the 'C' until the CD loads.
If you have an OldWorld Mac the bootable portion of the livecd can't be used.
Instead you need to download BootX and have a working
MacOS installed on your system. You need to copy the BootX Extension from
the unpacked archive-file into the Extensions Folder and make a new
directory called Linux Kernels in the System Folder. In the next step you
need to copy the files G3G4kernel and initrd.img.gz from the
LiveCD boot folder into the Linux Kernels directory. Then
reboot the system and wait for BootX to load. After BootX loaded you still have
to set up a few items. In the options dialog you need to check Use Specified
RAM Disk and select the initrd.img.gz which you put in the Linux
Kernels directory. The ramdisk size should be set to at least 32000.
Furthermore the kernel argument needs to be set to rw init=/linuxrc
cdroot. Eventually you are able to boot the LiveCD when you select Linux on
Startup.
After the LiveCD loaded, you will be greeted by a friendly welcome message and a
boot: prompt at the bottom of the screen.
At this prompt you are able to select a kernel for the subarchitecture you use.
We provide G3, G4 and G5. All kernels are built with
support for multiple CPUs, but they will boot on single processor machines as
well.
You are also able to tweak some kernel options at this prompt. The following
table lists the available boot options you can add:
| Boot Option |
Description |
video
This option takes one of the following vendor-specific tags:
radeonfb, rivafb, atyfb, aty128 or
ofonly. You can follow this tag with the resolution and refreshrate
you want to use. For instance video=radeonfb:1280x1024@75. If you are
uncertain what to choose, ofonly will most certainly work.
nol3
Disables level 3 cache on some PowerBooks (needed for at least the 17")
debug
Enables verbose booting, spawns an initrd shell that can be used to debug
the LiveCD
sleep=X
Wait X seconds before continuing; this can be needed by some very old SCSI
CD-ROMs which don't speed up the CD quick enough
bootfrom=X
Boot from a different device
At this prompt, hit enter, and a complete Gentoo Linux environment will be
loaded from the CD. Continue with And When You're
Booted....
Alternative: Booting the LiveCD on a Pegasos
On the Pegasos simply insert the CD and at the SmartFirmware boot-prompt type
boot cd /boot/pegasos. If you need any special boot options you can append them to the
command-line. For instance boot cd /boot/pegasos video=radeonfb:1280x1024@75 mem=256M.
And When You're Booted...
You will be greeted by a root ("#") prompt on the current console. You can also
switch to other consoles by pressing Alt-fn-F2, Alt-fn-F3 and Alt-fn-F4. Get
back to the one you started on by pressing Alt-fn-F1.
If you are installing Gentoo on a system with a non-US keyboard, use
loadkeys to load the keymap for your keyboard. To list the available
keymaps, execute ls /usr/share/keymaps/i386. Do not use the keymaps in
ppc or mac as they are for ADB-based OldWorld
machines.
(PPC uses x86 keymaps on most systems. The mac/ppc keymaps provided
on the LiveCD are ADB keymaps and unusable with the LiveCD kernel)
# ls /usr/share/keymaps/i386
Now load the keymap of your choice:
# loadkeys be-latin1
Now continue with Extra Hardware Configuration.
Extra Hardware Configuration
When the LiveCD boots, it tries to detect all your hardware devices and
loads the appropriate kernel modules to support your hardware. In the
vast majority of cases, it does a very good job. However, in some cases, it may
not auto-load the kernel modules you need. If the PCI auto-detection missed some
of your system's hardware, you will have to load the appropriate kernel modules
manually.
In the next example we try to load the airport module (support for
certain kinds of network interfaces):
# modprobe airport
Optional: Tweaking Hard Disk Performance
If you are an advanced user, you might want to tweak the IDE hard disk
performance using hdparm. With the -tT options you can
test the performance of your disk (execute it several times to get a
more precise impression):
# hdparm -tT /dev/hda
To tweak, you can use any of the following examples (or experiment
yourself) which use /dev/hda as disk (substitute with your
disk):
Activate DMA: # hdparm -d 1 /dev/hda
Activate DMA + Safe Performance-enhancing Options: # hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hda
Optional: User Accounts
If you plan on giving other people access to your installation
environment or you want to chat using irssi without root privileges (for
security reasons), you need to create the necessary user accounts and change
the root password.
To change the root password, use the passwd utility:
# passwd
New password: (Enter your new password)
Re-enter password: (Re-enter your password)
To create a user account, we first enter their credentials, followed by
its password. We use useradd and passwd for these tasks.
In the next example, we create a user called "john".
# useradd -m -G users john
# passwd john
New password: (Enter john's password)
Re-enter password: (Re-enter john's password)
You can change your user id from root to the newly created user by using
su:
# su - john
Optional: Viewing Documentation while Installing
If you want to view the Gentoo Handbook (either from-CD or online) during the
installation, make sure you have created a user account (see Optional: User Accounts). Then press Alt-F2 to
go to a new terminal and log in.
If you want to view the documentation on the CD you can immediately run
links2 to read it:
# links2 /mnt/cdrom/docs/html/index.html
However, it is preferred that you use the online Gentoo Handbook as it will be
more recent than the one provided on the CD. You can view it using links2
as well, but only after having completed the Configuring your Network
chapter (otherwise you won't be able to go on the Internet to view the
document):
# links2 http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml
You can go back to your original terminal by pressing Alt-F1.
Optional: Starting the SSH Daemon
If you want to allow other users to access your computer during the
Gentoo installation (perhaps because those users are going to help you
install Gentoo, or even do it for you), you need to create a user
account for them and perhaps even provide them with your root password
(only do that if you fully trust that user).
To fire up the SSH daemon, execute the following command:
# /etc/init.d/sshd start
To be able to use sshd, you first need to set up your networking. Continue with
the chapter on Configuring your Network.