Difference between pages "Multiple ABI Support" and "Install/fr"

(Difference between pages)
(Add a warning to indicate outdated information)
 
(Created page with "<includeonly> Le guide d'installation utilise maintenant un ensemble de modules. Chaque module constitue une section du guide d'installation. Quand vous cliquez sur l'un des...")
 
Line 1: Line 1:
{{warning|The instructions below seem outdated (as of 2014-12-01). More recent information seems to be present on the gentoo wiki at http://wiki.gentoo.org/wiki/Project:Multilib/Concepts}}
+
<includeonly>
 +
Le guide d'installation utilise maintenant un ensemble de modules. Chaque module constitue une section du guide d'installation.
  
=== Summary ===
+
Quand vous cliquez sur l'un des boutons 'Edit' en consultant le guide d'installation, MediaWiki affichera pour édition la section concernée.
  
Support for multiple ABIs has been partially integrated into Portage and the Gentoo gcc wrapper (part of sys-devel/gcc-config) and has been enabled in some system profiles. Extended Multiple ABI is available as part of <tt>multilib.eclass</tt>. This page documents this functionality so it can be more easily understood, used and improved.
+
Vous pouvez également voir le contenu du guide d'installation et l'éditer en allant à :
  
=== Core ABI Support ===
+
http://www.funtoo.org/Install/fr/partname.
  
Portage and some system profiles currently contain a very small set of changes so that multiple ABIs can be targeted by Portage. In addition, Gentoo's gcc "wrapper" (part of sys-devel/gcc-config) has a key feature in it to enable this multiple ABI support -- this functionality is detailed later in this section. This implements the core minimal multiple ABI functionality.
+
Veuillez noter que ce texte est inséré entre les balises includeonly afin qu'il soit visible qu'au moment où la page est éditée.
 
+
</includeonly>
In practice, this capability, combined with the gcc-wrapper's ABI support, can come in handy for directing Portage to build libraries for the non-default ABI, using the appropriate directories so that the resultant .tbz2 file can be manually installed on your system without overwriting the libraries for the default ABI. An example of this approach is documented later in this section. This support is also useful when it is necessary for the ebuild to direct the system to create 32-bit versions of some applications that may not be compatible with 64-bit multilib systems, and supports the ability for the ebuild to reliably compile both 32-bit and 64-bit versions of certain applications when necessary.
+
{{:Install/Header}}
 
+
{{:Install/Intro}}
==== Core ABI: econf() ====
+
{{:Install/Overview}}
 
+
{{:Install/Partitioning}}
Portage's <tt>econf()</tt> function has support for automatically specifying the proper <tt>--libdir=</tt> setting to <tt>configure</tt> based on settings that are found in the system profile. The intended purpose of automatically setting <tt>--libdir=</tt> is designed so that 64-bit libraries will be installed into /usr/lib64 on multilib systems, and 32-bit libraries will be installed into /usr/lib32 on multilib systems, rather than simply installing these libraries into /usr/lib.
+
{{:Install/Stage3}}
 
+
{{:Install/Chroot}}
While this functionality has questionable value for most normal ebuilds (since a library installed into /usr/lib will work just as well as one installed into /usr/lib64 on an amd64 multilib system,) this functionality likely comes in handy when building the app-emulation/emul-linux-x86-* binary library bundles to support 32-bit applications, as it allows the ABI to be set in the environment, and in combination with the gcc wrapper will cause 32-bit libraries to be built and installed to /usr/lib32.
+
{{:Install/PortageTree}}
 
+
{{:Install/Configuring}}
==== Core ABI: Gcc Wrapper ====
+
{{:Install/Portage}}
 
+
{{:Install/Kernel}}
It is important to note that Gentoo Linux uses a ''gcc wrapper'' as a front-end for all calls to gcc, and this wrapper  is part of the sys-devel/gcc-config ebuild. One of the features of the wrapper is that it determines whether the <tt>ABI</tt> variable has been defined in the environment, and if it has, the wrapper will automatically ensure that the <tt>CFLAGS</tt> variable that the compiler sees is actually the <tt>CFLAGS_$ABI</tt> variable, which originates from the system profile. On amd64 multilib systems, this means that a call to <tt>ABI="x86" gcc</tt> will result in an extra <tt>-m32</tt> option being passed to gcc to force it to produce 32-bit code. The <tt>-m32</tt> option will generally not appear in the build log, which may cause some confusion for developers. This is a critical component of the multiple ABI support in Gentoo and Funtoo Linux.
+
{{:Install/BootLoader}}
 
+
{{:Install/Network}}
==== Core ABI: Working Together ====
+
{{:Install/Finish}}
 
+
{{:Install/Profiles}}
The algorithm used by <tt>econf()</tt> works as follows: A system profile (or the user, via the environment) sets the <tt>ABI</tt> variable to a value like <tt>amd64</tt> or <tt>x86</tt>. A corresponding ABI-specific variable named <tt>LIBDIR_$ABI</tt> (e.g. <tt>LIBDIR_x86</tt>) will be used from the system profile, and will be set to either <tt>lib32</tt>, <tt>lib64</tt> or <tt>lib</tt>. This will be used to define the target <tt>--libdir</tt> setting used by <tt>econf()</tt>. This will allow the system profile to control exactly where libraries are installed when building them for a particular ABI, as long as the ebuild author uses <tt>econf()</tt> (part of core Portage) or <tt>get_libdir()</tt> (part of <tt>multilib.eclass</tt>.)
+
{{:Install/NextSteps}}
 
+
{{:Install/Footer}}
In addition, the <tt>ABI</tt> variable set in the environment will cause the gcc-wrapper to adjust the <tt>CFLAGS</tt> variable, by using the <tt>CFLAGS_$ABI</tt> variable to tell the multilib-aware gcc to target the alternate ABI. With <tt>ABI="x86"</tt> on amd64 multilib systems, this will cause <tt>-m32</tt> to be appended to the <tt>CFLAGS</tt> variable, which will instruct gcc to produce 32-bit code.
+
 
+
==== Core ABI: Demonstration ====
+
 
+
To test the multiple ABI functionality on an amd64 multilib system, you can execute the following command:
+
 
+
<pre>
+
# ABI="x86" emerge --buildpkgonly sys-libs/zlib
+
</pre>
+
 
+
If you compare the libz shared library in the resultant .tbz2 package ot the one installed in /lib64, you'll note that the one in the .tbz2 is 32-bit while the one in /lib64 is 64-bit:
+
 
+
<pre>
+
ninja1 lib32 # file libz.so.1.2.5
+
libz.so.1.2.5: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
+
ninja1 lib32 # file /lib/libz.so.1.2.5
+
/lib/libz.so.1.2.5: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
+
</pre>
+
 
+
It is important to note that Gentoo's gcc wrapper (part of sys-devel/gcc-config) instructs gcc to produce 32-bit code by silently passing (not visible in the build output, due to the wrapper design)a <tt>-m32</tt> option to all compiler calls.
+
 
+
Note that you should not install the 32-bit zlib .tbz2 package on a 64-bit multilib system, as it will replace the critical 64-bit zlib binaries on your system. Portage's  /var/db/pkg database does not allow side-by-side installations of packages that were built against different ABIs. However, this Portage functionality can be used to build 32-bit libraries when needed, which can be installed via manual extraction of the resultant .tbz2 file to the root filesystem.
+
 
+
=== Extended ABI Support ===
+
 
+
Beyond the core functionality, the <tt>multilib.eclass</tt> (which is inherited as part of the ubiquitous <tt>eutils.eclass</tt>) contains a more significant set of code to support multiple ABIs, which appears to be designed to be eventually merged into the Portage core. This means that latent multiple ABI support is available in Portage and can be used without inheriting <tt>multilib.eclass</tt> for "regular" ebuilds, but ebuilds that need more control over the ABI configuration can inherit <tt>multilib.eclass</tt> for access to a significant number of helper functions. If you want to use <tt>multilib.eclass</tt>, first familiarize yourself with the changes in Portage that exist that support <tt>multilib.eclass</tt> functionality, which are documented in this section. Then you will have a much easier time understanding <tt>multilib.eclass</tt>.
+
 
+
==== ABI Profile Variables ====
+
 
+
The following variables are supported on a limited number of architectures - namely, those that have different ABIs available. These include Sparc, PowerPC and PC-compatible x86/amd64 architectures.
+
+
; ABI
+
: Defines the name of the current ABI for which packages should be built. This variable is recognized by the gcc wrapper - see "Core gcc wrapper ABI support", below.
+
 
+
; DEFAULT_ABI
+
: Defines the name of the default ABI for which packages should be built.
+
 
+
; MULTILIB_ABIS
+
: This consists of a space-separated string of one or more ABIs that are supported on the current system. Amd64 multilib systems will have this set to <tt>amd64 x86</tt>
+
 
+
==== ABI-Specific Profile Variables ====
+
 
+
These variables have a suffix (represented below by <tt>*</tt>) that is set based on the ABI that the particular setting is for. For example, <tt>LIBDIR_amd64</tt> would set the library directory name for the amd64 ABI. The rationale for this naming convention is that it allows settings for multiple architectures to be defined together in a single file, and multiple ABI settings to exist on a system that may support multiple ABIs.
+
 
+
; LIBDIR_*
+
 
+
; CHOST_*
+
 
+
; CDEFINE_*
+
 
+
; CFLAGS_*
+
: Note: this variable is used by the gcc wrapper when ABI is defined in the environment.
+
 
+
; LDFLAGS_*
+
 
+
; ASFLAGS_*
+
 
+
==== multilib.eclass ====
+
 
+
Note that a number of these functions can probably be replaced with enhanced profile settings, as all they do is spit out canned values based on the setting of one variable or another. They are also prime candidates for inclusion into the Portage core, possibly with some reworking or deprecation so that as many of these as possible are replaced with "dead" variables rather than "live" code.
+
 
+
; has_multilib_profile()
+
: This is a boolean function that returns 0 (true) if multiple ABIs are defined in the MULTILIB_ABIS variable; otherwise 1 (false).
+
 
+
; get_libdir()
+
: Returns the "lib" directory name to use, based on the current setting of ABI. For example, on amd64 multilib systems, this will typically return <tt>lib64</tt>, and is typically used in <tt>src_configure()</tt> like this: <tt>./configure --libdir=/usr/$(get_libdir)</tt>.
+
 
+
; get_modname()
+
: Used by some ebuilds that generate dynamically-loadable modules, called "bundles" on MacOS X. ELF (used by Linux) makes no differentiation between the handling of shared libraries and loadable modules (or their file extension, which is ".so",) but Mach (MacOS X) does. MacOS X bundles cannot be linked against, but can be dynamically loaded using the dyld API. Apple also recommends that they have an extension of ".bundle" rather than ".so". This function will return ".bundle" for Darwin (Mach) systems, and ".so" for everything else. For more information, see [http://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm MacOS X Guide For Unix Geeks].
+
 
+
; get_libname()
+
: Used by a handful of ebuilds to determine the proper suffix for shared libraries on the current system. This function has various hard-coded values depending on the value of CHOST. For example, Darwin systems will get an echoed value of "<tt>.dylib</tt>" while Linux systems will get a value of "<tt>.so</tt>". Accepts an optional version argument that will be properly appended to the output.
+
 
+
; multilib_env()
+
: Used by toolchain.eclass, gnatbuild.eclass and the glibc ebuild - sets up environment variables for using a cross-compiler. Accepts a single argument - the target architecture in GNU format.
+
 
+
; multilib_toolchain_setup()
+
: In practice, this function is used exclusively to target a non-default x86 ABI on amd64 multilib systems. It accepts one argument, the name of an ABI, or <tt>default</tt> as a shorthand for the default system ABI. It will configure environment variables so the x86 (or other) compiler is targeted, and also backs up all modified variables so they can be restored later. It is typically used to allow non-64-bit-compatible code to still be installed on amd64 multilib systems, by adding the following to the top of <tt>src_configure()</tt>:
+
 
+
<pre>
+
src_configure() {
+
  use amd64 && multilib_toolchain_setup x86
+
  # we're now building a 32-bit app on a 64-bit system, whee!
+
  econf
+
}
+
</pre>
+
 
+
=== ABI Support Limitations ===
+
 
+
Only a handful of applications leverage the more sophisticated functionality available in <tt>multilib.eclass</tt>, and Gentoo Linux currently uses binary bundles of 32-bit libraries to provide support for 32-bit applications on 64-bit multilib systems, rather than using Portage functionality to build these components from source. One possible explanation for this approach is that Portage currently does not allow applications to be slotted on ABI -- that is, a 32-bit and 64-bit version of sys-libs/zlib cannot co-exist in the Portage /var/db/pkg database, even if they do not overwrite one another on the filesystem when installed. There may be other possible reasons why building 32-bit packages from source remains unfeasible in Gentoo Linux, and will be documented here as they are discovered.
+
 
+
[[Category:Internals]]
+
[[Category:Portage]]
+
[[Category:Official Documentation]]
+

Revision as of 15:21, December 20, 2014

Funtoo Linux Download/Install

Introduction

This document was written to help you install Funtoo Linux on PC-compatible systems, while keeping distracting options regarding system configuration to a minimum.

If you've had previous experience installing Gentoo Linux then a lot of steps will be familiar, but you should still read through as there are a few differences.

Note

If you are installing Funtoo Linux on ARM architecture, please see Funtoo Linux Installation on ARM for notable differences regarding ARM support.

Installation Overview

This is a basic overview of the Funtoo installation process:

  1. Download and boot the live CD of your choice.
  2. Prepare your disk.
  3. Create and mount filesystems.
  4. Install the Funtoo stage tarball of your choice.
  5. Chroot into your new system.
  6. Download the Portage tree.
  7. Configure your system and network.
  8. Install a kernel.
  9. Install a bootloader.
  10. Complete final steps.
  11. Reboot and enjoy.

Live CD

Funtoo doesn't provide an "official" Funtoo Live CD. We recommend using the Gentoo-based System Rescue CD as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems. Download it here:

http://www.sysresccd.org/Download

Note

If using an older version of System Rescue CD, be sure to select the rescue64 kernel at the boot menu if you are installing a 64-bit system. By default, System Rescue CD used to boot in 32-bit mode though the latest version attempts to automatically detect 64-bit processors.

Prepare Hard Disk

Introduction

In earlier times, there was only one way to boot a PC-compatible computer. All of our desktops and servers had a standard BIOS, all our hard drives used Master Boot Records, and were partitioned using the MBR partition scheme. And we liked it that way!

Then, along came EFI and UEFI, which are new-style firmware designed to boot systems, along with GPT partition tables to support disks larger than 2.2TB. All of the sudden, we had a variety of options to boot Linux systems, turning what once was a one-method-fits-all approach into something a lot more complex.

Let's take a moment to review the boot options available to you. This Install Guide uses, and recommends, the old-school method of BIOS booting and using an MBR. It works. There's nothing wrong with it. If your system disk is 2TB or smaller in size, it won't prevent you from using all of your disk's capacity, either.

But, there are some situations where the old-school method isn't optimal. If you have a system disk >2TB in size, then MBR partitions won't allow you to access all your storage. So that's one reason. Another reason is that there are some so-called "PC" systems out there that don't support BIOS booting anymore, and force you to use UEFI to boot. So, out of compassion for people who fall into this predicament, this Install Guide documents UEFI booting too.

Our recommendation is still to go old-school unless you have reason not to. We call this method the BIOS + GRUB (MBR) method. It's the traditional method of setting up a PC-compatible system to boot Linux.

If you need to use UEFI to boot, we recommend not using the MBR at all for booting, as some systems support this, but others don't. Instead, we recommend using UEFI to boot GRUB, which in turn will load Linux. We refer to this method as the UEFI + GRUB (GPT) method.

And yes, there are even more methods, some of which are documented on the Boot Methods page. We used to recommend a BIOS + GRUB (GPT) method but it is not consistently supported across a wide variety of hardware.

The big question is -- which boot method should you use? Here's how to tell.

Principle 1 - Old School
If you can reliably boot System Rescue CD and it shows you an initial light blue menu, you are booting the CD using the BIOS, and it's likely that you can thus boot Funtoo Linux using the BIOS. So, go old-school and use BIOS booting, unless you have some reason to use UEFI, such as having a >2.2TB system disk. In that case, see Principle 2, as your system may also support UEFI booting.
Principle 2 - New School
If you can reliably boot System Rescue CD and it shows you an initial black and white menu -- congratulations, your system is configured to support UEFI booting. This means that you are ready to install Funtoo Linux to boot via UEFI. Your system may still support BIOS booting, but just be trying UEFI first. You can poke around in your BIOS boot configuration and play with this.
What's the Big Difference between Old School and New School?
Here's the deal. If you go with old-school MBR partitions, your /boot partition will be an ext2 filesystem, and you'll use fdisk to create your MBR partitions. If you go with new-school GPT partitions and UEFI booting, your /boot partition will be a vfat filesystem, because this is what UEFI is able to read, and you will use gdisk to create your GPT partitions. And you'll install GRUB a bit differently. That's about all it comes down to, in case you were curious.

Note

Some motherboards may appear to support UEFI, but don't. Do your research. For example, the Award BIOS in my Gigabyte GA-990FXA-UD7 rev 1.1 has an option to enable UEFI boot for CD/DVD. This is not sufficient for enabling UEFI boot for hard drives and installing Funtoo Linux. UEFI must be supported for both removable media (so you can boot System Rescue CD using UEFI) as well as fixed media (so you can boot your new Funtoo Linux installation.) It turns out that later revisions of this board (rev 3.0) have a new BIOS that fully supports UEFI boot. This may point to a third principle -- know thy hardware.

Old-School (BIOS/MBR) Method

Note

Use this method if you are booting using your BIOS, and if your System Rescue CD initial boot menu was light blue. If you're going to use the new-school method, click here to jump down to UEFI/GPT.

Preparation

First, it's a good idea to make sure that you've found the correct hard disk to partition. Try this command and verify that /dev/sda is the disk that you want to partition:

# fdisk -l /dev/sda

Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048   1250263694  596.2G  Linux filesyste Linux filesystem

Now, it's recommended that you erase any existing MBR or GPT partition tables on the disk, which could confuse the system's BIOS at boot time. We do this using sgdisk:

Warning

This will make any existing partitions inaccessible! You are strongly cautioned and advised to backup any critical data before proceeding.

# sgdisk --zap-all /dev/sda

Creating new GPT entries.
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.

This output is also nothing to worry about, as the command still succeded:

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************
Partitioning

Now we will use fdisk to create the MBR partition table and partitions:

# fdisk /dev/sda

Within fdisk, follow these steps:

Empty the partition table:

Command (m for help): o ↵

Create Partition 1 (boot):

Command (m for help): n ↵
Partition type (default p): 
Partition number (1-4, default 1): 
First sector: 
Last sector: +128M ↵

Create Partition 2 (swap):

Command (m for help): n ↵
Partition type (default p): 
Partition number (2-4, default 2): 
First sector: 
Last sector: +2G ↵
Command (m for help): t ↵ 
Partition number (1,2, default 2): 
Hex code (type L to list all codes): 82 ↵

Create the root partition:

Command (m for help): n ↵
Partition type (default p): 
Partition number (3,4, default 3): 
First sector: 
Last sector: 

Verify the partition table:

Command (m for help): p

Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x82abc9a6

Device    Boot     Start       End    Blocks  Id System
/dev/sda1           2048    264191    131072  83 Linux
/dev/sda2         264192   4458495   2097152  82 Linux swap / Solaris
/dev/sda3        4458496 625142447 310341976  83 Linux

Write the parition table to disk:

Command (m for help): w

Your new MBR partition table will now be written to your system disk.

Note

You're done with partitioning! Now, jump over to Creating filesystems.

New-School (UEFI/GPT) Method

Note

Use this method if you are booting using UEFI, and if your System Rescue CD initial boot menu was black and white. If it was light blue, this method will not work.

The gdisk commands to create a GPT partition table are as follows. Adapt sizes as necessary, although these defaults will work for most users. Start gdisk:

# gdisk

Within gdisk, follow these steps:

Create a new empty partition table (This will erase all data on the disk when saved):

Command: o ↵
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y ↵

Create Partition 1 (boot):

Command: n ↵
Partition Number: 1 ↵
First sector: 
Last sector: +500M ↵
Hex Code: 

Create Partition 2 (swap):

Command: n ↵
Partition Number: 2 ↵
First sector: 
Last sector: +4G ↵
Hex Code: 8200 ↵

Create Partition 3 (root):

Command: n ↵
Partition Number: 3 ↵
First sector: 
Last sector:  (for rest of disk)
Hex Code: 

Along the way, you can type "p" and hit Enter to view your current partition table. If you make a mistake, you can type "d" to delete an existing partition that you created. When you are satisfied with your partition setup, type "w" to write your configuration to disk:

Write Partition Table To Disk:

Command: w ↵
Do you want to proceed? (Y/N): Y ↵

The partition table will now be written to disk and gdisk will close.

Now, your GPT/GUID partitions have been created, and will show up as the following block devices under Linux:

  • /dev/sda1, which will be used to hold the /boot filesystem,
  • /dev/sda2, which will be used for swap space, and
  • /dev/sda3, which will hold your root filesystem.

Creating filesystems

Note

This section covers both BIOS and UEFI installs. Don't skip it!

Before your newly-created partitions can be used, the block devices need to be initialized with filesystem metadata. This process is known as creating a filesystem on the block devices. After filesystems are created on the block devices, they can be mounted and used to store files.

Let's keep this simple. Are you using old-school MBR partitions? If so, let's create an ext2 filesystem on /dev/sda1:

# mkfs.ext2 /dev/sda1

If you're using new-school GPT partitions for UEFI, you'll want to create a vfat filesystem on /dev/sda1, because this is what UEFI is able to read:

# mkfs.vfat -F 32 /dev/sda1

Now, let's create a swap partition. This partition will be used as disk-based virtual memory for your Funtoo Linux system.

You will not create a filesystem on your swap partition, since it is not used to store files. But it is necessary to initialize it using the mkswap command. Then we'll run the swapon command to make your newly-initialized swap space immediately active within the live CD environment, in case it is needed during the rest of the install process:

# mkswap /dev/sda2
# swapon /dev/sda2

Now, we need to create a root filesystem. This is where Funtoo Linux will live. We generally recommend ext4 or XFS root filesystems. If you're not sure, choose ext4. Here's how to create a root ext4 filesystem:

# mkfs.ext4 /dev/sda3

...and here's how to create an XFS root filesystem, if you choose to use XFS:

# mkfs.xfs /dev/sda3

Your filesystems (and swap) have all now been initialized, so that that can be mounted (attached to your existing directory heirarchy) and used to store files. We are ready to begin installing Funtoo Linux on these brand-new filesystems.

Warning

When deploying an OpenVZ host, please use ext4 exclusively. The Parallels development team tests extensively with ext4, and modern versions of openvz-rhel6-stable are not compatible with XFS, and you may experience kernel bugs.

Mounting filesystems

Mount the newly-created filesystems as follows, creating /mnt/funtoo as the installation mount point:

# mkdir /mnt/funtoo
# mount /dev/sda3 /mnt/funtoo
# mkdir /mnt/funtoo/boot
# mount /dev/sda1 /mnt/funtoo/boot

Optionally, if you have a separate filesystem for /home or anything else:

# mkdir /mnt/funtoo/home
# mount /dev/sda4 /mnt/funtoo/home

If you have /tmp or /var/tmp on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:

# chmod 1777 /mnt/funtoo/tmp

Installing the Stage 3 tarball

After creating filesystems, the next step is downloading the initial Stage 3 tarball. The Stage 3 is a pre-compiled system used as a starting point to install Funtoo Linux. Load one of the following URLs in another browser window:

Now, let's navigate the directories on the mirrors to find the appropriate build of Funtoo Linux for you.

Which Build?

If you're not sure, pick funtoo-current.

Funtoo Linux has various different 'builds', or variants. Here is a list of the various builds that are available, and what their distinctive features are:

BuildDescription
funtoo-currentThe most commonly-selected build of Funtoo Linux. Receives rapid updates and preferred by desktop users.
funtoo-current-hardenedSame package set as funtoo-current, but with a hardened, exploit-resistant toolchain.
funtoo-stableEmphasizes less-frequent package updates and trusted, reliable versions of packages over the latest versions.

If you want to read more about this, have a look at Differences between stable, current and experimental.

What Architecture?

If you're not sure, pick x86-64bit, or possibly pure64 for server systems.

For PC-compatible systems, the following choices are available:

ArchitectureDescription
x86-64bitFor modern 64-bit processors. Uses new 64-bit instructions and address space. Maintains 32-bit compatibility with multilib.
pure64For modern 64-bit processors but with no support for 32-bit compatibility.
x86-32bitFor older 32-bit systems such as Athlon XP, Pentium 4, or earlier Atom.

Your SubArch

Inside /funtoo-current/x86-64bit/ on one of our mirrors, you'll see a bunch of directories for various subarches of Funtoo Linux. Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They also take advantage of the instruction sets available for each CPU.

If you are using an AMD-based CPU, download a stage3 from generic_64, amd64-k8, amd64-k10, amd64-bulldozer, amd64-piledriver, amd64-steamroller or amd64-jaguar. See our list of 64-bit AMD subarches for help figuring out which one is best for you.

If you are using an Intel-based CPU, download a stage3 from generic_64, atom_64, core2_64 or corei7. Note that corei7 is ideal for any modern Intel processor, including Core i3 and Core i5, and many Xeons. our list of 64-bit Intel subarches for help figuring out which one is best for you.

If you are using a 32-bit CPU, download a stage3 from generic_32, i686, core2_32, atom_32 or athlon-xp.

Setting the Date

Important

If your system's date and time are too far off (typically by months or years,) then it may prevent Portage from properly downloading source tarballs. This is because some of our sources are downloaded via HTTPS, which use SSL certificates and are marked with an activation and expiration date. However, if you system time is relatively close to correct, you can probably skip this step for now.

Now is a good time to verify the date and time are correctly set to UTC. Use the date command to verify the date and time:

# date
Fri Jul 15 19:47:18 UTC 2011

If the date and/or time need to be corrected, do so using date MMDDhhmmYYYY, keeping in mind hhmm are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:

# date 071620002011
Fri Jul 16 20:00:00 UTC 2011

Once you have set the system clock, it's a very good idea to copy the time to the hardware clock, so it persists across reboots:

# hwclock --systohc

Download the Stage3

Once you are in your Funtoo Linux root filesystem, use wget to download the Stage 3 tarball you have chosen to use as the basis for your new Funtoo Linux system. It should be saved to the /mnt/funtoo directory as follows:

# cd /mnt/funtoo
# wget http://build.funtoo.org/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz

Note that 64-bit systems can run 32-bit or 64-bit stages, but 32-bit systems can only run 32-bit stages. Make sure that you select a Stage 3 build that is appropriate for your CPU. If you are not certain, it is a safe bet to choose the generic_64 or generic_32 stage. Consult the Download page for more information.

Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:

# tar xpf stage3-latest.tar.xz

Important

It is very important to use tar's "p" option when extracting the Stage 3 tarball - it tells tar to preserve any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.

Chroot into Funtoo

Before chrooting into your new system, there's a few things that need to be done first. You will need to mount /proc and /dev inside your new system. Use the following commands:

# cd /mnt/funtoo
# mount -t proc none proc
# mount --rbind /sys sys
# mount --rbind /dev dev


You'll also want to copy over resolv.conf in order to have proper DNS name resolution from inside the chroot:

# cp /etc/resolv.conf etc

Now you can chroot into your new system. Use env before chroot to ensure that no environment variables from the installation media are used by your new system:

# env -i HOME=/root TERM=$TERM chroot . bash -l

Note

Users of live CDs with 64-bit kernels installing 32-bit systems: Some software may use uname -r to check whether the system is 32 or 64-bit. You may want append linux32 to the chroot command as a workaround, but it's generally not needed.

Important

If you receive the error "chroot: failed to run command `/bin/bash': Exec format error", it is probably because you are running a 32-bit kernel and trying to execute 64-bit code. SystemRescueCd boots with a 32-bit kernel by default.

It's also a good idea to change the default command prompt while inside the chroot. This will avoid confusion if you have to change terminals. Use this command:

# export PS1="(chroot) $PS1"

Congratulations! You are now chrooted inside a Funtoo Linux system. Now it's time to get Funtoo Linux properly configured so that Funtoo Linux will boot successfully when your system is restarted.

Downloading the Portage tree

Note

For an alternative way to do this, see Installing Portage From Snapshot.

Now it's time to install a copy of the Portage repository, which contains package scripts (ebuilds) that tell portage how to build and install thousands of different software packages. To create the Portage repository, simply run emerge --sync from within the chroot. This will automatically clone the portage tree from GitHub:

(chroot) # emerge --sync

Important

If you receive the error with initial emerge --sync due to git protocol restrictions, change SYNC variable in /etc/make.conf:

SYNC="https://github.com/funtoo/ports-2012.git"

Configuring your system

As is expected from a Linux distribution, Funtoo Linux has its share of configuration files. The one file you are absolutely required to edit in order to ensure that Funtoo Linux boots successfully is /etc/fstab. The others are optional.

Using Nano

The default editor included in the chroot environment is called nano. To edit one of the files below, call nano as follows:

(chroot) # nano /etc/fstab

When in the editor, you can use arrow keys to move the cursor, and common keys like backspace and delete will work as expected. To save the file, press Control-X, and answer y when prompted to save the modified buffer if you would like to save your changes.

Configuration Files

Here are a full list of files that you may want to edit, depending on your needs:

File Do I need to change it? Description
/etc/fstab YES - required Mount points for all filesystems to be used at boot time. This file must reflect your disk partition setup. We'll guide you through modifying this file below.
/etc/localtime Maybe - recommended Your timezone, which will default to UTC if not set. This should be a symbolic link to something located under /usr/share/zoneinfo (e.g. /usr/share/zoneinfo/America/Montreal)
/etc/make.conf (symlink) - also known as:
/etc/portage/make.conf
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.
/etc/conf.d/hostname Maybe - recommended Used to set system hostname. Set the hostname variable to the fully-qualified (with dots, ie. foo.funtoo.org) name if you have one. Otherwise, set to the local system hostname (without dots, ie. foo). Defaults to localhost if not set.
/etc/hosts No You no longer need to manually set the hostname in this file. This file is automatically generated by /etc/init.d/hostname.
/etc/conf.d/keymaps Optional Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See Funtoo Linux Localization.
/etc/conf.d/hwclock 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.
/etc/conf.d/modules Optional Kernel modules to load automatically at system startup. Typically not required. See Additional Kernel Resources for more info.
/etc/conf.d/consolefont Optional Allows you to specify the default console font. To apply this font, enable the consolefont service by running rc-update add consolefont.
profiles 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.

Warning

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 gdisk or fdisk. Skipping this step may prevent Funtoo Linux from booting successfully.

/etc/fstab

/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

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

Localization

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.

Introducing Portage

Portage, the Funtoo Linux package manager has a command called emerge which is used to build and install packages from source. It also takes care of installing all of the package's dependencies. You call emerge like this:

(chroot) # emerge packagename

When you install a package by specifying its name in the command-line, Portage records its name in the /var/lib/portage/world file. It does so because it assumes that, since you have installed it by name, you want to consider it part of your system and want to keep the package updated in the future. This is a handy feature, since when packages are being added to the world set, we can update our entire system by typing:

(chroot) # emerge --sync
(chroot) # emerge -auDN @world

This is the "official" way to update your Funtoo Linux system. Above, we first update our Portage tree using git to grab the latest ebuilds (scripts), and then run an emerge command to update the world set of packages. The options specified tell emerge to:

  • a - show us what will be emerged, and ask us if we want to proceed
  • u - update the packages we specify -- don't emerge them again if they are already emerged.
  • D - Consider the entire dependency tree of packages when looking for updates. In other words, do a deep update.
  • N - Update any packages that have changed (new) USE settings.

You should also consider passing --with-bdeps=y when emerging @world, at least once in a while. This will update build dependencies as well.

Of course, sometimes we want to install a package but not add it to the world file. This is often done because you only want the package installed temproarily or because you know the package in question is a dependnecy of another package. If this behavior is desired, you call emerge like this:

(chroot) # emerge -1 packagename

Advanced users may be interested in the Emerge wiki page.

Updating World

Now is actually a very good time to update the entire system and it can be a good idea to do so prior to first boot.

(chroot) # emerge --sync
(chroot) # emerge -auDN @world

Important

Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.

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 the boot loader, and interfaces directly with your system's hardware, and allows regular (userspace) programs to run.

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.

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.

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

Note

See Funtoo Linux Kernels for a full list of kernels supported in Funtoo Linux. We recommend debian-sources for new users.

Important

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

Important

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/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/make.conf section if you forgot to do this.

Note

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

Note

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.

Installing a Bootloader

These install instructions show you how to use GRUB to boot using BIOS (old-school) or UEFI (new-school).

Old School (BIOS)

If you're using the BIOS to boot, setting up GRUB, the bootloader, is pretty easy.

To use this recommended boot method, first emerge boot-update. This will also cause grub-2 to be merged, since it is a dependency of boot-update.

(chroot) # emerge boot-update

Then, edit /etc/boot.conf and specify "Funtoo Linux genkernel" as the default setting at the top of the file, replacing "Funtoo Linux".

/etc/boot.conf should now look like this:

boot {
	generate grub
	default "Funtoo Linux genkernel" 
	timeout 3 
}

"Funtoo Linux" {
	kernel bzImage[-v]
}

"Funtoo Linux genkernel" {
	kernel kernel[-v]
	initrd initramfs[-v]
	params += real_root=auto 
} 

"Funtoo Linux better-initramfs" {
	kernel vmlinuz[-v]
	initrd /initramfs.cpio.gz
}

Please read man boot.conf for further details.

Running grub-install and boot-update

Finally, we will need to actually install the GRUB boot loader to your disk, and also run boot-update which will generate your boot loader configuration file:

(chroot) # grub-install --no-floppy /dev/sda
(chroot) # boot-update

Now you need to update your boot loader configuration file:

(chroot) # boot-update

You only need to run grub-install when you first install Funtoo Linux, but you need to re-run boot-update every time you modify your /etc/boot.conf file, so your changes are applied on next boot.

New School (UEFI)

If you're using UEFI to boot, setting up the boot loader is a bit more complicated for now, but this process will be improving soon. Perform the following steps.

Emerging GRUB

You will still use GRUB as a boot loader, but before emerging grub, you will need to enable EFI booting. To do this, add the following line to /etc/make.conf:

GRUB_PLATFORMS="efi-64"

Then, emerge boot-update. You will notice grub and efibootmgr getting pulled in as dependencies. This is expected and good:

(chroot) # emerge boot-update
Installing GRUB

Now, for the magic of getting everything in place for booting. You should copy your kernel and initramfs (if you have one -- you will if you are following the default install) to /boot. GRUB will boot those. But how do we get UEFI to boot GRUB? Well, we need to run the following command:

(chroot) # grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck /dev/sda

This command will simply install all the stuff to /boot/EFI and /boot/grub that your system needs to boot. In particular, the /boot/EFI/grub/grubx64.efi file will be created. This is the GRUB boot image that UEFI will load and start.

A more detailed explanation of the flags used in the above command:

  • --target=x86_64-efi: Tells GRUB that we want to install it in a way that allows it to boot in UEFI
  • --efi-directory=/boot: All GRUB UEFI files will be installed in /boot
  • --bootloader-id="Funtoo Linux [GRUB]": This flag is not necessary for GRUB to boot. However, it allows you to change the text of the boot option in the UEFI BIOS. The stuff in the quotes can be set to anything that you would like.
  • --recheck: If a device map already exists on the disk or partition that GRUB is being installed on, it will be removed.
  • /dev/sda:The device that we are installing GRUB on.
Configuring GRUB

OK, now UEFI has the GRUB image it needs to boot. But we still need to configure GRUB itself so it finds and boots your kernel and initramfs. This is done by performing the following steps. Since boot-update doesn't yet support UEFI, we will use boot-update, but then edit our /boot/grub/grub.cfg to support UEFI booting.

First, you will need to edit /etc/boot.conf. Format this as you would if you were booting without UEFI. If you are not sure how this should look, below is an example of what it could look like if you are booting from an unencrypted ext4 partition:

/etc/boot.conf
boot {
        generate grub
        default "Funtoo Linux"
        timeout 3
}

"Funtoo Linux" {
        kernel vmlinuz[-v]
        params += rootfstype=ext4 root=/dev/sda2
}

After you have edited your /etc/boot.conf file, run boot-update. You should now have a /boot/grub/grub.cfg file, which you can edit using the following command:

# nano /boot/grub/grub.cfg


To get your /boot/grub/grub.cfg to support booting with UEFI, make the following changes. Below the existing insmod lines, add the following lines. Both of these involve adding support for the UEFI framebuffer to GRUB.:

  insmod efi_gop
  insmod efi_uga

Then, change the set gfxpayload line to read as follows. UEFI does not support text mode, so we will keep video initialized to the current resolution.:

  set gfxpayload=keep

You can now save your changes by pressing Control-X and answering y when asked if you want to save the modified buffer. When prompted for a filename, hit Enter to use the existing filename.

Configuring your network

It's important to ensure that you will be able to connect to your local-area network after you reboot into Funtoo Linux. There are three approaches you can use for configuring your network: NetworkManager, dhcpcd, and the Funtoo Linux Networking scripts. Here's how to choose which one to use based on the type of network you want to set up.

Wi-Fi

Using NetworkManager

For laptop/mobile systems where you will be using Wi-Fi and connecting to various networks, NetworkManager is strongly recommended. The Funtoo version of NetworkManager is fully functional even from the command-line, so you can use it even without X or without the Network Manager applet. Here are the steps involved in setting up NetworkManager:

(chroot) # emerge linux-firmware
(chroot) # emerge networkmanager
(chroot) # rc-update add NetworkManager default

Above, we installed linux-firmware which contains a complete collection of available firmware for many hardware devices including Wi-Fi adapters, plus NetworkManager to manage our network connection. Then we added NetworkManager to the default runlevel so it will start when Funtoo Linux boots.

After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:

# addwifi -S wpa -K 'wifipassword' mywifinetwork

The addwifi command is used to configure and connect to a WPA/WPA2 Wi-Fi network named mywifinetwork with the password wifipassword. This network configuration entry is stored in /etc/NetworkManager/system-connections so that it will be remembered in the future. You should only need to enter this command once for each Wi-Fi network you connect to.

Using wpa_supplicant

If for some reason you don't want to use a tool such as NetworkManager or wicd, you can use wpa_supplicant for wireless network connections.

First, emerge wpa_supplicant:

(chroot) # emerge -a wpa_supplicant

Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant.conf. The syntax is very easy:

network={
ssid="MyWifiName"
psk="lol42-wifi"
}

network={
ssid="Other Network"
psk="6d96270004515a0486bb7f76196a72b40c55a47f"
}

You will need to add both wpa_supplicant and dhcpcd to the default runlevel. wpa_supplicant will connect to your access point, and dhcpcd will acquire an IP address via DHCP:

(chroot) # rc-update add dhcpcd default
(chroot) # rc-update add wpa_supplicant default

Desktop (Wired Ethernet)

For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add dhcpcd to the default runlevel:

(chroot) # rc-update add dhcpcd default

When you reboot, dhcpcd will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.

Server (Static IP)

For servers, the Funtoo Linux Networking scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See Funtoo Linux Networking for information on how to use Funtoo Linux's template-based network configuration system.

Finishing Steps

Set your root password

It's imperative that you set your root password before rebooting so that you can log in.

(chroot) # passwd

Restart your system

Now is the time to leave chroot, to unmount Funtoo Linux partitions and files and to restart your computer. When you restart, the GRUB boot loader will start, load the Linux kernel and initramfs, and your system will begin booting.

Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.

(chroot) # exit
# cd /mnt
# umount -l funtoo
# reboot

Note

System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.

You should now see your system reboot, the GRUB boot loader appear for a few seconds, and then see the Linux kernel and initramfs loading. After this, you should see Funtoo Linux itself start to boot, and you should be greeted with a login: prompt. Funtoo Linux has been successfully installed!

Profiles

Once you have rebooted into Funtoo Linux, you can further customize your system to your needs by using Funtoo Profiles.

Funtoo profiles are used to define defaults for Portage specific to your needs. There are 4 basic profile types: arch, build, flavor, and mix-ins:

arch
typically x86-32bit or x86-64bit, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.
build
defines whether your system is a current, stable or experimental build. current systems will have newer packages unmasked than stable systems.
flavor
defines the general type of system, such as server or desktop, and will set default USE flags appropriate for your needs.
mix-ins
define various optional settings that you may be interested in enabling.

One arch, build and flavor must be set for each Funtoo Linux system, while mix-ins are optional and you can enable more than one if desired.

Remember that profiles can often be inherited. For example, the desktop flavor inherits the workstation flavor settings, which in turn inherits the X and audio mix-ins. You can view this by using eselect:

(chroot) # eselect profile show
Currently set profiles:
    arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit
   build: gentoo:funtoo/1.0/linux-gnu/build/current
  flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde

Automatically enabled profiles:
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media
 mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras

To view installed profiles:

(chroot) # eselect profile list

To change the profile flavor:

(chroot) # eselect profile set-flavor 7

To add a mix-in:

(chroot) # eselect profile add 10


Next Steps

If you are brand new to Funtoo Linux and Gentoo Linux, please check out Funtoo Linux First Steps, which will help get you acquainted with your new system. We also have a category for our official documentation, which includes all docs that we officially maintain for installation and operation of Funtoo Linux.

We also have a number of pages dedicated to setting up your system, which you can find below. If you are interested in adding a page to this list, add it to the "First Steps" MediaWiki category.


If your system did not boot correctly, see Installation Troubleshooting for steps you can take to resolve the problem.