Some might find using the minimal a little boring since its none GUI with only links to play with I like something that has Mozilla-firefox and Gaim and Xchat these tend to help if running into problems with the installation. So here are a few i like to use.

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.

Code:

# 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:

4.2 We will be setting hdparm in this step you increase Harddrive Proformance. In this example we're using a WD1200JB. Its possible to get a little better performance out of this Harddrive by issuing a few parameters with hdparm. The following parameters work well with this drive. Here are a few guides on HDparm that might help you decide if those right for your drive:

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

Code:

# fdisk /dev/hda
The number of cylinders for this disk is set to 24321.
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)

My recommendation is that you might want to plan out your partitions out well. I would suggest for debugging purposes to create a seperate /usr /opt /var and possibly a /home and i also like to create a /www partition which i then use to house all my web pages for my LAMP setup.

For Clarity Im going to just 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.

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

6.5 Setting up make.conf
In this example, we're compiling for a Athlon-xp-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 Hightly recommended that you do not add them to /etc/make.conf until after you have Finished emerge -e system. Adding USE-flags before then Can make Compiling the system a Challenge.

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.

Code:

# mkdir /var/log/portage
# mkdir /usr/local/portage

6.6.2 Package Keywords - Enabling GCC 4.0.3 in the Stable Branch

GCC 4.0.3 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 4.0.3 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.

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 step will surely make you think WOW because this step takes awhile to complete. Good time for a nice afternoon nap. Time to compile that toolchain!.

7.2 Re-Building the Toolkit: GCC 4.0.3

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.4.4 and a toolchain built with GCC 3.4.4 to compile GCC 4.0.3. Before we spend any more time building our Gentoo system we should rebuild the entire toolchain, re-compiling it so that we have GCC 4.0.3 that was built with GCC 4.0.3.

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 4.0.3. After making necessary updates to /etc/make.conf we need to rebuild the toolkit using the new GCC 4.0.3 compiler. The result will be a 4.0.3 tooklit, compiled by a 4.0.3 toolkit that was built with a 3.4.4 toolkit.

7.2.1 Updating make.conf

Here are some settings for /etc/make.conf that may be worth considering. They include extreme levels of code optimization, and some very safe and stable performance-enhancing CFLAGS. Depending upon your individual hardware, you may have to simplify some of the CFLAGS settings.

The Default 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 4.0.3, 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 4.0.3 has already been emerged, GCC 3.4.4 is still installed also so were going to remove GCC3.4.4 since we no longer need it.

Change the default compiler to gcc 4.0.3 by issuing the following command. Warning make sure that the correct Compiler option is selected numbers may change.

Code:

# gcc-config 6

7.2.3 Updating the System Environment

An additional command updates our system environment:

Code:

# 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 4.0.3 compiling toolkit (which had previously been compiled with GCC 3.4.4) with the GCC 4.0.3 compiler, taking advantage of our new USE flags and CFLAGS compiler settings.

Code:

# 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 4.0.3 and our hardware-specific settings.

The result will be a 4.0.3 toolkit and an entire system that is built with a 4.0.3 toolkit..

Code:

# emerge -e system && emerge -e system

7.2.5 Prune the GCC Compiler

Now that GCC 4.0.3 has been installed as the default compiler and our system has been rebuilt, we can prune GCC 3.4.4 from our system by issuing the following commands. First, verify that GCC 4.0.3 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 4.0.3 has been installed as the default compiler, prune GCC 3.4.4 from your system.

Code:

# gcc-config -l
# 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 2G 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 Keep this setting at: ccache_size="2G".) If you dont need or want this you can #ccache_size="2G" or just reduce it to ccache_size="512M" in the /etc/make.conf.

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:

Code:

# 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-Sources kernel. Note that a 2.4 kernel will not work properly with this Installation Guide.

9.3 Now we are going to emerge our kernel source....What ever kernel you decide to go with 2.6 stable just make sure to use gentoo-SOURCES.....

Code:

# emerge gentoo-sources

9.4 Building the Kernel Symlink

This is only needed if you already have a previous kernel installed and you want to point the symlink to the new kernel.

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

Code:

# nano -w /etc/conf.d/rc

RC_NET_STRICT_CHECKING="no"
RC_DEVICES="udev"
RC_DEVICE_TARBALL="no"

9.5.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:

Code:

# cd /usr/src/linux
# make menuconfig

9.5.4 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:

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 "MATRIXr" as the hostname in this example.

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.

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:

If you cant remember what kernel image you have this is what i do alot since i tend to forget when i get to grub.conf.

Code:

# ls /boot

And i look for this: vmlinuz-2.6.14-hardened-r1 or similar this is what you would add to your Grub.conf

# Which listing to boot as default. 0 is the first, 1 the second etc.
default 0
# How many seconds to wait before the default listing is booted.
timeout 30
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed

# The next four lines are only if you dualboot with a Windows system.
# In this case, Windows is hosted on /dev/hda6.
title=Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1

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.

Code:

# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

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.

# 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:

Code:

# nano -w /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.

Code:

# 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. .

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:

The groups the user is member of define what activities the user can perform. The following table lists a number of important groups you might wish to use:

Code:

Group Description
audio = be able to access the audio devices
cdrom = be able to directly access optical devices
floppy = be able to directly access floppy devices
games = be able to play games
portage = be able to use emerge --pretend as a normal user
usb = be able to access USB devices
video = be able to access video capturing hardware and doing hardware acceleration
wheel = be able to use su

For instance, to create a user called gentooian who is member of the wheel, users and audio groups, log in as root first (only root can create users) and run useradd:

then after all that is said and done....I move on to finishing my install with

Code:

# emerge kdebase mozilla-firefox gyach

After those emerge then you can setup xorg

Code:

# xorgconfig

Of course some might prefer to boot into their installation before emerging fun stuff like that: Either way after the emerge you would.

10.10 Exiting Chroot and Unmounting Partitions

We will now exit the chrooted environment and unmount all of the mounted partitions.

Code:

# exit
# cd ~/
# umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo

# swapoff /dev/hda2

11. REBOOT!

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

Code:

# shutdown -r now

Congradulations! You have completed the installation. We are in the process of creating other guides that will go along with this Setup That will increase the security Level of this install. Links to these guide will be added as they are completed...
JADED GuidesJaded Guide Ver 1.0Jaded Guide ver 2.0Jaded Guide ver 3_________________Jaded Team LeaderDbasetrinityMem Id #1002Jaded Guide V2.0