注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Install/pt-br/Kernel"

From Funtoo
Jump to navigation Jump to search
(Created page with "=== Configuring and installing the Linux kernel === Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. The kernel is loaded by...")
 
 
(22 intermediate revisions by one other user not shown)
Line 1: Line 1:
=== Configuring and installing the Linux kernel ===
<noinclude>
{{InstallPart|Kernel Installation}}
</noinclude>
=== Kernel ===


Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. The kernel is loaded by the boot loader, and interfaces directly with your system's hardware, and allows regular (userspace) programs to run.
Iniciando em meados de Maio de 2015 (mid-May 2015), o stage3 do Funtoo Linux inclui um kernel pre-built {{c|debian-sources}} para tornar a instalação mais rápida e mais facil. Para verificar se a debian-sources está instalada, digite:


A kernel must be configured properly for your system's hardware, so that it supports your hard drives, file systems, network cards, and so on. More experienced Linux users can choose to install kernel sources and configure and install their own kernel. If you don't know how to do this, we provide ebuilds that will automatically build a "univeral" kernel, modules and initramfs for booting your system that supports all hardware. This is an extremely simple way of building a kernel that will get your system booted.
{{console|body=
(chroot) # ##i##emerge -s debian-sources
Searching...  
[ Results for search key : ##b##debian-sources##!b## ]
[ Applications found : ##b##1##!b## ]


What is our goal? To build a kernel that will recognize all the hardware in your system necessary for booting, so that you will be greeted by a friendly login prompt after installation is complete. These instructions will guide you through the process of installing a kernel the "easy" way -- without requiring user configuration, by using a "universal" kernel.
*  ##b##sys-kernel/debian-sources##!b##
      ##g##Latest version available:##!g## 3.19.3
      ##g##Latest version installed:##!g## 3.19.3
      ##g##Size of files:##!g## 81,292 kB
      ##g##Homepage:##!g##      http://www.debian.org
      ##g##Description:##!g##  Debian Sources (and optional binary kernel)
      ##g##License:##!g##      GPL-2
}}


==== Package Sets ====
Se uma versão estiver listed sob {{c|Latest version installed}}, então a debian-sources já está pré-construída (pre-built) para você e você pode pular o resto da seção do Kernel, e prosseguir para a [[Install/pt-br/Kernel#Installing_a_Bootloader|Instalar uma seção de Bootloader]].


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 <code>emerge</code> 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 <code>emerge gnome</code>) will be added to the "world" package set. This provides an easy way to update your entire system.
==== Construindo o Kernel ====


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".
Se precisar construir um kernel para o Funtoo Linux, por favor siga esses passos:
 
==== Kernel Package Set ====
 
To create the kernel package set, perform the following steps:
 
<console>
(chroot) # ##i##mkdir /etc/portage/sets
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel
</console>
 
Now, we'll want to set a USE variable to tell <code>debian-sources</code> 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 <code>binary</code> USE variable for <code>debian-sources</code>, as follows:
 
<console>
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use
</console>
 
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 <code>binary</code> USE flag to the <code>debian-sources</code> 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 <code>emerge -auDN @world</code>, and it will update our world set, leaving out the kernel. Likewise, when we just want to update our kernel, we'll type <code>emerge -au @kernel</code>, and it will update our kernel, leaving out the world set.
 
==== Building the Kernel ====


{{Fancynote|1=
{{Fancynote|1=
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <code>debian-sources</code> for new users.}}
Verifique o [[Pt-br/Funtoo_Linux_Kernels|Kernels do Funtoo Linux]] para obter uma lista completa de kernels que possuem suporte no Funtoo Linux. Recomendamos <code>debian-sources</code> para novos usuários.}}


{{fancyimportant|1=
{{fancyimportant|1=
<code>debian-sources</code> with <code>binary</code> USE flag requires at least 14GB free in <code>/var/tmp</code> and takes around 1 hour to build on a Intel Core i7 Processor.}}
<code>debian-sources</code> como a flag USE <code>binary</code> requer no mínimo 14GB livre em <code>/var/tmp</code> e leva por volta de uma hora para construir em um processador Intel Core i7 Processor.}}


Let's emerge our kernel:
Vamos usar emerge para instalar nosso kernel:


<console>
<console>
(chroot) # ##i##emerge -1 @kernel
(chroot) # ##i##emerge debian-sources
</console>
</console>


{{Important|Right now, the <code>-1</code> option is required to not add our <code>@kernel</code> set to <code>world-sets</code>. This allows you to emerge it independently from @world. If you forget to use this option, edit <code>/var/lib/portage/world-sets</code> and remove the <code>@kernel</code> line. This will prevent kernel updates from being included in @world updates.}}
Uma vez que o <code>emerge</code> finaliza, você terá um kernel e um initramfs novinho instalado em <code>/boot</code>, mais o kernel headers instalado em <code>/usr/src/linux</code>, e estará pronto para configurar o boot loader para carregar esses para inicializar o seu Funtoo Linux.
 
Note that while use of the <code>binary</code> 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 <code>MAKEOPTS</code> in <code>/etc/portage/make.conf</code> 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|/etc/portage/make.conf section]] if you forgot to do this.
 
{{fancynote|NVIDIA card users: the <code>binary</code> 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 <code>/etc/modprobe.d/</code>.}}


{{fancynote|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 [http://www.funtoo.org/wiki/Funtoo_Linux_Kernels#Using_Debian-Sources_with_Genkernel genkernel] would be useful. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information.}}
{{fancynote|Usuários de Placas da NVIDIA: a flag USE <code>binary</code> instala os drivers da Nouveau que não podem ser carregadas ao mesmo tempo  como drivers proprietário, e não podem ser descarregados no momento em que estão sendo executados por causa do  KMS. Você precisa lista-lo como blacklist sob <code>/etc/modprobe.d/</code>.}}


Once <code>emerge</code> completes, you'll have a brand new kernel and initramfs installed to <code>/boot</code>, plus kernel headers installed in <code>/usr/src/linux</code>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.
{{fancynote|Para uma visão geral de outras opções de kernel para o Funtoo Linux, verifique [[Pt-br/Funtoo_Linux_Kernels|Kernels para Funtoo Linux]]. Pode haver módulos que o kernel do Debian não vem incluso, uma situação onde [[Pt-br/Funtoo_Linux_Kernels#Utilizando_o_Debian-Sources_com_o_Genkernel|genkernel]] seria útil. Certifique-se também d verificar [[:Category:Hardware Compatibility|hardware compatibility]] information.}}
[[Category:pt_BR]]

Latest revision as of 14:18, July 9, 2015


   Note

This is a template that is used as part of the Installation instructions which covers: Kernel Installation. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.


Kernel

Iniciando em meados de Maio de 2015 (mid-May 2015), o stage3 do Funtoo Linux inclui um kernel pre-built debian-sources para tornar a instalação mais rápida e mais facil. Para verificar se a debian-sources está instalada, digite:

(chroot) # emerge -s debian-sources
Searching...    
[ Results for search key : debian-sources ]
[ Applications found : 1 ]

*  sys-kernel/debian-sources
      Latest version available: 3.19.3
      Latest version installed: 3.19.3
      Size of files: 81,292 kB
      Homepage:      http://www.debian.org
      Description:   Debian Sources (and optional binary kernel)
      License:       GPL-2

Se uma versão estiver listed sob Latest version installed, então a debian-sources já está pré-construída (pre-built) para você e você pode pular o resto da seção do Kernel, e prosseguir para a Instalar uma seção de Bootloader.

Construindo o Kernel

Se precisar construir um kernel para o Funtoo Linux, por favor siga esses passos:

   Note

Verifique o Kernels do Funtoo Linux para obter uma lista completa de kernels que possuem suporte no Funtoo Linux. Recomendamos debian-sources para novos usuários.

   Important

debian-sources como a flag USE binary requer no mínimo 14GB livre em /var/tmp e leva por volta de uma hora para construir em um processador Intel Core i7 Processor.

Vamos usar emerge para instalar nosso kernel:

(chroot) # emerge debian-sources

Uma vez que o emerge finaliza, você terá um kernel e um initramfs novinho instalado em /boot, mais o kernel headers instalado em /usr/src/linux, e estará pronto para configurar o boot loader para carregar esses para inicializar o seu Funtoo Linux.

   Note

Usuários de Placas da NVIDIA: a flag USE binary instala os drivers da Nouveau que não podem ser carregadas ao mesmo tempo como drivers proprietário, e não podem ser descarregados no momento em que estão sendo executados por causa do KMS. Você precisa lista-lo como blacklist sob /etc/modprobe.d/.

   Note

Para uma visão geral de outras opções de kernel para o Funtoo Linux, verifique Kernels para Funtoo Linux. Pode haver módulos que o kernel do Debian não vem incluso, uma situação onde genkernel seria útil. Certifique-se também d verificar hardware compatibility information.