# Stage 1/3 Installation Guide for Gentoo 2005.1 & GCC 3.4.5

## Bob P

... Imitated but Never Duplicated...

Stage 1/3 Installation for Gentoo 2005.1 and GCC 3.4.4 / GCC 3.4.5

This Installation Guide is no longer being maintained on this site.  To view the most current revision of this Guide, >>Click Here<<.

This thread is a Maintenance Update to the now-famous series of Stage 1/3 Installation Guides for Gentoo Linux.  This edition of the Guide supercedes the what is now the penultimate version of the Guide, the Stage 1/3 Installation for Gentoo 2005.0 and GCC 3.4.4.  Please be sure to look at the older versions of the Guide and look at the credits!

The Official Support Thread for the Stage 1/3 Guide for GCC 3.4.4 is located  >> here. <<

Effective 2005-12-31 the text of this Guide remains correct for GCC 3.4.4 testing branch ebuilds, while the PDF version of this Guide has been updated for GCC 3.4.5.  

Faster than a Speeding Bullet... 

More Powerful than a Locomotive!

and STABLE as ROCK!

How To Build a Fast and Bulletproof Gentoo System --  Stage 1 NPTL Installation on a Stage 3 Tarball Using GCC 3.4.4

Copyright (c) 2005 Bob P and The Jackass! Project.  Released under the Creative Commons Attribution-ShareAlike license version 2.0.  If you base a derivative work on this Guide, you MUST give credit to the Author in your document, and your document must contain a hyperlink that points to This URL. If you paraphrase sections of this Guide, no further attribution is required.  OTOH, if you quote sections of this Guide, you must either:  a) identify the quoted sections as quotes, with full citations of authorship and a hyperlink to this web page, or b) provide me with co-authorship status as a secondary author on your work.

Background

The Stage 1/3 Installation Method was developed for Gentoo 2004.3 because at that time any Gentoo installation that was performed with anything other than a Stage 3 tarball suffered from two problems:  Circular dependencies within the base system, and the potential to leave behind unwanted files from the stage tarball because /var/db/pkg is incomplete.

As rac noted, "There are some 80+ packages in a stage1ball that are not listed in /var/db/pkg. Why? When you do your "emerge system", you would want your new toolchain to be used to compile all software. If portage sees that a particular version from the stageball is still current, it will omit it. The solution that somebody apparently chose was to make portage forget that most of this software is installed at all, which has the unfortunate side effect of making portage be unable to clean it when your "emerge system" finishes."

It seemed that there were some good reasons to never install from a Stage 1 tarball, and some good reasons to always install from a Stage 3 tarball.  The good news is that you can perform a Stage 1 installation using a Stage 3 tarball and have the best of both worlds.

With the advent of Gentoo 2005.0 the situation has improved markedly for users who wish to perform Stage 1 installs.  The /var/db/pkg problem has been resolved, but unfortunately some of the circular dependency problems remain.

Another reason to continue to perform Stage 1/3 installs relates to the system toolkit.  Unfortunately the GCC 3.4.4 toolkit components remain testing branch ebuilds.  As such, Gentoo 2005.0 continues to ship with a stable branch GCC 3.3.5 compiler.  Until such time that the GCC 3.4.4 compiler is reclassified into the stable software branch, the Stage 1/3 installation method will continue to be helpful to those users who wish to upgrade to a GCC 3.4.4-based toolkit.

Objective

This Installation Guide will describe how to perform a "Stage 1 on 3" installation of Gentoo on a 686-class x86 platform using 2005.1 installation media, a single CD-ROM drive and a single EIDE hard disk.  It will take advantage of the latest 2.6 kernels, NPTL threading, udev, and the latest GCC 3.4.4 compiler.  It will also completely sidestep the permissions problems that are inherent in some of the Gentoo 2005.1 installation media.

Note:  Support for the 586-CHOST has been terminated in this version of the Guide.  If you'd like to install for a 586-box, check out one of the preceeding verisons of the Guide.

Request for Support

If you use the Stage 1/3 Installation Guide and find it helpful in building your Gentoo system, please support my documentation development efforts.  You can do so by visiting the Stage 1/3 Installation Home Page and clicking on the Ads by Google on the site: http://bobp.webhop.org.  While you are there you can download a PDF version of this Guide.  :Cool: 

To perform a 2005.1 Stage 1/3 Installation with GCC 3.4.4, follow these steps:

1.  Download and Burn the Minimal Installation CD.   The .ISO image required for the hardware used in this example is 

```
http://gentoo.osuosl.org/releases/x86/2005.1/installcd/install-x86-minimal-2005.1.iso
```

2.  Boot using the Minimal Installation CD.  At the "boot:" prompt, press <Enter> to select the default gentoo kernel.

3.  Configure LAN Card.  We're assuming that your LAN card has been recognized and that you can obtain a LAN connection via DHCP.  

```
# dhcpcd eth0
```

4.  Configure Your Hard Disk

4.1  View the Hard Drive's Operational Parameters.  In this example we will assume that only one hard disk will be installed on the system.  It will be recognized by Gentoo as /dev/hda.  We will start off by viewing the default disk parameters at boot:

```
 # hdparm /dev/hda 

/dev/hda: 

multcount    = 16 (on) 

IO_support   = 0 (default 16-bit) 

unmaskirq    = 0 (off) 

using_dma    = 1 (on) 

keepsettings = 0 (off) 

readonly     = 0 (off) 

readahead    = 256 (on) 

geometry     = 16383/255/63, sectors = 120034123776, start = 0

 # hdparm -i /dev/hda 

/dev/hda: 

Model=WDC WD1200JB-00GVA0, FwRev=08.02D08, SerialNo=WD-WMAL92634373

Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq}

RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74

BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16

CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=234441648

IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}

PIO modes:  pio0 pio1 pio2 pio3 pio4

DMA modes:  mdma0 mdma1 mdma2

UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5

AdvancedPM=no, WriteCache=enabled

Drive conforms to: device does not report version:

* signifies the current active mode 
```

4.2  Tweak the Hard Disk Parameters with Hdparm.   In this example we're using a WD1200JB.  Its possible to get a little better performance out of this drive by issuing a few parameters with hdparm.  The following parameters work well with this drive:

```
# hdparm -a256A1c1d1m16u1 /dev/hda

/dev/hda:

setting fs readahead to 256

setting 32-bit IO_support flag to 1

setting multcount to 16

setting unmaskirq to 1 (on)

setting using_dma to 1 (on)

setting drive read-lookahead to 1 (on)

multcount    = 16 (on)

IO_support   =  1 (32-bit)

unmaskirq    =  1 (on)

using_dma    =  1 (on)

readahead    = 256 (on)
```

4.3  Test the Hard Drive's Performance.

Typical results for a Pentium 3 with UDMA66:

```
# hdparm -tT /dev/hda 

/dev/hda: 

Timing cached reads:   520 MB in  2.01 seconds =  258.75 MB/sec

Timing buffered disk reads:   114 MB in   3.01 seconds =  37.90  MB/sec
```

4.4  Partition the Hard Drive

4.4.1  Display the Partition Information

Technically, the syntax of this command is used to change the partition information, but on an unpartitioned drive it will display the partition information that is available:

```
# fdisk /dev/hda 

The number of cylinders for this disk is set to 14593.

There is nothing wrong with that, but this is larger than 1024,

and in certain setups could cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p 

Disk /dev/hda: 120.0 GB, 120034123776 bytes

255 heads, 63 sectors/track, 14593 cylinders 

Units = cylinders of 16065 * 512 = 8225280 bytes 

   Device Boot Start End Blocks Id System 

Command (m for help): 
```

4.4.2  Plan Our Partition Scheme:

To keep it simple, we're going to use the following partition scheme.  I'll leave out the details, assuming that you know how to partition your hard disk.

```
Partition File System    ID  Size      Description

/dev/hda1 ReiserFS 3.6   83  100 MB    Boot partition

/dev/hda2 (swap)         82  512 MB    Swap partition

/dev/hda3 ReiserFS 3.6   83  Remainder Root Partition
```

4.4.3  Partition the Hard Disk  (Boring details omitted in the interest of brevity)

4.4.4  Verify the partition configuration.

```
Disk /dev/hda: 120.0 GB, 120034123776 bytes

255 heads, 63 sectors/track, 14593 cylinders 

Units = cylinders of 16065 * 512 = 8225280 bytes 

Device     Boot   Start    End     Blocks    Id  System 

/dev/hda1    *        1     13     104391    83  Linux

/dev/hda2            14     76     506047+   82  Linux swap

/dev/hda3            77  14593  116607802+   83  Linux
```

4.4.5  Exit Fdisk and Save the Partition Layout  Press "w" to write the partition table to disk and exit fdisk.

```
Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks

```

4.5  Installing File Systems.  This example covers the installation of Reiser FS 3.6 on the /boot and /root partitions, and swap on the /swap partition.

4.5.1  Install Reiser FS on /dev/hda1 and /dev/hda3:

```
# mkreiserfs /dev/hda1 && mkreiserfs /dev/hda3
```

You will need to answer "Y" when asked if you want to continue installing Reiser FS on the hard disk.

4.5.2  Install the swap partition on /dev/hda2:

```
# mkswap /dev/hda2 && swapon /dev/hda2
```

4.6  Mounting the File Systems.  Mount the partitions using the "mount" command.  

```
# mount /dev/hda3 /mnt/gentoo

# mkdir /mnt/gentoo/boot

# mount /dev/hda1 /mnt/gentoo/boot
```

5.  Installing the Gentoo Installation Files. 

5.1  Download the i686 Stage 3 Tarball from the Internet.  

Go to the gentoo mount point on your hard disk:

```
# cd /mnt/gentoo
```

We will need to download 2 files from the mirrors:  The Stage 3 tarball and its checksum file.  We will download the following four files using the "wget" command at the bash prompt.  The entire command must be typed on one line:

```
# wget http://gentoo.osuosl.org/releases/x86/2005.1/stages/i686/stage3-i686-2005.1.tar.bz2  

# wget http://gentoo.osuosl.org/releases/x86/2005.1/stages/i686/stage3-i686-2005.1.tar.bz2.md5
```

If you need to check the list of Gentoo Mirrors, Click Here.  

5.2  Verify the md5sum of the Tarballs.  

```
# md5sum -c stage3-i686-2005.1.tar.bz2.md5

stage3-i686-2005.1.tar.bz2: OK
```

5.3  Unpack the Stage 3 Tarball.  Unpack the Stage 3 tarball using the following command.

```
tar -xjpvf stage3-i686-2005.1.tar.bz2
```

Now is a good time to take a break to re-dose with some caffeine, as this will take a little while...

5.4  Installing Portage 

5.4.1  Download a Fresh Portage Snapshot from the Internet. 

```
# wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2
```

5.4.2  Extract the Portage Snapshot

```
tar -xjvf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
```

Some of these steps will take a while to complete.

6.  Installing the Gentoo Base System

6.1  Copy DNS Information  Copy the DNS information in /etc/resolv.conf to ensure that networking works in our new Gentoo environment.  

```
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf 
```

6.2  Mount the proc filesystem  We will mount the /proc file system to allow our Gentoo installation to use kernel-provided information within the chrooted environment.  

```
# mount -t proc none /mnt/gentoo/proc

# mount -o bind /dev /mnt/gentoo/dev

# cp /proc/mounts /mnt/gentoo/etc/mtab
```

6.3  Chroot into the New Environment

```
# chroot /mnt/gentoo /bin/bash

# env-update

# source /etc/profile
```

6.4  Set the Date and Time

6.4.1  Set the Correct Date and Time. 

The date command uses the syntax MMDDHHMMYYYY, where MM is the month, DD is the day, HHMM is the time, and YYYY is the year.  As I type this, it is Sunday March 27, 2005 at 19:30:

```
# date 032719302005

Sun Mar 27 19:30:00 Local time zone must be set--see zic manual page 2005
```

6.4.2  Set the Time Zone Symlink.

This example displays the available time zone selections for the Western Hemisphere:

```
# ls /usr/share/zoneinfo/America
```

I'll set the local time zone to Central Time because I live in Chicago.  To do this, I first remove the symlink to the default time zone, and then replace it with a symlink to my local time zone:

```
# rm /etc/localtime 

# ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime

Sun Mar 27 19:32:50 CST 2005
```

6.4.3  Get it Right for Daylight Savings Time.

The previous example showed how to select a city when setting the timezone symlink.  It is my opinion that you should always choose a city that is in your time zone, and use the city to set the time zone symlink.  You should NEVER choose a time zone as your symlink for the setting the time zone.  Here's why:

I live in Chicagoland.  By setting the timezone symlink to the nearest major city, Chicago, I don't have to worry about implementing Daylight Savings Time.  Linux is smart enough to spring forward and fall back so that no changes to the system time are necessary on my part.  This past weekend, when Chicago changed from Central Standard Time to Central Daylight Time, I watched with glee as the clocks on all of my linux PCs ticked from 01:59:59 CST to 03:00:00 CDT.  (Just in case you were wondering, THAT is confirmation that I am a basement-dwelling linux g33k!)  If I had made the mistake of setting the timezone symlink to CST, then linux would have kept my PC's clock on CST, even though the city that I live in had switched to CDT.  In this case, I would either have to manually change my clock over from CST to CDT, or learn to live with a PC who's clock is off by an hour.  

6.5  Configuring the USE Flags, Portage Options, and Compile Options: /etc/make.conf

In this example, we're compiling for a 686-class box on the x86 architecture.  Our CHOST setting will be i686-pc-linux-gnu.  Since all of the 686-class boxes use the same CHOST, it really doesn't matter which tarball we start off with.  More accurately, you can start off with the i686 tarball and properly complete the install for any of the 686-class boxes.  The advantage for doing this is that the i686 tarball is not effected by the permissions problems that plague some of the other 686-class tarballs.  All that you need to worry about is changing the architecture specification for your processor.

This Guide uses a minimalist setting of the USE variable.  You are free to add additional USE flags as needed for your specific system requirements, but it is recommended that you do not add them to /etc/make.conf until after you have completed the entire installation.

Please note:  The specification of the "nptl" and the exclusion of the "nptlonly" USE flag is intentional, in order to provide both NPTL threading support in glibc as well as fallback support for linuxthreads.  Use of the "nptlonly" USE flag is NOT recommended!  The use of hardened GCC 3.4.4 is not recommended on any x86 systems except AMD64.

```
# cat /etc/make.conf

CHOST="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"

CXXFLAGS=${CFLAGS}

ACCEPT_KEYWORDS="x86"

PORTAGE_TMPDIR=/var/tmp

PORTDIR=/usr/portage

DISTDIR=${PORTDIR}/distfiles

PKGDIR=${PORTDIR}/packages

PORT_LOGDIR=/var/log/portage

PORTDIR_OVERLAY=/usr/local/portage

GENTOO_MIRRORS="<your mirror goes here> http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

RSYNC_RETRIES="3"

RSYNC_TIMEOUT=180

MAKEOPTS="-j2"

PORTAGE_NICENESS=3

AUTOCLEAN="yes"

FEATURES="distlocks sandbox userpriv usersandbox"

USE="nptl"

#CCACHE_SIZE="512M"
```

6.6  Additional Portage Configuration

6.6.1  Create Portage Directories

The sample /etc/make.conf listed above specifies directories for Portage log files and overlays that are not included as part of a standard Gentoo installation.  If you are going to use the logging and overlay functions listed in the sample make.conf file, then you will need to create two additional directories on your system.

```
# mkdir /var/log/portage

# mkdir /usr/local/portage
```

6.6.2  Package Keywords - Enabling GCC 3.4.4 in the Stable Branch

Skip this step and proceed to the next section if you have configured your system to use the "~x86" testing branch.

At the time that I write this guide, GCC 3.4.4 is part of the unstable or "testing" branch in Portage.  If you will be using the "x86" stable branch of the software, then we need to configure Portage to enable the use of GCC 3.4.4 and some other toolkit components, even though they are currently classified in the testing branch.  

To configure a stable branch system to utilize a testing branch ebuild, we need to let Portage know that we have approved this subset of the testing branch for use on our system.  This is accomplished by specifying the name of the package and the applicable keyword in the /etc/portage/package.keywords file.  We will enable support for four testing branch ebuilds in our system. 

```
# cat /etc/portage/package.keywords

~sys-devel/gcc-3.4.4 ~x86

sys-devel/gcc-config ~x86 

sys-libs/libstdc++-v3 ~x86

sys-libs/glibc ~x86

sys-devel/binutils ~x86

sys-libs/timezone-data ~x86
```

  6.6.3  Update the Portage Tree

We will now update our portage snapshot to include the current portage tree.

```
emerge --sync
```

6.7 Activate User Locales  

When compiling glibc (we'll do this in an upcoming step), Gentoo's default behavior is to compile a full set of all of the available user locales.  We will activate the userlocales local USE flag to limit the compilation of userlocales to those that we specify.  Limiting the scope of userlocales will save us a tremendous amount of time while compiling glibc.  (While we're editing this file, we'll also add "ithreads" as a package-specific USE flag for perl and libperl to allow interpreter level threading.  This flag is optional but recommended.)

6.7.1  Activate the userlocales USE flag for glibc

```
# cat /etc/portage/package.use

sys-libs/glibc userlocales

sys-devel/libperl ithreads

dev-lang/perl ithreads
```

6.7.2  Specify the user locales to build. 

Create the /etc/locales.build file with your favorite editor.  I'm located in the USA, so I'll use the following values.

```
# cat /etc/locales.build

en_US/ISO-8859-1 

en_US.UTF-8/UTF-8 
```

 7.  Building the Toolkit 

7.1  Building the Toolkit: GCC 3.3.5

To enable NPTL support we are required to use a 2.6 kernel and linux26-headers. Linux26-headers is now contained in the 2005.0 Stage 3 tarball, so it is no longer necessary to manipulate the linux headers as it was when installing with 2004.3 media.

```
# env-update && source /etc/profile

# emerge gcc-config glibc binutils libstdc++-v3 gcc
```

This is a good opportunity to take an extended break, as these instructions will take quite some time to complete.

7.2  Re-Building the Toolkit:  GCC 3.4.4

After emerging a new version of GCC, we need to pause for a moment and think about what we've done.  We've just used GCC 3.3.5 and a toolchain built with GCC 3.3.5 to compile GCC 3.4.4.  Before we spend any more time building our Gentoo system we should rebuild the entire toolchain, re-compiling it so that we have GCC 3.4.4 that was built with GCC 3.4.4.  

Before we do this we need to examine /etc/make.conf and make changes to the CFLAGS statements in order to take advantage of the new performance-enhancing features of GCC 3.4.4.  After making necessary updates to /etc/make.conf we need to rebuild the toolkit using the new GCC 3.4.4 compiler.  The result will be a 3.4.4 tooklit, compiled by a 3.4.4 toolkit that was built with a 3.3.5 toolkit.  Clear as mud?   :Rolling Eyes: 

7.2.1  Updating make.conf

Here are some settings for /etc/make.conf that may be worth considering.  They are the actual CFLAGS that I used to build my systems and have proven reliable on multiple installations.  They include extreme levels of code optimization (notice the -O3 flag), and some very safe and stable performance-enhancing CFLAGS.  Depending upon your individual hardware, you may have to simplify some of the CFLAGS settings. 

```
CFLAGS="-O3 -march=pentium3 -fforce-addr -fomit-frame-pointer -ftracer -pipe" 

CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
```

l still be getting most of the benefits of GCC 3.4.4, so this isn't a bad compromise.  This may be a better approach for those who don't want to be on the bleeding edge or don't want to spend time troubleshooting.

7.2.2  Configuring the Default C Compiler

Although we have emerged GCC 3.4.4, it has not been automatically installed as our default compiler.  If you have any doubts about this, take a quick peek at the output of "emerge info" or "gcc-config -l".  Although GCC 3.4.4 has already been emerged, GCC 3.3.5 is still installed as out default compiler:

```
# gcc-config -l

1] i686-pc-linux-gnu-3.3.5.20050130-r1

[2] i686-pc-linux-gnu-3.3.5.20050130-r1-hardened

[3] i686-pc-linux-gnu-3.3.5.20050130-r1-hardenednopie

[4] i686-pc-linux-gnu-3.3.5.20050130-r1-hardenednopiessp

[5] i686-pc-linux-gnu-3.3.5.20050130-r1-hardenednossp

[6] i686-pc-linux-gnu-3.4.4 *

[7] i686-pc-linux-gnu-3.4.4-hardened

[8] i686-pc-linux-gnu-3.4.4-hardenednopie

[9] i686-pc-linux-gnu-3.4.4-hardenednopiessp

[10] i686-pc-linux-gnu-3.4.4-hardenednossp

```

Change the default compiler to gcc 3.4.4 by issuing the following command.  Note that the numbers may have changed.

```
# gcc-config 6
```

7.2.3  Updating the System Environment

An additional command updates our system environment:

```
# env-update && source /etc/profile
```

7.2.4  Rebuilding the System Toolkit

Now its time to rebuild the toolkit.  We'll start off by recompiling glibc, binutils, gcc, and by updating portage.  This will rebuild our GCC 3.4.4 compiling toolkit (which had previuosly been compiled with GCC 3.3.5) with the GCC 3.4.4 compiler, taking advantage of our new USE flags and CFLAGS compiler settings.  

```
# emerge glibc binutils libstdc++-v3 gcc portage 
```

Upon completion of the rebuild of the compiling toolkit, we will recompile the entire system to assure that our entire toolkit has been compiled using GCC 3.4.4 and our hardware-specific settings.  

The result will be a 3.4.4 tooklit and an entire system that is built with a 3.4.4 toolkit, that was built with a 3.4.4 toolkit.   :Wink: 

```
# emerge -e system && emerge -e system 
```

7.2.5  Prune the GCC Compiler

Now that GCC 3.4.4 has been installed as the default compiler and our system has been rebuilt, we can prune GCC 3.3.5 from our system by issuing the following commands.  First, verify that GCC 3.4.4 has indeed been installed as the default compiler using the "l" parameter with gcc-config.  (Just to avoid any confusion, the parameter used is a lower case "L", not the number "one".)  Then, after confirming that GCC 3.4.4 has been installed as the default compiler, prune GCC 3.3.5 from your system.

```
# gcc-config -l

# emerge -P gcc
```

7.2.6  Summary

Although these command have been broken down into separate steps for the purpose of clarity, they can be concatenated into three steps.  The one-liners in Steps 1 and 3 will take quite some time to complete, and represent good opportunities for you to take an extended break while Gentoo does its thing.

Step 1:

```
# env-update && source /etc/profile && emerge gcc-config glibc binutils libstdc++-v3 gcc 
```

Step 2: update your USE flags and CFLAGS in /etc/make.conf 

Step 3:

```
# gcc-config 6 && env-update && source /etc/profile && emerge glibc binutils libstdc++-v3 gcc portage && emerge -e system && emerge -e system && emerge -P gcc
```

8.0  Building the World

8.1  Emerge Ccache (Optional)

Now that our toolkit has been built, we'll emerge the ccache program.  Ccache is a compiler cache that will help to reduce compile times when previously compiled programs are being recompiled.  It will not effect the time required to compile programs on the first pass, so this is an optional step.  (Note: the ccache_size was set to 512 MB in the sample make.conf.  If you have sufficient disk space, and you're planning on emerging a bloated window manager like Gnome or KDE (or if you are performing an emerge -e system or an emerge -e world), then you may want to increase the to something like ccache_size="2G".)

```
# emerge ccache
```

8.2  Emerging Programs

Now its time to add a few useful packages to our world profile:

```
# emerge syslog-ng xinetd grub vixie-cron reiserfsprogs sysfsutils dhcpcd hotplug coldplug gentoolkit

# emerge --nodeps acpid ntp
```

8.3  Updating the Environment  

Now we'll add these services to the default runlevel.  Here two ways to accomplish this task that are functionally equivalent.  Choose the one you like best.

```
# rc-update add syslog-ng default 

# rc-update add net.eth0 default 

# rc-update add vixie-cron default 

# rc-update add xinetd default 

# rc-update add sshd default 

# rc-update add hotplug default 

# rc-update add coldplug default 

# rc-update add acpid default

# rc-update add ntp-client default
```

or if you're an ub3r-g33k, try this cool bash loop  :Cool:   that saves alot of typing:

```
for x in syslog-ng net.eth0 vixie-cron xinetd sshd hotplug coldplug acpid ntp-client ; do rc-update add $x default ; done 
```

8.4  Configuring the NTP Client  

In the previous steps we emerged a Network Time Protocol client to allow us to use NTP time servers to synchronize our system clock.  In this step we'll configure the ntp-client to eliminate clock skew:

```
# ntpdate -b -u pool.ntp.org
```

9. Kernel

9.1  Downloading the Kernel 

The decision to enable NPTL support requires that we use a 2.6 kernel.  You are free to choose any flavor of 2.6 kernel that you like.  In this example, we'll be using the Gentoo (Development) Sources kernel.  Note that a 2.4 kernel will not work properly with this Installation Guide. 

```
# emerge gentoo-sources
```

9.2  Building the Kernel Symlink

```
# rm /usr/src/linux

# cd /usr/src

# ln -s linux-2.6.12-gentoo-r6 linux 
```

9.3  Configuration 

9.3.1  Enable udev Support  

Edit your /etc/conf.d/rc file so that it contains the following statements:

```
RC_NET_STRICT_CHECKING="no" 

RC_DEVICES="udev" 

RC_DEVICE_TARBALL="no"  
```

 9.3.2  Configure Kernel Options

If you're following this Installation Guide, we're going to assume that you want the best performance from your system, and that you'll be using a custom-compiled kernel instead of genkernel.  When configuring your kernel, be sure to include support for hotplug firmware loading.  Also be sure to remove devfs filesystem support, as we are designing udev support into our system.

Configure the kernel:

```
# cd /usr/src/linux

# make menuconfig  
```

9.3.3  Compiling the Kernel

To compile your kernel and install the kernel and selected modules, issue the following command.  I find that this one works a bit better than some of the other one-liner kernel compilation commands.  If you should run into a problem where kernel compilation fails, its easy to determine where the problem was.  In addition, this command will also install the kernel for you:

```
# make && make modules && make modules_install && make install  
```

10.  Configuring the System

10.1  Configure Network Adapters

Configure your network adapters as recommended in the Gentoo Installation Handbook.  In our case, we'll use DHCP:

```
# cat /etc/conf.d/net

iface_eth0="dhcp"

dhcpcd_eth0="-t 10" 

```

If this isn't suitable for you, consider these options as listed in the GIH:

```
# (For DHCP)

iface_eth0="dhcp"

# Some network admins require that you use the

# hostname and domainname provided by the DHCP server.

# In that case, add the following to let dhcpcd use them.

# That will override your own hostname and domainname definitions.

dhcpcd_eth0="-HD"

# If you intend on using NTP to keep your machine clock synchronized, use

# the -N option to prevent dhcpcd from overwriting your /etc/ntp.conf file

dhcpcd_eth0="-N"

#(For static IP)

iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

gateway="eth0/192.168.0.1"

#(For rp-pppoe)

iface_eth0="up"

```

10.2  Set Hostnames and Domainnames

The following hostname and domainname locations referenced in the Gentoo Installation Handbook and some of the other HowTo appear to have been deprecated. The first example in each of the following two sections uses the old configuration method, which has been deprecated but this is not yet reflected in many of the installation guides.  The second option in each of the following two examples is more current:

10.2.1  Set Your Hostname 

The following examples provide instruction for setting the hostname on your Gentoo box.  We'll use the "boatanchor" as the hostname in this example. 

```
# cat /etc/conf.d/hostname

HOSTNAME="boatanchor"

```

10.2.2  Set Your Domainname  

```
# cat /etc/conf.d/domainname

OVERRIDE=1

DNSDOMAIN="mydomain.com"

NISDOMAIN="nis.mydomain.com"

```

10.2.3  Update /etc/hosts

If nameservers on your network handle all name resolution, then you can skip this step.

If your PC is a standalone system, or if your PC has a static IP address and you don't have DNS entries for your machine in a nameserver somwehere on your network, then you should specify the following information in the /etc/hosts file.  

```
127.0.0.1             localhost.localdomain       localhost

static.ip.addr.ess    boatanchor.mydomain.com     boatanchor
```

The value of "static.ip.addr.ess" needs to be substituted with the IP address of your Gentoo box.  For example, if your Gentoo box's IP address is 192.168.0.5, your /etc/hosts file should contain the following lines.

```
127.0.0.1        localhost.localdomain       localhost

192.168.0.5      boatanchor.mydomain.com     boatanchor
```

10.2.4 Add domainname to the Default Runlevel

```
# rc-update add domainname default

```

10.3  Gensplash

For all of you eye-candy addicts who can't live without it, here's the section where we add gensplash to give us those ultra-cool  :Cool:  framebuffer images in our consoles.  Because some of us have really big monitors, we'll configure splash screens at your choice of 1024x768, 1280x1024 and 1600x1200 resolutions:

```
# emerge splashutils splash-themes-gentoo

# splash_geninitramfs -v -g /boot/fbsplash-emergence-1024x768 -r 1024x768 emergence && splash_geninitramfs -v -g /boot/fbsplash-emergence-1280x1024 -r 1280x1024 emergence && splash_geninitramfs -v -g /boot/fbsplash-emergence-1600x1200 -r 1600x1200 emergence && rc-update add splash default 
```

Note:  Gensplash and the framebuffer is UNSUPPORTED in the Stage 1/3 Guide.

10.4  Grub Bootloader

10.4.1  Grub.conf

To boot our installation of Gentoo Linux we'll need to configure a boot menu for the Grub Bootloader.  Use your favorite text editor to create the /boot/grub/grub.conf file.  In this case we'll use nano:

```
# cd /boot/grub

# nano -w grub.conf
```

You can either cut and paste the following text into the file, or type it in manually.  Note that the lines beginning with the word "kernel" and ending with the words "splash=verbose,theme:emergence" need to be typed on one line.  In this example, we're using the vesafb-tng video driver, and the video= statements are formatted accordingly.

```
# Grub boot menu configuration file 

# 

# Boot automatically after 30 secs. 

timeout 30 

# By default, boot the second entry. 

default 1 

# Fallback to the first entry. 

fallback 0 

# Use default Grub Splash image

# splashimage=(hd0,0)/grub/splash.xpm.gz

#

# Use custom (downloaded) Gentoo Splash Image

splashimage=(hd0,0)/grub/gentoo.xpm.gz 

# Boot Gentoo Linux (no framebuffer)

title Gentoo-2.6.12-r6  

root (hd0,0) 

kernel (hd0,0)/vmlinuz ro root=/dev/hda3 video=vesafb:ywrap,pmipal,1024x768-16@85

# Boot Gentoo Linux at 1024x768 framebuffer resolution

title Gentoo-2.6.12-r6, 1024x768 

root (hd0,0) 

kernel (hd0,0)/vmlinuz ro root=/dev/hda3 video=vesafb:ywrap,pmipal,1024x768-24@85 splash=verbose,fadein,theme:emergence CONSOLE=/dev/tty1

initrd (hd0,0)/fbsplash-emergence-1024x768 

# Boot Gentoo Linux at 1280x1024 framebuffer resolution

title Gentoo-2.6.12-r6, 1280x1024 

root (hd0,0) 

kernel (hd0,0)/vmlinuz ro root=/dev/hda3 video=vesafb:ywrap,pmipal,1280x1024-24@85 splash=verbose,fadein,theme:emergence CONSOLE=/dev/tty1

initrd (hd0,0)/fbsplash-emergence-1280x1024 

# For installing GRUB into the hard disk 

title Install GRUB into the hard disk 

root (hd0,0) 

setup (hd0) 

```

10.4.2  Installing Grub onto the Hard Disk

Start Grub from the command prompt and use the following commands to embed grub into the hard disk. Remember, when counting hard disks we like to start at 1, but Grub likes to start at 0, so /dev/hda1 corresponds to hard disk 0, partition 0 in Grub.

```
# grub 

grub> root (hd0,0) 

grub> setup (hd0) 

grub> quit 

```

10.4.3  Download a Cool  :Cool:  Grub Splash Screen

We'll also download a cool Gentoo-specific splash screen for Grub.

```
wget http://www.schultz-net.dk/downloads/grub/gentoo.xpm.gz
```

10.5  Filesystem - Configuring fstab

This is a sample /etc/fstab file that reflects the disk partition scheme used earlier in this Installation Guide.  Make changes as appropriate if your partition scheme is different.

```
# <fs>               <mountpoint>  <type>       <opts>               <dump/pass> 

/dev/hda1            /boot         reiserfs     noauto,notail        1 2 

/dev/hda3            /             reiserfs     notail               0 1 

/dev/hda2            none          swap         sw                   0 0 

/dev/cdroms/cdrom0   /mnt/cdrom    iso9660      user,noauto,ro,exec  0 0 

/dev/fd0             /mnt/floppy   auto         noauto,users         0 0 

# NOTE: The next line is critical for boot! 

none                 /proc         proc         defaults             0 0 

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink). 

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will 

# use almost no memory if not populated with files) 

# Adding the following line to /etc/fstab should take care of this: 

none                 /dev/shm      tmpfs        nodev,nosuid         0 0

```

10.6  Setting HD Paramaters

Back in Section 4 we developed optimized operating parameters for our hard disk.  Now that we're in the chrooted environment of our newly designed Gentoo system, we need to make these configuration changes permanent.  To do this, we'll write the HD parameters to the /etc/conf.d/hdparm file:

```
# cat /etc/conf.d/hdparm 

disc0_args="-a256A1c1d1m16u1" 

cdrom0_args="-d1c1u1" 

```

After editing the contents of /etc/conf.d/hdparm type the following command to add hdparm to the boot runlevel. 

```
# rc-update add hdparm boot 
```

10.7  Set-Up User Accounts

We must change the password of the root user in our newly installed system.  Then we will add non-root users to the system.  Substitute the username examples "bob" and "mary" with your own usernames.

First, change the root password:

```
# passwd

New password: (Enter your new password)

Re-enter password: (Re-enter your password) 
```

Now add users who will be allowed to "su" their way to temporary root status.  These users must be added to the "wheel" user group:

```
# useradd -m -G users,wheel bob 

# passwd bob

New password: (Enter bob's password)

Re-enter password: (Re-enter bob's password) 
```

Now add non-root users to the system:

```
# useradd -m -G users mary 

# passwd mary

New password: (Enter mary's password)

Re-enter password: (Re-enter mary's password) 
```

10.8  Toggle NUMLOCK ON at Boot

If you'd like the NUMLOCK key to be toggled ON at system boot, execute the following command.

```
# rc-update add numlock default
```

10.9  Define Console Screen Blanking Interval

If youre not happy with the standard screen blanking interval for the console (to me the screen always seems to blank too quickly), you can specify the desired interval (from 1 to 60 minutes) using the following command.  Substitute n with the value of the desired blanking interval in minutes.  A value of zero will disable screen blanking.

```
# setterm -blank n
```

This setting is only temporary; after rebooting the screen will resume blanking at the default interval.  To make your changes permanent, issue the following command:

```
# echo setterm blank n >> /etc/conf.d/local.start
```

10.10  Exiting Chroot and Unmounting Partitions 

We will now exit the chrooted environment and unmount all of the mounted partitions.  Use tab completion to save yourself some typing.

```
exit 

cd ~/ 

umount /mnt/gentoo/dev

umount /mnt/gentoo/proc 

umount /mnt/gentoo/boot 

umount /mnt/gentoo 

swapoff /dev/hda2

```

11.  REBOOT!

And now, the moment you've been waiting for!

```
# shutdown -r now 
```

When the system reboots, you should be welcomed with the following greeting.

```
This is boatanchor.mydomain.com (Linux i686 2.6.15-gentoo-r5) HH:MM:SS

boatanchor login:
```

12.  TROUBLESHOOTING

If you encounter problems after rebooting, consider the following:

 :Arrow:  kernel configuration errors are the most common cause of failure on first boot.

 :Arrow:  grub configuration errors are another common cause of failure on first boot.

 :Arrow:   if you have device problems, read the Gentoo udev Guide.

Have fun with your new Gentoo system!

13.  If You Need Help

Remember: The Documentation, Tips & Tricks forum is not a support forum:

 *Quote:*   

> Documentation, Tips & Tricks
> 
> Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
> 
> Moderator: Global Moderators

 

Please bear in mind that this thread is located in the Documentation, Tips & Tricks Forum, which is not a support forum.  For this reason I would like to ask that we limit the context of this thread to posts that discuss problems with the Installation Guide that need to be corrected, or to ideas about how to improve the Stage 1 on 3 installation procedure itself.  If you have a problem and you need help, please post your support request in the Official 2005.0 Stage 1 on 3 for GCC 3.4.4 Support Thread in the Installing Gentoo forum.

NOTE: Documentation, Tips & Tricks  is NOT a support forum.  Please do not post installation support requests into this thread.  Please post in the support thread that is dedicated to this installation method.

14.  Corrections, Errors, Omissions 

Please let me know if there are any errors or omissions in this document by sending me a personal message through the Gentoo Forums by clicking the link below.

15.  Updated Credits

Thanks to @nightmorph for prodding me into addressing the update for glibc-2.3.5-r3 and timezone-data.

16.  Revision History:

20051112:  Fixed a cut and paste error.

----------

## DOSBoy

Should you, perhaps, have a reference to using binutils-config to set the new binutils version as the default in a manner similar to that is used with gcc-config, around the point where you enable GCC 3.4.4, but before you env-update && source /etc/profile?

----------

## warrens

 *Quote:*   

> Should you, perhaps, have a reference to using binutils-config to set the new binutils version as the default in a manner similar to that is used with gcc-config, around the point where you enable GCC 3.4.4, but before you env-update && source /etc/profile?

 

I just checked on my freshly installed Stage 1/3 binutils-config -l and binutils is already set to the latest and greatest without any intervention from me.  It seems that only gcc is not automaticaly updated to the newest build.  

By the way, I think that this thread should be given Sticky status.   :Very Happy: 

----------

## Bob P

Sticky?  that's been recommended for these Guides many times before.  I'm flattered,   :Embarassed:   but I don't have the authority to make anything sticky.  You need to talk to somebody official about that.

----------

## krizz

Hey Bob,

Nice tutorial, but the /usr/share/timezone directory is not available if I try to link the timezone.

Cheers,

-Krizz

----------

## krizz

 *krizz wrote:*   

> Hey Bob,
> 
> Nice tutorial, but the /usr/share/timezone directory is not available if I try to link the timezone.
> 
> Cheers,
> ...

 

I'm sorry, I misread...stage3...  :Laughing: 

----------

## ajburch

-->Bob,

What gives with the recompile time? I have a Pentium-M Thinkpad, a pretty nice laptop. I have been recompiling for 14 hours now. This was the dreaded step:

 *Quote:*   

>  emerge -e system && emerge -e system && emerge -P gcc 

 

<--AJ

----------

## Frodg

My, but aren't the young ones impatient...  :Laughing: 

You are recompiling all your programs several times so it will be a little while yet.

----------

## Bob P

 *ajburch wrote:*   

> 
> 
> What gives with the recompile time? I have a Pentium-M Thinkpad, a pretty nice laptop. I have been recompiling for 14 hours now. This was the dreaded step:
> 
>  *Quote:*    emerge -e system && emerge -e system && emerge -P gcc  

 

hehe.  if you can't run with the big dogs, you might as well stay on the porch.    :Twisted Evil: 

maybe you missed this in the other threads:

 *Stage 1/3 Guide wrote:*   

> WARNING: This is an ADVANCED installation method. The amount of time required for you to complete this type of installation will equal or exceed that of any other Gentoo installation method. Your time will be well invested, though, as the result will be a very stable Gentoo system. This installation method may prove to be somewhat difficult and cumbersome for users who are new to Gentoo. It will prove especially painful for users who plan to install Gentoo old hardware. 

 

----------

## Iron_DragonLord

14 hours? Hahaha...

Took my server almost a whole week about a few months ago. No compaints though, it was just an old box I got for free and decided to give it a use.

Anyway, spiffy guide.   :Cool: 

----------

## Bob P

 :Arrow:  Updated PDF now available.

Please click on the Ads by Google to show your support.  It doesn't cost you anything, and it helps to keep the wheels turning!   :Cool: 

----------

## zigver

 *Bob P wrote:*   

> Please click on the Ads by Google to show your support.  It doesn't cost you anything, and it helps to keep the wheels turning!  

 

Didn't need the pdf but clicked a couple ads.  Your contributions to the Gentoo community are greatly appreciated.

----------

## glang

 *Bob P wrote:*   

>  Updated PDF now available.
> 
> Please click on the Ads by Google to show your support.  It doesn't cost you anything, and it helps to keep the wheels turning!  

 

Does google not suck anymore or did they eventually give you your $100?

----------

## Bob P

Google Sucks.

----------

## slycordinator

 *Iron_DragonLord wrote:*   

> 14 hours? Hahaha...
> 
> Took my server almost a whole week about a few months ago. No compaints though, it was just an old box I got for free and decided to give it a use.
> 
> Anyway, spiffy guide.  

 

distcc for the win.

Actually, I'm right now installing gentoo on an extra partition and I'll use a statically-built partimage to send it to my old box.

----------

## COiN3D

Hi Bob P,

since GCC 3.4 has been marked as stable, there's now no need any longer to unmask it.

Just as information.  :Smile: 

----------

## glang

 *ajburch wrote:*   

> -->Bob,
> 
> What gives with the recompile time? I have a Pentium-M Thinkpad, a pretty nice laptop. I have been recompiling for 14 hours now. This was the dreaded step:
> 
>  *Quote:*    emerge -e system && emerge -e system && emerge -P gcc  
> ...

 

I followed this guide on a pentium-m more than once, start to finish takes anything up to 24 hours, give it time, it is worth the wait.

----------

## mr2600

Bob P, I cannot express how much I like your guides.  I just finished an install on a P4 3ghz Nocona, and... its quite fast!  Only 51MB used on initial boot, I wish I could say the same for other distros.

----------

## dbasetrinity

Bob P I just wanted to say Great Guide also, Ive been using your guides for awhile now and Its ultimately sweet perfection 

in a very unperfect world....

I'm hoping that soon ill see a new guide with the 2005.1 with GCC4.0.1...

----------

## front243

Nice guide, I try to follow it on my new laptop. What are some good gcc 3.4.4 settings for a pentium-m processor?

----------

## Bob P

 *dbasetrinity wrote:*   

> Bob P I just wanted to say Great Guide also, Ive been using your guides for awhile now and Its ultimately sweet perfection 
> 
> in a very unperfect world....
> 
> I'm hoping that soon ill see a new guide with the 2005.1 with GCC4.0.1...

 

you need to look at Rockhopper!  it uses 4.0.2.

----------

## golding

From the Gentoo Forums Thread (above)

 *Quote:*   

> Copyright (c) 2005 Bob Predaina. Released under the Creative Commons Attribution-ShareAlike license version 2.0. If you base a derivative work on this Guide, you MUST give credit to the Author in your document, and your document must contain a hyperlink that points to This URL. If you paraphrase sections of this Guide, no further attribution is required. OTOH, if you quote sections of this Guide, you must either: a) identify the quoted sections as quotes, with full citations of authorship and a hyperlink to this web page, or b) provide me with co-authorship status as a secondary author on your work. 
> 
> 

 

From your web page

 *Quote:*   

> You may:
> 
>     * Post a hyperlink to this web page.
> 
>     * Download the PDF file for your own personal use. 
> ...

 

From the CC Plain English Page

 *Quote:*   

> Attribution-ShareAlike 2.0
> 
> You are free:
> 
>     * to copy, distribute, display, and perform the work
> ...

 

The text from the forum and the CC page are similar, however the text from your private site is not.

What is this?  You're free, but, I'm just gonna put this chain around your neck ... hmm?

I can only conclude that the PDF, without actually having seen it, and the forum HowTo are very different.  Due to the pdf sites licence requirements, I have chosen NOT to download it.

----------

## greyhats

Hail Bob and everyone.

Just finish to install my system. It took me almost 2 days with lots of cafeine   :Wink: 

So, like other said this guide ROCK, and I believe Im not the first one who said that.

So, here are the spec on what I've build my system:

Laptop IBM thinkpad T41. 

processor 1600 GHZ pentium M

Disk 40 gig 

Videocard ATI Radeon 7500

whatelse .. 512M ram for now planing to add another 512 soon.

For making the kernel, I did my lazy ass and went with genkernel. I changed the processor type for Pentium M.

Beside that I did follow the guide step by step including the coffee break   :Wink:  and I'm up and runing.

Thanks for the nice guide. I'll buy you a root beer.

----------

## Bob P

thanks for the note.  i'm always thirsty, so a root beer would be great.   :Very Happy:   after you've recovered from the install, do take the time to build a custom kernel for your system.  that's one of the best low-cost performance enhancements that you can add to your system!  besides, after all that compiling that you've done, compiling a kernel won't seem to take long at all.   :Wink: 

----------

## slycordinator

 *golding wrote:*   

> I can only conclude that the PDF, without actually having seen it...

 

Some people jump to conclusions.

You make giant leaps.

----------

## daniel1988

 *Quote:*   

> since GCC 3.4 has been marked as stable, there's now no need any longer to unmask it.

 

Because of this, is still required to rebuild the toolchain and...

I'm asking this because I plan to install Gentoo on my "little" server which is really slow (duron750, 256MB SDRAM...) and don't want to waste a (few) day(s) more, if there is no need. Please edit this howto.

Cheers,

Daniel

----------

## Bob P

suppot questions?  how about trying the support thread?    :Idea: 

----------

## daniel1988

Edit: sure

----------

## ens_leader

I just gotta say: Bob... you are the man... your guide should replace gentoo's installation handbook, period.

----------

## odi

Thank you. Wonderfull guide. My box is working like never before.!

----------

## Bob P

 :Arrow:  PDF Updated for GCC 3.4.5 and Gentoo 2005.1-r1 installation media.

----------

## sylware

Use "gcc -v -Q" in order to display the enabled optimization flags. Then you can figure out what optimization flags -O123 really does enable.

----------

## slycordinator

 *Bob P wrote:*   

>  PDF Updated for GCC 3.4.5 and Gentoo 2005.1-r1 installation media.

 

The pdf available on your website is the old one.Last edited by slycordinator on Wed Jan 04, 2006 1:39 am; edited 1 time in total

----------

## Bob P

 *slycordinator wrote:*   

>  *Bob P wrote:*    PDF Updated for GCC 3.4.5 and Gentoo 2005.1-r1 installation media. 
> 
> The pdf available on your website is the old one.

 

i've updated the links so that the PDF on the website is the correct one.  thanks for pointing out the error.

i would prefer that people not post direct links to the file, as that's a violation of the site's terms of service.

----------

## Bob P

 *sylware wrote:*   

> Use "gcc -v -Q" in order to display the enabled optimization flags. Then you can figure out what optimization flags -O123 really does enable.

 

unfortunately, that recommendation isn't really all that helpful.  :Confused: 

as you've noticed in nxsty's responses to your inquiry in the CFLAGS Central thread, your recommendation for the use of gcc -v -Q doesn't really provide all the information that is needed to be very useful.    :Crying or Very sad: 

if you really want to understand what optimizations are in effect for x86 processors at each optimization level, your only recourse is to RTFM -- all of the x86 section, not just bits and pieces.

----------

## sylware

 *Bob P wrote:*   

>  *sylware wrote:*   Use "gcc -v -Q" in order to display the enabled optimization flags. Then you can figure out what optimization flags -O123 really does enable. 
> 
> unfortunately, that recommendation isn't really all that helpful. 

 

Yes it is for people who want to check was optimization flags are enabled.

 *Bob P wrote:*   

> 
> 
> as you've noticed in nxsty's responses to your inquiry in the CFLAGS Central thread, your recommendation for the use of gcc -v -Q doesn't really provide all the information that is needed to be very useful.    

 My point was to check which optimizations are on, not the full understanding of the inner working of optimization technics.

 *Bob P wrote:*   

> 
> 
> if you really want to understand what optimizations are in effect for x86 processors at each optimization level, your only recourse is to RTFM -- all of the x86 section, not just bits and pieces.

 Again, that was not my point, you misunderstood.

----------

## tommoyer324

Has anyone ever tried this with a mac?  I have an iBook that I want to put Gentoo on, but was wondering if anyone has heard of doing this installation (or something similar) for a Mac.

----------

## Bob P

question answered in the Support Thread.    :Wink: 

----------

## slycordinator

 *Bob P wrote:*   

>  *slycordinator wrote:*    *Bob P wrote:*    PDF Updated for GCC 3.4.5 and Gentoo 2005.1-r1 installation media. 
> 
> The pdf available on your website is the old one. 
> 
> i've updated the links so that the PDF on the website is the correct one, but because you are providing a direct link to the document i am turning off all document downloads until the link is removed.  please remove the direct link to the file, as it constitutes a prohibited use of the website under the site's terms of service.  i'll turn it back on for everyone as soon as you comply.  thanks.

 

While I think that's a lame move on your part... I complied.

----------

## slycordinator

 *Bob P wrote:*   

> 
> 
> i've updated the links so that the PDF on the website is the correct one

 

I beg to differ...

Repro steps:

1) Go to http://bobp.webhop.org

2) Click on "Stage 1/3 + NPTL Installation Guide" link

3) Click on the PDF link

4) Click on the "Stage 1/3 Install Guide" link

5) Save the PDF named stage13-2005.1.pdf

6) Look at the file's contents and notice no mention of 3.4.5

edit:

And if you removed all document downloads why am I still able to download this? Seems that downloads never got turned off; or you just responded quicker than I imagined would be possible.

----------

## Bob P

whether you consider it lame or not, I do not authorize people to direct link to binary library content on my site without my permission.  ultimately, since i created the content and i own it, i am allowed to dictate how it is distributed.  insofar as this is a gift to the Gentoo community, i think that the Gentoo community should be willing to accept the gift gracefully.   :Wink: 

you may not be aware of it but there is a significant problem for people who host web content related to theft of content and theft of  bandwidth.  graphics images are the content most commonly stolen.  unscrupulous webmasters will steal other people's artwork, incorporating it for display it on their web pages.  in addition to stealing images, some unscrupulous webmasters will go so far as to leave the image on the original site and incorporate an image display link on their web page.  when they do this, the original host has both his artwork AND his bandwidth stolen.  not only is the other webmaster using the owner's art, the other webmaster is using the owner's bandwidth to display it to people who aren't even his customers.  in such a fashion, people effectively steal two things:  other people's artwork, and other people's bandwidth.  and they're stealing for profit.    :Twisted Evil: 

while this is an all too common problem for artwork, it is also a problem for other digital content -- in this case, my PDF.  granted, by posting a remote link here you're not hijacking my document for profit, but posting a remote link to the file effectively prevents me from ever being able to generate any revenue from my work -- if people were to go around posting direct links to the file, nobody would have to visit my site to obtain it.  nobody would see the credits, the support links, or the ads, and nobody would ever have to think about supporting the project.   :Idea: 

i think its important for you to understand the nature of this whole project, so i'm going to spell it out for everyone.  i have spent over 2000 hobby hours working on the Stage 1/3 Guides -- in doing the development work, the testing, the documentation, and in proviidng support.  i don't get paid anything for my time.  i do this as a gift to the Gentoo community.

i have maintained a private server at my expense to host the project.  my server logs show that the Guide has been downloaded by over 100,000 unique users over the past year.  of these 100,000 unique users, a total of FOUR people have made some sort of contribution to support the Stage 1/3 effort.  FOUR people in a YEAR.  that's 4 in 100,000+, or 4.0E-005 users.  that's not even enough to pay for the electricity to run ONE box.  two of those people are Jackass! Team members, so i don't think that its even fair to count them.  as you can see, alot of people take from the project, but virtually NOBODY bothers to give anything back.   :Rolling Eyes:  as you can imagine, lack of support like this doesn't provide much incentive to continue working on the project.

i mistakenly assumed that because i invented such a revolutionary new method of building the toolkit and created a version of Gentoo that was better than the standard distribution by leaps and bounds, people would be willing to support the project with donations.  i was wrong about that.    :Sad:   because everybody loves to use the Stage 1/3 Guide but NOBODY is willing to make a donation to support it, i've had to monetize the website with ads.  i did this in the vain hope that the people who value the Stage 1/3 Guide so much, but are just too cheap to support it, would at least be willing to lift a finger to give support to the project through ad clicks.  i was wrong about that, too.    :Sad: 

less than 1/20 of 1% of Stage 1/3 users are willing to perform a simple ad click to support the site.  that's one in 5.0 E-004 users.  granted, that's 12x as many people as had actually sent in donations, but that kind of support is absolutely abysmal.  i really find it to be an insult that over 100,000 people would use the Guide and proclaim how great it is, yet so few satisfied users would consider lifting a finger to provide a single mouse click in support of the project.  i guess people are just lazy, or that by going through the effort of clicking they'd lose the feeling that they're getting something for nothing -- a feeling that everyone appararently can't bear to lose.   :Evil or Very Mad: 

so how does this relate to direct links?  nobody supports the project with donations, and nobody supports the project with ad clicks.  as this project is already over a year old, i'm losing interest in maintaining it for people who don't seem to appreciate all of the work that it requires on my part.   by posting a remote link to the PDF file, you effectively remove both the only way that people can support the project and the only enticement to continue to support the project that i have.  even though you've probably never considered it, you've cut me off at the knees.  i think THAT is lame.

thanks for taking the time to read this, to understand why direct links aren't approved, and for removing the link.   :Smile:   just for the record, the rapidity of my responses demonstates that i'm working on Gentoo as a full-time job (without pay).   :Wink: 

----------

## slycordinator

I am still unable to download your revised pdf file.

100% of the time I go to your website and am given the old one. I also know it can't be a brower cache problem as I've deleted the cache a couple times and I'm still given the old pdf which mentions using the 2005.1 tarball and gcc 3.4.4 (as opposed to gcc 3.4.5 and 2005.1-r1).

Also, the reason I posted the direct link was simply so that I could help. I figured that perhaps the link I was getting was faulty/old and posting that link would help you fix it. Posting the repro steps like I did "does the job" in getting the point across just in a slower way.

----------

## Bob P

i appreciate your efforts to help.   :Smile: 

the links were correct, but an old version of the file was on the server.  presumably an old version of the file got copied from backup when  the server got rebuilt a couple of days ago.  seems fixed now.  thanks for your help.  have fun.

----------

## dbasetrinity

Hi Bob P.

I went to you website to check out your RockHopper guides and i couldnt seem to find then Documentation. And also sorry to hear about your Google ordeal im thinking i might sign up just so i can see if that happens to myself lol. Like to always test things out.

By the way i was click on a few ads in there. really liked the Oreick XL lol

----------

## viniciusferrao

Bob, can you update the first page with 2005.1-r1 and GCC 3.4.5 guide?

Okay it's in PDF but, I can't see PDFs in Gentoo LiveCD! and I stay totally blinded during installation... so could you put this guide in HTML?

Thanks!

PS: Sry my bad english.

----------

## slycordinator

 *viniciusferrao wrote:*   

> Okay it's in PDF but, I can't see PDFs in Gentoo LiveCD!

 

You'll probably have to print it out.

----------

## viniciusferrao

 *slycordinator wrote:*   

>  *viniciusferrao wrote:*   Okay it's in PDF but, I can't see PDFs in Gentoo LiveCD! 
> 
> You'll probably have to print it out.

 

Ahhh I don't want to print hehehe  :Sad: 

----------

## slycordinator

If you wanted to do another update... glibc-2.3.6-r2 is now ~x86

edit:

Ignore this post; no update is needed. me == stupid

----------

## Bob P

 *viniciusferrao wrote:*   

>  *slycordinator wrote:*    *viniciusferrao wrote:*   Okay it's in PDF but, I can't see PDFs in Gentoo LiveCD! 
> 
> You'll probably have to print it out. 
> 
> Ahhh I don't want to print hehehe 

 

Ahhh, I don't want to rewrite for somebody who's too lazy to print.  hehehe.    :Laughing: 

----------

## slycordinator

Hey bob,

On the front page of this thread you say that CHOST for i586 are not supported yet your new pdf has a section telling the user about changing the CHOST value for i586 boxes. That's section 6.5

And then in section 7.2.1 it gives a make.conf example of building for a pentium-pro which is a 586.

----------

## Bob P

not really.  the guide specifically states that it only supports 686, and that's what is used in the example.  it provides a warning for people who attempt to deviate from the guide and install on a 586 box, and advises them that if they're going to do that, they'd better get the combination of tarball, chost, and march setting right.  no inconsistency.

----------

## greyhats

OY,

A litle story here.

After building my laptop from scrach with 2005.1 & gcc 3.4.4, I decided to upgrade gcc to 3.4.5 following only the part of the installation of the gcc 3.4.5 from the guide 2005.1 & gcc 3.4.5.

Meaning something like this  *Quote:*   

> #emerge glibc binutils libstdc++-v3 gcc portage && emerge -e system && emerge -e system

 

Right after I've decided to go ahead with other program installation, not related with this tread, and got the following error at the first installation

 *Quote:*   

> checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool 

 

I had to re-emerge XML-Parser to fix that.

It might not be related with the guide, but wanted to let you know.

--

----------

## sylware

I got the same issue.

Emerge again all packages from dev-perl you got installed.

----------

## Bob P

First:  This is not the suport thread.  Maybe you overlooked the repeated boldfaced red advisories about that.

Second:  Support is only available to people who are following the Guide without modifying it.  If you are not following the Guide exactly as it is written for its intended purpose, then you are deviating from the Guide and support is not available.  

This Guide covers new installs -- it does not cover GCC Migration.  If you want to do that, then you should read the GCC Migration Guide, as it performs additional steps that you have been skipping.  If you attempt to adapt this Guide to do something other than what it is intended to do, then you should expect that problems may crop-up as a direct result of your having done things improperly.  In cases like that you are responsible for the errors that you generate, and you are responsible for finding your own solutions.  Please don't come here looking for support.

Third:  Problems that you encounter with ebuilds and/or portage dependencies are bugs with the ebuild.  You might want to look at bugzilla.  They are totally unrelated to the Guide.   

Please understand that if you are deviating from the Guide and you run into a problem, your escapades are totally unsupported.  Please try not to take this thread off-topic with totally irrelevant information by discussing your problems here -- doing that only confuses the new users who are attempting to follow the Guide.  New users often don't have the sophistication to recognize irrelevant information that is injected by people who are not following the Guide, and the irrelvant material often confuses them.  This makes understanding the Guide that much harder for everyone else, and supporting it that much harder for me.  

Thanks.

----------

## WTFman

Had to search for this thread after some baselayout changes, wanted to check hdparm settings. Man this thread really should get stickied.

----------

## Bob P

 *WTFman wrote:*   

> Had to search for this thread after some baselayout changes, wanted to check hdparm settings. Man this thread really should get stickied.

 

good idea,    :Idea:  but you're not the first person to say that.    :Confused: 

i can't make the Guide sticky here, but if you'd like to go to a place where the most current version of this Installation Guide *IS* sticky, then >> look here <<.

----------

## Originlabs

Is there a reason users need to register and log in before viewing the support or installation threads at the jackass forums?  A nice feature about the gentoo phpbb forums is they are open to the general public, including the google bot (as the search feature of phpbb needs work).

----------

## thecrazyperson_ws

 *slycordinator wrote:*   

> Hey bob,
> 
> On the front page of this thread you say that CHOST for i586 are not supported yet your new pdf has a section telling the user about changing the CHOST value for i586 boxes. That's section 6.5
> 
> And then in section 7.2.1 it gives a make.conf example of building for a pentium-pro which is a 586.

 

Here is where I must prove you wrong.  The last intel chip to be a 586 was the pentium-mmx.  The PPro was a 686, albeit without MMX extensions.  This is a common mistake for people to make, as they assume the Pentium 2 was the first 686 chip to be released, but it was not.  I used to own a PPro machine, and every test i could run on it, as well as plenty of research, showed it was a 686, but without MMX.

Oh, and Bob, I did a few mouse clicks for ya.

-TcP

----------

## Bob P

 *Originlabs wrote:*   

> Is there a reason users need to register and log in before viewing the support or installation threads at the jackass forums?  A nice feature about the gentoo phpbb forums is they are open to the general public, including the google bot (as the search feature of phpbb needs work).

 

out of respect and appreciation for the Gentoo forums having hosted these threads for so long, I don't want to continue to waste their bandwith on topics that are not related to Gentoo.  if you have a question about the functionality of the brand-new board that has been put up at Jackass! Development Labs, you should ask it there, not here.  out of respect for Gentoo, anyone's specific questions about off-site services may not go unnoticed if you post them here, but they will certainly be left unanswered.

----------

## Originlabs

Please accept my apologies.  My post was not intended as criticism of you, the jackass project or anyone else.  I shall ask questions in the correct place in future.

----------

## Bob P

no apology needed.  :Wink:    just trying to minimize the impact of non-gentoo projects on the gentoo servers.

----------

## brfsa

It tooke me nearly one week to have my girlfriend's laptop done with gentoo installation.

with this guide, plus gnome, kde, openoffice, firefox and tons of apps for internet and multimedia...

and another day to get all the fn keys working on the sony vaio S260. ( i had to modify the code of sonypip )

----------

