Why choose Gentoo Linux?
Http://blog.9cbs.net/kissinger2000/archive/2004/09/18/108555.aspxred Hat, SUSE, etc. It is very convenient, but it is installed with too many useless things, and RPM does not completely solve the problem of bag dependence. Debian solves the problem of RPM, but there is no compilation of your own machine optimization. SLACKWARE? I don't know how to solve the dependency problem when the software is compiled. LFS This kind of thing that needs to be parasitic on other systems, only players like it. Gentoo, is like FreeBSD in Linux, can be compiled according to the situation, and there is a portage similar to Ports, it is too good! What is hesitant? Walk into the world of Gentoo. This article refers to the installation instructions on www.gentoo.org, deleting some things I think about the initial installation, and other installments are added. 1. About installing this new Boot CD can boot from most Linux supported CD-ROMs, including IDE and SCSI interfaces. Guided from the CD, requires at least 486 and 64M memory. (Although Gentoo Linux successfully compiled in 64M memory and 64M SWAP space, the compilation process is simply a nightmare.) Gentoo Linux is installed in three "stage" packages. Which package you want to see you want your own to compile the system. If it is the first installation, choose Stage3, the specific difference, etc., you will carefully experience it. LiveCD ISO Image file from http://www.ibiblio.org/gentoo/releases/1.4_rc4/x86/ download. It is best to choose "Gentoo-3stages" image, which contains all of the contents of Stage1, Stage2, and Stage3. 2, guide from the CD-Guided system to see an imaginative interface? Please select the boot core parameters here. If your hardware is not special, the monitor also supports 1024x768 resolution and knocks "Enter" directly. The following is the available kernel and option or press F2.
Described basic kernel available gentoo gentoo kernel (default) 800 800x600 framebuffer mode 1024 1024x768 framebuffer mode (default) 1280 1280x1024 framebuffer framebuffer mode nofb off mode smp smp kernel boot so acpi acpi = on loaded in the init mode framebuffer acpi boot memory test module memtest selectable boot options described in the initrd doataraid dofirewire fireware detection module (for firewire cdroms equipment) dokeymap order to open the non-us keyboard dopcmcia selected keymap start scanning from initrd pcmcia service doscsi loading module ide raid SCSI devices (SOLVED SODC) NoAPM NOAPM NODETECT Because HWSetup / Kudzu and Hotplug causing NODHCP Can't run NODHCP When the NODHCP is detected, DHCP cannot automatically start NOHOHOTPLUG Turn off the loading HotPlug service NORAID does not load the EVMS module NousB shut down load USB module, Close HotPlug IDE = NODMA Since the IDE device fault mandatory shutdown DMA supports partial to memory on the CACACHE cache, this requires 40M memory, but allows you umount / mnt / cdrom. In addition, additional CDROM. Under After you will automatically log in with "root" after the Enter, you can see "#" prompt, and you can switch to other terminals with Alt F2, Alt F3, Alt F4. Remember to modify the root password with "Passwd". (The starting root password is randomly generated) Please note some instructions on the screen. 3, LOAD kernel module First, look at what module loaded # lsmod is the most important thing to network, SCSI card, etc. If your NIC is not automatically configured, then use ls / lib / modules / * / kernel / drivers / net to support what network card module. Find the corresponding module, use the following command load: # modprobe 8139too (8139too is my network card, please replace it with your own network card) If there is SCSI, ATA-RAID and other devices, also load it with a similar method. If there is a problem, look at the Gentoo homepage. Gentoo LiveCD usually opened the hard disk's DMA support, if not, use HDPARM to set hard disk DMA: # hdparm -d 1 / dev / hda (Open DMA Support) # hdparm -d1 -a1 -m16 -u1 -a64 / dev / HDA (Open DMA Support and add another secure reinforced performance option) # HDPARM -X66 / DEV / HDA (forced open ULTRA-DMA support, pay attention to some issues) 4, configure the network / sbin / ifconfig See if the network is already set.
If you are fine, you can see Eth0 Link Encap: Ethernet Hwaddr 00: 50: BA: 8F: 61: 7A inet addr: 192.168.0.2 bcast6 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 TXQuelen: 100 rx bytes: 485691215 (463.1 MB) TX bytes: 123951388 (118.2 MB) Interrupt: 11 Test it with ping. If normal, congratulations! If you have access to the Internet through ADSL (no broadband?, Stop it, don't continue ^ _ ^), you need to run the script # ADSL-SETUP # adsl-start If there is a problem, check / etc / ppp / pap-secrets or / etc / PPP / Chap-Secrets These two files. The easiest way is # Net-setup eth0 as a prompt setting. If the DHCP service is available, then the # dhcpcd eth0 it is not, it is not difficult to manually configure # ifconfig eth0 192.168.168.168 broadcast 192.168.168.255 netmask 255.255.255.0 # / sbin / route add -net default gw 192.168.168.1 netmask 0.0.0.0 metric 1 (Set the default gateway) Pay attention to modifying /etc/resolv.conf, mine as follows: domain mydomain.com Nameserver 202.101.103.54 (Gentoo Default Editor is nano.vi need additional installation.) If you use the agent, then Also # export http_proxy = "Machine.company.com:1234" # export ftp_proxy = "$ http_proxy" # export rync_proxy = "$ http_proxy" and ping www.sina.com.cn Try Network Normal? 5, set the system time (this can be omitted) # Date Thu Feb 27 09:04:42 CST 2003 (if Your Date Is Wrong, Set Your Date with this next command) # DATE 022709042003 (Date MMDDHMMCCYY) 6, file Systems, partitions and block devices I like to use CFDisk partitions, FDISK is not intuitive enough. # cfdisk / dev / hda at least one / and a swap partition, this will not be said, you should know. Suppose / Boot / DEV / HDA1 EXT3 (100M) SWAP / DEV / HDA2 / / / DEV / HDA3 Reiserfs (1.5G) After classifying the file system, create a file system, or use EXT3 and Reiserfs, other you look at the Gentoo home page.
# mke2fs -j / dev / hda1 # mkswap / dev / hda2 # mkreiserfs / dev / hda3 7, Mount Partition First, activate SWAP partition # swapon / dev / hda2, create a hookpoint and mount partition # mkdir / mnt / gentoo # Mount / DEV / HDA3 / MNT / GENTOO (first mount "/" partition) # mkdir / mnt / gentoo / boot # mount / dev / hda1 / mnt / gentoo / boot (re-mount "/ boot" partition) 8, stage package Installation of Chroot, choose Stage3 # CD / MNT / Gentoo # tar -xvjpf /mnt/cdrom/gentoo/stage3-x86-1.4_rc4.tar.bz2 then enter chroot # mount -t proc proc / magnetoo / proc # cp /etc/resolv.conf /mnt/gento/etc/resolv.conf # chroot / mnt / gentoo / bin / bash # env-update # Source / etc / profile 9, use SYNC to get the current portage # Emerge Sync needs Time to see your network is slow. 10. Set the Gentoo Compilation Optimization Option (make.conf) if it is not for these optimized compilation options, calculated with Debian. First install a breakpoint resumed software #EMERGE NET-WWW / Prozilla after completion # nano -w /etc/make.conf at least two places: the first place is cflags = "- O3-MCPU = i686 -pipe "According to your CPU change, for example, my P4 CPU, I will change to cflags =" - o3-march = pentium4 -pipe ". The second place is the annotated #FetchCommand = '/ usr / Bin / Proz --NO-Getch-S $ {URI} -p {discdir} '## is turned off, it is to open Prozilla, after modify, press CTRL X to save exit. 11. From Stage3, we chose Stage3, so it will start directly from this. If you choose Stage1, please see Appendix 1.
# @ @ * "# Emerge -up system (here you can also be world) #EMERGE -U system (同) # unset config_protect 12, set time zone China should be this #LN -SF / USR / Share / ZoneInfo / Asia / Shanghai / etc / localtime 13 After completing, compile the kernel # cd / usr / src / linux # make menuconfig # make Dep && make Clean bzimage modules modules_install # CP / USR / SRC / Linux / Arch / i386 / boot / bzimage / boot Need to pay attention to Gentoo use devfs When the file system is compiled, select "Code Mature Level Options", select Y, then "File System", to "/ dev file system", select Y, select Y, "Automatic or Mount At Boot Time". Other choices according to your own situation. Select one of the three LOG daemons below # 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 r / metalog # rc-update add metalog default or # emerge app-admin / msyslog # rc-update add msyslog default cron also need it # emerge sys-apps / dcron # rc-update add dcron default # crontab / etc / crontab or # Emerge sys-apps / fcron # rc-update add fcron Default # crontab / etc / crontab or # Emerge sys-apps / vcron # rc-update add vcron default you do not need to run crontab / etc / crontab if using vcron. Other bags yourself do.
14. Modify / etc / fstab # nano -w / etc / fstab In this example, it should be the case # / 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 is safe to drop the noatime options if you want and to # switch between notail and tail freely #
21 Enjoy your own optimized system! Appendix I 1.Starting from Stage1 Note:.. If you are not starting from a stage1 tarball, skip this section The stage1 tarball is for complete customization and optimization If you have picked this tarball, you are most likely looking to have an uber- optimized and up-to-date system. Have fun, because optimization is what Gentoo Linux is all about! Installing from a stage1 takes a lot of time, but the result is a system that has been optimized from the ground up for your specific machine and needs. Now, it is time to start the "bootstrap" process. This process takes about two hours on my 1200MHz AMD Athlon system. During this time, the GNU C library, compiler suite and other key system programs will be built. Start the bootstrap as follows: Code listing 11.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 To change where Portage stores these temporary files, set a new PORTAGE_TMPDIR before starting the bootstrap process, as follows: Code listing 11.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. once this process completes, Your System Will Be Equivalent to a "stage2"