Difference between revisions of "Install/Kernel"

From Funtoo
Jump to: navigation, search
(Marked this version for translation)
 
(37 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>
+
<translate>
{{Note|This is a template that is used as part of the Installation instructions, which covers installation of the kernel. Templates are being used to allow multiple variant install guides that use most of the same re-usable parts.}}
+
<includeonly>
</noinclude>
+
== Prepare Disk == <!--T:1-->
=== Configuring and installing the Linux kernel ===
+
</includeonly><noinclude><languages/>
 +
= Install Guide: Install a 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.
+
<!--T:2-->
 +
{{InstallNavigation|num=13|prev=Introducing Portage|next=Bootloader}}</noinclude>
  
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.
+
<!--T:32-->
 +
Funtoo Linux stage3's include a pre-built {{c|debian-sources-lts}} kernel to make installation faster and easier. To see what kernel version is pre-installed, type:
  
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.
+
<!--T:18-->
 +
{{console|body=
 +
%chroot% ##i##emerge -s debian-sources-lts
 +
Searching...   
 +
[ Results for search key : ##b##debian-sources-lts##!b## ]
 +
[ Applications found : ##b##1##!b## ]
  
==== Package Sets ====
+
<!--T:19-->
 +
*  ##b##sys-kernel/debian-sources-lts##!b##
 +
      ##g##Latest version available:##!g## 4.9.130
 +
      ##g##Latest version installed:##!g## 4.9.130
 +
      ##g##Size of files:##!g## 95,022 kB
 +
      ##g##Homepage:##!g##      https://packages.debian.org/stable/kernel/linux-image-4.9.0-6-amd64
 +
      ##g##Description:##!g##  Debian Sources (and optional binary kernel)
 +
      ##g##License:##!g##      GPL-2
 +
}}
  
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.
+
=== Firmware === <!--T:33-->
  
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".
+
<!--T:34-->
 +
At this point it is wise to emerge the latest {{c|sys-kernel/linux-firmware}} package, because various drivers rely on firmware blobs and instructions. Hardware like Wi-Fi cards, graphic cards, network cards, and others will not work properly or at all if firmware is not available. If using the ''{{c|stage3}}'' image, perform the following to install it. {{c|linux-firmware}} will be already installed if using the ''{{c|gnome}}'' image:
  
==== Kernel Package Set ====
+
<!--T:35-->
 +
{{console|body=
 +
%chroot% ##i##emerge -av linux-firmware
 +
}}
  
To create the kernel package set, perform the following steps:
+
=== Modern Intel Chipsets === <!--T:36-->
  
<console>
+
<!--T:37-->
(chroot) # ##i##mkdir /etc/portage/sets
+
If you have a modern Intel system (Skylake, Coffee Lake or newer) then you may be better served by the newer {{c|debian-sources}} kernel
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel
+
as it will have support for more modern Intel WiFi and integrated graphics chipsets. To use this kernel, you will want to perform the following steps:
</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:
+
<!--T:38-->
 +
{{console|body=
 +
%chroot% ##i##echo "sys-kernel/debian-sources binary" > /etc/portage/package.use
 +
%chroot% ##i##emerge -av debian-sources
 +
}}
  
<console>
+
<!--T:39-->
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use
+
Then, when you configure {{c|/etc/boot.conf}} in the next section, you will want to ensure that {{c|debian-sources}} (not {{c|debian-sources-lts}}) is selected as your default kernel.
</console>
+
</translate>
 
+
<noinclude>{{InstallNavigation|num=13|prev=Introducing Portage|next=Bootloader|align=right}}</noinclude>
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=
 
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <code>debian-sources</code> for new users.}}
 
 
 
{{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.}}
 
 
 
Let's emerge our kernel:
 
 
 
<console>
 
(chroot) # ##i##emerge @kernel
 
</console>
 
 
 
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/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/make.conf|/etc/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.}}
 
 
 
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.
 

Latest revision as of 22:05, October 10, 2019

Other languages:
English • ‎español • ‎português do Brasil • ‎русский

Install Guide: Install a Kernel

Install Guide, Chapter 13 < Prev Next >

Funtoo Linux stage3's include a pre-built debian-sources-lts kernel to make installation faster and easier. To see what kernel version is pre-installed, type:

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

*  sys-kernel/debian-sources-lts
      Latest version available: 4.9.130
      Latest version installed: 4.9.130
      Size of files: 95,022 kB
      Homepage:      https://packages.debian.org/stable/kernel/linux-image-4.9.0-6-amd64
      Description:   Debian Sources (and optional binary kernel)
      License:       GPL-2

Firmware

At this point it is wise to emerge the latest sys-kernel/linux-firmware package, because various drivers rely on firmware blobs and instructions. Hardware like Wi-Fi cards, graphic cards, network cards, and others will not work properly or at all if firmware is not available. If using the stage3 image, perform the following to install it. linux-firmware will be already installed if using the gnome image:

chroot # emerge -av linux-firmware

Modern Intel Chipsets

If you have a modern Intel system (Skylake, Coffee Lake or newer) then you may be better served by the newer debian-sources kernel as it will have support for more modern Intel WiFi and integrated graphics chipsets. To use this kernel, you will want to perform the following steps:

chroot # echo "sys-kernel/debian-sources binary" > /etc/portage/package.use
chroot # emerge -av debian-sources

Then, when you configure /etc/boot.conf in the next section, you will want to ensure that debian-sources (not debian-sources-lts) is selected as your default kernel.

Install Guide, Chapter 13 < Prev Next >