| |||
AOA Gentoo Install Guide AOA Guide to Gentoo Linux Before we begin, I'd like to thank and give to credit to my good friend, Fernando aka LikeWhoa. Without his help I would have given up on Linux long ago. He has been kind enough to grant the files he has written and the bandwidth for the retrieving of files that we will need for our installs. I have also stolen some material from his original guide because I was too lazy too type it all out. Second: I will not blow smoke up your butt and tell you how much faster a base install of Gentoo is compared to any other distribution available. Gentoo is more about having the option to choose everything about your OS and build it according to your needs than it is about speed, although options for speed are available if you are adventurous enough.. If you are not interested in learning anything about linux along the way, are not willing to spend the time installing and configuring your OS or just want a pop it in and go OS, Gentoo is not for you. I will not use any package or option in this guide that has not been tested and confirmed working by me on AthlonXP, A64 and Intel C2D based systems. This guide will be broken down into 2 different sections: X86_64 for a 64bit install and will be marked with Red x86 for a 32 bit system will be marked with blue If a code is not marked with red or blue it applies to both architectures. For the purpose of this guide I will keep things on the conservative side. I'll throw some material and options for the more adventurous in part 2, such as overlays, using experimental packages, custom kernels and optimising to get the most out of Gentoo. If at any point you get stuck, do not give up. I am just a PM away and the fix will probably be just a matter of walking through it in person so you can see it done once. 1. Install Mediums 1a. Gentoo Linux LiveCDs The Gentoo LiveCDs are bootable CDs which contain a self-sustained Gentoo environment. They allow you to boot Linux from the CD. During the boot process your hardware is detected and the appropriate drivers are loaded. They are maintained by Gentoo developers. All LiveCDs allow you to boot, set up networking, initialize your partitions and start installing Gentoo from the Internet. This is a small, no-nonsense, bootable CD, the sole purpose of which is to boot the system, prepare the networking and continue with the Gentoo installation. It does not contain any stages (or, in some cases, a single stage1 file), source code or precompiled packages. For example the amd64 variant of this LiveCD can be found in the releases/amd64/2007.0/livecd/ subdirectory and is called livecd-amd64-installer-2007.0.iso. 1b. Alternative LiveCDs The JustBOOT is a customized Gentoo variant LiveCD maintained by LikeWhoa and should be used when dealing with very new hardware. for example many LiveCDs will fail to identify your system's SATA/IDE,Ethernet & WIFI devices; thus using this LiveCD will JustBOOT (tm). You will need to manually pick the LiveCD to download as they are archived by released date. Disclaimer: JustBOOT LiveCD is NOT affiliated with Gentoo. USE this liveCD at your own risk. 1c. Downloading and Burning the LiveCDs We'll first start by downloading and burning the chosen LiveCD. We previously discussed the available LiveCDs, but where can you find them? You can download the LiveCDs from one of the Gentoo mirrors or via a torrent. The JustBOOT LiveCD can be found here and is the preferred install medium. Index of /gentoo/downloads/livecds/custom/ Inside that directory you'll find the ISO images. Those are full CD images which you can write on CD-R media. In case you wonder if your downloaded file is corrupted or not, you can check its MD5 checksum and compare it with the MD5 checksum provided (such as livecd-amd64-installer-2007.0.iso.DIGESTS). Check the contents of this file for the MD5 HASH then, You can check the MD5 checksum with the md5sum tool under Linux/Unix or md5sum for Windows. To burn the downloaded ISO(s), you can use ImgBurn found here. The Official ImgBurn Website 1d. Which LiveCD Architecture? 32bit or 64bit? The choice is yours. [/color] If you know for sure that your CPU is 64bit capable then download the 64bit stage3 sources, otherwise download the 32bit stage3 sources. If you're not completely sure and want to know if your processor is 64bit capable then just download the 686 LiveCD. Keep in mind the following tips 1. Commands are after # sign (if the # sign is included the command will be ignored without any indication) 2. 32bit configuration commands will be highlighted in RED 3. 64bit configuration commands will be highlighted in BLUE 4. When showing sample configuration files that need to be edited, pay attention to the ones that are in bold; which are the ones I'll be suggesting. 5. If a command fails, make sure to scroll to the FAQ section, which should have solutions for most compile errors. 6. Be patient and follow directions and you will be all right Processors that are 64bit capable * Intel Processors in the LGA775 package. * Intel Pentium D 8xx,9xx series processors. * AMD Opteron Processors (single/dual-core) in the 1xx,2xxx series. * AMD Barcelona Processors. * AMD Sempron "E6 (Part No.: *BX)". 2. Installation 2a.Network preparation Since we will be installing gentoo over a network it only makes sense to configure the network first. The install CD's are pretty good about setting up the network on boot so typing ifconfig will let us know if it Code: # /sbin/ifconfig (...) 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 Base address:0xe800 Code: (If the proxy filters HTTP traffic) # export http_proxy="http://proxy.gentoo.org:8080" (If the proxy filters FTP traffic) # export ftp_proxy="ftp://proxy.gentoo.org:8080" (If the proxy filters RSYNC traffic) # export RSYNC_PROXY="proxy.gentoo.org:8080" Code: # http://username:password@proxy.gentoo.org:8080 Code: # ping -c 3 www.gentoo.org Code: # net-setup eth0 2b. Starting the SSH Daemon (Optional) Setting up Gentoo is easiest via an ssh session from another machine, allowing you to read (this guide for example) while staying connected to a Gentoo help channel on IRC and being able to browse the net all in a GUI, making life easier in many ways. you can still install Gentoo from 1 machine and still browse the internet in a graphical way using "links -q". I will explain this later in the guide. First let's give the 'virtual' livecd root account a password, since this is auto scrambled by the livecd for security purposes. you can also type: Code: # sudo su Code: # passwd Code: # /etc/init.d/sshd start To connect using a computer already running linux, open a terminal and type. Code: # ssh root@<ipaddress> With Windows you do not have a utility to effect changes to the hard drives' performance parameters. Linux does. hdparm is the utility that allows you to set your hard disks and CD-ROM drives to utilize the fastest 32-bit and UDMA transfer modes supported by your hard disks. Keep in mind that hdparm is intended more for IDE/UDMA/ATA-based systems because SATA and SCSI disks have the ability to dynamically affect these changes from the controller's chipset. Gentoo Linux adds hdparm in all the LiveCDs, even the minimal one. The results from using it can save you days of waiting for apps to compile if your motherboard's IDE chipset does not automatically set the hard drives' performance parameters to use 32bit I/O, multcount and read-ahead disk modes for your system. Hard disks, CD-ROMs, CD-RW's, DVD-RW's all may require these modes to be set to allow your system to truly achieve the performance Linux can really offer. Below you will see four examples. The first is a non-optimized drive offering no DMA, 32bit I/O, multicount or unmaskirq usage. The second and third shows how to set these modes for hard disks and optical storage readers and writers. The fourth are the results of the settings. The un-optimized view would or could look like this: Code: # hdparm /dev/hda /dev/hda: multcount = 0 (off) IO_support = 0 (default 16-bit) unmaskirq = 0 (off) using_dma = 0 (off) keepsettings = 0 (off) readonly = 0 (off) readahead = 256 (on) geometry = 16383/255/63, sectors = 78165360, start = 0 To set optimized transfer modes for most hard disks from the LiveCD do the following: Code: # hdparm -d1c1u1m16 /dev/hda Code: # hdparm -d1c1u1 /dev/cdroms/cdrom0 Code: # hdparm -d1c1u1m16 /dev/hda /dev/hda: setting 32-bit IO_support flag to 1 setting multcount to 16 setting unmaskirq to 1 (on) setting using_dma to 1 (on) multcount = 16 (on) IO_support = 1 (32-bit) unmaskirq = 1 (on) using_dma = 1 (on) 3a. Partitions Although it is theoretically possible to use a full disk to house your Linux system, this is almost never done in practice. Instead, full disk block devices are split up in smaller, more manageable block devices. On x86 systems, these are called partitions. Partitions are divided in three types: primary, extended and logical. A primary partition is a partition which has its information stored in the MBR (master boot record). As an MBR is very small (512 bytes) only four primary partitions can be defined (for instance, /dev/hda1 to /dev/hda4). An extended partition is a special primary partition (meaning the extended partition must be one of the four possible primary partitions) which contains more partitions. Such a partition didn't exist originally, but as four partitions were too few, it was brought to life to extend the formatting scheme without losing backward compatibility. A logical partition is a partition inside the extended partition. Their definitions aren't placed inside the MBR, but are declared inside the extended partition. Use fdisk to determine how your drives are labled (sata disks will be sd* ide discs will be hd*) Once you know the labels and location of the drive then we will use fdisk to make the partitions fdisk is a popular and powerful tool to split your disk into partitions. Fire up fdisk on your disk (in our example, we use /dev/hda): Starting fdisk Code: # fdisk /dev/hda (or whichever drive you choose to install on) fdisk prompt Code: Command (m for help): Type p to display your disk's current partition configuration: An ntfs is probably the only thing on the disk at this time. An example partition configuration Code: Command (m for help): p Disk /dev/hda: 240 heads, 63 sectors, 2184 cylinders Units = cylinders of 15120 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 1 14 105808+ 7 HPFS/NTFS Code: Command (m for help):n (for new partition) Command action e extended p primary partition (1-4) (we want to create a primary partition for /boot p Partition number (1-4): 2 First cylinder (1-3876, default 1):(hit enter) Using default value 1 (use first cylinder of partition for starting point) Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): +32M (plenty for the /boot partition unless you like to test drive kernels. Code: Command (m for help):n (for new partition) Command action e extended p primary partition (1-4) (we want to create a primary partition for swap p Partition number (1-4): 3 First cylinder (1-3876, default 1):(hit enter) Using default value 1 (use first cylinder of partition for starting point) Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): +1G (or whatever size swap partition you decide) After you've done this, type t to set the partition type, 2 to select the partition you just created and then type in 82 to set the partition type to "Linux Swap" Code: Command (m for help):n (for new partition) Command action e extended p primary partition (1-4) (we want to create a primary partition for / p Partition number (1-4): 4 First cylinder (1-3876, default 1):(hit enter) Using default value 1 (use first cylinder of partition for starting point) Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876):(hit enter to use rest of free space or enter the amount in M or G that you want to allocate) 3b. Formatting the partitions Introduction Now that your partitions are created, it is time to place a filesystem on them. If you don't care about what filesystem to choose and are happy with what we use as default in this handbook, continue with Applying a Filesystem to a Partition. Otherwise read on to learn about the available filesystems... Filesystems? The Linux kernel supports various filesystems. We'll explain ext2, ext3, ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux systems. ext2 is the tried and true Linux filesystem but doesn't have metadata journaling, which means that routine ext2 filesystem checks at startup time can be quite time-consuming. There is now quite a selection of newer-generation journaled filesystems that can be checked for consistency very quickly and are thus generally preferred over their non-journaled counterparts. Journaled filesystems prevent long delays when you boot your system and your filesystem happens to be in an inconsistent state. ext3 is the journaled version of the ext2 filesystem, providing metadata journaling for fast recovery in addition to other enhanced journaling modes like full data and ordered data journaling. It uses an HTree index that enables high performance in almost all situations. In short, ext3 is a very good and reliable filesystem. ReiserFS is a B+tree-based filesystem that has very good overall 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. ReiserFS is solid and usable as both general-purpose filesystem and for extreme cases such as the creation of large filesystems, very large files and directories containing tens of thousands of small files. XFS is a filesystem with metadata journaling which comes with a robust feature-set and is optimized for scalability. We only recommend using this filesystem on Linux systems with high-end SCSI and/or fibre channel storage and an uninterruptible power supply. Because XFS aggressively caches in-transit data in RAM, improperly designed programs (those that don't take proper precautions when writing files to disk and there are quite a few of them) can lose a good deal of data if the system goes down unexpectedly. JFS is IBM's high-performance journaling filesystem. It has recently become production-ready and there hasn't been a sufficient track record to comment positively nor negatively on its general stability at this point. For time proven stable filesystems use ext3 for root and ext2 for /boot Reiserfs is best suited for partitions with many small files so as you progress through Linux and start breaking up partitions you can use the best file system for the type of files on that partition to maximize efficiency and speed up your apps. There are 2 other file systems that I use as well. They are ext4 and Reiser4 and will require the use of the Justboot cd listed in the install media above. If you want pure speed and are willing to make regular backups use Reiser4. It is still under development, has never caused me any problems but I still don't use it on critical data partitions as even a buggy kernel patch can kill the data. 3c. Applying a Filesystem to a Partition To create a filesystem on a partition or volume, there are tools available for each possible filesystem: Code: Filesystem Creation Command ext2 ---- # mke2fs ext3 & 4 ---- # mke2fs -j reiserfs ----- # mkreiserfs xfs ---- # mkfs.xfs jfs ---- # mkfs.jfs reiser4 -------- # mkfs.reiser4 (must use a custom cd such as justboot) Code: # mke2fs /dev/hda1 # mke2fs -j /dev/hda3 mkswap is the command that is used to initialize swap partitions: Creating a Swap signature Code: # mkswap /dev/hda2 Code: # swapon /dev/hda2 3d. Mounting Now that your partitions are initialized and are housing a filesystem, it is time to mount those partitions. Use the mount command. Don't forget to create the necessary mount directories for every partition you created. As an example we mount the root and boot partition: Mounting partitions Code: # mount /dev/hda3 /mnt/gentoo # mkdir /mnt/gentoo/boot # mount /dev/hda1 /mnt/gentoo/boot 4.a Setting the Date/Time Right Before you continue you need to check your date/time and update it. A misconfigured clock may lead to strange results in the future! To verify the current date/time, run date: Code: # date Fri Mar 29 16:21:18 UTC 2007 Code: # date 032916212007 Downloading the Stage Tarball Code: # cd /mnt/gentoo Code: # wget http://gentoo.mirrors.easynews.com/linux/gentoo/releases/x86/2007.0/stages/stage1-x86-2007.0.tar.bz2 Code: # http://gentoo.mirrors.easynews.com/linux/gentoo/releases/amd64/2007.0/stages/stage1-amd64-2007.0.tar.bz2 Code: # tar xvjpf stage1* 4c. Installing a Portage snapshot You now have to install a Portage snapshot, a collection of files that inform Portage what software titles you can install, which profiles are available, etc. Download and Install a Portage Snapshot Code: # wget http://gentoo.mirrors.easynews.com/linux/gentoo/snapshots/portage-latest.tar.bz2 Code: # tar xvjf portage-latest* -C /mnt/gentoo/usr Compiler flags (Cflags) are an area with much controversy and many opinions, most of which do nothing but break packages, yet show no real world speed increase. Keep it simple at first. Likewhoa has provided pre-configured make.conf files available for users to download and edit to suit their needs. Due to the amount of variables in Gentoo's make.conf they cannot be covered in this tutorial. If you require some assistance ingesting how make.conf works read the manual page. Manual for make.conf. Code: # man make.conf Configuration for Athlon-XP Processor Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/athlon-xp/x86/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your have a dual processor system * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Athlon64 Processors 32bit Athlon64 Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/athlon64/x86/make.conf Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/athlon64/amd64/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if you have a dual processor rig * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Athlon64 X2 Processors (Socket 939/AM2) 32bit Athlon64 X2 (Socket 939/AM2) Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/athlon64x2/x86/make.conf Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/athlon64x2/amd64/make.conf * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type: # cat /proc/cpuinfo Configuration for Opteron Processors (Socket 939/AM2) 32bit Opteron Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/opteron/x86/make.conf Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/opteron/amd64/make.conf * MAKEOPTS="-j3" edit this to MAKEOPTS="-j2" if your processor does not have dual-cores. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." variable in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Intel Core Duo/ Core 2 Duo Processors 32bit Core Duo / Core2 Duo-Quad Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/nocona/x86/make.conf Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/nocona/amd64/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your processor has dual-cores. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Pentium2 Processors Pentium2 Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/pentium2/x86/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your running a dual processor board. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Pentium3 Processors Pentium3 Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/pentium3/x86/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your running a dual processor board. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Pentium-M (Centrino)/Celeron M (Intel) Processors Pentium-M Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/pentium-m/x86/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your processor has dual-cores. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo 32bit Pentium4 Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/pentium4/x86/make.conf Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/pentium4/amd64/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your processor has dual-cores or if you have hyperthreading enabled on a single core * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Pentium4 (Prescotts) Processors 32bit Pentium4 (Prescott) Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/p4-prescott/x86/make.conf Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/p4-prescott/amd64/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your processor has dual-cores. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * You can verify the chip is a Prescott by looking for pni in the flags section of /proc/cpuinfo. this indicates support for SSE3. In 2004, Intel started branding processors with the Prescott core as Intel Celeron D. * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for PentiumD Processors 32bit PentiumD Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/pentium-d/x86/make.conf Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/pentium-d/amd64/make.conf * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Xeon w/o EM64T Processors 32bit Xeon w/o EM64T Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/xeon_no_em64t/x86/make.conf * If you have hyperthreading turned on, then each processor counts as two logical CPUs, so if you have two hyperthreaded CPUs, then you should use MAKEOPTS="-j5" in your make.conf. This wont affect the generated code but might make your compiles faster. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Xeon w/ EM64T Processors Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/xeon_w_em64t/amd64/make.conf * If you have hyperthreading turned on, then each processor counts as two logical CPUs, so if you have two hyperthreaded CPUs, then you should use MAKEOPTS="-j5" in your make.conf. This wont affect the generated code but might make your compiles faster. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo Configuration for Celeron (Willamette) Processors 32bit Celeron (Willamette) Code: # cd /mnt/gentoo/etc # mv make.conf make.conf.original # wget http://weboperative.com/gentoo/celeron/x86/make.conf * MAKEOPTS="-j2" edit this to MAKEOPTS="-j3" if your processor is has dual-cores. * If your processor is missing any of the sse,sse2 flags edit these out from the USE="..." in the make.conf * to view available flags type or to check if you have two cores. type # cat /proc/cpuinfo 4e. Selecting Fast Mirrors Code: # mirrorselect -s4 -o -D >> /mnt/gentoo/etc/make.conf 4f. Mounting /proc Before chrooting you must mount procfs from the running livecd into the hard drive's newly extracted filesystem for stuff to operate properly while chrooted Code: # mount -t proc proc /mnt/gentoo/proc /dev on the livecd should be mounted into the chroot also as you may experience some difficulties setting up grub if your using a promise or other offboard ide card Code: # mount -o bind /dev /mnt/gentoo/dev resolv.conf is the primary file resposible for advising a linux system which dns servers should be used for address resolving. This file is dynamically updated by dhcp when the livecd starts but doesnot exist by default in the base system stage. We must copy /etc/resolv.conf to provide for the dns resolver configuration. Code: # cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf Chroot is defined in the manpage as " chroot - run command or interactive shell with special root directory" "chroot" is short for "change root". After preparing the base system stage we need to change to the "new root" in the base stage. Code: # chroot /mnt/gentoo /bin/bash 4j. Rehashing the $path environment Code: # env-update && source /etc/profile Code: # emerge --sync Selecting a Locale Code: # nano -w /etc/locale.gen uncomment the locales you need (uncomment means remove the # sign from in front of the line) en_US ISO-8859-1 en_US.UTF-8 UTF-8 (if you need other locales select them now) Code: # ls -FGg /etc/make.profile lrwxrwxrwx 1 root 46 2007-03-20 17:34 /etc/make.profile -> /usr/portage/profiles/default-linux/x86/no-nptl/ Code: # unlink /etc/make.profile # ln -s /usr/portage/profiles/default-linux/x86/2007.0 /etc/make.profile Code: # env-update && source /etc/profile 5a. Bootstrapping the System Code: # emerge --oneshot --nodeps gcc-config && USE="-* build bootstrap" emerge linux-headers && /usr/portage/scripts/bootstrap.sh 5b. Rebuilding the toolchain Now that the system has been bootstrapped we want to rebuild our toolchain so that it is built on top of itself. Thenen our system will be built using the updated toolchain. Code: # emerge gcc-config linux-headers glibc binutils gcc libstdc++-v3 portage 5c. Finish with the Bootstrap Process Code: # emerge --deep system; emerge gettext; emerge --deep world; python-updater; emerge -Pv python Code: # emerge syslog-ng grub vixie-cron reiserfsprogs sysfsutils dhcpcd && USE="-zlib" emerge pciutils Code: # rc-update add syslog-ng default && rc-update add net.eth0 default && rc-update add vixie-cron default There's just not enough time in a day... and it's a little known fact that a computer has two clocks. One is a hardware clock and the second is a software clock that runs in the os. They however do not stay in sync which creates a condition known as clock skew that can cause havok with source build operating systems such as gentoo linux. Clock skew can cause source compiles to fail. We allieviate this problem by adding a network time protocol client into the installation. Code: # emerge ntp && rc-update add ntp-client default && ntpdate -u -b pool.ntp.org List the timezone files in the system and find the timezone that closest matches your location on our big blue ball in the dark universe. Keep in mind they will not be added until after bootstrap or until after glibc compiles. Code: Output of # ls /usr/share/zoneinfo/ Africa Atlantic Canada EST5EDT Factory GMT-0 Iceland Japan MST7MDT Navajo Portugal Turkey W-SU posixrules America Australia Chile Egypt GB GMT0 Indian Kwajalein Mexico PRC ROC UCT WET right Antarctica Brazil Cuba Eire GB-Eire Greenwich Iran Libya Mideast PST8PDT ROK US Zulu zone.tab Arctic CET EET Etc GMT HST Israel MET NZ Pacific Singapore UTC iso3166.tab Asia CST6CDT EST Europe GMT+0 Hongkong Jamaica MST NZ-CHAT Poland SystemV Universal posix Code: # rm /etc/localtime # ln -s /usr/share/zoneinfo/{path/to/your/timezonefile} /etc/localtime Code: # etc-update use the -5 option this time. ( You will want to be careful in the future with this option as -5 can overwrite the files you have edited.) There are a few pointers when it comes to configuring your kernel. * lspci part of sys-apps/pciutils This tool will output information on your main board to help you decide what needs to be enabled on the Linux Kernel. * lsmod part of sys-apps/module-init-tools In short it means List Modules, with this command you will be able to see what modules are currently loaded by the Linux Kernel, I use this to find out what modules the Gentoo LiveCD loaded for my system and by the names i can quickly find the source inside the Linux Kernel's configuration file. Example lspci Output Code: #lspci 00:00.0 Host bridge: Intel Corporation DRAM Controller (rev 02) 00:01.0 PCI bridge: Intel Corporation PCI Express Root Port (rev 02) 00:1a.0 USB Controller: Intel Corporation USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation USB UHCI Controller #5 (rev 02) 00:1a.2 USB Controller: Intel Corporation USB UHCI Controller #6 (rev 02) 00:1a.7 USB Controller: Intel Corporation USB2 EHCI Controller #2 (rev 02) 00:1d.0 USB Controller: Intel Corporation USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation LPC Interface Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation 6 port SATA AHCI Controller (rev 02) 00:1f.3 SMBus: Intel Corporation SMBus Controller (rev 02) 01:00.0 VGA compatible controller: nVidia Corporation G80 [GeForce 8800 GTS] (rev a2) 02:02.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04) 02:02.1 Input device controller: Creative Labs SB Audigy Game Port (rev 04) 02:02.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port (rev 04) 02:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10) Code: # lsmod Module ------------ Size - Used by snd_seq_midi -------------- 7168 --- 0 snd_emu10k1_synth -------- 6912 --- 0 snd_emux_synth ------------ 29696 -- 1 snd_emu10k1_synth snd_seq_virmidi ------------ 6144 --- 1 snd_emux_synth snd_seq_midi_event -------- 7104 --- 2 snd_seq_midi,snd_seq_virmidi snd_seq_midi_emul --------- 6144 --- 1 snd_emux_synth snd_seq --------------------- 48064 -- 5 snd_seq_midi,snd_emux_synth,snd_seq_virmidi,snd_seq_midi_event,snd_seq_midi_emul snd_pcm_oss ---------------- 39456 -- 0 snd_mixer_oss -------------- 14784 -- 1 snd_pcm_oss coretemp -------------------- 6720 --- 0 hwmon ----------------------- 3208 --- 1 coretemp uinput ------------------------ 8192 --- 1 nvidia ------------------------ 6999620 - 24 snd_emu10k1 --------------- 130064 -- 2 snd_emu10k1_synth snd_rawmidi ---------------- 20768 --- 3 snd_seq_midi,snd_seq_virmidi,snd_emu10k1 snd_ac97_codec ------------ 106888 -- 1 snd_emu10k1 ac97_bus -------------------- 3008 ---- 1 snd_ac97_codec snd_pcm -------------------- 73288 --- 3 snd_pcm_oss,snd_emu10k1,snd_ac97_codec snd_seq_device ------------ 6544 ---- 4 snd_seq_midi,snd_emu10k1_synth,snd_emu10k1,snd_rawmidi snd_timer ------------------ 19912 --- 3 snd_seq,snd_emu10k1,snd_pcm snd_page_alloc ------------ 8592 ---- 2 snd_emu10k1,snd_pcm snd_util_mem ------------- 4352 ---- 2 snd_emux_synth,snd_emu10k1 snd_hwdep ---------------- 8136 ---- 2 snd_emux_synth,snd_emu10k1 snd ------------------------- 50168 --- 14 snd_emux_synth,snd_seq_virmidi,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_emu10k1,snd_rawmidi,snd_ac97_codec,snd_pcm,snd_seq_device,snd_timer,snd_hwdep floppy ---------------------- 57288 --- 0 soundcore ------------------ 6992 --- 1 snd 6b. Emerging Kernel For this guide we will be using Gentoo-sources for our kernel. Part 2 of the guide will cover various other custom kernels, all of which have their own merits. Code: # emerge gentoo-sources Introduction Manually configuring a kernel is often seen as the most difficult procedure a Linux user ever has to perform. Nothing is less true -- after configuring a couple of kernels you don't even remember that it was difficult ![]() However, one thing is true: you must know your system when you start configuring a kernel manually. Most information can be gathered by running lspci & lsmod (it might provide you with a nice hint on what to enable). The default config from Gentoo will have most of the required options already selected, Go through each menu / submenu and use the "help" tab to find out what an option is. Take your time here, a properly configured kernel can reduce system load, improve system responsiveness and improve boot times. If you are not sure about something you can always shoot me a PM. Google searches or the Gentoo Wiki can also be of assistance. If none of these options shed the light for you, contact me and we will see if we can work out some remote assistance. Now go to your kernel source directory and execute make menuconfig. This will fire up an ncurses-based configuration menu. Code: cd /usr/src/linux make menuconfig Specifically you must change the following items to suit your configuration. * General Setup --> leave as-is * Enable loadable module support --> leave as-is * Enable the block layer --> Change default I/O scheduler to CFQ * Processor type and features --> Set Processor family, set or unset symmetric multiprocessing support and other multi-cpu options depending on CPU * Bus Options --> enable PCI-Express if needed * Networking support --> leave as is * Device Drivers --> Go through each menu and enable only those items you need. Disable any that you don't * Character devices - agpgart and agp chipset type, dri driver ( if required) (Note that if your using an nvidia videocard it's best to leave the character devices as-is) * Sound support ~>> Advanced Linux Sound Architecture ~~> Pci devices Set the correct driver module for your soundcard here.(M) Use a module as the alsa-utils package demands that at least one module be present for your system to use the startup script correctly Disable OSS support in sound support USB support - Three primary items to be concerned with here... If you have usb2 add the EHCI module as <m> The output recieved from lspci is important here as you cannot have both ohci AND uhci included. You much choose one or the other and add it as a module * EHCI HCD (USB 2.0) support * OHCI HCD support * UHCI HCD (most Intel and VIA) support * File systems --> enable support for all file systems you intend to use, also enable joliet under CDROM and ntfs support if you plan to share files with your windows installation This is a pretty quick run through on configuring a kernel but it should give you an idea of what to enable. Configuring a kernel is machine and user specific so covering everything is just not possible. Once you are finished configuring the kernel, exit back out to the command line and execute this command. Code: # make && make modules_install >>Note. Type uname -r at the command prompt to get your kernel version 32 bit users Code: # cp arch/i386/boot/bzImage /boot/<kernel version> (output from uname -r ) Code: # cp arch/x86_64/boot/bzImage /boot/<kernel version> (output from uname -r ) For guide to keep things simple and avoid complications, I have had you configure the kernel with everything but the sound driver built in. As you learn to configure kernels I recommend configuring the kernel using modules anywhere you can. A dynamically loading system will save valuable memory address space in your system kernel, decrease boot times and give you control over wether a modules is loaded or not. (i.e. I rarely use ntfs support in linux but I do use it. Compiled as a module I can enable it when needed then disable it when I am done.) lsmod is your eyes into a running modular linux system but it's only usable with modules. Configuring the Modules You should list the modules you want automatically loaded in /etc/modules.autoload.d/kernel-2.6. You can add extra options to the modules too if you want To view all available modules, run the following find command. Don't forget to substitute "<kernel version>" with the version of the kernel you just compiled: Code: # find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko' We will be using nano as the default editor for this guide, there are a few others but nano is the easiest to work with. After altering your files use CTRL+X, then ENTER to save the file as you have written it. Code: # nano -w /etc/modules.autoload.d/kernel-2.6 3c59x Using the 3c59x example from above the command would be: Code: # echo "3c59x" >> /etc/modules.autoload.d/kernel-2.6 Code: # update-modules 7a. Filesystem Information What is fstab? Under Linux, all partitions used by the system must be listed in /etc/fstab. This file contains the mount points of those partitions (where they are seen in the file system structure), how they should be mounted and with what special options (automatically or not, whether users can mount them or not, etc.) Creating /etc/fstab /etc/fstab uses a special syntax. Every line consists of six fields, separated by whitespace (space(s), tabs or a mixture). Each field has its own meaning: * The first field shows the partition described (the path to the device file) * The second field shows the mount point at which the partition should be mounted * The third field shows the filesystem used by the partition * The fourth field shows the mount options used by mount when it wants to mount the partition. As every filesystem has its own mount options, you are encouraged to read the mount man page (man mount) for a full listing. Multiple mount options are comma-separated. * The fifth field is used by dump to determine if the partition needs to be dumped or not. You can generally leave this as 0 (zero). * The sixth field is used by fsck to determine the order in which filesystems should be checked if the system wasn't shut down properly. The root filesystem should have 1 while the rest should have 2 (or 0 if a filesystem check isn't necessary). Code: # nano -w /etc/fstab In our default partitioning example, /boot is usually the /dev/hda2 partition (or /dev/sda* if you use SCSI or SATA drives), with ext2 as filesystem. It needs to be checked during boot, so we would write down: Code: /dev/hda1 /boot ext2 defaults 1 2 Add the rules that match your partitioning scheme and append rules for your CD-ROM drive(s), and of course, if you have other partitions or drives, for those too. Now use the example below to create your /etc/fstab: Code: /dev/hda1 /boot ext2 defaults,noatime 1 2 /dev/hda2 none swap sw 0 0 /dev/hda3 / ext3 noatime 0 1 /dev/cdrom /mnt/cdrom auto noauto,user 0 0 To improve performance, most users would want to add the noatime mount option, which results in a faster system since access times aren't registered (you don't need those generally anyway). Double-check your /etc/fstab, save and quit to continue. >> Note the default config is pretty close and should only need minor alterations to the /dev lines and to fix the typo on the CDROM line, also replace ro with user on the CDROM line so the drive will be mountable to all users. 7b. Networking Information Host name, Domainname, etc One of the choices the user has to make is name his/her PC. This seems to be quite easy, but lots of users are having difficulties finding the appropriate name for their Linux-pc. To speed things up, know that any name you choose can be changed afterwards. For all we care, you can just call your system tux and domain homenetwork. Code: # nano -w /etc/conf.d/hostname (Set the HOSTNAME variable to your host name) HOSTNAME="tux" Code: # nano -w /etc/conf.d/net (Set the dns_domain variable to your domain name) dns_domain_lo="homenetwork" Code: # nano -w /etc/conf.d/net (Set the nis_domain variable to your NIS domain name) nis_domain_lo="my-nisdomain" If you need to configure your network connection either because you need specific DHCP options or because you do not use DHCP at all, open /etc/conf.d/net with your favorite editor (nano is used in this example): Code: # nano -w /etc/conf.d/net Code: # This blank configuration will automatically use DHCP for any net.* # scripts in /etc/init.d. To create a more complete configuration, # please review /etc/conf.d/net.example and save your configuration # in /etc/conf.d/net (this file :]!). Code: config_eth0=( "dhcp" ) dhcp_eth0="nodns nontp nonis" Code: config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" ) routes_eth0=( "default via 192.168.0.1" ) If you have several network interfaces repeat the above steps for config_eth1, config_eth2, etc. Now save the configuration and exit to continue. Code: # cd /etc/init.d # ln -s net.lo net.eth1 # rc-update add net.eth1 default You now need to inform Linux about your network. This is defined in /etc/hosts and helps in resolving host names to IP addresses for hosts that aren't resolved by your nameserver. You need to define your system. You may also want to define other systems on your network if you don't want to set up your own internal DNS system. Code: # nano -w /etc/hosts Code: This defines the current system) 127.0.0.1 tux.homenetwork tux localhost (Define extra systems on your network, they need to have a static IP to be defined this way.) 192.168.0.5 jenny.homenetwork jenny 192.168.0.6 benny.homenetwork benny First we set the root password by typing: Code: # passwd Gentoo uses /etc/conf.d/keymaps to handle keyboard configuration. Edit it to configure your keyboard. Code: # nano -w /etc/conf.d/keymaps When you're finished configuring /etc/conf.d/keymaps, save and exit. Gentoo uses /etc/conf.d/clock to set clock options. Edit it according to your needs. Code: # nano -w /etc/conf.d/clock You should define the timezone that you previously copied to /etc/localtime so that further upgrades of the sys-libs/timezone-data package can update /etc/localtime automatically. For instance, if you used the GMT timezone, you would add TIMEZONE="GMT" (Mine is America/Phoenix, check under /etc/localtime/America for your timezone) When you're finished configuring /etc/conf.d/clock, save and exit. 9. Configuring the Bootloader 9a. Using GRUB Understanding GRUB's terminology The most critical part of understanding GRUB is getting comfortable with how GRUB refers to hard drives and partitions. Your Linux partition /dev/hda1 (for IDE drives) or /dev/sda1 (for SATA/SCSI drives) will most likely be called (hd0,0) under GRUB. Notice the parentheses 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 hard drives are counted, not atapi-ide devices such as cdrom players and burners. Also, the same construct is used with SCSI drives. (Normally they get higher numbers than IDE drives except when the BIOS is configured to boot from SCSI devices.) When you ask the BIOS to boot from a different hard disk (for instance your primary slave), that harddisk is seen as hd0. Assuming you have a hard drive on /dev/hda, a cdrom player on /dev/hdb, a burner on /dev/hdc, a second hard drive on /dev/hdd and no SCSI hard drive, /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 hard drives and partitions and who are a little lost in the GRUB numbering scheme. Configuring and Installing Grub Code: # nano -w /boot/grub/grub.conf Code: # 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 title=Gentoo Linux # Partition where /boot is located root (hd0,1) kernel /boot/<kernel-version> root=/dev/hda4 title=Gentoo Linux (rescue) # Partition where the kernel image (or operating system) is located root (hd0,1) kernel /boot/<kernel-version> root=/dev/hda3 init=/bin/bb # The next four lines are only if you dualboot with a Windows system. # In this case, Windows is hosted on /dev/hda0. title=Windows XP rootnoverify (hd0,0) makeactive chainloader +1 To install GRUB you will need to issue the grub-install command. However, grub-install won't work off-the-shelf since we are inside a chrooted environment. We need to create /etc/mtab which lists all mounted filesystems. Fortunately, there is an easy way to accomplish this - just copy over /proc/mounts to /etc/mtab, excluding the rootfs line if you haven't created a separate boot partition. The following command will work in both cases: Code: # grep -v rootfs /proc/mounts > /etc/mtab Code: # grub-install --no-floppy /dev/hda We've gone throught he procedures above for utilizing hdparm for obtaining the fastest i/o transfer modes for your hard drive however the changes made only affect the livecd's running kernel therefore we should setup hdparm for the installation that you have created so that performance is maintained after booting into your running system. Allot of very useful options for Gentoo Linux dwell in /etc/conf.d This time we are to be concerned with the contents of /etc/conf.d/hdparm Below you will see an example of hdparm's config file. Change to suit the layout of your disks for your system appropriately. Each device may need the modes set for your systems hardware configuration. Here's a typical configuration for a system with one cdrom and hard disk. You can safely skip this step if using sata or scsi. Code: # nano -w /etc/conf.d/hdparm # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-conf.d.3,v 1.2 2004/09/06 02:17:08 swegener Exp $ # You can either set hdparm arguments for each drive using hdX_args, # discX_args, cdromX_args and genericX_args, e.g. # hda_args="-d1c1u1m16" # disc1_args="-d1" cdrom0_args="-d1c1u1" # or, you can set hdparm options for ALL drives using all_args, e.g. # #all_args="-d1" Code: # rc-update add hdparm boot Exit the chrooted environment and unmount all mounted partitions. Then type in that one magical command you have been waiting for: reboot. Code: # exit ~# cd ~# umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo ~# reboot On to page2.
__________________ Last edited by ccperf721p; 23rd December, 2007 at 05:21 PM. |
| |||
10. Post install clean up and creating user accounts After you log in as root we will remove the installation folders downloaded at the beginning of the guide Code: # rm /*.tar.bz2 Adding a User for Daily Use Working as root on a Unix/Linux system is dangerous and should be avoided as much as possible. Therefore it is strongly recommended to add a user for day-to-day use. 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 plugdev --> Be able to mount and use pluggable devices such as cameras and USB sticks video --> be able to access video capturing hardware and doing hardware acceleration wheel --> be able to use su Code: # groupadd games # groupadd plugdev # useradd -m -G users,wheel,video,audio,plugdev,games,cdrom,portage,usb,cron -s /bin/bash <your username> # passwd <your username> Installing Sudo Sudo is an app to allow users temporary root privileges without logging in as root, as soon as it runs the command or commands it drops root privileges. Sudo also gives you the ability to control which users can run commands. I will assume you are on a single user computer not get to in depth on sudo for this guide. I will add a linux security section in the FAQ portion at some point just to keep the guide going with decent material. Code: # emerge sudo Code: # visudo scroll to and uncomment (remove the # sign) this line > %wheel ALL=(ALL) ALL Lets move on to installing X server 11. Installing X server 11a. Configuring the make.conf variables Use variables The ideas behind USE flags When you are installing Gentoo (or any other distribution, or even operating system for that matter) you make choices depending on the environment you are working with. A setup for a server differs from a setup for a workstation. A gaming workstation differs from a 3D rendering workstation. This is not only true for choosing what packages you want to install, but also what features a certain package should support. If you don't need OpenGL, why would you bother installing OpenGL and build OpenGL support in most of your packages? If you don't want to use KDE, why would you bother compiling packages with KDE support if those packages work flawlessly without? I have put together a list of use flags that will give most users everything they need to have a fully functioning multi-media capable system. It will still need slight changes depending on your machine and which Desktop Environment you choose. (Check section 12 and pick your Desktop environment. before altering your use flags If you choose to run KDE add these to the USE= line > kde qt3 qt4 qt3support , if you choose to run gnome add > gnome gtk to the line >> Note: Before emerging a package use -pv (--pretend --verbose) to see what Use flags it will use. Example: # emerge -pv sudo. Code: # nano -w /etc/make.conf USE="a52 aac acpi alsa bash-completion -bindist cairo cdr dbus dvd dvdr dvdread encode ffmpeg firefox flac gif glitz hal -ipv6 jpeg jpeg2k lm_sensors logrotate mad mmx mp3 mp4 mpeg nptl nptlonly opengl openntpd pdf png sse sse2 spell symlink theora tiff truetype type1 usb vorbis win32codecs X xcomposite xine xv" >> Note: Try to stay light on Use flags, if you have a specific package that needs a certain use flag you can allow the Use flag for just that package instead of system wide by using /etc/portage/package.use. As an example, I compile pciutils with the -zlib flag set, but this will break other packages if set system wide so: Code: # nano -w /etc/portage/package.use sys-apps/pciutils* - zlib (the star indicates any version of that app) Video Cards and Input Devices Next we will add a couple of lines to the make.conf Code: # nano -w /etc/make.conf (use "nvidia" for nvidia cards <yeah I know;) use flgrx for ATI cards) VIDEO_CARDS="nvidia or flgrx" (for most users keyboard and mouse are sufficient for input devices) INPUT_DEVICES="keyboard mouse" With over 100 packages this step will take a while. Find something to do for 1.5 hours or so Code: # emerge xorg-x11 Code: # env-update # source /etc/profile The configuration file of Xorg is called xorg.conf and it resides in /etc/X11. The Xorg-X11 package provides an example configuration as /etc/X11/xorg.conf.example which you can use to create your own configuration. It is heavily commented, but if you are in need of more documentation regarding the syntax, don't hesitate to read the man page, but it is not necessary Code: # man 5 xorg.conf Generating an xorg.conf file Code: # Xorg -configure ![]() Code: # X -config /root/xorg.conf.new If this does not work try: Semi-Automatic Generation of xorg.conf Xorg provides a tool called xorgconfig which will ask you for various information regarding your system (graphical adapter, keyboard, ...). Based on your input it will create a xorg.conf file. Code: # xorgconfig After running xorgconfig we will need to edit xorg.conf Code: # nano -w /etc/X11/xorg.conf nvidia users uncomment the "Load glx" line > ATI users uncomment the "Load glx and Load dri" lines Scroll down to "Section Device" nvidia users will change > Driver "vga" to Driver "nvidia" flgrx users will change it to flgrx. CTRL + X to save and exit Code: # eselect opengl set nvidia # env-update; source /etc/profile Code: eselect opengl set ati # env-update; source /etc/profile Code: # startx >> Note:: These are basic configs for the video section, they will have hardware accleration but there are many more features that can be enable for both sets of drivers. I hope to cover these options soon enough in a part 3 of the guide.. 12. Installing a Desktop Environment Choices, Choices There are many choices for a Desktop Environment under Linux. The two most popular are Gnome and KDE for full featured Desktops with programs to handle most tasks built in. If you are working with an old system running a small amount of memory you may also want to look into Xfce4 and Fluxbox To help you decide I have included links to KDE and Gnome. Take a look at the feature set offered by both, decide what you need then emerge it. K Desktop Environment - Conquer your Desktop! GNOME: The Free Software Desktop Project Code: # emerge kde Code: # emerge gnome Once they are compiled we need to edit a couple of files to let Gentoo know which Window manager and Desktop environment we will be using. For KDE users: Code: # nano -w /etc/rc.conf scroll down and change the line to this XSESSION="kde-3.5" Code: # nano -w /etc/conf.d/xdm scroll and change DISPLAYMANGER="xdm" to DISPLAYMANGER="kdm" Code: # nano -w /etc/rc.conf Uncomment the XSESSION line Code: # nano -w /etc/conf.d/xdm scroll and change DISPLAYMANGER="xdm" to DISPLAYMANGER="gdm" Code: # rc-update add hald default # rc-update add xdm default Code: shutdown -r now Welcome to Gentoo Linux and open source freedom.. Sources: LikeWhoa Gentoo.org: Gentoo Linux -- Gentoo Documentation Resources Official IRC Channel: irc.freenode.net #gentoo Official Gentoo Linux Guides: Gentoo Linux -- Gentoo Documentation Resources Official Gentoo Overlays: Gentoo Overlays Forums: Gentoo Forums :: Index Gentoo Wiki: Main Page - Gentoo Linux Wiki Grub Error Collection: Gentoo Linux Documentation -- Gentoo Grub Error Collection
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP Last edited by ccperf721p; 23rd December, 2007 at 05:15 PM. |
| ||||
I don't know if this will be of any value for your guide here or not, but I detailed my experiences getting Gentoo running on a box I have at home a while back. The thread is located here. |
| |||
Good read there are some parts in there that are better stated than what I have written. ![]() I have bitten off a bunch here trying to do a 3 in one guide that will get a person to a working desktop. It will be a week or 2 before I get it finished I think.
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP |
| |||
From experence and from Gentoo, Gentoo is not suitable for mission critical work. I would recommend against someone deploying Gentoo for anything that is mission critical.
__________________ |
| |||
If this were actually true then any brand of linux would be included as well. It's not like they are writing their own source code for the apps.
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP Last edited by ccperf721p; 2nd November, 2007 at 03:06 PM. |
| |||
Gentoo is unsuitable for enterprise, on the basis that stability and predictability is lacking in portage. Gentoo doesn't have a "stable" tree. There was a move (GLEP19) to build another portage tree (stable!) that would be suitable for enterprise usage, but this didn't appear to have go anywhere. I know that AOA has hit issues whereby a minor change was made in a package (one of the sysloggers), which rendered systems inoperable.
__________________ |
| ||||
Yea, this is very true. Gentoo isn't the only OS I wouldn't use in an enterprise situation either, I put Fedora, Ubuntu server, OpenSuSE and others in the same category due to their cutting edge nature. For hosting large volume's of users, or a small number of very important / high reliability clients, RHEL / SLES, clones or similar are the only thing I'd touch. For example, RHEL is made by taking an outgoing Fedora release that has reached end of development (Fedora only has a six month cycle) and that matured Fedora release is then thoroughly tested to a great extent, documented, and tweaked for reliability and security. This becomes the new RHEL. When F7 was releases, RHEL5 was also released around that time based on the outgoing F6. SLES is a similar situation, with the server distro drawing on the matured open distro after testing tweaking and documenting. The big thing is, if RHEL/SLES goes tits up on you, you call RedHat/Novell and get them to get you up again. They have a support contract to live up to, and they are aware of the fact that their customers have high expectations of their product. With a community based distro that is on the cutting edge, there's no substational official support, and not as much care is involved. Its more a matter of if they break something "whoops, we'll fix it soon", where with an enterprise distro its a matter of "we are aware of the problem and have a pile of engineers solving it as we speak, we are very sorry for the inconvenience". Something else rather interesting with respect to predictability and stability, is a large number of specialty Linux software vendors are now releasing Xen guest images, with a complete linux distro, custom configured to provide an ideal environment for their software, and the software preinstalled being offered. So for example, I'm building a new quad core kentsfield / 4GB ram / 1.5TiB office server next week and will be running RHEL5 (Xen kernel) on it. In order to get our asterisk phone system running, I will use the AsteriskNow Xen image Asterisk at Home or Asterisk at Work in 30 MINUTES :: AsteriskNOW | Downloads to create a hardware virtual server on top of RHEL for Asterisk to sit in, all to itself, with dedicated system resources. I know of many major groupware applications for Linux (groupware apps are often VERY picky about package verisons, and tend to take over your operating system) that are either already available as Xen images, or soon will be.
__________________ Notebook: Apple Macbook Pro 13" i7 2.7Ghz (3.4Ghz max) 8GB DDR3 1333Mhz (Mac OSX 10.6.7) Desktop: ASUS Rampage Formula X48 Intel Core 2 Quad Q9450 (Yorkfield) @ 3.60Ghz (Folding SMP Linux) Running Fedora 15 Linux (GNOME 3) Dual Dell 2407WFP ![]() Drivers, Games, Demos, Mods and Overclocking Tools At AOAFiles |
| ||||
This isn't to say that I think Gentoo sucks, because it doesn't. It does exactly what it claims to do, and that is to provide an optimised, cutting edge, source based distro on a continuous update cycle rather than a release based cycle, which is advantageous in many cases, particularly with respect to the fact that there is no strict upgrade path that must be followed as there is on many release based distros. Its different, not better or worse than anything else, and that's one of the advantages of having all these distros to choose from. Ubuntu is different from Fedora, which is different from Slackware, which is different from Gentoo. Read about the choices and pick the one that makes sense the most to you, and there is no right or wrong answer. Except Vista. That's just plain wrong.
__________________ Notebook: Apple Macbook Pro 13" i7 2.7Ghz (3.4Ghz max) 8GB DDR3 1333Mhz (Mac OSX 10.6.7) Desktop: ASUS Rampage Formula X48 Intel Core 2 Quad Q9450 (Yorkfield) @ 3.60Ghz (Folding SMP Linux) Running Fedora 15 Linux (GNOME 3) Dual Dell 2407WFP ![]() Drivers, Games, Demos, Mods and Overclocking Tools At AOAFiles Last edited by dsio; 2nd November, 2007 at 04:25 PM. |
| |||
Most Linux distros don't suck, but they do have their differences. Gentoo has some strong points (such as the ebuild idea, and the way service startup scripts are handled - other distros would do well to take some lessons from Gentoo) Ubuntu is easy to install for a desktop but I feel, like most Debian based systems, that package management isn't great (but far in advance of RPM based systems), and startup scripts are positively SysV (think 1983).
__________________ |
| |||
What I should have said is that my optimizations are stable enough for mission critical work. Whether Gentoo can be used as a enterprise solution is debatable but it is performing that role in a few machines that I know of personally Anyone that would use my guide to set up an enterprise solution shouldn't be setting up an enterprise solution. This guide is for users interested in Gentoo Linux. Just reading the guide and seeing what it takes should scare off the majority of people. It's just my way of contributing material to the site and not meant to be an end all for all on Gentoo linux. It's just another option for those that may want it.
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP |
| |||
The issue I have is that it leads people to beleive that they'll be deploying something that's mission critical. There's a lot of people who have no idea what "optimisations" mean as far as Gentoo goes.
__________________ |
| |||
I fixed it. I will cover as much as I can to bring an understanding to those that do not know, with explanations of each and every step. I'm sure there will be issues along the way. Biggest problem I run into with people are daily -uDN worlds, taking a perfectly good system and destroying it just because a new package dropped into portage while they were asleep.. This will be covered as well..
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP |
| |||
I don't take it personally or as a dump. I more or less pictured the target audience and ran with it without thinking someone would actually think they could build an enterprise solution from my guide. Enterprise solutions are few and far between and should be kept that way. Frequent updates are of course important, updating for no other reason than there is an update available without reading what that update is creates a ton of problems. People seem to only remember the easy parts, such as -uDN world, or etc-update -7. They don't realize that Gentoo is not self maintaining like other distros, even the distros with decent self maintenance have a loaded support forum..
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP |
| ||||
Purely as a matter of personal experience, I've accept every update offered for at lest 4 months now, the worst that happens is they can't install. I've "learned" that I can Yum update when this happens, it does some stuff, then depedency stuff, then either the auto updates says it's done, or can now update. I think they may have this in hand now, is I guess what I'm trying to say.":O} It's never caused a problem, so far if there's a problem, it doesn't install... of course I'm still honeymooning, but she's exceeded all my expectations. Now that gaming is dead in 2000 pro sooner that I waned it to be, but the landing is much softer than I thought it would be.
__________________ "Though all men live in ignorance before mystery, they need not live in darkness... Justice is foundation and Mercy ETERNAL." DKE "All that we do is touched by Ocean Yet we remain on the shore of what we know." Richard Wilbur [img]/forum/attachments/random-nonsense/16515-sigs-dan_drag.jpg[/img] Subscribers! Ask Pitch about a Custom Sig Graphic |
| |||
To me Linux is Linux, give me a install disk for any flavor and I'll make it happen for myself. For most, half the battle of choosing a distribution is knowing what is available that suits their needs when even they don't know what they need. It would be too hard to determine what suits everybody's needs, the next easiest way would be to let people know what we are using so they know what they can get answers for. Gentoo is basically my Nlite for Linux, but rather than go through removing and changing the things I don't like about the OS I just never install them in the first place. Same amount of time spent for me either way..
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP |
| |||
I believe the guide is ready. If there are any problems or particular questions, post in the thread or shoot me a PM. I will keep the guide updated and will add to the FAQ section as information comes in from using the guide.
__________________ Biostar TForce X58 - Core i7 920 - 12GB Corsair Dominator DDR3 - EVGA 560ti - PCP&C 750W - Dual boot, Arch Linux/WinXP |
![]() |
Tags |
gentoo , linux |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Rate This Thread | |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
USB Flash Drive under Gentoo | Gizmo | OS, Software, Firmware, and BIOS | 5 | 6th July, 2005 10:16 AM |
Gentoo installation issue... | Áedán | OS, Software, Firmware, and BIOS | 5 | 9th December, 2004 11:14 PM |
Geforce2 TV Out on Gentoo | Áedán | OS, Software, Firmware, and BIOS | 7 | 15th February, 2004 07:32 PM |
PMS Guide for Men | Betty | Mookydooky's Just for laughs! | 3 | 17th June, 2002 06:34 PM |