The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Install/pt-br/Kernel
Configurando e instalando o kernel Linux
Agora é hora de construir e instalar um kernel Linux, o qual é o coração de qualquer sistema Funtoo Linux. O kernel é carregado pelo boot loader, e interfaces diretamente com o hardware do seu sistema, e permite programas regulares (userspace) serem executador.
Um kernel deve ser configurado propriamente para o hardware do seu sistema, desse modo ele suporta seus hard drives, file systems, placas de rede, e assim por diante. Usuários de Linux mais experientes pode escolher instalar o kernel sources e configurar e instalar seu próprio kernel. Se você não sabe como fazer isso, nós fornecemos ebuilds que construirão automaticamente um kernel "universal", módulos e initramfs para a inicialização do seu sistema que suporte todo o hardware. Esse é um jeito extremamente simples de construção de um kernel que colocará seu sistema para inicializar.
Qual é o nosso objetivo? Para construir um kernel que reconhecerá todo o hardware em seu sistema necessário para inicialização, você será cumprimentado por um prompt de login amigável depois que a instalação estiver completa. Esses instruções lhe guiarão através do processo de instalação de um kernel no modo "fácil" -- sem exigir configuração do usuário, ao utilizar um kernel "universal".
Package Sets
Before we install a kernel, we're going to cover a feature of Portage called package sets. Portage, the package manager/ports system for Funtoo Linux, will keep track of system packages as well as packages you have installed by calling emerge
directly. These packages that are part of the base system are considered part of the "system" package set, while packages that you have installed by typing them on the command line (such as "gnome" in emerge gnome
) will be added to the "world" package set. This provides an easy way to update your entire system.
However, sometimes it's nice to be able to update the kernel all by itself, or leave a kernel update out of your regular whole system update. To do this, we will create a new package set called "kernel".
Kernel Package Set
To create the kernel package set, perform the following steps:
(chroot) # mkdir /etc/portage/sets (chroot) # echo sys-kernel/debian-sources > /etc/portage/sets/kernel
Now, we'll want to set a USE variable to tell debian-sources
to build a "universal" kernel and initramfs for us, to take the guess-work out of getting Funtoo Linux booted. To do this, we're going to set the binary
USE variable for debian-sources
, as follows:
(chroot) # echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use
If USE variables are new to you, you'll be getting a lot more familiar with them as you use Funtoo Linux. At their essence, they are "switches" that you can set to configure options that can be built in to various packages. They're used to customize your Funtoo Linux system to meet your exact needs. We added support for a binary
USE flag to the debian-sources
ebuilds, as well as a few other of our kernel ebuilds, to make it easier for new users to get Funtoo Linux up and running.
Now, when we just want to update our system's packages, we'll type emerge -auDN @world
, and it will update our world set, leaving out the kernel. Likewise, when we just want to update our kernel, we'll type emerge -au @kernel
, and it will update our kernel, leaving out the world set.
Building the Kernel
See Funtoo Linux Kernels for a full list of kernels supported in Funtoo Linux. We recommend debian-sources
for new users.
debian-sources
with binary
USE flag requires at least 14GB free in /var/tmp
and takes around 1 hour to build on a Intel Core i7 Processor.
Let's emerge our kernel:
(chroot) # emerge -1 @kernel
Right now, the -1
option is required to not add our @kernel
set to world-sets
. This allows you to emerge it independently from @world. If you forget to use this option, edit /var/lib/portage/world-sets
and remove the @kernel
line. This will prevent kernel updates from being included in @world updates.
Note that while use of the binary
USE flag makes installing a working kernel extremely simple, it is one part of Funtoo Linux that takes a very long time to build from source, because it is building a kernel that supports all hardware that Linux supports! So, get the build started, and then let your machine compile. Slower machines can take up to several hours to build the kernel, and you'll want to make sure that you've set MAKEOPTS
in /etc/portage/make.conf
to the number of processing cores/threads (plus one) in your system before starting to build it as quickly as possible -- see the /etc/portage/make.conf section if you forgot to do this.
NVIDIA card users: the binary
USE flag installs the Nouveau drivers which cannot be loaded at the same time as the proprietary drivers, and cannot be unloaded at runtime because of KMS. You need to blacklist it under /etc/modprobe.d/
.
For an overview of other kernel options for Funtoo Linux, see Funtoo Linux Kernels. There may be modules that the Debian kernel doesn't include, a situation where genkernel would be useful. Also be sure to see hardware compatibility information.
Once emerge
completes, you'll have a brand new kernel and initramfs installed to /boot
, plus kernel headers installed in /usr/src/linux
, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.