Configurando seu sistema
Como é esperado de uma distribuição Linux, Funtoo Linux tem seu compartilhamento de arquivos de configuração. O arquivo que absolutamente requer que você edite de forma a assegurar que o Funtoo Linux inicialize com sucesso é
/etc/fstab. Os outros são opcionais.
Utilizando o Nano
O editor padrão incluso no ambiente chroot é chamado de
nano. Para editar um dos arquivos abaixo, chame o nano como a seguir:
(chroot) # nano /etc/fstab
Quando estiver no editor, você pode utilizar as teclas de cetas para mover o cursor, e teclas comuns como backspace e delete funcionarão como esperado. Para salvar o arquivo, pressione Control-X, e responda
y quando solicitado para salvar o buffer modificado se você gostaria de salvar suas alterações.
Aqui estão uma lista completa de arquivos que você pode queres editar, dependendo de suas necessidades:
||SIM - exigido||Pontos de montagem para todos os filesystems a serem utilizados no momento do boot. Esse arquivo deve refletir sua configuação de partição de disco. Vamos lhe guiar através da modificação desse arquivo abaixo.|
||Talvez - recomendável||Seu fuso horário (timezone), que será padrão ao UTC se não definido. Esse deve ser um link simbólico para algo localizado sob /usr/share/zoneinfo (ex. /usr/share/zoneinfo/America/Montreal)|
||Maybe - recommended||Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.|
||Maybe - recommended||Used to set system hostname. Set the
||No|| You no longer need to manually set the hostname in this file. This file is automatically generated by
||Optional||Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See Funtoo Linux Localization.|
||Optional||How the time of the battery-backed hardware clock of the system is interpreted (UTC or local time). Linux uses the battery-backed hardware clock to initialize the system clock when the system is booted.|
||Optional||Kernel modules to load automatically at system startup. Typically not required. See Additional Kernel Resources for more info.|
||Optional||Allows you to specify the default console font. To apply this font, enable the consolefont service by running rc-update add consolefont.|
||Optional||Some useful portage settings that may help speed up intial configuration.|
If you're installing an English version of Funtoo Linux, you're in luck as most of the configuration files can be used as-is. If you're installing for another locale, don't worry. We will walk you through the necessary configuration steps on the Funtoo Linux Localization page, and if needed, there's always plenty of friendly, helpful support. (See Community)
Let's go ahead and see what we have to do. Use
nano -w <name_of_file> to edit files -- the "
-w" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.
It's important to edit your
/etc/fstab file before you reboot! You will need to modify both the "fs" and "type" columns to match the settings for your partitions and filesystems that you created with
fdisk. Skipping this step may prevent Funtoo Linux from booting successfully.
/etc/fstab is used by the
mount command which is ran when your system boots. Statements of this file inform
mount about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit
/etc/fstab and ensure that it reflects the partition configuration you used earlier:
(chroot) # nano -w /etc/fstab
# The root filesystem should have a pass number of either 0 or 1. # All other filesystems should have a pass number of 0 or greater than 1. # # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. # # See the manpage fstab(5) for more information. # # <fs> <mountpoint> <type> <opts> <dump/pass> /dev/sda1 /boot ext2 noauto,noatime 1 2 /dev/sda2 none swap sw 0 0 /dev/sda3 / ext4 noatime 0 1 #/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
Currently, our default
/etc/fstab has the root filesystem as
/dev/sda4 and the swap partition as
/dev/sda3. These will need to be changed to
If you're using UEFI to boot, change the
/dev/sda1 line so it says
vfat instead of
ext2. Similarly, make sure that the
/dev/sda3 line specifies either
ext4, depending on which filesystem you chose at filesystem-creation time.
/etc/localtime is used to specify the timezone that your machine is in, and defaults to UTC. If you would like your Funtoo Linux system to use local time, you should replace
/etc/localtime with a symbolic link to the timezone that you wish to use.
(chroot) # ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime
The above sets the timezone to Mountain Standard Time (with daylight savings). Type
ls /usr/share/zoneinfo to see what timezones are available. There are also sub-directories containing timezones described by location.
MAKEOPTS can be used to define how many parallel compilations should occur when you compile a package, which can speed up compilation significantly. A rule of thumb is the number of CPUs (or CPU threads) in your system plus one. If for example you have a dual core processor without hyper-threading, then you would set MAKEOPTS to 3:
If you are unsure about how many processors/threads you have then use nproc to help you.
(chroot) # nproc 16
Set MAKEOPTS to this number plus one:
USE flags define what functionality is enabled when packages are built. It is not recommended to add a lot of them during installation; you should wait until you have a working, bootable system before changing your USE flags. A USE flag prefixed with a minus ("
-") sign tells Portage not to use the flag when compiling. A Funtoo guide to USE flags will be available in the future. For now, you can find out more information about USE flags in the Gentoo Handbook.
LINGUAS tells Portage which local language to compile the system and applications in (those who use LINGUAS variable like OpenOffice). It is not usually necessary to set this if you use English. If you want another language such as French (fr) or German (de), set LINGUAS appropriately:
If you dual-boot with Windows, you'll need to edit this file and change the value of clock from UTC to local, because Windows will set your hardware clock to local time every time you boot Windows. Otherwise you normally wouldn't need to edit this file.
(chroot) # nano -w /etc/conf.d/hwclock
By default, Funtoo Linux is configured with Unicode (UTF-8) enabled, and for the US English locale and keyboard. If you would like to configure your system to use a non-English locale or keyboard, see Funtoo Linux Localization.