ComputersOS

Installing Gentoo Linux - Step-by-Step Instruction

The Linux operating system is known all over the world. Most often, inexperienced users use the Ubuntu distribution, because it is simple and free. However, although other distributions are also free, they are less popular. It is quite difficult to name the installation of Gentoo. But with our instructions for sure it will work out.

What is Gentoo Linux?

This is a distribution that is known for its wide capabilities, complexity, customization capabilities. But it is worth noting that it is not for everyone, and when working it is necessary to actively include the brain, because without specialized knowledge it will not be possible to use the full functionality of this OS. Often you will have to turn to different kinds of instructions, but that's after. It is important to remember that the installation of packages in Gentoo is done from sources using the special PORTAGE tool. This is more complicated, but the user can choose which packages and functions to install.

Depending on the volume of assembly, the installation can take very little time (a couple of minutes), and can last for days.

Advantages and disadvantages

It is believed that it is Gentoo Linux is the fastest distribution. But everywhere and always there are certain drawbacks. "Genta" (or "Gentoo") refers to distributions of Source-based Linux, which increases the speed of work. But often the saved time has to be spent on a long installation (read: compilation) of packages. One of the key features of "Gentoo" is the optimization for hardware. This is achieved thanks to USE-flags (they will be described below), optimizations and builds of programs from the sources, connecting / disconnecting different modules.

The key advantage of the distribution is the ability to make anything from it. может стать обычным сервером или рабочей станцией. Thanks to Portage, Gen too can become a regular server or workstation. The second advantage is flexibility of application. This distribution is multi-platform and works with any processor architecture. The system has already been successfully ported to the following architectures:

  1. X86.
  2. X64.
  3. ARM.
  4. PowerPc970.
  5. PowerPC.
  6. Dec Alpha.
  7. IBM / 390.
  8. 68K.
  9. Sparc.
  10. PA-RISC.
  11. MIPS.
  12. SuperH.
  13. PowerPC G5.

Also Gentoo is protected from various kinds of vulnerabilities. Packages are updated very quickly, as well as patching vulnerability holes. There are many sites with unofficial program assemblies and official binary assemblies.

As a disadvantage, we will point out the process of installing Gentoo. Beginners who previously had no experience using this distribution will be difficult. But thanks to the instructions, everything will turn out.

How do I install Gentoo? Instructions

To start, you must have a Ubuntu distribution installed on your computer. You will need root privileges, so make sure that they are there. You also need an internet connection.

The very first step is installing in the Gentoo chroot. There are two ways to do this:

  1. At the command line, write: sudo apt-get install dchroot debootstrap.
  2. Use Synaptic to install the debootstrap and dchroot packages. This is necessary for the Linux OS to think that its "native" directory is different from the usual one.

Now we need to redistribute the disk partitions or create new ones if there is free space. But to work with partitions you need to be careful, because there is a risk of losing all data. Many forums write that it is preferable to have many different sections. At a minimum, you will need a primary partition (/), as well as the / boot and / var partitions. Although there is / swap (used for swapping) and home / home.

After creating new partitions, we format them. For partitions / boot, / home, main (/), / var, you need to use ext3 or reiser2.

Now create the / mnt / gentoo folder. For each section created by us, we need our own folder.

We mount here new sections. To do this, on the command line, write:

  1. Sudo mount / dev / sda5 / mnt / gentoo.
  2. Sudo mount / dev / sda6 / mnt / gentoo / home.

Sections sda5 and sda6 will contain the root and home directories.

Be sure to check that the date is correct. If not, then using the command and syntax, you can set the correct date: date MMDDhhmmYYYY.

Now open the browser and go to the download site for the distribution. We are looking for a suitable mirror for your location.

From the releases / ia64 / 2008.0 / stages directory, load the stage3 tarball. Now move the archive to the Gentoo folder. We do this with the command: mv stage3 * .bz2 * / mnt / gentoo.

We move to this directory (cd / mnt / gentoo) and check the archive with md5. We write on the command line: md5sum -c stage3 * .md5. So you can check if the archive is damaged and if everything is fine with it. If you do not get an OK response, you'll have to download it again.

Go to the next step of installing and configuring Gentoo. You need to extract the files from the archive. Use the command: sudo tar xvjpf stage3 * .bz2 and wait for the completion.

Configuring Gentoo

Now we have the main programs in the Gentoo section. Without fail, we will need Portage, a special tool for managing packages. Thanks to him we will get control over the installed programs. To do this, go back to the download site. In the snapshots section, we look for the last one by the date of adding Portage. Download it and move it to the / mnt / gentoo folder. The easiest way to do this is simply to register the command: tar xvjf /mnt/gentoo/portage-.tar.bz2 -C / mnt / gentoo / usr.

What is Portage?

A couple of words should be said about this tool. Portage is a system with which you can manage packages in the distribution. It is designed to simplify the procedure for installing programs and source codes. With it, you can delete packets, update them, perform synchronization using rsync. Once Portage downloads files, the system builds the program using the downloaded sources, and optimizes it.

At this stage, install compile flags. Open make.conf, which is located in / gentoo / etc. We use a plain text editor. The make.conf.example document describes the statement with make variables. Read it well. Use the specified variables and the configuration file to install.

We need to make sure that the settings have been transferred from the Ubuntu distribution without any changes. The main thing is the dns-configuration (sudo cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf) and the proc (sudo mount -t proc none / mnt / gentoo / proc) system.

If the settings are ok, go to chroot. To do it, you need:

  1. Change the root directory. At the command line, write: sudo chroot / mnt / gentoo / bin / bash
  2. Update the environment and let the terminal know where it is located. At the command line: / usr / sbin / env-update.
  3. Put this in memory: source / etc / profile.

From now on, you are inside the Gentoo system.

Compiling the kernel

The most important step is to compile the kernel - the part of the system that determines when and what program to give access to. Without a kernel, no operating system works. Also install packages from rsync-server. For this, enter the command: emerge --sync. For the sake of clarity, assume that the kernel version 2.6 will be installed. At this stage, you need to declare the USE flags that tell the compiler which options and characteristics to apply. It is important to specify the correct flags, otherwise the result may not be entirely expected.

Each added flag is a word. The options to be removed are indicated by a "-" before the word. For example, to install and compile programs and options with support for ogg, we just need to add an ogg. If we do not need this, then write -ogg.

To understand which USE flags you need to select, be sure to see the Gentoo documentation.

After selecting the flags, open make.conf in the / etc / directory and enter them.

Setting the time zone

The next step is to set the time zone. They are all in the / usr / share / zoneinfo directory. We pass here, enter the ls command and see the list of available ones. We copy the time zone we need in / etc / localtime. We use the command: # cp / usr / share / zoneinfo / GMT / etc / localtime.

After setting the time zone, you can download and compile the kernel. Enter the command: # emerge gentoo-sources. Now the most difficult step is to configure the kernel in such a way that it has support for the packages we need. If the kernel is not installed correctly, the required functions may not be available.

Running:

  • Cd / usr / src / linux;
  • Make menuconfig.

So we get into the kernel settings. Select all the drivers you need to boot the system. You need to check that they are all built into the kernel, otherwise the system will not be able to boot up corny. Do not forget to enable support for your file system. Choose as far as possible all the necessary network drivers: wireless and local network, as well as the type and family of the processor.

Now, to start the compilation, type: make && make modules_install. The process will take some time. Then enter: make -j2 && make modules_install. The kernel image is copied to the / boot folder.

The last is the configuration of kernel modules. To find all available modules, run the command: find / lib / modules / (kernel version) / -type f -iname '* .o' -or -iname '* .ko'. Add from the list in the /etc/modules.autoload.d/kernel-2.6 folder those that are downloaded automatically. At this point, the Gentoo installation is complete. You can start working with the OS.

Tips for installing KDE Gentoo

There will be problems during the installation process. In another way, it simply can not be. Be sure to contact the Gentoo forum to solve your problems. In any case, follow these instructions.

There are often debates about how to install Gentoo on UEFI. It is important that an EFI partition is created. It should be a variant of the FAT file system. The UEFI specification says that UEFI-firmware works with FAT12, 16 and 32, but it is recommended to use the FAT32 system.

Also, in a tarball, a group and a user of portage may be absent. When using schroot on a host system, you need to create them manually. In this case, the files in the / gentoo / etc directory and the password will be overwritten (you can change them directly).

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.