1. for the quick installation method, see. However, I have not installed it successfully, which may be a problem with the optical drive. GentooLinux quick installation method there are several installation methods to install gentoolinux. The following is the official minimum installation method. The installation is successful. II. installation steps 1. prepare the boot disk...
I. installation method
For the quick installation method, see, but I have not installed it successfully, it may be a problem with the optical drive. How to Install Gentoo in Linux
Gentoo linux has several installation methods. the following uses the official minimum installation method. The installation is successful.
II. installation steps
1. prepare the boot disk
1.1 First Download gentoo minimal installation disc, http://mirrors.sohu.com/gentoo/releases/x86/current-stage3/install-x86-minimal-20111129.iso
1.2. use UltraISO to burn images
1.3. Insert a USB flash drive
1.4. use UltralISO to open the iso file
1.5. Choose Start> write hard disk image
1.6. format the USB flash drive and click write again.
1.7. you can use a USB flash drive to start the system and install it in the BIOS.
2. formal installation
2.1. Select USB Flash Drive for BIOS boot.
2.2. start the system boot
2.3. disk partition
Use fdisk or cfdisk disk to partition a disk.
Here I personally partition the disk as follows:
Device size mount point
/Dev/sda1 30G NFTS
/Dev/sda2 300 M/boot
/Dev/sda3 60G/
/Dev/sda5 2G swap
/Dev/sda6 60G/home
The usage of fdisk is as follows, which is excerpted from the official documentation for the use of fdisk during Gentoo installation.
2.5 mount a partition
Mount/dev/sda3/mnt/gentoo/
Mount/dev/sda2/mnt/gentoo/boot
Mount/dev/sda6/mnt/gentoo/home
2.6 download and decompress stage3
Cd/mnt/gentoo
Then use
Wget http://mirrors.sohu.com/gentoo/releases/x86/current-stage3/stage3-i686-20111129.tar.bz2
Or use the links command and click the corresponding link for download.
Extract
Tar xvjpf stage *
2.7 install Portage
Download the http://mirrors.sohu.com/gentoo/snapshots/portage-latest.tar.bz2 as above
Decompress the package
2.8 configure compilation options
Open the make. conf file.
Nano-w/mnt/gentoo/etc/make. conf
Set CFLAGS and CXXFLAGS as follows:
CFLAGS = "-O2-march = nocona-pipe"
# Use the same settings for the two variables
CXXFLAGS = "$ {CFLAGS }"
CHOST = "i686-pc-linux-gnu"
MAKEOPTS = "-j3"
USE = "-gtk-gnome3 qt3qt4 kde alsa cdr"
GENTOO_MIRRORS = "http://mirrors.sohu.com/gentoo"
3. Install Gentoo basic system
3.1 copy dns information and mount the proc and dev file systems
# Cp-L/etc/resolv. conf/mnt/gentoo/etc/
# Mount-t proc none/mnt/gentoo/proc
# Mount-o bind/dev/mnt/gentoo/dev
3.2 enter the new Gentoo environment
# Chroot/mnt/gentoo/bin/bash
# Env-update
> Regenerating/etc/ld. so. cache...
# Source/etc/profile
# Export PS1 = "(chroot) $ PS1"
3.3 update the Portage tree
Emerge -- sync
3.4 Select profile
# Eselect profile list
# Eselect profile set n
3.5 set LOCALE
# Nano-w/etc/locale. gen
Add as follows:
En_US ISO-8859-1
En_US.UTF-8 UTF-8
Zh_CN GB18030
Zh_CN.GBK GBK
Zh_CN.GB2312 GB2312
Zh_CN.UTF-8 UTF-8
3.6 installation source code
Emerge gentoo-sources
3.7 configure the kernel
Make menuconfig
This option is selected based on the characteristics of your computer. for example, if you change the CPU type family in the kernel option to CORE2, because it is not large memory (greater than 4 GB), the function of large memory can be deleted here, you can crop the PAE function and modify the hardware driver according to your own hardware type. we recommend that you modify the driver if it is clear, and keep the default value if it is not clear. The kernel configuration has a great impact on the system performance in the future.
3.8 then compile the kernel and driver and install the driver
Make & make modules_install
3.9 install the kernel
Cp arch/x86/boot/bzImage/boot/kernel-3.0.6-gentoo
Note that you must modify the kernel name corresponding to your own kernel version.
IV. configuration system
4.1 modify/etc/fstab
#/Etc/fstab: static file system information.
#
# Noatime turns off atimes for increased performance (atimes normally aren't
# Needed); notail increases performance of ReiserFS (at the expense of storage
# Efficiency). It's safe to drop the noatime options if you want and
# Switch between notail/tail freely.
#
# The root filesystem shoshould have a pass number of either 0 or 1.
# All other filesystems shocould have a pass number of 0 or greater than 1.
#
# See the manpage fstab (5) for more information.
#
#
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/Dev/sda2/boot ext3 defaults, noatime 1 2
/Dev/sda3/ext3 noatime 1 1
/Dev/sda5 none swap sw 0 0
/Dev/sda6/home ext3 defaults, noatime 1 2
/Dev/cdrom/mnt/cdrom auto noauto, ro 0 0
4.2 configure the network
# Nano-w/etc/conf. d/hostname
(Set the HOSTNAME variable value to the host name)
HOSTNAME = "yan-laptop"
# Nano-w/etc/conf. d/net
(Set the variable value of dns_domain to your domain name)
Dns_domain_lo = "homenetwork"
Config_eth0 = ("192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255 ")
Routes_eth0 = ("default via 192.168.0.1 ")
Config_eth0 = ("dhcp ")
# Cd/etc/init. d
# Ln-s net. lo net. eth0
# Rc-update add net. eth0 default
# Nano-w/etc/hosts
127.0.0.1 localhost yan-laptop
Finally, install a DHCP client to allow the machine to automatically configure the network.
Emerge dhcpcd
5. install GRUB boot
Emerge grub
5.1 modify/boot/grub. cfg
Nano-w/etc/boot/grub. cfg
The file content is as follows:
# This is a sample grub. conf for use with Genkernel, per the Gentoo handbook
# Http://www.gentoo.org/doc/en/handbook/handbook-x86.xml? Part = 1 & chap = 10 # doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# Shoshould consult the handbook. Alternatively, consult the grub. conf. sample that
# Is already Ded with the Grub documentation.
Default 0
Timeout 5
# Splashimage = (hd0, 0)/boot/grub/splash.xpm.gz
Title Gentoo Linux 3.0.6
Root (hd0, 1)
Kernel/boot/kernel-3.0.6-gentoo root =/dev/sda3
Title Windows 7
Rootnoverify (hd0, 0)
Makeactive
Chainloader + 1
# Vim: ft = conf:
5.2 Create mtab
Grep-v rootfs/proc/mounts>/etc/mtab
5.3 install grub
Grub-install -- no-floppy/dev/sda
Restart, select Gentoo, start successfully, and the basic system is installed successfully.
Install the KDE desktop whenever possible. However, one day of compilation is required. This is what Gentoo features. a high degree of customization can achieve high efficiency. This is the Philosopy of Gentoo.
From Yan Ming -- To Be a Linux Kernel Hacker