Gentoo Installation Notes

Source: Internet
Author: User
Tags naming convention

This installation is based primarily on the official wiki Gentoo. Install with Virtual box.

1. From the Gentoo official download minimal LiveCD.

2. Create a new virtual computer and load the LiveCD of Gentoo minimal in virtual box.

3. Start the virtual computer, at the startup prompt, the user can press F1 button to display the available kernel.

Kernel Description
Gentoo Default kernel, support for K8 CPUs (including support for NUMA) and EM64T CPUs
Gentoo-nofb Same as Gentoo, but frame buffering is not supported (framebuffer)
Memtest86 Error detecting local memory
I choose Gentoo here.

Boot:gentoo then enter.

Press the F2 key to display the available startup options. I'm not using startup options here.

4. Enter the Gentoo LiveCD system.


5. Configure the live CD Gentoo network because the installation process requires a network. The system's interface name can be very different from the old eth0 naming convention. The recent installation media may display the generic network interface name as Eno0, ens1, or ENP5S0. Check the ifconfig output to find an interface with the IP address associated with your local network.

If the network is not configured automatically, the easiest way to do this is to run the Net-setup script setting: Root #net-setup eth0

Net-setup will ask some questions about the network environment. When all this is done, the network connection should work.

You can also root #dhcpcd eth0 from the dynamic settings network.

Then root #ping www.baidu.com test network access.


6. Partition the hard disk of the virtual computer, use Fdisk for partitioning, using the MBR, not using GPT.

Partitioning File System size Description
/dev/sda1 (bootstrapper) 2M BIOS boot partition
/dev/sda2 Ext2 (or VFAT) 128M Boot partition
/dev/sda3 (Swap) 512M and higher Swap partition
/dev/sda4 Ext4 The remaining disks Root partition

7. Create a file system.

Root #mkfs. ext2/dev/sda2

Root #mkfs. ext4/dev/sda4

Root #mkswap/dev/sda3

Root #swapon/dev/sda3

8. Mount the file system.

Root #mount/mnt/gentoo

Root #mkdir/mnt/gentoo/boot

Root #mount/dev/sda2/mnt/gentoo/boot

9. Install Stage3.

Ensure that the date and time are set correctly before installing Gentoo. An incorrectly configured clock may cause strange results in the future. To verify the current date and time, run the Date:root #date

Fri Mar 16:21:18 UTC 2005
As long as it's not bad enough.

Select a stage tar package, if you want to install x64 Gentoo system, if you want to be compatible with the 32-bit program, you need to select the Multilib tar3 package, if you choose No-multilib TAR3 Package, then the final will not be compatible with 32-bit program. Because I this is the installation of the x86 Gentoo system, there is no no-multilib and multilib points, it does not matter.

Download phase tar pack, go to mount the Gentoo mount point (much like/mnt/gentoo) on the root filesystem:

Root #cd/mnt/gentoo

Depending on the installation media, there is a bunch of tools available to download a phase. One of these tools is links, a graphical, directory-driven browser. To download a phase, access to the Gentoo mirror list like this:

Root #links https://www.gentoo.org/downloads/mirrors/

In the mirror list, select a nearby mirror, and I choose a 163 mirror. Access to releases/x86/autobuilds/. All available stage files will be displayed there. Select one, and then press D to download it. When finished, press Q to exit the browser. After downloading the stage file, you can verify the integrity of the downloaded stage package. I just ignored it.

Undo Phase Tar packets, now, unzip the downloaded stage to the system. We use tar to do this:

Root #tar xvjpf stage3-*.tar.bz2--xattrs

The official wiki also has to configure/mnt/gentoo/etc/portage/make.conf, and I simply ignore it because it seems like the default is available.

10. Choose a landscape site. Gentoo provides a good tool called Mirrorselect, which provides a good exchange for the user to choose the desired image. Just move the cursor to select the mirror and press SPACEBAR to select one or more mirrors.

Root #mirrorselect-i-o >>/mnt/gentoo/etc/portage/make.conf

The second important step in selecting a mirror is to configure the Gentoo main warehouse with the/etc/portage/repos.conf/gentoo.conf file.

Root #mkdir/mnt/gentoo/etc/portage/repos.conf

Root #cp/mnt/gentoo/usr/share/portage/config/repos.conf/mnt/gentoo/etc/portage/repos.conf/gentoo.conf

Without modification.

Copy DNS information and copy DNS information from the live CD to the Gentoo system you want to install.

Root #cp-L/etc/resolv.conf/mnt/gentoo/etc/

11. Mount the necessary file system

Root #mount-T proc Proc/mnt/gentoo/proc

Root #mount--rbind/sys/mnt/gentoo/sys

Root #mount--make-rslave/mnt/gentoo/sys

Root #mount--rbind/dev/mnt/gentoo/dev

Root #mount--make-rslave/mnt/gentoo/dev

The--make-rslave operation is required to install SYSTEMD support at a later time.

12. Entering a new environment

Root #chroot/mnt/gentoo/bin/bash

Root #source/etc/profile

Root #export ps1= "(chroot) $PS 1"

13. Configure Portage.
Install the Portage snapshot. A collection of files that tell portage which software headers are available for installation, which profiles can be selected by administrators, and so on. Recommended use of Emerge-webrsync. This will get the latest portage snapshot (Gentoo to release a benchmark daily) and install it into the system from a gentoo image.

Root #emerge-webrsync

Emerge-webrsync may not be able to find the/usr/portage/location. This is expected and don't worry-the tool will create this location.

Portage may be prompted to recommend that some updates be run. This is because after a new portage snapshot is installed, Portage discovers that some of the software already installed in the Stage3 file has an updated version. It can now be safely ignored, and the update can be gentoo when the installation is complete.

14. Select the correct configuration file.

Using Eselect, you can see what configuration files are currently being used by the system and now use profile

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.