![]() ![]() |
Feb 21 2006, 10:16 AM
Post
#1
|
|
|
Linux-Noob Member ![]() ![]() Group: Members Posts: 18 Joined: 28-June 04 Member No.: 397 |
If you don’t want to learn about the inner-workings of a Linux system (and spend
lots of time getting it to work), Gentoo may not be for you. An experienced Linux person usually takes several tries to get Gentoo going, while someone new to Linux may not get it installed and running at all without lots of help. However, if you like to tune and tweak your operating system, Gentoo is a great way to go. Gentoo Installation Here are the minimum computer requirements for a Gentoo installation using the x86 procedure described in this chapter: 1GB of hard disk space 64MB of RAM A 486 processor (or better) 300MB of total memory (combined RAM and swap) If you have a slow processor, consider getting precompiled packages because the full compilation process can take a long time. Obtain the Gentoo installation CD image from http://bouncer.gentoo.org/?product=gentoo-...-minimum&os=x86 (minimal) http://bouncer.gentoo.org/?product=gentoo-...niversal&os=x86 (universal) & print this http://www.gentoo.org/doc/en/handbook/handbook-x86.xml 1. Insert CD. Insert the CD (minimal or universal) into your computer’s CD or DVD drive. 2. Reboot. Reboot your computer. 3. Boot CD. From the boot prompt, press Enter. (If you are not able to boot the install medium, press F1 or F2 to see other install options that might help you get going.) Gentoo should detect your computer hardware, start the install process, and display a boot prompt. 4. Set date. Type the date command to make sure the date and time are set correctly. If they need to be changed, use the date command (with options) to change them. For example, to set the date to 8:15 a.m. June 15, 2006, type: # date 061508152006 5. Load modules. If some piece of hardware was not auto-detected, you may have to load the module you need to access that hardware. Use the modprobe command with the name of the module you want to load. For example, to load the module for an Orinoco wireless LAN card, you can type: # modprobe orinoco Do a Web search for “Linux” and the name of the hardware not being detected to find out what module to load. 6. Configure network. Type ifconfig eth0 to see if the Internet connection to your first Ethernet card is up and running. Then try to ping a computer on the Internet to make sure you can get out (for example, ping www.gentoo.org). If you are not able to pick up a DHCP server to automatically connect to the Internet, you can set up your Internet connection manually, by typing: # net-setup eth0 7. Partition hard disk. Partition your hard disk to prepare it to receive your Gentoo installation. You can use the fdisk utility to do this. Gentoo recommends a 64MB boot volume (ext2 file system), a swap partition that’s double the size of your RAM, and a large root (/) partition (ReiserFS file system). Start fdisk by following the command with the name of your first hard disk (such as /dev/hda or /dev/sda for your first IDE or SCSI hard disk, respectively). Then type h to display a list of commands Repartitioning your disk destroys existing data on your hard disk. Back up any data you value before starting this procedure. Be sure not to delete or change any partitions that have data on them that you want to keep. # fdisk /dev/hda 8. Make file systems. To create the appropriate file systems on your disk partitions, use the mk2fs and mkswap commands. For example, with an IDE hard drive that has the first partition as the boot partition (/dev/hda1), the second as swap (/dev/hda2), and the third as the root (/) partition (/dev/hda3), you can type the following: # mke2fs /dev/hda1 # mkswap /dev/hda2 # mkreiserfs /dev/hda3 9. Turn on swap. Use the swapon command to turn on your swap partition. For our example (with hda2 being the swap partition), type: # swapon /dev/hda2 10. Mount root (/) partition. You need to mount the root (/) partition temporarily to begin installing Gentoo to it. In this example (with the root file system on /dev/hda3), type: # mount /dev/hda3 /mnt/gentoo 11. Mount the /boot partition. Next, mount the boot partition so you can install boot files to that partition: # mkdir /mnt/gentoo/boot # mount /dev/hda1 /mnt/gentoo/boot 12. Get the stage1 tarball. Assuming that you have the minimal Gentoo installation CD, you need to download the stage1 tarball. Find a mirror site near you Then make a directory on your hard disk to copy it to and download the tarball using a tool such as wget. Here is an example: If you are using the universal CD, the stage1 tarball is available there. Instead of downloading it, jump to the next step and extract the tarball from /mnt/cdrom/ stages/stage1*.tar.bz2. # mkdir /mnt/gentoo/tmp2 # cd /mnt/gentoo/tmp2 # wget -c http://gentoo.osuosl.org/releases/x86/2005.1/ stages/x86/stage1-x86-2005.1.tar.bz2 The wget command, which appears on multiple lines here, should all be typed on one line. (There’s no space between the slash at the end of the first line and the word “stages” at the beginning of the next.) If the download should stop in the middle, you can restart it by running the same command again in the same directory. 13. Extract the stage 1 tarball. Use the following commands: # cd /mnt/gentoo # tar -xvjpf /mnt/gentoo/tmp2/stage1-*.tar.bz2 You can remove the stage1 tarball once you have untarred it. 14. Select mirror site. Use the mirrorselect command to search for a Gentoo mirror site from which you can efficiently download the files you need to do the install. Run the following command to select an efficient mirror and add it to your make.conf file (it will take a while to test download speed from more than 150 servers): # mirrorselect -a -s4 -o |grep GENTOO_MIRRORS >> /mnt/gentoo/etc/make.conf If, when you run emerge commands later in this procedure, you see messages that files are not found from any of the download sites, you might need to add other mirror sites to the make.conf file. 15. Mount file systems. Mount the /proc file system as follows: # mount -t proc none /mnt/gentoo/proc 16. Change root directory. Use the chroot command to change /mnt/gentoo to be your root directory, but first copy the resolve.conf file so it can be used from there: # cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf # chroot /mnt/gentoo /bin/bash 17. Update environment. Read in environment variables as follows: # env-update; source /etc/profile 18. Update Portage tree. Type the following command to have the latest package information installed to your /usr/portage directory: # emerge --sync 19. Modify make.conf. Use the nano text editor to change the make.conf file that is used to build your Gentoo system. Here’s how: # nano -w /etc/make.conf If you don’t know what to change, refer to the /etc/make.conf.example file for information on the settings you may want to change before continuing. If you don’t know what processor your computer has, type cat /proc/cpuinfo. 20. Bootstrap Gentoo. Run bootstrap.sh to bootstrap Gentoo as follows: # cd /usr/portage/ ; scripts/bootstrap.sh 21. Install Gentoo. Run the following emerge command to install: # emerge -e system It takes a long time for emerge -e system command to complete. If it fails before it is finished, check that the settings in your make.conf file are correct. 22. Set the time zone. Use the following command: # ln -sf /usr/share/zoneinfo/path /etc/localtime You need to replace path with the path to the file that represents the time zone your computer is in. For example, the entire path for Central time in the United States is /usr/share/zoneinfo/US/Central. 23. Create file system table. Add the file systems you want to mount automatically at boot time to your /etc/fstab file. Here’s an example: # nano -w /etc/fstab Here’s what /etc/fstab might look like (given the partitions created earlier in this example procedure): # <fs> <mountpoint> <type> <opts> <dump/pass> /dev/hda1 /boot ext2 noauto,noatime 1 2 /dev/hda2 none swap sw 0 0 /dev/hda3 / reiserfs noatime 0 1 /dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 24. Build kernel. Either install a prebuilt kernel or build one yourself. To build one, you need a kernel sources package (gentoo-sources is recommended). Type the emerge command as follows to get the gentoo-sources package: # emerge gentoo-sources Next, use the following command to get the genkernel package and configure a kernel using menuconfig: # emerge genkernel # genkernel --menuconfig all After you have made any changes you want to your kernel configuration, select Exit, and then choose Yes to save it. At this point, genkernel makes your new kernel. This takes a while. Configuring your own kernel can be quite tricky at first. If you run into problems, refer to the Gentoo Linux Handbook (www.gentoo.org/doc/en/handbook/ handbook-x86.xml). Select Section 7, “Configuring the Kernel,” for further information. After genkernel is complete, note the names of the kernel and boot loader. (Type ls /boot to see names that are similar to initramfs-genkernel-x86-2.6.13- gentoo-r3 and kernel-genkernel-x86-2.6.13-gentoo-r3.) 25. Add coldplug. Type the following to enable coldplug (so hardware outside of that which is detected during initialization is detected and configured automatically): # emerge coldplug # rc-update add coldplug boot 26. Configure system services. Install your system services—system logger, cron service, hotplug, and reiserfs service—and set the domain name. Then turn on each of those services, as follows: # emerge syslog-ng # rc-update add syslog-ng default # emerge vixie-cron # rc-update add vixie-cron default # emerge hotplug # rc-update add hotplug default # emerge reiserfsprogs # rc-update add domainname default 27. Add special driver support. There may be particular kernel modules required by your computer at this point. For example, if you have a special Ethernet adapter or a special type of video card, use the emerge command to install kernel modules now. You may not need any of them. Here are a few examples: # emerge nvidia-kernel # emerge nforce-audio # emerge e100 # emerge e1000 # emerge emu10k1 # emerge ati-drivers These emerge command lines are used only if you have special hardware associated with the kernel drivers. Respectively, those commands load drivers for accelerated Nvidia video cards, audio for Nvidia NForce motherboards, Intel e100 Fast Ethernet cards, Intel e1000 Gigabit Ethernet cards, Sound Blaster Live!/Audigy support for 2.4 kernel, and ATI Radeon+/FireGL graphics acceleration video cards. 28. Add user and machine information. Add a password for the root user, a regular user account name of your choosing (chris in this example), a machine name, and a domain name. If you like, you can also edit the /etc/hosts and /etc/rc.conf files to add IP addresses and host name or change the basic system startup script. # passwd # useradd chris -m -G users,wheel,audio -s /bin/bash # passwd chris # echo mymachine > /etc/hostname # echo mydomain.com > /etc/dnsdomainname # nano -w /etc/hosts # nano -w /etc/rc.conf 29. Set up networking. Edit the net file, and then run rc-update to add the eth0 interface as the default. (Uncomment the line iface eth0=”dhcp” to have the network use DHCP to start up automatically.) # nano -w /etc/conf.d/net # rc-update add net.eth0 default 30. Add kernel modules. Add any extra kernel modules that you need to add at boot time. You usually need to do this only if some piece of hardware isn’t detected and the module needed to use it isn’t automatically loaded. Edit either the kernel-2.4 or kernel-2.6 file, depending on which kernel you are using. # nano -w /etc/modules.autoload.d/kernel-<version> You can type uname -a to see what your current kernel version is. 31. Configure the boot loader. You need to install a boot loader (grub in this example) and configure it. The example makes the following assumptions about your setup: • Gentoo is installed on your first IDE hard disk (/dev/hda). • You have a separate /boot partition on /dev/hda1. • Your initrd file in the /boot directory is initrd-2.4.26-gentoo-r9. • Your kernel file in the /boot directory is kernel-2.4.26-gentoo-r9. If any of that information is different for your setup, you need to adapt the following step appropriately. To configure grub, install it with emerge, run the grub command, and then create the grub.conf file as follows: # emerge grub # grub grub> root (hd0,0) grub> setup (hd0) grub> quit # nano -w /boot/grub/grub.conf default 0 timeout 15 splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux root (hd0,0) kernel /kernel-2.6.13-gentoo-r3 root=/dev/hda0 initrd /initrd-2.6.13-gentoo-r3 32. Reboot. Exit from your chroot partition by running umount to unmount all partitions and then rebooting as follows: # exit; cd / # umount /mnt/gentoo/proc /mnt/gentoo # reboot Remove the installation disk and allow the computer to boot from hard disk. After a few moments, you should see the GRUB boot screen. Select Gentoo Linux (press Enter). From here on you will be booting from the hard disk and working directly from the operating system you installed. If you see error messages, such as missing kernel drivers, I recommend that you go to http://forums.gentoo.com or to (irc.efnet.net #linux-noob and ask znx or enigma) for the driver that’s causing problems. Chances are that someone else has had the same problem and can offer you a solution. 33. Install a Desktop. For most of us, it’s not much fun just working from the command line. The following command installs a basic set of desktop packages, including the X Window System (xfree), KDE desktop (kde), Mozilla browser (mozilla), and Openoffice.org office suite (openoffice-bin). This takes a long time to install over the network! # emerge xfree kde mozilla openoffice-bin As an alternative, if you have these packages available on CD-ROM, you can type the following commands to identify the location of the packages and install them from that location: # export PKGDIR=”/mnt/cdrom/packages” # emerge -k xfree gnome kde mozilla openoffice-bin You can also save some time by installing only GNOME or KDE (not both). If you don’t plan to create documents or spreadsheets, you probably don’t need to install openoffice-bin either. 34. Configure the X server. Now that your desktop software is installed, you need to configure the X Window System to work properly with your video card and monitor. Type the following to configure your video card and monitor: # /usr/X11R6/bin/xf86config At this point you should have a working Gentoo system. For further documentation, check out www.gentoo.org/doc/en/index.xml. |
|
|
|
Feb 22 2006, 12:13 PM
Post
#2
|
|
|
Linux-Noob Member ![]() ![]() Group: Members Posts: 20 Joined: 4-December 05 Member No.: 1231 |
Nice - spread the gentoo love
If you have another computer, I'd recommend doing a remote install - that way you can browse docs, etc while doing the install. boot as described. Once you get the prompt, #net-setup eth0 set the ip and stuff so you can get to it. #passwd set the root password #/etc/init.d/sshd start start the sshd demon. now you can continue the installation from the other machine using ssh (from linux) or putty (from windows) forums.gentoo.org is also a great place to get quick help |
|
|
|
Jul 18 2006, 01:46 PM
Post
#3
|
|
|
Linux-Noob Member ![]() ![]() Group: Members Posts: 10 Joined: 11-July 05 Member No.: 968 |
Gentoo installation was just as hectic as Arch Linux.. but i got them both to work.. currently installing Fedora 6 to see which one i like better its a showdown
Gentoo vs Arch vs Fedora who will win? Arch linux is in the lead if only they utitilzed a GUI installer or LiveCD installer like Gentoo... sigh... |
|
|
|
Jul 18 2006, 02:31 PM
Post
#4
|
|
![]() Linux-Noob Frequent Member ![]() ![]() ![]() Group: Members Posts: 57 Joined: 9-June 06 From: uk Member No.: 1545 |
arch hektik? u asure.. it's easy.. porlly easy as mandriva..
gentoo was easy too... [ ewll following teh manual] it was.. i only doen it once, was my first time.. but it's a pain in teh ass.. cos i don't liek waiting lol.. and plus arch linux on my machine N-XI is faster, fastest OS ever. -------------------- Someday. I Will Konquer It. And I Will Be Free.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 6th January 2009 - 01:33 PM |