Difference between pages "Funtoo Linux Kernels" and "Install/fr/Configuring"

(Difference between pages)
 
(Localization)
 
Line 1: Line 1:
This Section will give you an overview of kernels used in funtoo.
+
<noinclude>
 +
{{InstallPart|configuration du système Funtoo Linux}}
 +
</noinclude>
 +
=== Configuration du système ===
  
Funtoo Linux provides a number of new kernels for your use. This is the official page for all Funtoo Linux kernel information.  
+
Comme toutes les distributions Linux, Funtoo Linux possède son lot de fichiers de configuration. Un fichier qui ne doit en aucun cas échapper à votre attention est <code>/etc/fstab</code>. À défaut de le configurer correctement, Funtoo Linux refusera de démarrer.
  
Some points of interest:
+
==== L'éditeur nano ====
  
* Most Funtoo Linux kernels support the handy ''<code>[[#Binary USE|binary]]</code>'' USE flag, described below.
+
L'éditeur de texte disponible dans l'environnement «chroot» se nomme <code>nano</code>. Pour éditer l'un des fichiers ci-dessous, vous le lancez ainsi:
* Funtoo Linux offers quality kernels from other Linux Distributions, like ''<code>ubuntu-server</code>'' and ''<code>debian-sources</code>''.
+
* A detailed [[#Kernel Features and Stability|Kernel Features and Stability]] table can be found below.
+
* Advanced users may want to take a look at [[Additional Kernel Resources]].
+
* There is a quick'n dirty howto to compile your own [[kernel]] with initramfs the funtoo way.
+
 
+
== Overview of Kernels ==
+
 
+
=== sysrescue-std-sources --> {{Package|sys-kernel/sysrescue-std-sources}} ===
+
 
+
This kernel is from the [http://www.sysresccd.org SystemRescueCD project], and is based on Fedora 14/15, plus some other patches related to booting from a live CD. It is a quality kernel, and is generally pretty stable. It is not suitable for production servers but is a good choice for Funtoo Linux desktops. Earlier,the [[Funtoo Linux Installation]] Guide recommended this kernel for general users, but now 'debian-sources' is recommended. Note however,  that by design all audio functions are removed from SystemRescue,  ie no sound when using this kernel.
+
 
+
=== vanilla-sources --> {{Package|sys-kernel/vanilla-sources}} ===
+
 
+
This will install the "vanilla" (unmodified) Linux kernel sources. Current recommended version is 3.x. Funtoo Linux fully supports Linux 3.x. The advantages of this kernel include recent improvements to [[Linux Containers]], a very modern networking stack with lots of bug fixes, and high reliability for desktops and servers. The downside is that this kernel must be manually configured by the user and does not have built-in ''<code>genkernel</code>'' support via the ''<code>binary</code>'' USE flag at this time.
+
 
+
=== gentoo-sources --> {{Package|sys-kernel/gentoo-sources}} ===
+
 
+
This kernel tree is based on stable kernels from [https://www.kernel.org/ kernel.org] with genpatches applied [http://dev.gentoo.org/~mpagano/genpatches/about.htm genpatches].
+
Gentoo patchset aims to support the entire range of Gentoo-supported architectures. List of available genpatched kernels: [http://dev.gentoo.org/~mpagano/genpatches/kernels.htm genpatches-kernels]
+
 
+
=== openvz-rhel6-stable --> {{Package|sys-kernel/openvz-rhel6-stable}} ===
+
 
+
This is a RHEL6-based kernel with OpenVZ support. This kernel is now the preferred kernel for production OpenVZ deployments. It requires gcc-4.4.5 to build, which it will use automatically without the user needing to use ''<code>gcc-config</code>''. We use this version of gcc since this is the version of gcc used by Red Hat to build this kernel.
+
 
+
=== openvz-rhel5-stable --> {{Package|sys-kernel/openvz-rhel5-stable}} ===
+
 
+
This kernel is based on the latest Red Hat Enterprise Linux 5.6 kernel, and contains additional OpenVZ (virtual containers) patches from the [[OpenVZ on Funtoo Linux|OpenVZ]] project. It is a very stable and reliable kernel, and is recommended for use in production environments. The only major downside to this kernel is that it is based on Linux 2.6.18 -- some parts of the kernel are out-of-date, and it is not compatible with modern versions of udev. However, it is pretty trivial to downgrade udev to an earlier version on Funtoo Linux and this kernel has a track-record of being rock-solid. When stability is paramount, you put up with the udev downgrade, use this kernel, and can enjoy hundreds of days of uptime. For more information on how to use this kernel with Funtoo Linux, see the [[RHEL5 Kernel HOWTO]].
+
 
+
=== ubuntu-server --> {{Package|sys-kernel/ubuntu-server}} ===
+
 
+
This is the kernel from Ubuntu Server. Version ''<code>2.6.32.32.62</code>'' is the same version used in Ubuntu Server 10.04 LTS, and version ''<code>2.6.35.28.50</code>'' is the one used in Ubuntu Server 10.10 (currently masked). In our testing of ''<code>2.6.32.32.62</code>'', it has been very reliable and offers very good performance. One exception, which is common among 2.6.32-based kernels, is that it's recommended that you emerge {{Package|net-misc/broadcom-netxtreme2}} if you have any Broadcom-based NICs, as the in-kernel drivers have compatibility issues with certain models. This kernel is a very good option if you want a relatively modern server kernel and do not need [[OpenVZ]] support. We use gcc-4.4.5 to build this kernel. It will use gcc-4.4.5 automatically, without requiring the user to use ''<code>gcc-config</code>''.
+
 
+
=== debian-sources --> {{Package|sys-kernel/debian-sources}} ===
+
 
+
This is the Debian kernel. '''These ebuilds now support the ''<code>binary</code>'' USE flag.''' Daniel has added a special <tt>config-extract</tt> command which can be used to list all available official Debian kernel configurations, and generate them from the Debian files included with the kernel. This kernel has optional [[OpenVZ]] support, but it is much better to use <tt>openvz-rhel6-stable</tt> if you want a production-quality OpenVZ installation. For more information about how to use <tt>debian-sources</tt> and <tt>config-extract</tt>, see [[#Using Debian-Sources with Genkernel|Using debian-sources with Genkernel]] below.
+
 
+
=== debian-sources-lts --> {{Package|sys-kernel/debian-sources-lts}} ===
+
 
+
This is the Debian long-term stable kernel. '''These ebuilds now support the <tt>binary</tt> USE flag.''' Daniel has added a special <tt>config-extract</tt> command which can be used to list all available official Debian kernel configurations, and generate them from the Debian files included with the kernel.
+
 
+
== Binary USE ==
+
 
+
Many of the kernel ebuilds in Funtoo Linux support the very useful <code>binary</code> USE flag. By enabling this USE flag and emerging the kernel, the ebuild will automatically build a binary kernel image, initramfs and kernel modules and install them to <code>/boot</code>. The binary kernel image and initramfs can be used to boot your Funtoo Linux system without requiring any additional configuration. This is a great way to get a Funtoo Linux system up and running quickly. Here's how to do it:
+
  
 
<console>
 
<console>
###i## echo "sys-kernel/openvz-rhel5-stable binary" >> /etc/portage/package.use
+
(chroot) # ##i##nano -w /etc/fstab
###i## emerge openvz-rhel5-stable
+
###i## nano -w /etc/boot.conf
+
###i## boot-update
+
 
</console>
 
</console>
  
More information can be found in the [[Funtoo Linux Installation]] Guide.
+
{{Note|L'argument '''w''' prévient le retour à la ligne automatique. On le recommande lors de l'édition de fichiers de configuration. Cela évite la possible insertion de caractères étrangers générant une erreur à l'exécution du contenu.}}
 +
 +
Utilisez les touches fléchées pour vous déplacez dans l'éditeur. Les touches telles «backspace» et «delete» réagissent tel que prévu. Appuyez sur Ctrl+X pour sauvegarder le fichier en quittant l'éditeur.
  
== Funtoo Linux Genkernel ==
+
==== Fichiers de configuration ====
  
Funtoo Linux contains a forked/enhanced version of genkernel with the following new capabilities:
+
Voici une liste de fichiers de configuration à éditer pour modification selon vos besoins:
  
* genkernel can use a build directory that is separate from the kernel source directory. This is enabled using the new <tt>--build-dst</tt> option.
+
{{TableStart}}
* <code>--build-src</code> is a new option that is equivalent to the <tt>--kerneldir</tt> option.
+
<tr class="active"><th>Fichier</th>
* <code>--fullname</code> can be used to specify the entire name of the kernel and initramfs images -- everything after <tt>kernel-</tt> and <tt>initramfs-</tt>.
+
<th>Dois-je le modifier?</th>
* <code>--firmware-src</code> - a new option that works identically to <tt>--firmware-dir</tt>.
+
<th>Description</th>
* <code>--firmware-dst</code> - a new capability - you can now define where genkernel installs firmware.
+
</tr><tr  class="danger">
* Genkernel uses Funtoo Linux <code>lvm2</code> rather than building its own.
+
<td><code>/etc/fstab</code></td>
* Some compile fixes.
+
<td>'''Oui - requis'''</td>
 +
<td>Instructions de montage de vos partitions lors du démarrage.</td>
 +
</tr><tr>
 +
<td><code>/etc/localtime</code></td>
 +
<td>''Recommandé''</td>
 +
<td>Votre fuseau horraire. Lien symbolique vers /usr/share/zoneinfo (i.e. /usr/share/zoneinfo/America/Toronto) </td>
 +
</tr><tr>
 +
<td><code>/etc/portage/make.conf</code></td>
 +
<td>''Recommandé''</td>
 +
<td>Paramètres utilisés par gcc (compilateur), portage, et make.</td>
 +
</tr><tr>
 +
<td><code>/etc/conf.d/hostname</code></td>
 +
<td>''Recommandé''</td>
 +
<td>Sert à affecter un nom à la machine.</td>
 +
</tr><tr>
 +
<td><code>/etc/conf.d/keymaps</code></td>
 +
<td>Optionnel</td>
 +
<td>Fichier de configuration pour le mappage du clavier. À modifier si votre clavier n'est pas US.</td>
 +
</tr><tr>
 +
<td><code>/etc/conf.d/hwclock</code></td>
 +
<td>Optionnel</td>
 +
<td>Fichier de configuration de l'horloge du système.</td>
 +
</tr><tr>
 +
<td><code>/etc/conf.d/modules</code></td>
 +
<td>Optionnel</td>
 +
<td>Modules du noyau à charger automatiquement au démarrage. Voir [[Additional Kernel Resources]] pour plus de détails.</td>
 +
</tr><tr>
 +
<td><code>/etc/conf.d/consolefont</code></td>
 +
<td>Optionnel</td>
 +
<td>Définition de la police d'affichage en console. Le service consolefont doit être actif. Démarrez-le ainsi: rc-update add consolefont.</td>
 +
</tr><tr>
 +
<td><code>profiles</code></td>
 +
<td>Optionnel</td>
 +
<td>Réglages pour Portage.</td>
 +
</tr>
 +
{{TableEnd}}
  
== Kernel Features and Stability ==
+
{{Warning|Éditez le fichier <code>etc/fstab</code> avant de redémarrer. Vous devez modifier le contenu des colonnes «fs» et «type» afin qu'il soit conforme aux partitions et aux systèmes de fichiers que vous avez créés avec <code>gdisk</code> ou <code>fdisk</code>. Vous pourriez être incapale de lancer Funtoo Linux en passant outre à cette étape.}}
  
This page provides an overview of kernel features and stability information:
+
==== /etc/fstab ====
  
{| {{table}}
+
La commande <code>mount</code> lit le fichier <code>/etc/fstab</code> lors du démarrage du système. Les énoncés de ce fichier fournissent à cette commande des informations à propos des partitions et lui indiquent comment les monter. Éditez le fichier afin que son contenu reflète exactement le partitionnement que vous avez créé plus tôt.
!Kernel Name
+
!Version
+
!USE flags
+
!Stability
+
!Extra Features
+
!Req'd udev
+
!Notes
+
|-
+
|<tt>[[#vanilla-sources|vanilla-sources]]</tt>
+
|3.12.6
+
|N/A
+
|'''Excellent''' - recommended for desktops and servers.
+
|N/A
+
|Any
+
|Recommended for modern networking stack, hardware and [[Linux Containers]] support. This kernel must be manually configured by the user. New Features: [http://kernelnewbies.org/Linux_3.12 kernelnewbies.org/linux_3.12]  New Drivers: [http://kernelnewbies.org/Linux_3.12-DriversArch kernelnewbies/Linux_3.12-DriversArch]
+
|-
+
|<tt>[[#gentoo-sources|gentoo-sources]]</tt>
+
|3.12.6
+
|N/A
+
|'''Excellent''' - recommended for desktops and workstations
+
|N/A
+
|Any
+
|Recommended for modern networking stack, hardware and [[Linux Containers]] support. This kernel must be manually configured by the user. New Features: [http://kernelnewbies.org/Linux_3.12 kernelnewbies.org/linux_3.12]  New Drivers: [http://kernelnewbies.org/Linux_3.12-DriversArch kernelnewbies/Linux_3.12-DriversArch]
+
|-
+
|<tt>[[#sysrescue-std-sources|sysrescue-std-sources]]</tt>
+
|3.0.21.302
+
|<tt>binary</tt>
+
|''Good'' - recommended for desktops
+
|N/A
+
|Any
+
|Nvidia card users: binary use flag installs nouveau drivers. Not compatible with nvidia-drivers.
+
|-
+
|<tt>[[#openvz-rhel6-stable|openvz-rhel6-stable]]</tt>
+
|2.6.32.042.079.5
+
|<tt>binary</tt>
+
|'''Excellent''' - recommended for production servers
+
|N/A
+
|Any
+
|This kernel is built with gcc-4.4.5. <tt>emerge broadcom-netxtreme2</tt> for reliable BCM5709+ support (integrated NIC)
+
|-
+
|<tt>[[#openvz-rhel5-stable|openvz-rhel5-stable]]</tt>
+
|2.6.18.028.095.1
+
|<tt>binary</tt>
+
|'''Excellent''' - recommended for production servers
+
|OpenVZ
+
|=sys-fs/udev-146*
+
|Broadcom <tt>bnx2</tt> driver module bundled with kernel appears to be OK. This kernel is built with gcc-4.1.2. Enabling the <tt>binary</tt> USE flag will cause gcc-4.1.2 to be emerged and used for building the kernel.
+
|-
+
|<tt>[[#ubuntu-server|ubuntu-server]]</tt>
+
|2.6.32.32.62
+
|<tt>binary</tt>
+
|'''Excellent''' - recommended for production servers (still in extended testing)
+
| N/A
+
|Any
+
|This kernel is built with gcc-4.4.5. <tt>emerge broadcom-netxtreme2</tt> for reliable BCM5709+ support (integrated NIC)
+
|-
+
|<tt>[[#ubuntu-server|ubuntu-server]]</tt>
+
|2.6.35.28.50
+
|<tt>binary</tt>
+
|''not yet tested''
+
| N/A
+
|Any
+
|This kernel is built with gcc-4.4.5. <tt>emerge broadcom-netxtreme2</tt> for reliable BCM5709+ support (integrated NIC)
+
|-
+
|<tt>[[#debian-sources|debian-sources]]</tt>
+
|3.12.3
+
|<tt>openvz</tt>
+
|''Good'' - default kernel recommended by Funtoo
+
|OpenVZ (optional)
+
|Any
+
|See [[#Using debian-sources with Genkernel]], below.
+
|-
+
|}
+
 
+
== Using Debian-Sources with Genkernel ==
+
 
+
{{ fancyimportant|Debian-sources is now fully compatible with the ''<code>binary</code>'' USE flag and recommended for desktop users. The below example is valid for manual installation. At least 12G of ''<code>/var/tmp</code>'' required to build
+
}}
+
This section describes how to build a binary kernel with ''<code>debian-sources</code>'' and ''<code>genkernel</code>'', and it also explains how to use Funtoo Linux's ''<code>config-extract</code>'' tool to list and create official Debian kernel configurations.
+
 
+
=== First step: emerging the required packages ===
+
 
+
The first step is to emerge:
+
 
+
# The Debian sources
+
# Genkernel itself
+
 
+
This is achieved by running the following:
+
  
 
<console>
 
<console>
###i## emerge -av sys-kernel/debian-sources sys-kernel/genkernel
+
(chroot) # ##i##nano -w /etc/fstab
 
</console>
 
</console>
 
Once the Debian kernel sources are deployed, you should find a directory named '''linux-debian-''version''''' (e.g. linux-debian-2.6.32.30) under '''<code>/usr/src</code>'''. Update your the '''<code>linux</code>''' symlink to point on this directory:
 
<console>
 
###i## cd /usr/src
 
###i## rm linux
 
###i## ln -s linux-debian-2.6.32.30 linux
 
</console>
 
 
Alternatively, emerge the debian-sources with the ''<code>symlink</code>'' USE flag.
 
 
=== Second step: Grabbing a configuration file ===
 
 
If is now time to download the kernel configuration file. For this tutorial we will use a configuration file for AMD64 (several others architectures like MIPS or SPARC64 are available.)  To view a complete list of available kernel configurations, type <code>./config-extract -l</code> '''in the Debian kernel source directory''':
 
  
 
<pre>
 
<pre>
ninja1 linux-debian-2.6.32.30 # ./config-extract -l
+
# 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>
  
====== standard featureset ======
+
/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
 +
</pre>
  
      alpha: alpha-generic, alpha-legacy, alpha-smp
+
{{Note|Currently, our default <code>/etc/fstab</code> has the root filesystem as <code>/dev/sda4</code> and the swap partition as <code>/dev/sda3</code>. These will need to be changed to <code>/dev/sda3</code> and <code>/dev/sda2</code>, respectively.}}
      amd64
+
      armel: iop32x, ixp4xx, kirkwood, orion5x, versatile
+
        hppa: parisc, parisc-smp, parisc64, parisc64-smp
+
        i386: 486, 686, 686-bigmem, amd64
+
        ia64: itanium, mckinley
+
        m68k: amiga, atari, bvme6000, mac, mvme147, mvme16x
+
        mips: 4kc-malta, 5kc-malta, r4k-ip22, r5k-ip32, sb1-bcm91250a, sb1a-bcm91480b
+
      mipsel: 4kc-malta, 5kc-malta, r5k-cobalt, sb1-bcm91250a, sb1a-bcm91480b
+
    powerpc: powerpc, powerpc-smp, powerpc64
+
        s390: s390x, s390x-tape
+
        sh4: sh7751r, sh7785lcr
+
      sparc: sparc64, sparc64-smp
+
    sparc64: sparc64, sparc64-smp
+
  
====== vserver featureset ======
+
{{Note|If you're using UEFI to boot, change the <code>/dev/sda1</code> line so it says <code>vfat</code> instead of <code>ext2</code>. Similarly, make sure that the <code>/dev/sda3</code> line specifies either <code>xfs</code> or <code>ext4</code>, depending on which filesystem you chose at filesystem-creation time.}}
  
      amd64
+
==== /etc/localtime ====
        i386: 686, 686-bigmem
+
        ia64: itanium, mckinley
+
    powerpc: powerpc, powerpc64
+
        s390
+
      sparc
+
    sparc64
+
  
====== xen featureset ======
+
<code>/etc/localtime</code> 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 <code>/etc/localtime</code> with a symbolic link to the timezone that you wish to use.
  
      amd64
+
<console>
        i386
+
(chroot) # ##i##ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime
 +
</console>
  
====== openvz featureset ======
+
The above sets the timezone to Mountain Standard Time (with daylight savings). Type <code>ls /usr/share/zoneinfo</code> to see what timezones are available. There are also sub-directories containing timezones described by location.
  
      amd64
+
==== /etc/make.conf ====
        i386
+
</pre>
+
  
Type <tt>config-extract -h</tt> for extended usage information:
+
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 [[wikipedia:Hyper-threading|hyper-threading]], then you would set MAKEOPTS to 3:
  
 
<pre>
 
<pre>
ninja1 linux-debian-2.6.32.30 # ./config-extract -h
+
MAKEOPTS="-j3"  
This work is free software.
+
 
+
Copyright 2011 Funtoo Technologies. You can redistribute and/or modify it under
+
the terms of the GNU General Public License version 3 as published by the Free
+
Software Foundation. Alternatively you may (at your option) use any other
+
license that has been publicly approved for use with this program by Funtoo
+
Technologies (or its successors, if any.)
+
 
+
usage: config-extract [options] arch [featureset] [subarch]
+
 
+
  -h  --help        print this usage and exit
+
  -l  --list        list all available kernel configurations
+
  -o  --outfile    specify kernel config outfile --
+
                    defaults to .config in current directory
+
  [featureset]      defaults to "none" if not specified
+
  [subarch]        defaults to the only one available; otherwise required
+
 
+
This program was written by Daniel Robbins for Funtoo Linux, for the purpose of
+
easily and conveniently extracting Debian kernel configurations. To see a nice
+
list of all available kernel configurations, use the --list option.
+
 
+
Debian's kernel configs are specified internally in arch_featureset_flavor
+
format, such as: "amd64_openvz_amd64". The featureset typically describes an
+
optional kernel configuration such as "xen" or "openvz", while the flavor in
+
Debian terminology typically refers to the sub-architecture of the CPU.
+
 
+
When using this command, you must specify an arch. A featureset of "none" is
+
assumed unless you specify one, and by default this program will pick the only
+
available subarch if there is only one to choose from. If not, you will need to
+
pick one (and the program will remind you to do this.)
+
 
+
The kernel configuration will be written to ".config" in the current directory,
+
or the location you specified using the -o/--outfile option.
+
 
</pre>
 
</pre>
  
Let's use <tt>config-extract</tt> to create a kernel configuration for an amd64 system:
+
If you are unsure about how many processors/threads you have then use nproc to help you.
 
+
 
<console>
 
<console>
# ##i##cd linux
+
(chroot) # ##i##nproc
# ##i##./config-extract amd64
+
16
Wrote amd64_none_amd64 kernel configuration to /usr/src/linux-debian-2.6.32.30/.config.
+
 
</console>
 
</console>
  
<tt>config-extract</tt> also allows you to extract special Debian featuresets, such as settings for Xen and [[OpenVZ]] kernels:
+
Set MAKEOPTS to this number plus one:
  
<console>
+
<pre>
# ##i##./config-extract amd64 openvz
+
MAKEOPTS="-j17"
Wrote amd64_openvz_amd64 kernel configuration to /usr/src/linux-debian-2.6.32.30/.config.
+
</pre>
</console>
+
  
'''It is necessary to name the kernel configuration file something other than ".config" to avoid errors with genkernel.'''
+
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 ("<code>-</code>") 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 [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=2&chap=2 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:
  
After using <tt>config-extract</tt>, run <tt>make oldconfig</tt> and accept all default options by hitting Enter at all prompts.
+
<pre>
 
+
LINGUAS="fr"
=== Third step: Building and installing the kernel ===
+
</pre>
 
+
This is simply achieved by:
+
  
 +
==== /etc/conf.d/hwclock ====
 +
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.
 
<console>
 
<console>
# ##i##genkernel --kernel-config=config-2.6.32-5-amd64 all
+
(chroot) # ##i##nano -w /etc/conf.d/hwclock
 
</console>
 
</console>
  
* --kernel-config: use the given configfile. If you only give a filename here, it is searched for in your current working dir. You can also use a relative or an absolute path leading to your configfile here (for example: "--kernel-config=/usr/src/linux/configfile").
+
==== Autres francisations ====
* all: rebuild the kernel image and the initramfs ramdisk image (aside of kernel modules, the ramdisk image contains tools such as BusyBox and some generic startup scripts, depending on options you use on the command line several additional tools like lvm or raid volume management can be incorporated as well).
+
 
+
{{ fancyimportant|Unless explicitly stated via ''--no-clean'' or ''--no-mrproper'', Genkernel will do a '''make mrproper''' in the kernel source tree, thus cleaning a previous build '''and removing the previous kernel configuration file''' in it.
+
}}
+
 
+
If you use Genkernel to rebuild a Linux kernel on SPARC64, remember to either:
+
* Set '''sparc64-unknown-linux-gnu-''' in ''General setup --> Cross-compiler tool prefix''
+
* Put '''--kernel-cross-compile=sparc64-unknown-linux-gnu-''' on the Genkernel command line
+
 
+
Once the kernel has been compiled and the ram disk has been generated, the kernel image plus its companion files (initramfs image and System.map) are placed in the /boot directory. You can use your favourite tool to update your bootloader configuration files.
+
  
[[Category:Internals]]
+
Le système Funtoo Linux est livré en Anglais américain. Il supporte la norme de codage [[http://fr.wikipedia.org/wiki/UTF-8|UTF-8]]. Nous devons modifier quelques fichiers afin d'avoir un système qui soit entièrement en Français. Nous avons déjà modifié le fichier <code>/etc/portage/make.conf</code> afin que le système soit compilé en Français. Nous avons toutefois d'autres fichiers à modifier, par exemple un clavier français ou canadien-français.
[[Category:Funtoo features]]
+
[[Category:Kernel]]
+

Revision as of 23:48, December 30, 2014


Note

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


Configuration du système

Comme toutes les distributions Linux, Funtoo Linux possède son lot de fichiers de configuration. Un fichier qui ne doit en aucun cas échapper à votre attention est /etc/fstab. À défaut de le configurer correctement, Funtoo Linux refusera de démarrer.

L'éditeur nano

L'éditeur de texte disponible dans l'environnement «chroot» se nomme nano. Pour éditer l'un des fichiers ci-dessous, vous le lancez ainsi:

(chroot) # nano -w /etc/fstab
Note

L'argument w prévient le retour à la ligne automatique. On le recommande lors de l'édition de fichiers de configuration. Cela évite la possible insertion de caractères étrangers générant une erreur à l'exécution du contenu.

Utilisez les touches fléchées pour vous déplacez dans l'éditeur. Les touches telles «backspace» et «delete» réagissent tel que prévu. Appuyez sur Ctrl+X pour sauvegarder le fichier en quittant l'éditeur.

Fichiers de configuration

Voici une liste de fichiers de configuration à éditer pour modification selon vos besoins:

Fichier Dois-je le modifier? Description
/etc/fstab Oui - requis Instructions de montage de vos partitions lors du démarrage.
/etc/localtime Recommandé Votre fuseau horraire. Lien symbolique vers /usr/share/zoneinfo (i.e. /usr/share/zoneinfo/America/Toronto)
/etc/portage/make.conf Recommandé Paramètres utilisés par gcc (compilateur), portage, et make.
/etc/conf.d/hostname Recommandé Sert à affecter un nom à la machine.
/etc/conf.d/keymaps Optionnel Fichier de configuration pour le mappage du clavier. À modifier si votre clavier n'est pas US.
/etc/conf.d/hwclock Optionnel Fichier de configuration de l'horloge du système.
/etc/conf.d/modules Optionnel Modules du noyau à charger automatiquement au démarrage. Voir Additional Kernel Resources pour plus de détails.
/etc/conf.d/consolefont Optionnel Définition de la police d'affichage en console. Le service consolefont doit être actif. Démarrez-le ainsi: rc-update add consolefont.
profiles Optionnel Réglages pour Portage.
Warning

Éditez le fichier etc/fstab avant de redémarrer. Vous devez modifier le contenu des colonnes «fs» et «type» afin qu'il soit conforme aux partitions et aux systèmes de fichiers que vous avez créés avec gdisk ou fdisk. Vous pourriez être incapale de lancer Funtoo Linux en passant outre à cette étape.

/etc/fstab

La commande mount lit le fichier /etc/fstab lors du démarrage du système. Les énoncés de ce fichier fournissent à cette commande des informations à propos des partitions et lui indiquent comment les monter. Éditez le fichier afin que son contenu reflète exactement le partitionnement que vous avez créé plus tôt.

(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
Note

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 /dev/sda3 and /dev/sda2, respectively.

Note

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 xfs or ext4, depending on which filesystem you chose at filesystem-creation time.

/etc/localtime

/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.

/etc/make.conf

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:

MAKEOPTS="-j3" 

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:

MAKEOPTS="-j17"

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:

LINGUAS="fr"

/etc/conf.d/hwclock

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

Autres francisations

Le système Funtoo Linux est livré en Anglais américain. Il supporte la norme de codage [[1]]. Nous devons modifier quelques fichiers afin d'avoir un système qui soit entièrement en Français. Nous avons déjà modifié le fichier /etc/portage/make.conf afin que le système soit compilé en Français. Nous avons toutefois d'autres fichiers à modifier, par exemple un clavier français ou canadien-français.