Gentoo Linux 1.4_rc2 and 1.4_rc3 Installation Instructions Contents: [1. About the Install................................................. .................] 1.About the Install This new boot CD will boot from nearly any modern IDE CD-ROM drive, as well as many SCSI CD-ROM, assuming that your CD-ROM and BIOS both support booting. Included on the CD-ROM is Linux support for IDE (and PCI IDE) (built-in to the kernel) as well as support for all SCSI devices (available as modules.) In addition, we provide modules for literally every kind of network card that Linux supports, as well as tools to allow you to configure your network and establish outbound (as well as inbound) ssh connections and download files. To install from the build CD, you will need to have a 486+ processor and ideally at least 64 Megabytes of RAM. (Gentoo Linux has been successfully built with 64MB of RAM + 64MB of swap space, but the build process is awfully slow under those conditions.) Gentoo Linux can be installed using one of three "stage" tarball files. The one you choose depends on how much of the system you want to compile yourself. The stage1 tarball is used when one wants to bootstrap and build the entire system from scratch. The stage2 tarball is used for building the entire system from scratch, except for the bootstrap part which is already performed for you. And the stage3 tarball already contains a basic Gentoo Linux system that has been optimized for your system. So, how does one begin the install process? First, you'll want to decide which one of our LiveCD ISO images to grab from [3]http://www.ibiblio.org/gentoo/releases/1.4_rc2/x86/. In this directory, you'll see several subdirectories such as athlon for each of our various architecture-specific builds. Here's a low-down on each arch directory and what it contains: Architecture Description x86 Stage 1 tarballs and "gentoo-basic" liveCD -- will work on anything. i586 Stage 2 and 3 tarballs, GRP packages and liveCD for i586+ CPUs i686 Stage 2 and 3 tarballs, GRP packages and liveCD for i686+ CPUs athlon Stage 2 and 3 tarballs, GRP packages and liveCD for AMD Athlon CPUs athlon-xp Stage 2 and 3 tarballs, GRP packages and liveCD for AMD Athlon XP CPUs athlon-mp Stage 2 and 3 tarballs, GRP packages and liveCD for AMD Athlon MP CPUs pentium3 Stage 2 and 3 tarballs, GRP packages and liveCD for Intel Pentium III and Pentium 4 CPUs Inside each of these directories, you'll find a livecd/ directory that contains LiveCDs. While these LiveCDs will boot on any architecture, the install-related tarballs are optimized for a particular CPU type and will not work on all systems, except for the "gentoo-basic" LiveCD in the x86 directory which can be used to install on anything. The LiveCDs are full CD images that should be burned to a CDR or CD-RW using CD burning software. Currently, we have two types of LiveCDs. The first carries the "gentoo-basic" label, and is approximately 40MB in size and lives in the x86/livecd/ directory. This LiveCD is of minimal size to allow for a initial quick download and contains a stage1 tarball that can be found in /mnt/cdrom/gentoo/ after the CD has booted. The second flavor of LiveCD we currently offer is labelled "livecd-grp." These CDs (found in their respective arch/livecd directories) contain stage1, 2 and 3 tarballs, and also contain a set of GRP packages optimized for a specific architecture. GRP is simply precompiled packages for very large applications, such as XFree86. KDE, GNOME, OpenOffice, etc. Using these LiveCDs, it will be possible for you to install a fully-functional Gentoo Linux system very quickly. The downside is that these ISO images are large -- around 600MB -- so they can take a while to download. If for some reason your install gets interrupted at some point, you can reboot and restart. For example, if you have partitioned, installed the stageX tarball, and are ready to chroot, you can restart the install if necessary. Just re-boot with the LiveCD, then mount your drives/partitions to /mnt as normal. Basically, you can do this at about any point during the install, just not before partitioning for obvious reasons. Warning: If you encounter a problem with any part of the install and wish to report it as a bug, report it to [4]http://bugs.gentoo.org. If the bug needs to be moved upstream to the package maintainers (ie KDE) the developers will take care of that. Now, let's quickly review the install process. First, we'll download, burn and boot a LiveCD. After getting a root prompt, we'll create partitions, create our filesystems, and extract either a stage1, stage2 or stage3 tarball. If we are using a stage1 or stage2 tarball, we will take the appropriate steps to get our systems to stage3. Once our systems are at stage3, we can configure them (tweaking config files, installing a bootloader, etc) and boot them and have a fully-functional Gentoo Linux system. Depending on what stage of the build process you're starting from, here's what's required for installation: stage tarball requirements for installation 1 partition/filesystem setup, emerge sync, bootstrap, emerge system, emerge linux sources, final configuration 2 partition/filesystem setup, emerge sync, emerge system, emerge linux sources, final configuration 3 partition/filesystem setup, emerge sync, final configuration 2.Booting Start by booting the LiveCD. If detected properly, you should see a fancy boot screen with the Gentoo Linux logo on it. At this screen, you can hit Enter to begin the boot process, hit F2 for help, or pass kernel boot options by typing gentoo opt1 opt2, etc. Once you hit Enter, you'll be greeted with a lot of text output followed by the normal Gentoo Linux boot sequence. You will be automatically logged in as "root" and the root password will be set to a random string for security purposes. You should have a root ("#") prompt on the current console, and can also open new root consoles by pressing Alt-F2, Alt-F3 and Alt-F4. Get back to the one you started on by pressing (you guessed it) Alt-F1. You've probably also noticed that above your # prompt is a bunch of help text explaining how to do things like configure your network devices and where you can find the Gentoo Linux stage tarballs and packages on your CD. 3.Load Kernel Modules If the PCI autodetection missed some of your hardware, you will have to load the appropriate modules manually. To view a list of all available network card modules, type ls /lib/modules/*/kernel/drivers/net/*. To load a particular module, type: Code listing 3.1: PCI Modules Configuration # modprobe pcnet32 (replace pcnet32 with your NIC module) Now, if you want to be able to access any SCSI hardware that wasn't detected during the initial boot autodetection process, you'll need to load the appropriate modules from /lib/modules, again using modprobe: Code listing 3.2: Loading SCSI Modules # modprobe aic7xxx # modprobe sd_mod aic7xxx supports your SCSI controller and sd_mod supports SCSI hard disks. Note: Support for a SCSI CD-ROMs and disks are built-in in the kernel. If you are using hardware RAID, you'll need to load the ATA-RAID modules for your RAID controller. Code listing 3.3: Loading RAID Modules # modprobe ataraid # modprobe pdcraid (Promise Raid Controller) # modprobe hptraid (Highpoint Raid Controller) The Gentoo LiveCD should have enabled DMA on your disks, but if it did not, hdparm can be used to set DMA on your drives. Code listing 3.4: Setting DMA Replace hdX with your disk device. # hdparm -d 1 /dev/hdX Enables DMA # hdparm -d1 -A1 -m16 -u1 -a64 /dev/hdX Enables DMA and other safe performance- enhancing options # hdparm -X66 /dev/hdX Force-enables Ultra-DMA -- dangerous -- may cause some d rives to mess up 4.Loading PCMCIA Kernel Modules If you have a PCMCIA network card, you will need to do some additional trickery. Warning: To avoid problems with cardmgr, you must run it before you enter the chroot portion of the install. Code listing 4.1: Loading PCMCIA Modules # modprobe pcmcia_core # modprobe i82365 # modprobe ds # cardmgr -f As cardmgr detects which hardware is present, your speaker should emit a few reassuring beeps, and your PCMCIA network card should hum to life. You can of course insert the PCMCIA card after loading cardmgr too, if that's preferable. (Technically, you need not run cardmgr if you know exactly which module your PCMCIA card requires. But if you don't, loading all PCMCIA modules and see which sticks won't work, as all PCMCIA modules load obligingly and hang around for a PCMCIA card to drop by. cardmgr will also unload the module(s) for any card when you remove it). 5.Configuring Networking PPPoE configuration Assuming you need PPPoE to connect to the internet, the livecd (any version) has made things easy for you by including rp-pppoe. Use the provided adsl-setup script to configure your connection. You will be prompted for the ethernet device that is connected to your adsl modem, your username and password, the IPs of your DNS servers, and if you need a basic firewall or not. Code listing 5.1: Configuring PPPoE # adsl-setup # adsl-start If something goes wrong, double-check that you correctly typed your username and password by looking at /etc/ppp/pap-secrets or /etc/ppp/chap-secrets, and make sure you are using the right ethernet device. Automatic Network Configuration The Gentoo Linux install lets you configure a working network, allowing you to use ssh, scp, lynx, irssi or wget as needed before even beginning the installation process. Even if you don't need to do these things now, you should go ahead and set up networking now. Once networking is up, Portage will be able to use your configured network once you are inside the chroot environment (required for installing Gentoo Linux). The simplest way to set up networking is to run our new net-setup script. Code listing 5.2: Net-Setup Script # net-setup eth0 Of course, if you prefer, you may still set up networking manually. Manual DHCP Configuration Network configuration is simple with DHCP; If your ISP is not using DHCP, skip down to the static configuration section below. Code listing 5.3: Network configuration with DHCP # dhcpcd eth0 Note: Some ISPs require you to provide a hostname. To do that, add a -h myhostname flag to the dhcpcd command line above. If you receive dhcpConfig warnings, don't panic; the errors are most likely cosmetic. Skip down to Network testing below. Manual Static Configuration We need to setup just enough networking so that we can download sources for the system build, as well as the required localhost interface. Type in the following commands, replacing $IFACE with your network interface (typically eth0), $IPNUM with your IP address, $BCAST with your broadcast address, and $NMASK with your network mask. For the route command, replace $GTWAY with your default gateway. Code listing 5.4: Static IP Network Configuration # ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK # /sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1 Now it's time to create the /etc/resolv.conf file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work. Here's a template to follow for creating your /etc/resolv.conf file: Code listing 5.5: /etc/resolv.conf template domain mydomain.com nameserver 10.0.0.1 nameserver 10.0.0.2 Replace 10.0.0.1 and 10.0.0.2 with the IP addresses of your primary and secondary DNS servers respectively. Proxy Configuration If you are behind a proxy, it is necessary to configure your proxy before you continue. We will export some variables to set up the proxy accordingly. Code listing 5.6: Setting a Proxy # export http_proxy="machine.company.com:1234" # export ftp_proxy="$http_proxy" # export RSYNC_PROXY="$http_proxy" Network Testing Now that your network has been configured, the /sbin/ifconfig -a command should show that your network card is working (look for UP and RUNNING in the output). Code listing 5.7: /sbin/ifconfig for a working network card eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::50:ba8f:617a/10 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0 TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0 collisions:1984 txqueuelen:100 RX bytes:485691215 (463.1 Mb) TX bytes:123951388 (118.2 Mb) Interrupt:11 You may want to also try pinging your ISP's DNS server (found in /etc/resolv.conf), and a website of choice, just to make sure that your packets are reaching the net, DNS name resolution is working correctly, etc. Code listing 5.8: Further Network Testing # ping www.some_website.com Networking is go! Networking should now be configured and useable. You should be able to use the included ssh, scp, lynx, irssi and wget commands to connect to other machines on your LAN or the Internet. 6.Partition Configuration Now that the kernel can see the network card and disk controllers, it's time to set up disk partitions for Gentoo Linux. Here's a quick overview of the standard Gentoo Linux partition layout. We're going to create at least three partitions: a swap partition, a root partition (to hold the bulk of Gentoo Linux), and a special boot partition. The boot partition is designed to hold the GRUB or LILO boot loader information as well as your Linux kernel(s). The boot partition gives us a safe place to store everything related to booting Linux. During normal day-to-day Gentoo Linux use, your boot partition should remain unmounted. This prevents your kernel from being made unavailable to GRUB (due to filesystem corruption) in the event of a system crash, preventing the chicken-and-egg problem where GRUB can't read your kernel (since your filesystem isn't consistent) but you can't bring your filesystem back to a consistent state (since you can't boot!) Now, on to filesystem types. Right now, you have five filesystem options: XFS, ext2, ext3 (journaling), jfs, and ReiserFS. ext2 is the tried and true Linux filesystem but doesn't have metadata journaling. ext3 is the new version of ext2 with both metadata journaling and ordered data writes, effectively providing data journaling as well. ReiserFS is a B*-tree based filesystem that has very good small file performance, and greatly outperforms both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is finally rock-solid and highly recommended. XFS is a filesystem with metadata journaling that is fully supported under Gentoo Linux's xfs-sources kernel, but is generally not recommended due to its tendency to lose recently-modified data if your system locks up or unexpectedly reboots (due to a power failure, for instance.) Finially, jfs is IBM's own high performance journaling filesystem. Since it is obscure, we cannot comment either positvely nor negatively on its stability. If you're looking for the most standard filesystem, use ext2. If you're looking for the most rugged journalled filesystem, use ext3. If you're looking for a high-performance filesystem with journaling support, use ReiserFS; both ext3 and ReiserFS are mature and refined. Here are our basic recommended filesystem sizes and types: Partition Size Type example device boot partition, containing kernel(s) and boot information 100 Megabytes ext2/3 highly recommended (easiest); if ReiserFS then mount with -o notail /dev/hda1 swap partition (no longer a 128 Megabyte limit) Generally, unless you are running a server, swapspace can be pretty flexible. Please consult the below table for some loose guidelines on swap space. Linux swap /dev/hda2 root partition, containing main filesystem (/usr, /home, etc) >=1.5 Gigabytes ReiserFS, ext3 recommended; ext2 ok /dev/hda3 Physical RAM Swapspace Size 0-48MB RAM 048-064MB RAM 064MB-128MB RAM 128-256MB RAM 256-512MB RAM 720MB 702MB 640MB 256MB Before creating filesystems, you may want to initialize the beginning of your HD using dd. Doing this will ensure that your new filesystem will not be mis-indentified by Linux's mounting code. This can be done as follows: Code listing 6.1: Initializing first 1024 Sectors of HD # dd if=/dev/zero of=/dev/hdxy bs=1K count=1 Replace /dev/hdxy with the device you wish to "clean." Warning: The command above will destroy all data from /dev/hdxy. Be careful and check twice which partition you specify for zeroing. If you make a mistake it might result in a loss of data. At this point, create your partitions using fdisk. Note that your partitions should be of type 82 if swap and 83 for regular filesystems (whether ReiserFS, ext2/3 or other). Note: cfdisk is included on the install CD, and it is considerably easier to use than fdisk. Just type cfdisk to run it; by default, cfdisk will work with /dev/hda. If /dev/hda is not the hard disk you want to partition, give the right value to cfdisk as a parameter. For example: cfdisk /dev/hde Note: If fdisk or cfdisk instruct you to do so, please reboot to allow your system to detect the new partition configuration. Note: If you are using RAID your partitions will be a little different. You will have the partitions like this: /dev/ataraid/discX/partY X is the arrays you have made, so if you only have made 1 array, then it will be disc0.Y is the partition number as in /dev/hdaY Once you've created your partitions, it's time to initialize the filesystems that will be used to house our data. Initialize swap as follows: Code listing 6.2: Initializing Swap # mkswap /dev/hda2 You can use the mke2fs command to create ext2 filesystems. Code listing 6.3: Creating an ext2 Filesystem # mke2fs /dev/hda1 To create an XFS filesystem, use the mkfs.xfs command. Code listing 6.4: Creating a XFS Filesystem # mkfs.xfs /dev/hda3 Note: You may want to add a couple of additional flags to the mkfs.xfs command: -d agcount=3 -l size=32m. The -d agcount=3 command will lower the number of allocation groups. XFS will insist on using at least 1 allocation group per 4 GB of your partition, so, for example, if you hava a 20 GB partition you will need a minimum agcount of 5. The -l size=32m command increases the journal size to 32 Mb, increasing performance. Warning: If you are installing an XFS partition over a previous ReiserFS partition, later attempts to mount may fail without an explicit mount -t xfs. The solution is to zero out the partition before creating the XFS filesystem: dd if=/dev/zero of=/dev/hdx bs=1k. If you'd like to use ext3, you can create ext3 filesystems using mke2fs -j. Code listing 6.5: Creating an ext3 Filesystem # mke2fs -j /dev/hda3 Note: You can find out more about using ext3 under Linux 2.4 at [5]http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html. To create ReiserFS filesystems, use the mkreiserfs command. Code listing 6.6: Creating a ReiserFS Filesystem # mkreiserfs /dev/hda3 To create JFS filesystems, use the mkfs.jfs comamnd. Code listing 6.7: Creating a JFS Filesystem # mkfs.jfs /dev/hda3 7.Mount Partitions Now, we'll activate our new swap, since we may need the additional virtual memory that provides later: Code listing 7.1: Activating Swap # swapon /dev/hda2 Next, we'll create the /mnt/gentoo and /mnt/gentoo/boot mountpoints, and we'll mount our filesystems to these mountpoints. Code listing 7.2: Creating Mount Points # mkdir /mnt/gentoo # mount /dev/hda3 /mnt/gentoo # mkdir /mnt/gentoo/boot # mount /dev/hda1 /mnt/gentoo/boot If you are setting up Gentoo Linux with a separate /usr or /var, these would get mounted to /mnt/gentoo/usr and /mnt/gentoo/var, respectively. Important: If your boot partition (the one holding the kernel) is ReiserFS, be sure to mount it with the -o notail option so GRUB gets properly installed. Make sure that notail ends up in your new /etc/fstab boot partition entry, too. We'll get to that in a bit. Important: If you are having problems mounting your boot partition with ext2, try using mount /dev/hXX /mnt/gentoo/boot -t ext2 8.Obtaining the Desired 'stage-x' Tarball If you are using a GRP CD to install, you already have all of the stage tarballs available on the CD. If this is the case, copy the tarball of your choice to /mnt/gentoo Alternatively, if you do not have a GRP CD, the stage1 tarball is still available on the CD in /mnt/cdrom/gentoo. You will have to download the other stages though, and the best place to download those to is /mnt/gentoo. Code listing 8.1: Downloading Required Stages # cd /mnt/gentoo Use lynx to get the URL for your tarball: # lynx http://www.ibiblio.org/pub/Linux/distributions/gentoo/releases/1.4_rc2/x 86/ Use Up and Down arrows keys (or the TAB key) to go to the right directory Highlight the appropriate stage you want to download Press d which will initiate the download Save the file and quit the browser OR use wget from the command line: # wget insert URL to the required stage tarball here. 9.Unpacking the Stage Tarballs Now it's time to extract the compressed stage tarball of your choice to /mnt/gentoo. Then, we'll chroot over to the new Gentoo Linux build installation to "enter" the new Gentoo Linux system. Important: Be sure to use the p option with tar. Forgetting to do this will cause certain files to have incorrect permissions. If you are using the "from scratch, build everything" install method, you will want to use the stage1-ix86-1.4_beta.tbz2 image. If you're using one of our bigger CDs, you'll also have a choice of a stage2 and stage3 image. These images allow you to save time at the expense of configurability (we've already chosen compiler optimizations and default USE variables for you.) Code listing 9.1: Unpacking the Stages # cd /mnt/gentoo # tar -xvjpf /mnt/cdrom/gentoo/stage?-*.tbz2 # mount -o bind /proc /mnt/gentoo/proc # cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf If you are going to use GRP, now would be a good time to execute the following commands: Code listing 9.2: Getting ready for GRP # mkdir /mnt/gentoo/GRP # mount -o bind /mnt/cdrom/gentoo/packages /mnt/gentoo/GRP Code listing 9.3: Entering the chroot Environment # chroot /mnt/gentoo /bin/bash # env-update Regenerating /etc/ld.so.cache... # source /etc/profile The above points your shell to the new paths and updated binaries. After you execute these commands, you'll be "inside" your new Gentoo Linux environment. 10.Getting the Current Portage Tree using Rsync Now, you'll need to run emerge sync. This will make sure that you have the most current copy of the Portage tree. Code listing 10.1: Updating Using Rsync # emerge sync # export CONFIG_PROTECT="-*" # export USE="-* bootstrap build" # emerge portage # unset USE The Portage tree will be downloaded and stored in /usr/portage; it's about 90Mb in size without tarballs. Note: The export CONFIG_PROTECT="-*" line ensures that any new scripts installed to /etc will overwrite the old scripts (stored in sys-apps/baselayout), bypassing Portage's new config file management support. Type emerge --help config for more details. 11.Setting Gentoo optimizations (make.conf) Now that you have a working copy of the Portage tree, people using stage1 to install will need to bootstrap their Gentoo Linux system as follows. First edit the file /etc/make.conf. In this file, you should set your USE flags, which specify optional functionality that you would like to be built into packages; generally, the defaults (an empty or unset USE variable) are fine. More information on USE flags can be found [6]here. A complete list of current USE flags can be found [7]here. You also should set appropriate CHOST, CFLAGS and CXXFLAGS settings for the kind of system that you are creating (commented examples can be found further down in the file.) Your best friend is man gcc to figure out what additional CFLAGS and CXXFLAGS are available. Search for 'Optimization'. If necessary, you can also set proxy information here if you are behind a firewall. Code listing 11.1: Setting make.conf Options # nano -w /etc/make.conf (Adjust these settings) Note: People who need to substantially tweak the build process should take a look at the /etc/make.globals file. This file comprises gentoo defaults and should never be touched. If the defaults do not suffice, then new values should be put in /etc/make.conf, as entries in make.conf override the entries in make.globals. If you're interested in tweaking USE settings, look in /etc/make.profile/make.defaults. If you want to turn off any USE settings found here, add an appropriate USE="-foo" in /etc/make.conf (to turn off the foo USE setting.) 12.Starting from Stage1 The stage1 tarball is for ultimate tweakage. If you have picked this tarball, you are most likely looking to have an uber-optimized system. Have fun, because optimization is what Gentoo Linux is all about! Now, it's time to start the "bootstrap" process. This process takes about two hours on my 1200Mhz AMD Athlon system. During this time, the extracted build image will be prepped for compiling the rest of the system. The GNU compiler suite will be built, as well as the GNU C library. These are time consuming builds and make up the bulk of the bootstrap process. Code listing 12.1: Bootstrapping # cd /usr/portage # scripts/bootstrap.sh The "bootstrap" process will now begin. Note: Portage by default uses /var/tmp during package building, often using several hundred megabytes of temporary storage. If you would like to change where Portage stores these temporary files, set a new PORTAGE_TMPDIR before starting the bootstrap process, as follows: Code listing 12.2: Changing Portage's Storage Path # export PORTAGE_TMPDIR="/otherdir/tmp" bootstrap.sh will build binutils, gcc, gettext, and glibc, rebuilding binutils, gcc, and gettext after glibc. Needless to say, this process takes a while. Have a nice nap. Once this process completes, your system will be equivalent to a "stage2" system, which means you can now move on to the stage2 instructions. 13.Starting from Stage2 The stage2 tarball already has the bootstrapping done for you. All that you have to do is install the rest of the system. Note: If you haven't done so, please edit /etc/make.conf to your flavor. Code listing 13.1: Installing the Rest of the System # emerge -p system [lists the packages to be installed] # emerge system It's going to take a while to finish building the entire base system. Your reward is that it will be thoroughly optimized for your system. The drawback is that you have to find a way to keep yourself occupied for some time to come. The author suggests "Star Wars - Super Bombad Racing" for the PS2. When this process completes, your system will be the equivalent of a stage3 system. You have a couple of choices on how to continue at this point. You can move onto the stage3 instructions and complete those. Doing that will get your system right up to date with what is in the current Portage tree. This is not necessary, but it is highly recommended. If you do not choose to get up to date with the stage3 instructions, you can move onto the GRP install section. If you do not wish to use GRP, you can move onto [8]Chapter 16: Final Steps. 14.Starting from Stage3 The stage3 tarball is already configured for your system. There is not much to do for this stage, but it is a very good idea to update your system to the newest available packages. Note: If you have not already edited /etc/make.conf to fit your specifications, now would be a good time to do so. Code listing 14.1: Getting up-to-date # emerge sync # emerge -up world lists [packages] to be installed # emerge -u world Once you complete this step, you have some options on how to continue. If you are going to be using GRP, please move onto the GRP section. If you are not going to use GRP, you may continue onto [9]Chapter 16: Final Steps. 15.Using GRP You can take advantage of pre-built GRP package sets to avoid compiling certain popular and large packages. Currently, we provide full builds of everything you need for openoffice-bin, GNOME, KDE and xfree. First, you will need to cd to the location of the packages directory. We have already mounted the directory at /GRP. In that directory you will find the grp-install.sh script, an All directory that contains all of the binary packages, and a list of available GRP packages. To install any/all of these package sets you should do the following: Code listing 15.1: Using GRP # cd /GRP # sh grp-install.sh where may be any of the *-list.txt files found in the s ame directory. grp-install.sh can be run multiple times without replacing existing installations. You can do a sh grp-install.sh for a basic usage description if you are still a bit foggy. 16.Setting your Timezone At this point, you should have system that's ready for final configuration. We'll start the configuration process by setting the timezone. By setting the timezone before building the kernel we ensure that users get reasonable uname -a output. Look for your timezone (or GMT if you using Greenwich Mean Time) in /usr/share/zoneinfo. Then, make a symbolic link by typing: Code listing 16.1: Creating a symbolic link for timezome # ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime You might also want to check /etc/rc.conf to make sure your timezone settings are correct. 17.Installing the kernel and a System Logger Note: If you haven't done so, please edit /etc/make.conf to your flavor. You now need to merge Linux source ebuilds. Here are the ones we currently offer: ebuild description gentoo-sources Our own performance and functionality-enhanced kernel does not include XFS support. xfs-sources Highly-compatible kernel with XFS support. openmosix-sources A stock Linux kernel source tree patched with support for the GPL [10]openMosix load-balancing/clustering technology usermode-sources A stock Linux kernel source tree patched with support for User-Mode Linux. ("Linux inside Linux" technology) vanilla-sources A stock Linux kernel source tree, just like you'd get from kernel.org Warning: If you are configuring your own kernel, be careful with the grsecurity option. Being too aggressive with your security settings can cause certain programs (such as X) to not run properly. If in doubt, leave it out. Choose a kernel and then merge as follows: Code listing 17.1: Emerging Kernel Sources # emerge sys-kernel/gentoo-sources Once you have a Linux kernel source tree available, it's time to compile your own custom kernel. Please note that /usr/src/linux is a symlink to your current emerged kernel source package, which is set automatically by Portage at emerge time. If you have multiple kernel source packages, it is necessary to set the /usr/src/linux symlink to the correct one before proceeding. Code listing 17.2: Compiling the Linux Kernel # cd /usr/src/linux # source /etc/profile Again, this updates your paths. If you get an error saying gcc is not found, this is what you may have to do. # make menuconfig # make dep && make clean bzImage modules modules_install # mv /boot/bzImage /boot/bzImage.orig [if bzImage already exists] # cp /usr/src/linux/arch/i386/boot/bzImage /boot Warning: For your kernel to function properly, there are several options that you will need to ensure are in the kernel proper -- that is, they should be enabled and not compiled as modules. You will need to enable the "Code maturity level options --> Prompt for development and/or incomplete code/drivers" option to see several of these selections. Under the "File systems" section, be sure to enable the "/dev" file system support (note that you don't need to enable the "/dev/pts file system support" option). You'll also need to enable the "Virtual Memory Filesystem". Be sure to enable "ReiserFS" if you have any ReiserFS partitions; the same goes for "Ext3". If you're using XFS, enable the "SGI XFS filesystem support" option. It's always a good idea to leave ext2 enabled whether you are using it or not. Also, most people using IDE hard drives will want to enable the "USE DMA by default" option; otherwise, your IDE drives may perform very poorly. Of course, remember to enable "IDE disk" support as well -- otherwise your kernel won't be able to see your IDE disks. If you are using hardware RAID you will need to enable a couple more options in the kernel: For Highpoint RAID controllers select hpt366 chipset support, support for IDE RAID controllers and Highpoint 370 software RAID.For Promise RAID controllers select PROMISE PDC202{46|62|65|67|68|69|70} support, support for IDE RAID controllers and Support Promise software RAID (Fasttrak(tm)) If you use PPPoE to connect to Internet, you will need the following options in the kernel (built-in or as preferably as modules) : "PPP (point-to-point protocol) support", "PPP support for async serial ports", "PPP support for sync tty ports". The two compression options won't harm but are not definitely needed, neither does the "PPP over Ethernet" option, that might only be used by rp-pppoe when configured to do kernel mode PPPoE. If you have an IDE cd burner, then you need to enable SCSI emulation in the kernel. Turn on "ATA/IDE/MFM/RLL support" ---> "IDE, ATA and ATAPI Block devices" ---> "SCSI emulation support" (I usually make it a module), then under "SCSI support" enable "SCSI support", "SCSI CD-ROM support" and "SCSI generic support" (again, I usually compile them as modules). If you also choose to use modules, then echo -e "ide-scsi\nsg\nsr_mod" >> /etc/modules.autoload to have them automatically added at boot time. Note: For those who prefer it, it is now possible to install Gentoo Linux with a 2.2 kernel. However, doing this comes at a price: you will lose many of the nifty features that are new to the 2.4 series kernels (such as XFS and tmpfs filesystems, iptables, and more), although the 2.2 kernel sources can be patched with ReiserFS and devfs support. Gentoo linux boot scripts require either tmpfs or ramdisk support in the kernel, so 2.2 kernel users need to make sure that ramdisk support is compiled in (ie, not a module). It is vital that a gentoo=notmpfs flag be added to the kernel line in /boot/grub/grub.conf for the 2.2 kernel so that a ramdisk is mounted for the bootscripts instead of tmpfs. If you choose not to use devfs, then gentoo=notmpfs,nodevfs should be used instead. Your new custom kernel (and modules) are now installed. Now you need to choose a system logger that you would like to install. We offer sysklogd, which is the traditional set of system logging daemons. We also have msyslog and syslog-ng as well as metalog. Power users seem to gravitate away from sysklogd (not very good performance) and towards the newer alternatives. If in doubt, you may want to try metalog, since it seems to be quite popular. To merge your logger of choice, type one of the next four lines: Code listing 17.3: Emerging System Logger of Choice # emerge app-admin/sysklogd # rc-update add sysklogd default or # emerge app-admin/syslog-ng # rc-update add syslog-ng default or # emerge app-admin/metalog # rc-update add metalog default or # emerge app-admin/msyslog # rc-update add msyslog default Warning: In the case of syslog-ng you need to create /etc/syslog-ng/syslog-ng.conf. See /etc/syslog-ng for a sample configuration file. Important: Metalog flushes output to the disk in blocks, so messages aren't immediately recorded into the system logs. If you are trying to debug a daemon, this performance-enhancing behavior is less than helpful. When your Gentoo Linux system is up and running, you can send metalog a USR1 signal to temporarily turn off this message buffering (meaning that tail -f /var/log/everything/current will now work in real time, as expected), and a USR2 signal to turn buffering back on again. If you want to disable buffering permanently, you can change METALOG_OPTS="-B" to METALOG_OPTS="-B -s" in /etc/conf.d/metalog. Now, you may optionally choose a cron package that you'd like to use. Right now, we offer dcron, fcron and vcron. If you don't know which one to choose, you might as well grab vcron. They can be installed as follows: Code listing 17.4: Choosing a CRON Daemon # emerge sys-apps/dcron # crontab /etc/crontab or # emerge sys-apps/fcron # crontab /etc/crontab or # emerge sys-apps/vcron You do not need to run crontab /etc/crontab if using vcron. Don't forget to add your *cron to the proper init level. # rc-update add *cron default For more information on starting programs and daemons at startup, see the [11]rc-script guide. 18.Installing miscellany necessary packages If you need rp-pppoe to connect to the net, be aware that at this point it has not been installed. It would be the good time to do it. Code listing 18.1: Installing rp-pppoe # USE="-X" emerge rp-pppoe Note: The USE="-X" prevents pppoe from installing its optional X interface, which is a good thing, because X and its dependencies would also be emerged. You can always recompile rp-pppoe with X support later. Note: Please note that the rp-pppoe is built but not configured. You will have to do it again using adsl-setup when you boot into your Gentoo system for the first time. You may need to install some additional packages in the Portage tree if you are using any optional features like XFS, ReiserFS or LVM. If you're using XFS, you should emerge the xfsprogs package: Code listing 18.2: Emerging Filesystem Tools # emerge sys-apps/xfsprogs If you'd like to use ReiserFS, you should emerge the ReiserFS tools: # emerge sys-apps/reiserfsprogs If you'd like to use JFS, you should emerge the JFS tools: # emerge jfsutils If you're using LVM, you should emerge the lvm-user package: # emerge sys-apps/lvm-user If you're a laptop user and wish to use your PCMCIA slots on your first real reboot, you'll want to make sure you install the pcmcia-cs package. Code listing 18.3: Emerging PCMCIA-cs # emerge sys-apps/pcmcia-cs Warning: You will have to re-emerge pcmcia-cs after installation to get PCMCIA to work. 19.Modifying /etc/fstab for your machine Your Gentoo Linux system is almost ready for use. All we need to do now is configure a few important system files and install the GRUB boot loader. The first file we need to configure is /etc/fstab. Remember that you should use the notail option for your boot partition if you chose to create a ReiserFS filesystem on it. Remember to specify ext2, ext3 or reiserfs filesystem types as appropriate. Use something like the /etc/fstab listed below, but of course be sure to replace "BOOT", "ROOT" and "SWAP" with the actual block devices you are using (such as hda1, etc.) Code listing 19.1: Editing fstab # /etc/fstab: static file system information. # # noatime turns off atimes for increased performance (atimes normally aren't # needed; notail increases performance of ReiserFS (at the expense of storage # efficiency). It's safe to drop the noatime options if you want and to # switch between notail and tail freely. # # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/BOOT /boot ext2 noauto,noatime 1 2 /dev/ROOT / ext3 noatime 0 1 /dev/SWAP none swap sw 0 0 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 proc /proc proc defaults 0 0 Warning: Please notice that /boot is NOT mounted at boottime. This is to protect the data in /boot from corruption. If you need to access /boot, please mount it! 20.Setting the Root Password Before you forget, set the root password by typing: Code listing 20.1: Setting the root Password # passwd You will also want to add a non-root user for everyday use. Please consult the [12]Gentoo FAQ. 21.Setting your Hostname Edit this file so that it contains your fully-qualified domain name on a single line, i.e. mymachine.mydomain.com. Code listing 21.1: Configuring Hostname # echo mymachine.mydomain.com > /etc/hostname 22.Modifying /etc/hosts This file contains a list of ip addresses and their associated hostnames. It's used by the system to resolve the IP addresses of any hostnames that may not be in your nameservers. Here's a template for this file: Code listing 22.1: Hosts Template 127.0.0.1 localhost # the next line contains your IP for your local LAN, and your associated machin e name 192.168.1.1 mymachine.mydomain.com mymachine Note: If you are on a DHCP network, it might be helpful to set localhost to your machine's actual hostname. This will help GNOME and many other programs in name resolution. 23.Final Network Configuration Add the names of any modules that are necessary for the proper functioning of your system to /etc/modules.autoload file (you can also add any options you need to the same line.) When Gentoo Linux boots, these modules will be automatically loaded. Of particular importance is your ethernet card module, if you happened to compile it as a module: Code listing 23.1: /etc/modules.autoload This is assuming that you are using a 3com card. Check /lib/modules/`uname -r`/kernel/drivers/net for your card. 3c59x Edit the /etc/conf.d/net script to get your network configured for your first boot: Code listing 23.2: Boottime Network Configuration # nano -w /etc/conf.d/net # rc-update add net.eth0 default If you have multiple network cards you need to create additional net.ethx scripts for each one (x = 1, 2, ...): Code listing 23.3: Multiple Network Interfaces # cd /etc/init.d # cp net.eth0 net.ethx # rc-update add net.ethx default If you have a PCMCIA card installed, have a quick look into /etc/init.d/pcmcia to verify that things seem all right for your setup, then add this line to the top of /etc/init.d/net.ethx: Code listing 23.4: PCMCIA depend in /etc/init.d/net.ethx depend() { need pcmcia } This makes sure that the PCMCIA drivers are autoloaded whenever your network is loaded. 24.Final steps: Configure Basic Settings (including the international keymap setting) Code listing 24.1: Basic Configuration # nano -w /etc/rc.conf Follow the directions in the file to configure the basic settings. All users will want to make sure that CLOCK is set to his/her liking. International keyboard users will want to set the KEYMAP variable (browse /usr/share/keymaps to see the various possibilities). 25.Configure a Bootloader Notes In the spirit of Gentoo, users now have more than one bootloader to choose from. Using our virtual package system, users are now able to choose between both GRUB and LILO as their bootloaders. Please keep in mind that having both bootloaders installed is not necessary. In fact, it can be a hinderance, so please only choose one. Important: If you are installing Gentoo Linux on a system with an NVIDIA nForce or nForce2 chipset with an integrated GeForce graphics card, you should use LILO and avoid GRUB. With on-board video enabled, the low memory area of your RAM is used as video RAM. Since GRUB also uses low memory at boot time, it will experience an "out of memory" condition. So, if you have an nForce or potentially other board with on-board video, use LILO. Even if you're using off-board video right now, it'd be nice to be able to remove the graphics card and use the on-board video in a pinch, wouldn't it? :) Configuring GRUB The most critical part of understanding GRUB is getting comfortable with how GRUB refers to hard drives and partitions. Your Linux partition /dev/hda1 is called (hd0,0) under GRUB. Notice the parenthesis around the hd0,0 - they are required. Hard drives count from zero rather than "a", and partitions start at zero rather than one. Be aware too that with the hd devices, only harddrives are counted, not atapi-ide devices such as cdrom players, burners, and that the same construct can be used with scsi drives. (Normally they get higher numbers than ide drives except when the bios is configured to boot from scsi devices.) Assuming you have a harddrive on /dev/hda, a cdrom player on /dev/hdb, a burner on /dev/hdc and a second hardrive on /dev/hdd, for example, and no scsi harddrive /dev/hdd7 gets translated to (hd1,6). It might sound tricky, and tricky it is indeed, but as we will see, grub offers a tab completion mechanism that comes handy for those of you having a lot of harddrives and partitions and who are a little lost in the grub numbering scheme. Having gotten the feel for that, it's time to install GRUB. The easiest way to install GRUB is to simply type grub at your chrooted shell prompt: Code listing 25.1: Installing GRUB # emerge grub # grub Important: If you are using hardware RAID this part will not work at this time. Skip to the section on making your grub.conf. After that we will complete the grub setup for RAID controllers You'll be presented with the grub> grub command-line prompt. Now, you need to type in the right commands to install the GRUB boot record onto your hard drive. In my example configuration, I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands I want to type are: Code listing 25.2: GRUB on the MBR grub> root (hd0,0) // Your boot partition grub> setup (hd0) // Where the boot record is installed, here, it is the MBR Code listing 25.3: GRUB not on the MBR Alternatively, if you wanted to install the bootloader somewhere other than the MBR grub> root (hd0,0) // Your boot partition grub> setup (hd0,4) // Where the boot record is installed, here it is /dev/hda5 grub> quit Here's how the two commands work. The first root ( ) command tells GRUB the location of your boot partition (in our example, /dev/hda1 or (hd0,0) in GRUB terminology. Then, the second setup ( ) command tells GRUB where to install the boot record - it will be configured to look for its special files at the root ( ) location that you specified. In my case, I want the boot record on the MBR of the hard drive, so I simply specify /dev/hda (also known as (hd0)). If I were using another boot loader and wanted to set up GRUB as a secondary boot-loader, I could install GRUB to the boot record of a particular partition. In that case, I'd specify a particular partition rather than the entire disk. Once the GRUB boot record has been successfully installed, you can type quit to quit GRUB. Note: The tab completion mechanism of grub can be used from within grub, assuming you wrote root ( and that you hit the TAB key, you would be prompted with a list of the available devices (not only harddrives), hitting the TAB key having written root (hd, grub would print the available harddrives and hitting the TAB key after writing root (hd0, would make grub print the list of partitions on the first harddrive. Checking the syntax of the grub location with completion should really help to make the right choice. Gentoo Linux is now installed, but we need to create the /boot/grub/grub.conf file so that we get a nice GRUB boot menu when the system reboots. Here's how to do it. Important: To ensure backwards compatibility with GRUB, make sure to make a link from grub.conf to menu.lst. You can do this by doing ln -s /boot/grub/grub.conf /boot/grub/menu.lst . Now, create the grub.conf file (nano -w /boot/grub/grub.conf), and add the following to it: Code listing 25.4: Grub.conf for GRUB default 0 timeout 30 splashimage=(hd0,0)/boot/grub/splash.xpm.gz title=My example Gentoo Linux root (hd0,0) kernel (hd0,0)/boot/bzImage root=/dev/hda3 #Below is for setup using hardware RAID title=My Gentoo Linux on RAID root (hd0,0) kernel (hd0,0)/boot/bzImage root=/dev/ataraid/dXpY # Below needed only for people who dual-boot title=Windows NT Workstation root (hd0,5) chainloader (hd0,5)+1 Note: (hd0,0) should be written without any spaces inside the parentheses. Important: If you set up scsi emulation for an IDE cd burner earlier, then to get it to actually work you need to add an "hdx=ide-scsi" fragment to the kernel line in grub.conf (where "hdx" should be the device for your cd burner). After saving this file, Gentoo Linux installation is complete. Selecting the first option will tell GRUB to boot Gentoo Linux without a fuss. The second part of the grub.conf file is optional, and shows you how to use GRUB to boot a bootable Windows partition. Note: Above, (hd0,0) should point to your "boot" partition (/dev/hda1 in our example config) and /dev/hda3 should point to your root filesystem. (hd0,5) contains the NT boot loader. Note: The path to the kernel image is relative to the boot partition. If for example you have separated boot partition (hd0,0) and root partition (hd0,1), all paths in the grub.conf file above will become /bzImage. If you need to pass any additional options to the kernel, simply add them to the end of the kernel command. We're already passing one option (root=/dev/hda3), but you can pass others as well. In particular, you can turn off devfs by default (not recommended unless you know what you're doing) by adding the gentoo=nodevfs option to the kernel command. Note: Unlike in earlier versions of Gentoo Linux, you no longer have to add devfs=mount to the end of the kernel line to enable devfs. In rc6 devfs is enabled by default. Configuring LILO While GRUB may be the new alternative for most people, it is not always the best choice. LILO, the LInuxLOader, is the tried and true workhorse of Linux bootloaders. Here's how to install LILO if you would like to use it instead of GRUB: The first step is to emerge LILO: Code listing 25.5: Emerging LILO # emerge lilo Now it is time to configure LILO. I will give you a small lilo.conf to use, and I will explain the different parts of the file. Code listing 25.6: Example lilo.conf boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=50 message=/boot/message lba32 default=linux image=/boot/vmlinuz-2.4.20 label=linux read-only root=/dev/hda5 #For dual booting windows/other OS other=/dev/hda1 label=dos * boot=/dev/hda tells LILO to install itself on the first hard disk on the first IDE controller. * map=/boot/map states the map file. In normal use, this should not be modified. * install=/boot/boot.b tells LILO to install the specified file as the new boot sector. In normal use, this should not be altered. If the install line is missing, LILO will assume a default of /boot/boot.b as the file to be used. * The existence of prompt tells LILO to show you whatever is referenced in the message line. While it is not recommended that you remove the prompt line, if you do remove it, you can still get a prompt by holding down the [Shift] key while your machine starts to boot. * timeout=50 sets the amount of time that LILO will wait for user input before proceeding with booting the default line entry. This is measured in tenths of a second, with 50 as the default. * message=/boot/message refers to the screen that LILO displays to let you select the operating system or kernel to boot. * lba32 describes the hard disk geometry to LILO. Another common entry here is linear. You should not change this line unless you are very aware of what you are doing. Otherwise, you could put your system in an unbootable state. * default=linux refers to the default operating system for LILO to boot from the options listed below this line. The name linux refers to the label line below in each of the boot options. * image=/boot/vmlinuz-2.4.20 specifies the linux kernel to boot with this particular boot option. * label=linux names the operating system option in the LILO screen. In this case, it is also the name referred to by the default line. * read-only specifies that the root partition (see the root line below) is read-only and cannot be altered during the boot process. * root=/dev/hda5 tells LILO what disk partition to use as the root partition. Note: Thanks to [13]Redhat.com for this information. After you have edited your lilo.conf file, it is time to run LILO to load the information into the MBR: Code listing 25.7: Running LILO # /sbin/lilo LILO is configured, and now your machine is ready to boot into Gentoo Linux! 26.Creating Bootdisks GRUB Bootdisks It is always a good idea to make a boot disk the first time you install any Linux distribution. This is a security blanket, and generally not a bad thing to do. If you are using some kinds of hardware RAID, you may need make a GRUB boot disk. With these types of hardware RAID, if you try to install grub from your chrooted shell it will fail. If you are in this camp, make a GRUB boot disk, and when you reboot the first time you can install GRUB to the MBR. Make your bootdisk like this: Code listing 26.1: Creating a GRUB Bootdisk # mke2fs /dev/fd0 # mount /dev/fd0 /mnt/floppy # mkdir -p /mnt/floppy/boot/grub # cp /usr/share/grub/i386-pc/stage1 /mnt/floppy/boot/grub/ # cp /usr/share/grub/i386-pc/stage2 /mnt/floppy/boot/grub/ # umount /mnt/floppy # grub grub> root (fd0) grub> setup (fd0) grub> quit Now reboot and load the floppy. At the floppy's grub> prompt, you can now execute the necessary root and setup commands. LILO Bootdisks If you are using LILO, it is also a good idea to make a bootdisk: Code listing 26.2: Making a LILO Bootdisk # dd if=/boot/your_kernel of=/dev/fd0 This will only work if your kernel is smaller than 1.4MB 27.Installation Complete! Now, Gentoo Linux is installed. The only remaining step is to exit the chrooted shell, update necessary configuration files, safely unmount your partitions and reboot the system: Code listing 27.1: Rebooting the System # etc-update # exit // This exits the chrooted shell; you can also type ^D # cd / # umount /mnt/gentoo/boot # umount /mnt/gentoo/proc # umount /mnt/gentoo/dev # umount /mnt/gentoo # reboot Note: After rebooting, it is a good idea to run the update-modules command to create the /etc/modules.conf file. Instead of modifying this file directly, you should generally make changes to the files in /etc/modules.d. Important: Remember if you are running hardware RAID, you must use the bootdisk for the first reboot. then go back and install grub the way everyone else did the first time. You are done -- congratulations! If you have any questions or would like to get involved with Gentoo Linux development, consider joining our gentoo-user and gentoo-dev mailing lists (there's a "click to subscribe" link on our [14]main page). We also have a handy [15]Desktop configuration guide that will help you to continue configuring your new Gentoo Linux system, and a useful [16]Portage user guide to help familiarize you with Portage basics. You can find the rest of the Gentoo Documentation [17]here. If you have any other questions involving installation or anything for that matter, please check the Gentoo Linux [18]FAQ. Enjoy and welcome to Gentoo Linux! 28.Gentoo-Stats The Gentoo Linux usage statistics program was started as an attempt to give the developers a way to find out about their user base. It collects information about Gentoo Linux usage to help us in set priorities our development. Installing it is completely optional, and it would be greatly appreciated if you decide to use it. Compiled statistics can be viewed at [19]http://stats.gentoo.org/. The gentoo-stats server will assign a unique ID to your system. This ID is used to make sure that each system is counted only once. The ID will not be used to individually identify your system, nor will it be mached against an IP address or other personal information. Every precaution has been taken to assure your privacy in the development of this system. The following are the things that we are monitoring right now through our "gentoo-stats" program: * installed packages and their version numbers * CPU information: speed (MHz), vendor name, model name, CPU flags (like "mmx" or "3dnow") * memory information (total available physical RAM, total available swap space) * PCI cards and network controller chips * the Gentoo Linux profile your machine is using (that is, where the /etc/make.profile link is pointing to). We are aware that disclosure of sensitive information is a threat to most Gentoo Linux users (just as it is to the developers). * Unless you modify the gentoo-stats program, it will never transmit sensitive information such as your passwords, configuration data, shoe size... * Transmission of your e-mail addresses is optional and turned off by default. * The IP address your data transmission originates from will never be logged in such a way that we can identify you. There are no "IP address/system ID" pairs. The installation is easy - just run the following commands: Code listing 28.1: Installing gentoo-stats # emerge gentoo-stats // Installs gentoo-stats # gentoo-stats --new // Obtains a new system ID The second command above will request a new system ID and enter it into /etc/gentoo-stats/gentoo-stats.conf automatically. You can view this file to see additional configuration options. After that, the program should be run on a regular schedule (gentoo-stats does not have to be run as root). Add this line to your crontab: Code listing 28.2: Updating gentoo-stats with cron 0 0 * * 0,4 /usr/sbin/gentoo-stats --update > /dev/null The gentoo-stats program is a simple perl script which can be viewed with your favortive pager or editor: /usr/sbin/gentoo-stats. line Updated 26 Feb 2003 line [20]Daniel Robbins Chief Architect Chris Houser Author [21]Jerry Alexandratos Author [22]Grant Goodyear Ghost [23]John P. Davis Editor [24]Pierre-Henri Jondot Editor [25]Eric Stockbridge Editor [26]Rajiv Manglani Editor [27]Jungmin Seo Editor [28]Stoyan Zhekov Editor line Summary: These instructions step you through the process of installing Gentoo Linux 1.4_rc2 and 1.4_rc3. The Gentoo Linux installation process supports various installation approaches, depending upon how much of the system you want to custom-build from scratch. line Donate to support our development efforts. Make payments with PayPal - it's fast, free and secure! line [29]Win4Lin at NeTraverse Win4Lin from NeTraverse lets you run Windows applications under Gentoo Linux at native speeds. [30]Purchase Win4Lin "Gentoo Edition" and you'll also get a special Gentoo discount. Every sale also helps support Gentoo Linux development :) line [31]DDR Memory at Crucial.com Purchase RAM from Crucial.com and a percentage of your sale will go towards further Gentoo Linux development. line Copyright 2001-2003 Gentoo Technologies, Inc. Questions, Comments, Corrections? Email [32]www@gentoo.org. References 1. http://www.gentoo.org/ 2. http://www.gentoo.org/ 3. http://www.ibiblio.org/gentoo/releases/1.4_rc2/x86/ 4. http://bugs.gentoo.org/ 5. http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html 6. http://www.gentoo.org/doc/en/use-howto.xml 7. http://www.gentoo.org/dyn/use-index.xml 8. http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chp16 9. http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chp16 10. http://www.openmosix.com/ 11. http://www.gentoo.org/doc/en/rc-scripts.xml 12. http://www.gentoo.org/doc/en/faq.xml 13. http://www.redhat.com/ 14. http://www.gentoo.org/ 15. http://www.gentoo.org/doc/en/desktop.xml 16. http://www.gentoo.org/doc/en/portage-user.xml 17. http://www.gentoo.org/main/en/docs.xml 18. http://www.gentoo.org/doc/en/faq.xml 19. http://stats.gentoo.org/ 20. mailto:drobbins@gentoo.org 21. mailto:jerry@gentoo.org 22. mailto:g2boojum@gentoo.org 23. mailto:zhen@gentoo.org 24. mailto:Pierre-Henri.Jondot@wanadoo.fr 25. mailto:stocke2@gentoo.org 26. mailto:rajiv@gentoo.org 27. mailto:seo@gentoo.org 28. mailto:zhware@gentoo.org 29. http://www.netraverse.com/gentoo.htm 30. http://www.netraverse.com/gentoo.htm 31. http://www.qksrv.net/click-477620-5032687 32. mailto:www@gentoo.org