• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Gentoo the {PMS}fishy way. Like it or else!

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

{PMS}fishy

Senior Member
Joined
Dec 20, 2001
Disclaimer. Pardon all the spelling mitakes. Ill try to emerge my spell checker, untill then just deal. Here is the best I can do. Ill add an X config guide and some other hard to deal with situations, but this is all that I can deal with for this sitting. I hope it helps. If not, PM me and tell me how much I suck. If you like it, thats good too.

{PMS}fishy's Almost Perfect Idiots Guide to a 50% Working Gentoo Install.

AKA how to get to a text Gentoo OS with the least trouble.

I prefer to use Knoppix to install the Gentoo. For some reason every minimal live CD I have burned or borrowed or tried has been borked in some way.Knoppix is an easy way to install the Gentoo, and still have a desktop to read the guide on, if this is your only computer, or play tux racer to kill some time.

So the obvious to most, but not so obvious to some, would be to get the Knoppix CD into the CDrom, and boot the computer into Knoppix. So once you have gotten that far, let the fun begin. Here are the steps in the order that I do them.

sudo passwd (enter new password for knoppix)

mkdir /mnt/gentoo

fdisk /dev/hda (this is assuming that you are running the hdd that you want to install the Gentoo on as a master drive on the primary IDE chanell. If that is not the case adjust accordingly.)

fdisk Commands: M to print the help menu
N for a new partition
D to Delete a partion
W to write and save the partition table
A to toggle a bootable flag
T to change the partion type
X to exit

That should be all that you need to install the Gentoo, but again you can see all the needed info with the "M" command.

So here is the quick run down on how to make the most basic partion table needed. Adjust to your liking.

Make Boot.

n for new, p for primary, 1 for partion number, enter for default size, +32M to make a 32Mb partion,then "a" and 1 to make bootable. (follow these steps again to create /root and /swap make sure to change the type of filesystem for swap to linux swap, using "t" and the hex code 82)

Make sure to print the partion and check it over one last time, and then write (no turning back at this point). You can then exit and continue on with making the file systems.

I use ext3 on my /boot and reiserfs on my /root. To create a file system on the new partions issue one of the following commands. Here is what I did.


mkresiferfs dev/hda3

mke2fs -j /dev/hda1


This is what my partion table looks like. Fell free to use it as a guide for yourself.

Code:
	Disk /dev/hda: 60.0 GB, 60040544256 bytes
255 heads, 63 sectors/track, 7299 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1           5       40131   83  Linux
/dev/hda2               6          68      506047+  82  Linux swap
/dev/hda3              69        3187    25053367+  83  Linux
/dev/hda4            3188        7299    33029640    7  HPFS/NTFS

Next you are going to want to create the swap partion.

mkswap /dev/hda2

Then activate the swap partion

swapon /dev/hda2

From that point there are a few things that need to be mounted.

mount /dev/hda1 /mnt/gentoo

and creating the boot path..............

mkdir /mnt/gentoo/boot

and mounting boot............

mount /dev/hda1 /mnt/gentoo/boot




Now that everything is mounted, its time to download the stage tarball.(these instructions are for a stage 1)

first make sure to check/set the date with the date command

#date (if not correct set like example, date mmddhhmmyyyy)
date 082412452004 (sets date/time to august 24th at 12:45pm 2004)

Now you need to download the stage tarball. There is no links for knoppix atleast not for the version that I had (3.4) so you are going to need to use knoppix to download it to the ram disk (I saved on the destop and moved to the /mnt/gentoo/ mount point) and move it where it needs to go. So fire up Konqueror and head to http://www.gentoo.org/main/en/mirrors.xml and go and find that stage1 tarball. Save it to the desktop and then move it to the gentoo moint point like this.

Code:
cd /Desktop
mv stage* /mnt/gentoo/

Now unpack that badboy.

tar -xvjpf stage*

Hopefully there are no errors at this point, and we can continue. If you get some weird tar errors try to download the tar from a different mirror and try to unpack it again.




Once the tarball of the stage has been unpacked and set up we can really get into the start of the real Gentoo install and start tweaking some things and getting stuff optomized and set up. Then next step is going to be setting up the compile/build options in the make.conf.

nano -w /etc/make.conf

This is where we set optomizations for the build of the Gentoo base systems and all the other packages. Here is what mine looks like for a P4, your will vary depending on CPU and necessity. Check the make.conf.example for details.

Code:
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O2 -mcpu=pentium4 -march=pentium4 -pipe -ffast-math -fstack-protector -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="nogcj -java -nls -gnome -gtk kde qt alsa mmx sse sse2"
#GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo [url]ftp://ftp.ndlug.nd.edu/pub/gentoo/[/url] [url]http://gentoo.ccccom.com[/url] ftp://gentoo.ccccom.com"
ALSA_CARDS="EMU10k1"

Next we are going to mount the /proc

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

Failry easy step, and then continue on with chrooting into the install and picking up on some things that we missed from eairler steps.

Code:
# chroot /mnt/gentoo /bin/bash
# env-update
 * Caching service dependencies...
# source /etc/profile

Now we are into the actuall Gentoo install that we have created, we have some new tools at our disposal such as protage and can emerge somthings that are required that we have had to hold off on for now.So with that said lets emerge some appliactions.

First emerge sync to get the most up-to-date packages availabe.

Code:
# emerge sync

Once that has completed we need to emerge mirrorselect to get the fastest mirror for out geographic loaction, this setting will vary from loaction to loaction.

first emerge mirrorselect and then issue this command to select the fastest mirror(s)

Code:
# mirrorselect -a -s4 -o | grep 'GENTOO_MIRRORS=' >> /mnt/gentoo/etc/make.conf

Once that is complete we can fetch the sources for the bootstrap and then bootstrap and emerge-system and then we are on to the final steps.

Code:
# cd /usr/portage
#scripts/bootstrap -f
#scripts/bootsrap.sh

Better get out a cold one, this is going to take some time. For my stock P4 3.0c with a 1gb of RAM it took me over an hour, so go relax, you computer is slower than mine ;)

Once the bootstrap is done we can emerge system like so

Code:
emerge --fetchonly system
emerge system

Can you smell it? We are almost done. Almost.........

Operation Kernel Configuration. The dirty work.

First check and set the timezone info.
ls /usr/share/zoneinfo
ln -sf /usr/share/zoneinfo/EST /etc/localtime (for eastern standard time)

Then its time to get the kernel. I like to go for the newest and freshest option out there, so for us that will be a 2.6.x (if you want a 2.4.x (why?) emerge vanilla-sources) emerge gentoo-dev-sources and that will fetch and compile the latestest and greatest kernel out.

Now that the kernel is downloaded and installed, its time for the fun part, kernel configuration. It can be hard, but read the menus and take your time. (learn to love makemenu config, it will become your best gentoo friend)

Code:
# cd /usr/src/linux
# make menuconfig

There are some required options, such as; (Stolen from the Gentoo guide)

Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers

(With a 2.4.x kernel)
File systems --->
[*] Virtual memory file system support (former shm fs)
[*] /proc file system support
[*] /dev file system support (EXPERIMENTAL)
[*] Automatically mount at boot
[ ] /dev/pts file system for Unix98 PTYs

(With a 2.6.x kernel)
File systems --->
Pseudo Filesystems --->
[*] /proc file system support
[*] /dev file system support (OBSOLETE)
[*] Automatically mount at boot
[*] Virtual memory file system support (former shm fs)

Now to install the 2.6.x kernel (2.4 instructions can be found here: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7)

Code:
# make && make modules_install
# cp arch/i386/boot/bzImage /boot/kernel-2.6.x-nameme
# cp System.map /boot/System.map-2.6.x-nameme

Here are some kernel modules that are important to some people, but not needed for my system (also stolen from the Gentoo handbook)

nvidia-kernel Accelerated NVIDIA graphics for xorg-x11 emerge nvidia-kernel
nforce-net On-board ethernet controller on NVIDIA NForce(2) motherboards emerge nforce-net
nforce-audio On-board audio on NVIDIA NForce(2) motherboards emerge nforce-audio
e100 Intel e100 Fast Ethernet Adapters emerge e100
e1000 Intel e1000 Gigabit Ethernet Adapters emerge e1000
emu10k1 Creative Sound Blaster Live!/Audigy support emerge emu10k1
ati-drivers Accelerated ATI Radeon 8500+/FireGL graphics for xorg-x11 emerge ati-drivers
ati-drivers-extra Graphical ATI tools emerge ati-drivers-extra

Don't forget to add the needed modules to the autoload config

find it here nano -w /etc/modules.autoload.d/kernel-2.6

Then run modules-update and move on with the configuration of the rest of the system. Take a deep breath we are almost 50% done.

Set the hostname

Code:
# echo hostnamegoeshere > /etc/hostname

Configure the netowork. I have mine set-up for DHCP as I would assume most of you would as well. Here it is.

Code:
# nano -w /etc/conf.d/net

Here is my config.

Code:
  GNU nano 1.3.2                File: /etc/conf.d/net

# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="dhcp"
#dhcpcd_eth0="..."

# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"

Yawn. Borred yet? I am. Add eth0 to defualt run levels, so it starts on boot.

Code:
rc-update add net.eth0 defualt

I can see the light at the end of the tunnel. We are almost to the text based Gentoo install. There are a few system tools that NEED to be installed for the Gentoo to work right.

System Logger

Code:
emerge metalog
rc-update add metalog default

Cron Dameon

Code:
emerge vixie-cron
rc-update add vixie-cron defualt

File System Tools IMPORTANT FOR REISER FILE SYETEMS. DO NOT SKIP!!!!!!

Code:
emerge reiserfsprogs
emerge xfsprogs

Now GRUB. I can see the end, I can smell the ph33r.

Code:
emerge grub
nano -w /boot/grub/grub.conf

Set up your grub so it works. Here is mine for comparison purpose only.

Code:
  GNU nano 1.3.2                   File: grub.conf

timeout 5
default 0
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2004.2 (linux 2.6.8 Sound)
root (hd0,0)
kernel /kernel-2.6.8-sound root=/dev/hda3

title=Gentoo Linux 2004.2 (linux 2.6.8)
root (hd0,0)
kernel /kernel-2.6.8-gentoo root=/dev/hda3

title=Gentoo Linux 2004.2 (linux2.6.8-nolan)
root (hd0,0)
kernel /kernel-2.6.8-gentoo-lan-old root=/dev/hda3

title=Gentoo Linux 2004.2 (Try this fuc***)
root (hd0,0)
kernel /kernel-2.6.8-nousb-8k root=/dev/hda3

You can see that I have numerous kernels, becuase I cannot config them right the first time, if you can more power to you, but Id like to bet that your grub.conf looks worse than mine.

THATS IT. CROSS YOUR FINGERS. REBOOT. HOLD ONTO YOUR UNDERWARE. HOPE IT WORKS.

You should be able to boot to a command prompt GENTOO install if you followed this crappy guide to the letter. From there you are going to want to emerge your window manager of choice and continue to bang your head against the wall.

I hope this helps. If not, then too bad. I tired, what more can you ask for from me?

Try forums.gentoo.org if you egt really jammed up, and IM me if need be Im around at dark.

G3Nt00 r0x0rs your b0x0r5! (sorry I had too.)
 
Last edited:
SickBoy said:
so, no offernse, but explain to me what's here that isn't in the install guide.....

Its the alt. install merged with the guide, and a few of the tricks that helped me through it also. Such as needing to emerge mirrorselect before you can use it, with knoppix, and various other small things that can hang up a first timer.

If its not helpful, then so be it.

However if it helps one person it was worth it.
 
some hints to add if emerge mirrorselect fails, dont worry just continue on the default values are good enough. I just went through it (still installing) and it works fine. Nice post, using it to install gentoo as we speak. Just finished following that guide, nice, gonna reboot after I emerge gnome.
 
Last edited:
I'm prepared to take the plunge... I'll let you know what happens when I 'emerge' from the darkness. (Sorry for the horrible pun, lol!)
 
Aren't -mcpu=Pentium4 and -march=Pentium4 conflicting commands to use in the USE statement?

The first tells your compiler to make the programs compatible with P4 and everything below while the second tells the compiler to make them only compatible with P4.

Or did I misunderstand something in the documentation on the USE flag?

DWolf:cool:

PS: Still a nice clean concise guide though :thup:
 
Old thread, but what does "source /etc/profile" do?
It reminded me to emerge vixie-cron since I have had Gentoo installed for almost a week without it.
I also noticed that you have "nano -w /etc/make.conf" before you are chrooted into the Gentoo root, so you would be editing a Knoppix make.conf, unless you did "nano -w /mnt/gentoo/etc/make.conf". Or I might have just missed something.
 
Gonna try that tomorrow. Been having at a gentoo install every night for close to a week now, and it's been kicking my arse. Good thing about doing it over and over again is that I can get all the way through till just after "emerge system" with my eyes closed. :D It's all good though. Haven't had this much fun with a computer in ages (aside from gaming).
 
very nice guide, Fishy. Im sure it will help many people along, as for some the documentation is obscure to find (if they dont look that much), and its also so damned long. Nice work.
 
Great guide! Should help some people suffering with Gentoo installs. Just one thing, since you make /dev/hda2 swap a few lines later you don't need this command

Code:
mke2fs -j /dev/hda2

Having it won't do any harm, just waste a few seconds formating it into a filesystem it will loose when you make it swap.
 
DreamingWolf said:
Aren't -mcpu=Pentium4 and -march=Pentium4 conflicting commands to use in the USE statement?

The first tells your compiler to make the programs compatible with P4 and everything below while the second tells the compiler to make them only compatible with P4.

Or did I misunderstand something in the documentation on the USE flag?

DWolf:cool:

PS: Still a nice clean concise guide though :thup:
I guess it's probably a little late to get your answer, but here goes anyway. First, they go in your CFLAGS, not in your use flags. They are compatible. -march implies -mcpu (which, by the way is now depreciated in favor of -mtune).
 
Flamed_Chip said:
Great guide! Should help some people suffering with Gentoo installs. Just one thing, since you make /dev/hda2 swap a few lines later you don't need this command

Code:
mke2fs -j /dev/hda2

Having it won't do any harm, just waste a few seconds formating it into a filesystem it will loose when you make it swap.

Just noticed that screw up, and fixed the guide.

I thought that no one cared about this post anymore.

Glad it can help somepeople, maybe Ill update it with some fancy features too, for people that want the extra speed.
 
Was the mistake that I noticed not a mistake and supposed to be that way, or did you miss my post? Nice guide, but I didn't see it when I installed Gentoo (since it is an old thread). BTW, my grub.conf is probably cleaner than that, if only in a couple ways. :)
 
Back