posted by Dave Scott on Mon 17th Mar 2003 17:36 UTC

"Gentoo vs. the n00b 2, Part III"

Once this completes, you will have a system equivalent to a Stage 3. Now we will update the Portage tree, and update all installed packages.

emerge sync
emerge -up world
emerge -u world

First we update the tree, then we pretend to merge the packages (the -u flag specifies we want to update installed packages). Then we merge the packages.

Now, if you decided to use the GRP packages, we will install these. First, we need to enter the GRP directory and then use the grp-install shell script to install the packages:

cd /GRP
sh grp-install.sh package-list.txt

Replace "package-list.txt" with package you want to install. You can also specify multiple packages on the same line seperated by a space. Make sure that you are in the /GRP directory on your hard drive. The first time I did this, I did not mount the CD's packages directory at /GRP and I tried to run the grp-install.sh script from the CD. Needless to say, this doesn't work.

Now we need to set the time zone for the system. Browse to /usr/share/zoneinfo and find the timezone file for your locale. Use the command

pwd

to print the current working directory so you have the full path available to look at so you don't have to remember it. Then make a symbolic link to the timezone file by executing this command:

ln -sf /usr/share/zoneinfo/path/to/file /etc/localtime

Next up, we will install our system kernel. I recommend using the gentoo-sources kernel as it has some desirable features already enabled by default. Read the first part of Section 17 in the installation guide carefully. It is full of useful information about things you will need to enable if you have certain hardware. Make doubly sure that you enable the module for your network card to be installed as a module in the kernel configuration. I forgot this and was without networking on my first reboot. So the first thing I did on my new Gentoo system was recompile the kernel. Also, make sure you go through every menu in the kernel configuration and look at every option, because if you skip over something you have, you won't be able to just modprobe it to load it, because it wasn't compiled in the first place. The next part of section 17 covers installing a system logger daemon and is pretty self-explanatory, so I will not cover this here. Section 18 of the installation guide is purely optional and only necessary if you have used any of these filesystems or have any of these devices.

Now we need to edit the /etc/fstab file to tell the system where /, /boot, /swap, and /mnt/cdrom are to be mounted from. The installation guide covers this well and the file itself is well commented.

Now we perform some necessary pre-reboot configuration for our system. Set the root password using the

passwd

command, set your hostname, if you know it, by editing the /etc/hostname file, and set the /etc/hosts file up with your IP, domain, and machine name.

Next, we have some final network configuration to do. Edit the /etc/modules.autoload file to load any modules you need automatically, especially your network card. In my case, I have "tulip" in the modules.autload because this is the module my NIC card uses. Now, edit the /etc/conf.d/net file to make sure that your network card will be properly configured on boot. This file is also well commented and needs no other explanation. After that we need to make sure that our network card is brought up on boot, so we execute

rc-update add net.eth0 default

This will add the eth0 interface to the default runlevel.

Now we configure some basic system settings by editing the rc.conf file

nano -w /etc/rc.conf

Follow the instructions in the file to set up the various variables, most importantly, the CLOCK and KEYMAP settings.

Section 25 deals with installing and configuring a bootloader. I feel that the installation guide does a top notch job of this. I decided to go with grub, so I followed the first section. If you choose grub, be careful with the numbering scheme grub uses for your partitions. The way I remember is whatever linux calls it, just subtract one. For example, my /boot partition is on /dev/hda6, so in grub, this would translate to (0,5) - first disk, partition six. grub counts from zero.

Next, we create bootdisks for our system, and again the installation guide covers this well, so I won't go into this.

And finally, we are ready to reboot our system and get Gentoo-ing. Follow the code in Listing 27.1 to update any etc configuration files that need updating, exit the chrooted shell, unmount the filesystems, and reboot.

Upon reboot, you should have a lovely boot loader to load up Gentoo.

I hope this guide has given you some n00b insight into what goes on during the Gentoo install.

As Dustin stated in his Newbie review, this is not a distribution for the light-headed. This distro will take a lot of time and effort on your part, with the reward being a system that is totally optimized for your box.

Having been running Gentoo for a couple of weeks now myself, I love it. Portage is probably the best package manager of any that I have been exposed to (rpm, apt, etc.). It handles dependencies great, and is simply easy to use.

If you've ever wondered what goes on behind the scenes in your Linux distro, Gentoo will give you a hands on tutorial :).

About the Author:
Dave Scott is a 21-year-old student majoring in IT-Multimedia/Broadcast Graphics at ITT Technical Institute in Indianapolis. He is employed full-time as an engineer designing fire suppression systems. Dave's first exposure to Linux was a Knoppix CD in an Operating Systems class at school, and he's been hooked ever since, having run at various points over the last four months: Slackware, Mandrake, Debian, Gentoo, and Arch Linux.

Table of contents
  1. "Gentoo vs. the n00b 2, Part I"
  2. "Gentoo vs. the n00b 2, Part II"
  3. "Gentoo vs. the n00b 2, Part III"
e p (0)    36 Comment(s)

Technology White Papers

See More