Gentoo installation tips and tricks/ru

The Gentoo installation allows for very flexible approaches to the various installation methods. As it is almost impossible to insert every single tip or trick in the installation instructions this document tries to deal with all submitted tips and tricks for reference purposes.

Предварительно
В этом документе содержатся различные советы и трюки для установки Gentoo/x86. Многие из них обсуждаются достаточно серьезно - их нужно воспринимать как полезные советы для установки, а не как её замена.

Программный RAID
После загрузки с установочного диска загрузите подходящий модуль RAID. Например, если вы планируете использовать RAID-1:

При разметке диска, убедитесь, что разделы помечены  (Linux raid autodetect) как тип раздела вместо   (Linux native). Тип раздела можно изменить с помощью команды  в программе.

Теперь, прежде чем мы начнем создавать RAID-массивы, нам нужно создать ноды мета-устройств:

После разметки диска создайте файл (да, прямо в окружении установочного диска)  с помощью , продвинутая утилита для администрирования RAID. Например, чтобы зеркалировать boot, swap и root разделы (RAID-1) на и, можно воспользоваться:

Программный Linux драйвер RAID начнет создавать мета-устройства. Вы можете наблюдать этот процесс в. Прежде чем продолжить, подождите, пока процесс создания мета-устройств полностью закончится.

С этого момента используйте как раздел boot,  как раздел swap и  как раздел root.

Прямо перед chroot, не забудьте скопировать файл в.

Во время конфигурации ядра, убедитесь, что поддержка RAID включено в ядре, а не как модуль.

Во время установки дополнительных (системных) утилит, также установите. Обратите внимание, что он может быть не доступен на всех установочных дисках. Поэтому установка на программный RAID может быть неосуществима, если установка производиться без сети!

Во время установки загрузчика, убедитесь, что установили загрузчик в MBR на обоих дисках, которые используются в зеркале.

ATA RAID using 2.4 kernels
Make sure you boot your Installation CD using the  option. Once booted, check the contents of. It should contain various directories for each harddisk available in the ATA RAID. An entire disk is displayed as while partitions are.

Write down the various device files that you use to install Gentoo on. You will need to substitute the examples in the installation with this path.

Before chrooting, bind-mount the structure in the new environment:

When configuring your kernel, make sure you enable support for your ATA RAID chipset and options. For instance, a popular ATA RAID system is a Promise FastTrack built-in RAID in which case you definitely need  built in into your kernel.

When configuring GRUB, you first have to create a GRUB bootdisk. This is not as hard as you think. First install GRUB as you would, but when you come to the part where GRUB is getting installed in the MBR, follow the following instructions:

You still need to write your file. This is no different from the installation instructions, just make sure that your  points to the ATA RAID device.

After finishing the installation, boot with your GRUB bootdisk. You will be greeted by a GRUB prompt. Now configure GRUB to boot from the ATA RAID device:

Now reboot (with the GRUB bootfloppy removed).

LILO users can safely use the instructions mentioned in the installation instructions.

Использование ядра из установочного диска
Если вы не хотите компилировать ядро самостоятельно, вы можете использовать ядро из установочного диска, скопировав его на устанавливаемую систему. Когда вы дойдете до компиляции ядра, перейдите на другой терминал (нажмите + ) и войдите в систему, введя пароль root, который вы указали в начале установки.

Скопируйте ядро и модули на новую установку Gentoo:

Чтобы все модули, которые в настоящее время загружены в память (с установочного диска), загружались во время загрузки новой системы Gentoo, выполните следующую команду в окружении chroot:

Проверьте содержимое файла и обновите его по необходимости.

Leaving your Terminal
Многие люди хотят оставить свою систему во время компиляции. В некоторых случаях это довольно сложно, поскольку установка выполняется в публичной среде, где вы не можете доверять всем. Если это так, вы хотите иметь возможность выполнить компиляцию в фоновом режиме и выйти из всех терминалов.

There are several possible solutions for this. The first one is to use. After booting the Installation CD, set your root password and start a screen session:

Once inside the screen session you can perform the entire installation. When you want to leave your terminal, press +,  (that is,  and  at the same time, then followed by a ) to detach your screen session. You can now safely log out of your system.

To regain access to your terminal, log in as root again and attach to the running screen session:

If you can't use screen, there is still a way to leave your terminal. Follow the installation instructions, but when you come to the point where a long-term compilation would be started (for instance the  step), use   which allows for a process to continue even when you log out. Don't forget the trailing "&", otherwise the process won't be placed in the background! Remember where you are (the  command will show you that) as you will need to know this later on.

Now exit the chrooted environment and the Installation CD session. Your compilation will continue in the background.

When you want to check the compilation, log in as root (on the Installation CD) and chroot back into your environment and go to the directory where you left off:

Now use the  command on the  file that is situated inside that directory. The compilation will append its output to that file, so if you want to follow the compilation progress, run  and press   to follow the changes. When the compilation is finished, you can continue with the next step of the installation instructions.

If you ever get tired of following the changes, press +  followed by a. This won't stop the compilation process, only the  process.

Extensive Testing of your Disks
If you think your disk needs to be thoroughly checked for consistency (bad sectors and such), you can use the  (that's lowercase c) option while placing the ext2 or ext3 filesystem on it (using  ). This will format, perform a read-test and mark all bad blocks as such. If you are really paranoid, use  to format your disk and perform an extensive read/write test.

Recovering from a malfunctioning installation
If for some reason your Gentoo installation fails, you don't have to redo the installation all over again. Instead, you can safely "go" to the point where you think you made a mistake (or where you think the instructions are flawed) and try a different approach.

First of all you need to chroot back into your Gentoo Linux environment. Follow the instructions again, but ignore the partitioning steps as your partitions are already created and even populated. You can therefore immediately mount those partitions at. You should also ignore the steps about stage extraction and modifying - you don't want to overwrite your files do you?

Once chrooted inside your Gentoo Linux environment, immediately go to the step where you think you should try a different approach. Don't redo all the steps like bootstrapping and such unless that is the place where you think things went wrong.

For instance, if you believe that you have a wrongly configured, you can immediately fire up your editor to update.

Once you have tried a different approach for your situation, you should consider how much of the subsequent steps you need to perform again. If the subsequent steps are depending on your change, you will need to redo those.

Например:


 * if you have changed a variable inside you will need to do all subsequent compiling since those depend on the settings inside
 * if you have altered you can immediately exit the chrooted environment and reboot as no subsequent steps are depending on
 * if you have recompiled your kernel you only need to make sure that your bootloader configuration points to the correct kernel image (double-check that you mounted your !), then you can exit the chrooted environment and reboot
 * if you have altered you can exit the chrooted environment and reboot

As you can see, for most recovery operations you can immediately reboot. Only in certain cases will you need to redo the subsequent installation steps.