This document contains various tips and tricks for the Gentoo/x86 installation. Most of them are discussed in a dense way - they are meant as an addendum to the installation instructions and not as a replacement.
Advanced Installations
Simplifying the Installation
Fixing Errors/Issues
Once you are booted from the LiveCD, load the appropriate RAID modules. For instance, if you plan on using RAID-1:
# modprobe raid1
When you partition your disks, make sure that your partitions use
After partitioning, create the
# mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1 # mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 # mdadm --create --verbose /dev/md2 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3
The Linux Software RAID driver will start creating the metadevices. You can see
its progress in
From now onwards, use
After mounting
When you're configuring your kernel, make sure you have the appropriate RAID
support
When installing extra tools, emerge
When configuring your bootloader, make sure it gets installed in the MBR of
Make sure you boot your LiveCD using the
Write down the various
Before chrooting, bind-mount the
# mount -o bind /dev /mnt/gentoo/dev
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
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:
# cd /boot/grub # dd if=stage1 of=/dev/fd0 bs=512 count=1 # dd if=stage2 of=/dev/fd0 bs=512 seek=1
You still need to write your
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:
grub> root (hd0,x) grub> setup (hd0) grub> quit
Now reboot (with the GRUB bootfloppy removed).
LILO users can safely use the instructions mentioned in the installation instructions.
Many people want to leave their system when it's compiling. In certain cases this is rather difficult as the installation is done in a public environment where you cannot trust everyone. If this is the case, you want to be able to perform the compilation in the background and log out from all terminals.
There are several possible solutions for this. The first one is to use
# screen -S gentoo
Once inside the screen session you can perform the entire installation. When you
want to leave your terminal, press
To regain access to your terminal, log in as root again and
# screen -x gentoo
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
# pwd /usr/portage # nohup ./scripts/bootstrap.sh &
Now exit the chrooted environment (
When you want to check the compilation, log in as root (on the LiveCD) and chroot back into your environment and go to the directory where you left off:
# chroot /mnt/gentoo /bin/bash # env-update && source /etc/profile # cd /usr/portage
Now use the
If you ever get tired of following the changes, press
If you think your disk needs to be thoroughly checked for consistency (bad
sectors and such), you can use the
# mke2fs -j -c /dev/hda3
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
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
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.
For instance,
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.