After a thrilling upgrade of gentoo installation and usage for nearly one day (fortunately, the system has not been suspended and it feels faster ), finally, I want to calm down and write down the installation, configuration, and upgrade of gentoo for a week. First, I want to commemorate it, in addition, it may be helpful to other friends who want to use gentoo. Linux is not very long. I used ubuntu for about one and a half years and archlinux for one year. Some people often talk about gentoo when they visit the Forum in archlinux. It seems that gentoo is a master. At that time, I felt ridiculous. Were there any major differences between different releases? I encountered some problems when I used ubuntu to switch to archlinux, that is, the graphics card driver. Others were quite smooth, where can gentoo go? In addition, the installation software of gentoo must be compiled, and my current performance is not good. I want to consider it if I change it later. So I thought about it several times, but I definitely did not try. One week ago (2010, March 4), I updated both mplayer and ffmpeg manually and found that the compilation was a bit tangled. mplayer needed the ffmpeg source code, but ffmpeg had to be compiled and translated separately, later, after the mplayer was upgraded to ffmpeg with the so of ffmpeg, The mplayer crashed and re-edited several times to complete the problem. Several packages in the system are compiled by themselves, mainly to remove unnecessary dependencies, but manual maintenance is too troublesome, so I thought of gentoo again. At that time, it was more than 10 o'clock, so I wanted to start the next day. Nonsense. The hard disk partition before www.2cto.com is like this: /dev/sda1 ext4 6g/dev/sda2 2g not used/dev/sda3 ntfs 30g/dev/sda4 jfs 66g/home where/dev/sda2 is previous swap, however, if you don't need the sleep function, you don't need it because swap doesn't mean much. The remaining three partitions are all important and cannot be moved. How can this problem be installed. If you want to try sda2, you can try sda2 first. If you cannot install sda2, it will be okay. So I converted sda2 into reiserfs (someone said this format is good, but I have never used it, just to try it out ). Download the stage3-i686-20110301.tar.bz2 and portage-latest.tar. xz. (Previous file updated on Monday) (I am using 32-bit) Domestic images are: http://mirrors.163.com/gentoo/ http://mirrors.sohu.com/gentoo/ http://mirror.bjtu.edu.cn/gentoo/ http://mirrors.xmu.edu.cn/gentoo/ these two files can be found inside. Mount sda2 on/media/z and put the file in: sudo mount/dev/sda2/media/z sudo tar xvpf stage3-i686-20110301.tar.bz2-C/media/z sudo tar xvpf portage-latest.tar.xz-C/media/z/usr prepare the chroot environment: sudo mount-t proc none/media/z/proc sudo mount-vt devpts/media/z/dev/pts sudo chroot/media/z // bin/bash now chroot in, subsequent operations, if not specifically, are performed in this environment. Initialize the environment variable www.2cto.com: env-update; source/etc/profile Modify/etc/make. conf, this is very important. It is best to change it to the correct position first, otherwise you will get it later (I am, don't want to get it, change multiple times, and re-compile various things after the change): Add to the source: GENTOO_MIRRORS = "http://mirror.bjtu.edu.cn/gentoo/" SYNC = "rsync: // developer.bjtu.edu.cn/gentoo-portage" the above four sites have instructions on how to write this. MAKEOPTS = "-j3" #-jn, n is the kernel shujia 1, used for multi-thread compilation, if this parameter is not set, USE INPUT_DEVICES = "keyboard mouse synaptics" # keyboard, mouse, and touchpad # The following is an important USE. You can USE only USE = "X gtk" at the beginning ", but it was easy to write before, or it will be troublesome in the future. USE = "-pppd-alsa-fortran sse sse2 ssse3 mmx sdl v4l v4l2 oss oss4 X gtk unicode truetype jpeg png gif cairo zsh-completion fontconfig video opengl" VIDEO_CARDS = "radeon" # This important, the graphics card driver type. For details, refer to the official wiki. My name is ati x2300 and I can only use this open-source driver. # CCEPT_KEYWORDS = "~ X86 "# Note: If you want to use the latest software, you can add this line. However, if it is the first installation, it is strongly not recommended to add it. Otherwise, it will increase the installation difficulty and change it first. Modify/etc/locale. gen, plus (write as needed) en_US.UTF-8 UTF-8 zh_CN.UTF-8 UTF-8 zh_CN.GB2312 GB2312 zh_CN.GBK GBK run locale-gen cp/usr/share/zoneinfo/Asia/Shanghai/etc/localtime Modify/etc/conf. d/clock CLOCK = "local" TIMEZONE = "Asia/Shanghai" change/etc/resolv. conf, put the local/etc/resolv. write the conf content into it, otherwise it will not be accessible to the Internet. Change/etc/fstab. This can also be written after the kernel is installed. Invalid. xz can skip this step, but it is best to run it): emerge -- sync to install the kernel source code: emerge gentoo-sources and then start to compile the kernel, if you have experience in manual Kernel configuration, we strongly recommend that you manually configure and compile: cd/usr/src/linux make menuconfig make; make modules_install cp arch/x86/boot/bzImage/boot, otherwise, it is best to use genkernel: emerge genkernel cd/usr/src/linux/genkernel -- menuconfig all. For details about how to configure the kernel, go online and query it by yourself. If the following method is not available, it can also be started. The Compilation Time is related to many factors, ranging from dozens of minutes to hours. User-related: (osily is the user name you want to create) passwd useradd-m-G audio, cdrom, portage, usb, video, wheel, users-s/bin/bash osily passwd osily if fstab has not been changed before, you must change it now, and then change the/boot/grub/menu of your system. lst. The official wiki is clearly written here. We recommend that you check it. Www.2cto.com can continue to install other software, such as xorg-server, but it is best to restart it to see if it can be entered. If not, it may be the kernel (especially the self-compiled kernel). If there is no problem with the kernel, check whether/boot/grub/menu. lst is faulty. Change it several times. If it works properly, you can continue compilation directly here, but it is best to return the original system to continue. You can write a script like this :#! /Bin/bash sudo mount/dev/sda2/media/z/sudo mount-t proc none/media/z/proc sudo mount-vt devpts/media/z/dev/ pts sudo chroot/media/z // bin/bash can be run in the chroot environment, if the environment variable is not running properly: env-update; source/etc/profile, then install the required things, mainly depending on yourself, such as dhcpcd, sudo, vim ......, General tools can be used directly in emerge xxx. Check the specific usage of emerge online. If you want a desktop environment, follow these steps: Install the basic tool and install xorg-server directly. Note the prerequisites:/etc/make. the video card and input device variables in conf must be correct. It will take more than an hour to install many things. Please wait. After installation :( xorg-x11 and driver related, please view the relevant part of the official website wiki, this seems to be omitted, do not remember) www.2cto.com eselect opengl set xorg-x11 if installed, You can restart the first try, after entering, run startx. This is a very exciting moment. If it shows that no xterm can be found, congratulations, the graphics driver is basically normal, naturally, there will be a variety of strange problems &...... & × ...... &...... % × &, Congratulations, you will have a deep and thorough understanding of the installation of the video card driver and the writing of xorg. conf in the next time. If it is the former, you can go back and install other things, such as xterm (it is better to restart after installation to see if it is normal. If it is not normal, then you can go back and handle the problem of the graphics card driver), openbox or even gnome and kde. Later. If the resolution of the latter or the xterm is incorrect, and the mouse and keyboard touchpad are not available, you have to wait for a while, although it is not difficult for you to install the kernel before, it is likely to make enough tangle or even give up. This is also the most confusing part of my installation process, and I can't recall it clearly, because I have reinstalled it four times in succession (for the first time, due to insufficient space for 2 GB, 2 and 3 times because of the X segment error, it is very tangled), and it is similar to the back-to-back graphics card driver, and the re-compilation is performed multiple times. If it is an X-segment error, check whether the error message is loaded with an so error. If yes, move the so to another location and try again. If it is not a segment error, it may be xorg. if the conf file has a problem, some drivers do not need this problem. By default, it does not exist. If you try to delete the file first, use X-configure to generate a new one and then use X-config xorg. conf. if new cannot be tried, it is likely that the kernel is not configured. This is often troublesome. You can read the wiki on the official website carefully. If not, go to the linuxsir and other forums to find or ask. After re-compiling the kernel, it is best to re-compile the X-related packages (there are many ......). Another possibility is that the driver you choose does not support your graphics card. For example, many old ati graphics cards cannot use the current closed source driver. In this way, you can try other methods, change/etc/make. conf, and then re-compile the related packages. There are other possibilities ...... If xterm can be entered, but the mouse and keyboard cannot be used, ensure/etc/make. if conf is correct, install the xf86-input-evdev if the xf86-input-keyboard xf86-input-mouse xf86-input-synaptics does not. conf is not correctly written. These packages may not be easy to use when installed. You may need to re-compile more packages. This problem should be well solved. If the resolution is not normal, first of all to confirm that the use of the xf86-video-vesa is not the driver (according to my process will not install to this package), if it is OK, the resolution is not normal. Then there is still a problem with the installation of the graphics card driver, and there is xorg. conf. Find more on the Internet. If the problem of the video card driver cannot be solved for a while, it may take a long time or even wait until you give up, or you are willing to skip the graphic interface. Www.2cto.com if the above are normal, gentoo is very close to you. Next, we mainly deploy the desktop environment. We recommend lightweight ones (such as openbox, fluxbox, fvwm, dwm, and awesome) that can work with panels (such as tint2, BMP anel, and pypanel ), otherwise it will take a long time to compile. After installation, configure as needed. There are still no major problems involved: drivers of sound cards, NICS, cameras, and other devices, as well as abnormal touchpad. If the touchpad does not respond with a finger but the finger moves, try synclient TapButton1 = 1 if horizontal scrolling is not available: synclient HorizEdgeScroll = 1 for other issues, please query synclient usage. Put the preceding command in the startup script, for example. xinitrc to ensure that it can be called before entering X. Sound card problems. If alsa is used, the kernel compiled by genkernel by default contains the alsa driver, which should be used normally. If it is not included, it will be a little troublesome. If the kernel contains an oss Driver (an earlier version), it may also work normally, but the effect should be poor. If you can bear it, forget it. If none of www.2cto.com is available, you can choose to install the alsa or oss driver if the sound card supported by the kernel is enabled (alsa and oss are included in the menuconfig, and the previous layer should be selected, I personally recommend using oss4, which has a good sound quality and consumes less resources (I tried to reduce the cpu usage by half when using the kernel alsa than when using the mplayer mp3 ). However, it is not easy to install oss4 because it is not in the portage. You must use layman to connect to a foreign network. Alsa has not been installed. The wiki on the official website provides detailed instructions. If you want to install oss4 now, you can: emerge layman-a oss-overlay and then/etc/make. add "source/var/lib/layman/make" to the conf file. conf and then emerge oss or emerge oss-devel should be installed normally if the network is okay. Make sure that/usr/src/linux points to the current kernel and then/etc/init. d/oss start. It usually takes a few minutes to compile the kernel module. If it succeeds, you can use it. You can try osstest. If it fails, the problem will be troublesome, you may need to re-compile the kernel.