https://www.funtoo.org/api.php?action=feedcontributions&user=Dantrell&feedformat=atomFuntoo - User contributions [en]2024-03-28T22:51:06ZUser contributionsMediaWiki 1.36.2https://www.funtoo.org/index.php?title=News:GNOME_3.14_Unleashed&diff=6700News:GNOME 3.14 Unleashed2014-11-04T13:21:18Z<p>Dantrell: Created page with "{{News |Summary=GNOME 3.14 is now unmasked and stabilized. Enjoy! |News Format=Extended |News Category=General |Author=Dantrell |Publication Status=Published |Publication Date..."</p>
<hr />
<div>{{News<br />
|Summary=GNOME 3.14 is now unmasked and stabilized. Enjoy!<br />
|News Format=Extended<br />
|News Category=General<br />
|Author=Dantrell<br />
|Publication Status=Published<br />
|Publication Date=2014/11/04<br />
|Icon=File:Gnome.jpg<br />
}}<br />
<br />
{{Note|This is a News item page, and you can comment using DISQUS at the bottom.}}<br />
<br />
While GNOME 3.14 is not a huge leap forward in comparison to 3.12, it comes with a lot of changes under the hood such as:<br />
<br />
* a new animation when opening the Activities Overview<br />
* new transition animations for windows<br />
* new search providers for Clocks and Calculator (you can find times for cities and perform calculations)<br />
* system-wide multitouch gestures (for touchscreen devices only)<br />
* improvements to GTK<br />
* improved support for Wi-Fi hotspot<br />
* enhanced geolocation framework<br />
* network-based sharing<br />
* support for Wayland (for systemd systems only)<br />
<br />
<br />
My [https://bugs.funtoo.org/browse/FL-1637 patchset] was also applied which (in part):<br />
<br />
* reintegrates Power Management Utilities (pm-utils) Support<br />
* restores Adwaita backgrounds from GNOME 3.10<br />
* reintegrates background transparency for GNOME Terminal<br />
<br />
<br />
You can find the instructions for upgrading (and for cleaning out some unnecessary files if you were testing) at [[GNOME First Steps]].<br />
<br />
{{NewsFooter}}</div>Dantrellhttps://www.funtoo.org/index.php?title=GNOME_First_Steps&diff=6697GNOME First Steps2014-11-04T12:08:28Z<p>Dantrell: Update to reflect the transition to GNOME 3.14</p>
<hr />
<div>= What is GNOME? =<br />
<br />
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." — [http://gnome.org GNOME]<br />
<br />
== Prerequisites ==<br />
<br />
=== From a Clean Install ===<br />
<br />
Ensure that the [[X Window System]] is installed.<br />
<br />
=== From [[Testing GNOME 3.14]] ===<br />
<br />
Remove the GNOME 3.14 unmask by deleting <code>/usr/portage/profiles/package.mask/funtoo-gnome</code> and/or by removing the relevant lines from <code>/etc/portage/package.unmask</code>.<br />
<br />
Also, if you are not going to use the gnome mix-in, undo any GNOME 3.14 related <code>package.use</code> and <code>package.keyword</code> additions.<br />
<br />
== Preparing to emerge ==<br />
<br />
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:<br />
<br />
<console><br />
##r### ##b## eselect profile list<br />
##g##Currently available mix-ins profiles:<br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio<br />
[12] funtoo/1.0/linux-gnu/mix-ins/cinnamon<br />
[13] funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
[14] funtoo/1.0/linux-gnu/mix-ins/dvd<br />
[15] funtoo/1.0/linux-gnu/mix-ins/gnome<br />
[16] funtoo/1.0/linux-gnu/mix-ins/kde<br />
[17] funtoo/1.0/linux-gnu/mix-ins/mate<br />
[18] funtoo/1.0/linux-gnu/mix-ins/media<br />
[19] funtoo/1.0/linux-gnu/mix-ins/print<br />
[20] funtoo/1.0/linux-gnu/mix-ins/python3-only<br />
[21] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat<br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-db<br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-mail<br />
[24] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[25] funtoo/1.0/linux-gnu/mix-ins/X<br />
[26] funtoo/1.0/linux-gnu/mix-ins/xfce<br />
[27] funtoo/1.0/linux-gnu/mix-ins/vmware-guest<br />
[28] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
<br />
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:<br />
<br />
<console><br />
##r### ##b##eselect profile add 15<br />
</console><br />
<br />
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.<br />
<br />
== Emerging ==<br />
<br />
You are provided with two packages that will pull in this desktop environment:<br />
<br />
* ''gnome''<br />
<br />
{{fancynote|This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.}}<br />
<br />
* ''gnome-light''<br />
<br />
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}<br />
<br />
=== GNOME 3.14 from a clean install ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'' run the following command<br />
<br />
<console><br />
# ##i## emerge gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' run the following command<br />
<br />
<console><br />
# ##i## emerge gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.12 ===<br />
<br />
To update either ''gnome'' or ''gnome-light'' run the following command:<br />
<br />
<console><br />
# ##i## emerge -vauDN world<br />
</console><br />
<br />
== Subsystems ==<br />
<br />
=== Bluetooth ===<br />
<br />
For bluetooth support, ensure that:<br />
<br />
# Bluetooth support is enabled in your kernel (using modules is fine).<br />
# Your bluetooth hardware is turned on.<br />
# Add the <code>bluetooth</code> startup script to the default runlevel, and start it.<br />
<br />
This can be done as follows:<br />
<br />
<console><br />
# ##i##rc-update add bluetooth default<br />
# ##i##rc<br />
</console><br />
<br />
Once this is done, you should now be able to navigate to ''Settings'' -> ''Bluetooth'' and turn bluetooth on. The icon next to devices should now animate and you should be able to discover and add devices such as keyboards.<br />
<br />
{{Note|1=<br />
Additional kernel drivers may need to be enabled for certain input devices. For example, for the bluetooth Apple Magic Trackpad, the following option must be enabled in your kernel:<br />
<br />
{{kernelop|title=Device Drivers,HID support,HID bus support,Special HID drivers|desc=<br />
<M> Apple Magic Mouse/Trackpad multi-touch support<br />
}}}}<br />
<br />
=== Printing ===<br />
<br />
To enable printing support, add <code>cupsd</code> to the default runlevel:<br />
<br />
<console><br />
# ##i##rc-update add cupsd default<br />
# ##i##rc<br />
</console><br />
<br />
You should now be able to navigate to ''Settings'' -> ''Printers'' and add printers to your system, and print.<br />
<br />
=== Scanning ===<br />
<br />
To enable scanning support, add your user account to the <code>lp</code> group. This will allow your user to access the USB scanner.<br />
<br />
Then, <code>emerge xsane</code>, and run it. It should be able to access your scanner.<br />
<br />
== Finishing Touches ==<br />
<br />
=== X ===<br />
<br />
==== Setting up xdm (GUI log-in) ====<br />
<br />
Typically, you will want to use <code>gdm</code>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.<br />
<br />
To enable gdm, edit <code>/etc/conf.d/xdm</code> and set <code>DISPLAYMANAGER</code> to <code>gdm</code> instead of <code>xdm</code>. Then, perform the following steps to add <code>xdm</code> to the default runlevel, and have it start automatically from now on when your system starts:<br />
<br />
{{Note|Funtoo's <code>/etc/init.d/xdm</code> initscript has been modified to start the requisite services <code>dbus</code>, <code>openrc-settingsd</code> and <code>consolekit</code> prior to starting <code>gdm</code>.}}<br />
<br />
<console><br />
# ##i## rc-update add xdm default<br />
</console><br />
<br />
Then, if you want to start it now do:<br />
<br />
<console><br />
# ##i##rc<br />
</console><br />
<br />
But you should reboot to avoid having an open login terminal.<br />
<br />
==== Setting up xinitrc (text log-in) ====<br />
<br />
Adding the following to your <code>~/.xinitrc</code> file is sufficient:<br />
<br />
<pre><br />
# Fix Missing Applications in Gnome<br />
export XDG_MENU_PREFIX=gnome-<br />
<br />
# Properly Launch the Desired X Session<br />
exec ck-launch-session gnome-session<br />
</pre><br />
<br />
Additionaly, if you need support for different input sources, there is no longer a need to configure IBus or SCIM in your <code>.xinitrc</code> file as GNOME uses IBus natively. Simply configure it in the Control Center under Region & Language.<br />
<br />
=== Automatically Starting Applications at Login ===<br />
<br />
When using an old-fashioned <code>.xinitrc</code>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <code>~/.xprofile</code> file. Here's my sample <code>.xprofile</code> to start <code>xflux</code> to dim the screen at night:<br />
<br />
<pre><br />
xflux -z 87107<br />
</pre><br />
<br />
{{Note|Remember to add a <code>&</code> at the end of any command that doesn't return to the shell prompt after running.}}<br />
<br />
== Significant Known Issues (Workarounds Available) ==<br />
<br />
[https://bugs.funtoo.org/browse/FL-1678 FL-1678]: Bluetooth interface gives wrong pairing key<br />
<br />
[https://bugs.funtoo.org/browse/FL-1687 FL-1687]: Wallpaper corruption when resuming from suspend<br />
<br />
[[Category:Desktop]]<br />
[[Category:First Steps]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=News:Testing_GNOME_3.14&diff=6646News:Testing GNOME 3.142014-10-30T18:33:00Z<p>Dantrell: Ref. FL-1694</p>
<hr />
<div>{{News<br />
|Summary=GNOME 3.14 is now available in Funtoo, masked for testing. Help us test it!<br />
|News Format=Extended<br />
|News Category=General<br />
|Author=Dantrell<br />
|Publication Status=Published<br />
|Publication Date=2014/10/22<br />
|Icon=File:Gnome.jpg<br />
}}<br />
{{Note|This is a News item page, and you can comment using DISQUS at the bottom.}}<br />
<br />
GNOME 3.14 is now available in Funtoo, masked for testing. Please help us test it. If you find bugs, or want more detailed information on what is included, please see [https://bugs.funtoo.org/browse/FL-1637 FL-1637].<br />
<br />
== Preparing ==<br />
<br />
=== sync ===<br />
<br />
First, sync the tree if you haven't recently as you need access to a file in the tree:<br />
<br />
<console><br />
###i## emerge --sync<br />
</console><br />
<br />
=== unmask ===<br />
<br />
Now, reverse the GNOME 3.14 mask file:<br />
<br />
==== package.mask (directory) ====<br />
<br />
<console><br />
###i## cd /etc/portage/package.unmask<br />
###i## ln -s /usr/portage/profiles/package.mask/funtoo-gnome .<br />
</console><br />
<br />
==== package.mask (file) ====<br />
<br />
<console><br />
###i## cat /usr/portage/profiles/package.mask/funtoo-gnome >> /etc/portage/package.unmask<br />
</console><br />
<br />
=== USE flags ===<br />
<br />
Then to simplify matters, enable the gnome mix-in:<br />
<br />
<console><br />
###i## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio<br />
[12] funtoo/1.0/linux-gnu/mix-ins/cinnamon<br />
[13] funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
[14] funtoo/1.0/linux-gnu/mix-ins/dvd<br />
[15] funtoo/1.0/linux-gnu/mix-ins/gnome<br />
[16] funtoo/1.0/linux-gnu/mix-ins/kde<br />
[17] funtoo/1.0/linux-gnu/mix-ins/mate<br />
[18] funtoo/1.0/linux-gnu/mix-ins/media<br />
[19] funtoo/1.0/linux-gnu/mix-ins/print<br />
[20] funtoo/1.0/linux-gnu/mix-ins/python3-only<br />
[21] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat<br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-db<br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-mail<br />
[24] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[25] funtoo/1.0/linux-gnu/mix-ins/X<br />
[26] funtoo/1.0/linux-gnu/mix-ins/xfce<br />
[27] funtoo/1.0/linux-gnu/mix-ins/vmware-guest<br />
[28] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
<br />
<console><br />
###i## eselect profile add funtoo/1.0/linux-gnu/mix-ins/gnome<br />
</console><br />
<br />
== Emerging ==<br />
<br />
=== Installing GNOME 3.14 ===<br />
<br />
===== gnome =====<br />
<br />
To emerge ''gnome'' run the following command:<br />
<br />
<console><br />
###i## emerge gnome<br />
</console><br />
<br />
===== gnome-light =====<br />
<br />
To emerge ''gnome-light'' run the following command:<br />
<br />
<console><br />
###i## emerge gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.12 ===<br />
<br />
To update "gnome" or "gnome-light" run the following command:<br />
<br />
<console><br />
###i## emerge -vauDN world<br />
</console><br />
<br />
== Finishing Touches ==<br />
<br />
=== Verify the inode/directory MimeType Handler ===<br />
<br />
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:<br />
<br />
<pre><br />
[Added Associations]<br />
inode/directory=org.gnome.Nautilus.desktop;org.gnome.baobab.desktop;<br />
</pre><br />
<br />
{{NewsFooter}}</div>Dantrellhttps://www.funtoo.org/index.php?title=Funtoo_Linux_Installation&diff=6611Funtoo Linux Installation2014-10-26T06:59:09Z<p>Dantrell: Simplify processors/threads query</p>
<hr />
<div><div class="container"><div class="row"><div class="col-sm-12 col-md-9"><br />
== Introduction == <br />
<br />
This document was written to help you install Funtoo Linux as concisely as possible, with a minimum number of distracting options regarding system configuration. <br />
<br />
These docs assume you have a "PC compatible" computer system with a standard PC BIOS. Many new computers support UEFI for booting, which is a new firmware interface that frequently replaces the older MBR-based BIOS. If you have a system with UEFI, you will want to use this documentation along with the [[UEFI Install Guide]], which will augment these instructions and explain how to get your system to boot. You may need to change your PC BIOS settings to enable or disable UEFI booting. The [[UEFI Install Guide]] has more information on this, and steps on how to determine if your system supports UEFI.<br />
<br />
We also offer a [[ZFS Install Guide]], which augment the instructions on this page for those who want to install Funtoo Linux on ZFS. If you are installing Funtoo Linux on [[Funtoo Linux Installation on ARM|ARM]] architecture, please see [[Funtoo Linux Installation on ARM]] for notable differences regarding ARM support. An experimental Funtoo Linux build also exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]].<br />
<br />
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.<br />
<br />
== Installation Overview ==<br />
<br />
This is a basic overview of the Funtoo installation process:<br />
<br />
# [[#Live CD|Download and boot the live CD of your choice]].<br />
# [[#Prepare Hard Disk|Prepare your disk]].<br />
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.<br />
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.<br />
# [[#Chroot into Funtoo|Chroot into your new system]].<br />
# [[#Downloading the Portage tree|Download the Portage tree]].<br />
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].<br />
# [[#Configuring and installing the Linux kernel|Install a kernel]].<br />
# [[#Installing a Bootloader|Install a bootloader]].<br />
# [[#Finishing Steps|Complete final steps]].<br />
# [[#Restart your system|Reboot and enjoy]].<br />
<br />
=== Live CD ===<br />
<br />
Funtoo doesn't provide an "official" Funtoo Live CD, but there are plenty of good ones out there to choose from. A great choice is the Gentoo-based [http://www.sysresccd.org/ System Rescue CD] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.<br />
<br />
It is also possible to install Funtoo Linux using many other Linux-based live CDs. Generally, any modern bootable Linux live CD or live USB media will work. See [[Requirements|requirements]] for an overview of what the Live Media must provide to allow a problem-free install of Funtoo Linux.<br />
<br />
To begin a Funtoo Linux installation, download System Rescue CD from:<br />
<br />
{{MirrorList}}<br />
<br />
Or, use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of System Rescue CD, '''be sure to select the <code>rescue64</code> 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.<br />
<br />
=== Prepare Hard Disk ===<br />
==== Partitions ====<br />
<br />
Funtoo Linux fully supports traditional MBR partitions, as well as newer GPT/GUID partition formats. See below to determine which partitioning scheme to use:<br />
<br />
===== MBR Partitions =====<br />
<br />
* '''Recommended if your system disk is <=2TB in size'''<br />
* Legacy, DOS partitioning scheme<br />
* Only 4 primary partitions per disk; after that, you must use "logical" partitions<br />
* Does not support 2 TB+ disks for booting<br />
* Compatible with certain problematic systems (such as the HP ProBook 4520)<br />
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)<br />
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo<br />
<br />
{{fancynote|Due to the fact that it is more widely supported on PC hardware, it is best to use MBR partitions if possible.}}<br />
<br />
===== GPT Partitions =====<br />
<br />
* '''Recommended if your disk is >2TB in size'''<br />
* Newer format for Linux systems<br />
* Supports 2 TB+ hard drives for booting<br />
* Supports hundreds of partitions per disk of any size<br />
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI<br />
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy<br />
<br />
{{fancyimportant|If you have a system disk that is 2TB or greater and want to use the space beyond 2TB, you ''must'' partition using the GPT/GUID format. Otherwise, MBR is recommended as the most reliable boot method.}}<br />
<br />
===== Filesystem Resources =====<br />
<br />
Advanced users may be interested in the following topics:<br />
<br />
* [[GUID Booting Guide]]<br />
* [[LVM Install Guide]]<br />
* [[Rootfs over encrypted lvm]]<br />
* [[Rootfs over encrypted lvm over raid-1 on GPT]]<br />
* '''NEW!''' '''[[ZFS Install Guide]] (Also contains instructions for Rootfs over Encrypted ZFS!)'''<br />
<br />
===== Partitioning Recommendations =====<br />
<br />
Below are our partitioning recommendations in table form. For MBR-based partitions, use the MBR Block Device and MBR code columns with <code>fdisk</code>. For GPT-based partitions, use the GPT Block Device and GPT Code columns with <code>gdisk</code>:<br />
<br />
{{TableStart}} <br />
<tr class="active"><th>Partition</th><br />
<th>Size</th><br />
<th>MBR Block Device (<code>fdisk</code>)</th><br />
<th>GPT Block Device (<code>gdisk</code>)</th><br />
<th>Filesystem</th><br />
<th>MBR Code</th><br />
<th>GPT Code</th><br />
</tr><tr><br />
<td><code>/boot</code></td><br />
<td>512 MB</td><br />
<td><code>/dev/sda1</code></td><br />
<td><code>/dev/sda1</code></td><br />
<td>ext2</td><br />
<td>83</td><br />
<td>8300</td><br />
</tr><tr><br />
<td>GRUB boot loader partition</td><br />
<td>1 MB</td><br />
<td>''not required for MBR''</td><br />
<td><code>/dev/sda2</code></td><br />
<td>For GPT/GUID only, skip for MBR - no filesystem.</td><br />
<td>''N/A''</td><br />
<td>EF02</td><br />
</tr><tr><br />
<td>swap</td><br />
<td>2x RAM for low-memory systems and production servers; otherwise 2GB.</td><br />
<td><code>/dev/sda2</code></td><br />
<td><code>/dev/sda3</code></td><br />
<td>swap (default)</td><br />
<td>82</td><br />
<td>8200</td><br />
</tr><tr><br />
<td><code>/</code> (root)</td><br />
<td>Rest of the disk, minimum of 10GB. Note: to compile the <code>debian-sources</code> kernel, as described later on this page, requires a minimum of 14GB free space in <code>/tmp</code>; consider a minimum of 20GB in this case.</td><br />
<td><code>/dev/sda3</code></td><br />
<td><code>/dev/sda4</code></td><br />
<td>XFS recommended, alternatively ext4</td><br />
<td>83</td><br />
<td>8300</td><br />
</tr><tr><br />
<td><code>/home</code> (optional) </td><br />
<td>User storage and media. Typically most of the disk.</td><br />
<td><code>/dev/sda4</code> (if created)</td><br />
<td><code>/dev/sda5</code> (if created)</td><br />
<td>XFS recommended, alternatively ext4</td><br />
<td>83</td><br />
<td>8300</td><br />
</tr><tr><br />
<td>LVM (optional)</td><br />
<td>If you want to create an LVM volume.</td><br />
<td><code>/dev/sda4</code> (PV, if created)</td><br />
<td><code>/dev/sda5</code> (PV, if created)</td><br />
<td>LVM PV</td><br />
<td>8E</td><br />
<td>8E00</td><br />
</tr>{{TableEnd}}<br />
<br />
===== Partitioning Using fdisk (MBR) =====<br />
<br />
{{fancyimportant|If you need to create a GPT partition table, see [[Partitioning using gdisk]].}}<br />
<br />
{{fancynote|These install instructions assume you are installing Funtoo Linux to an hard disk using Master Boot Record partition tables (MBR). If you are installing Funtoo Linux on a machine where another OS is installed, there is an existing Linux distribution on your system that you want to keep or any other scenario (such as differing swap size requirements), then you will need to adapt these instructions to suit your needs.}}<br />
<br />
<code>fdisk</code> is the tool used to create an MBR partition table. MBR is well-supported on PCs and is recommended if your system disk is 2TB or smaller.<br />
<br />
====== Preparation ======<br />
<br />
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 <code>/dev/sda</code> is the disk that you want to partition:<br />
<br />
<console><br />
# ##i##fdisk -l /dev/sda<br />
<br />
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk label type: gpt<br />
<br />
<br />
# Start End Size Type Name<br />
1 2048 1250263694 596.2G Linux filesyste Linux filesystem<br />
</console><br />
<br />
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 <code>sgdisk</code>:<br />
{{fancywarning|This will make any existing partitions inaccessible! You are '''strongly''' cautioned and advised to backup any critical data before proceeding.}}<br />
<br />
<console><br />
# ##i##sgdisk --zap-all /dev/sda<br />
<br />
Creating new GPT entries.<br />
GPT data structures destroyed! You may now partition the disk using fdisk or<br />
other utilities.<br />
</console><br />
<br />
This output is also nothing to worry about, as the command still succeded:<br />
<br />
<console><br />
***************************************************************<br />
Found invalid GPT and valid MBR; converting MBR to GPT format<br />
in memory. <br />
***************************************************************<br />
</console><br />
<br />
====== Partitioning ======<br />
<br />
Now we will use <code>fdisk</code> to create the MBR partition table and partitions:<br />
<br />
<console><br />
# ##i##fdisk /dev/sda<br />
</console><br />
<br />
Within <code>fdisk</code>, follow these steps:<br />
<br />
'''Empty the partition table''':<br />
<br />
<console><br />
Command (m for help): ##i##o ↵<br />
</console><br />
<br />
'''Create Partition 1''' (boot):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (1-4, default 1): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+128M ↵<br />
</console><br />
<br />
'''Create Partition 2''' (swap):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (2-4, default 2): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+2G ↵<br />
Command (m for help): ##i##t ↵ <br />
Partition number (1,2, default 2): ##i## ↵<br />
Hex code (type L to list all codes): ##i##82 ↵<br />
</console><br />
<br />
'''Create the root partition:'''<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (3,4, default 3): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##↵<br />
</console><br />
<br />
'''Verify the partition table:'''<br />
<br />
<console><br />
Command (m for help): ##i##p<br />
<br />
Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0x82abc9a6<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 264191 131072 83 Linux<br />
/dev/sda2 264192 4458495 2097152 82 Linux swap / Solaris<br />
/dev/sda3 4458496 625142447 310341976 83 Linux<br />
</console><br />
<br />
'''Write the parition table to disk:'''<br />
<br />
<console><br />
Command (m for help): ##i##w<br />
</console><br />
<br />
Your new MBR partition table will now be written to your system disk.<br />
<br />
==== Creating filesystems ====<br />
<br />
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.<br />
<br />
You will not create a filesystem on your swap partition, but will initialize it using the <code>mkswap</code> command so that it can be used as disk-based virtual memory. Then we'll run the <code>swapon</code> command to make your newly-initialized swap space active within the live CD environment, in case it is needed during the rest of the install process.<br />
<br />
Note that we will not create a filesystem on the GRUB boot loader partition, as GRUB writes binary data directly to that partition when the boot loader is installed, which we'll do later.<br />
<br />
You can see the commands you will need to type below. Like the rest of this document, it assumes that you are using a GPT partitioning scheme. If you are using MBR, your root filesystem will likely be created on <code>/dev/sda3</code> instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:<br />
<br />
'''We generally recommend XFS for root filesystems, although ext4 is also a good choice.''' This tutorial assumes the use of XFS. If you want to use ext4, then be sure that your <code>/etc/fstab</code> file reflects this.<br />
<br />
{{fancywarning|1=<br />
When deploying an OpenVZ host, please use ext4 exclusively. The Parallels development team tests extensively with ext4, and modern versions of <code>openvz-rhel6-stable</code> are '''not''' compatible with XFS, and you may experience kernel bugs.<br />
}}<br />
<br />
'''To use ext4 as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.ext4 /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
'''To use XFS as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.xfs /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
==== Mounting filesystems ====<br />
<br />
Mount the newly-created filesystems as follows, creating <code>/mnt/funtoo</code> as the installation mount point:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/sda3 /mnt/funtoo<br />
# ##i##mkdir /mnt/funtoo/boot<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
</console><br />
<br />
Optionally, if you have a separate filesystem for <code>/home</code> or anything else:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo/home<br />
# ##i##mount /dev/sda4 /mnt/funtoo/home<br />
</console><br />
<br />
If you have <code>/tmp</code> or <code>/var/tmp</code> on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:<br />
<br />
<console><br />
# ##i##chmod 1777 /mnt/funtoo/tmp<br />
</console><br />
<br />
=== Installing the Stage 3 tarball ===<br />
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:<br />
<br />
{{MirrorList}}<br />
<br />
Now, let's navigate the directories on the mirrors to find the appropriate build of Funtoo Linux for you.<br />
<br />
==== Stable or Current? ====<br />
Funtoo Linux has a "stable" build and a "current" build. Most people use the "current" build of Funtoo Linux, and it's generally recommended that you do too. You will find "current' builds in the main <code>/funtoo-current</code> directory on our mirrors, and "stable" builds in <code>/funtoo-stable</code>.<br />
<br />If you want to read more about this, have a look at [[Funtoo_Linux#What_are_the_differences_between_.27stable.27.2C_.27current.27_and_.27experimental.27_.3F|Differences between stable, current and experimental]].<br />
<br />
==== 32 or 64-bit? ====<br />
There are three different types of Funtoo Linux that you can install. If you are installing on an older 32-bit system (if you don't know, then you probably are not) then you want to grab a stage3 tarball from the <code>x86-32bit</code> sub-directory. Most likely, you'll want to grab a 64-bit build from the <code>x86-64bit</code> sub-directory.<br />
<br />
==== Your SubArch ====<br />
Inside <code>/funtoo-current/x86-64bit/</code> on one of our mirrors, you'll see a bunch of directories for various ''subarches'' of Funtoo Linux.<br />
<br />
Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They take advantage of the instruction sets available for each CPU. <br />
<br />
For example, the <code>corei7</code> and <code>corei7-pure64</code> sub-arches require an Intel Core i7 processor to run (this includes Xeon x3400+ series, or other Nehalem-based CPUs such as Xeon x5500/x5600 series.)<br />
<br />
If you are using an AMD-based CPU, download a stage3 from <code>generic_64</code>, <code>amd64-k8</code> or <code>amd64-k10</code>. <br />
<br />
If you are using an Intel-based CPU, download a stage3 from <code>generic_64</code>, <code>atom_64</code>, <code>core2_64</code> or <code>corei7</code>.<br />
<br />
===== Pure64 Builds =====<br />
Inside <code>x86-64bit</code>, you may notice a sub-directory named <code>pure64</code>. These builds are recommended for server systems, and they do not offer any 32-bit compatibility, which is generally not needed on server systems. If you are setting up a desktop or workstation system, it's recommended that you avoid these builds as you will need 32-bit compatibility to run several binary desktop-oriented applications such as Skype. But for servers, pure64 is recommended.<br />
<br />
==== Setting the Date ====<br />
<br />
{{fancyimportant|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.}}<br />
<br />
Now is a good time to verify the date and time are correctly set to UTC. Use the <code>date</code> command to verify the date and time:<br />
<br />
<console><br />
# ##i##date<br />
Fri Jul 15 19:47:18 UTC 2011<br />
</console><br />
<br />
If the date and/or time need to be corrected, do so using <code>date MMDDhhmmYYYY</code>, keeping in mind <code>hhmm</code> are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:<br />
<br />
<console><br />
# ##i##date 071620002011<br />
Fri Jul 16 20:00:00 UTC 2011<br />
</console><br />
<br />
==== Download the Stage3 ====<br />
Once you are in your Funtoo Linux root filesystem, use <code>wget</code> 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 <code>/mnt/funtoo</code> directory as follows:<br />
<br />
<console># ##i##cd /mnt/funtoo<br />
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz<br />
</console><br />
<br />
<br />
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 <code>generic_64</code> or <code>generic_32</code> stage. Consult the [[Download]] page for more information.<br />
<br />
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:<br />
<console><br />
# ##i##tar xpf stage3-latest.tar.xz<br />
</console><br />
<br />
{{fancyimportant|It is very important to use <code>tar's</code> "<code>'''p'''</code>" option when extracting the Stage 3 tarball - it tells <code>tar</code> to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}<br />
<br />
=== Chroot into Funtoo ===<br />
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:<br />
<console><br />
# ##i##cd /mnt/funtoo<br />
# ##i##mount -t proc none proc<br />
# ##i##mount --rbind /sys sys<br />
# ##i##mount --rbind /dev dev<br />
</console><br />
<br />
You'll also want to copy over <code>resolv.conf</code> in order to have proper DNS name resolution from inside the chroot:<br />
<console><br />
# ##i##cp /etc/resolv.conf etc<br />
</console><br />
<br />
Now you can chroot into your new system. Use <code>env</code> before <code>chroot</code> to ensure that no environment variables from the installation media are used by your new system:<br />
<br />
<console><br />
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l<br />
</console><br />
<br />
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <code>uname -r</code> 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.}}<br />
{{fancyimportant|If you receive the error "<code>chroot: failed to run command `/bin/bash': Exec format error</code>", 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.}}<br />
<br />
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:<br />
<console><br />
# ##i##export PS1="(chroot) $PS1"<br />
</console><br />
<br />
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.<br />
<br />
=== Downloading the Portage tree ===<br />
<br />
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}<br />
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 <code>emerge --sync</code> from within the chroot. This will automatically clone the portage tree from [https://github.com/funtoo/ports-2012 GitHub]:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
</console><br />
<br />
{{fancyimportant|1=<br />
If you receive the error with initial <code>emerge --sync</code> due to git protocol restrictions, change <code>SYNC</code> variable in <code>/etc/make.conf</code>:<br />
<pre><br />
SYNC="https://github.com/funtoo/ports-2012.git"<br />
</pre><br />
}}<br />
<br />
=== Configuring your system ===<br />
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 <code>/etc/fstab</code>. The others are optional. Here are a list of files that you should consider editing:<br />
{{TableStart}}<br />
<tr class="active"><th>File</th><br />
<th>Do I need to change it?</th><br />
<th>Description</th><br />
</tr><tr class="danger"><br />
<td><code>/etc/fstab</code></td><br />
<td>'''YES - required'''</td><br />
<td>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.</td><br />
</tr><tr><br />
<td><code>/etc/localtime</code></td><br />
<td>''Maybe - recommended''</td><br />
<td>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) </td><br />
</tr><tr><br />
<td><code>/etc/make.conf</code> (symlink) - also known as:<br/><code>/etc/portage/make.conf</code></td><br />
<td>''Maybe - recommended''</td><br />
<td>Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.</td><br />
</tr><tr><br />
<td><code>/etc/conf.d/hostname</code></td><br />
<td>''Maybe - recommended''</td><br />
<td>Used to set system hostname. Set the <code>hostname</code> variable to the fully-qualified (with dots, ie. <code>foo.funtoo.org</code>) name if you have one. Otherwise, set to the local system hostname (without dots, ie. <code>foo</code>). Defaults to <code>localhost</code> if not set.</td><br />
</tr><tr><br />
<td><code>/etc/hosts</code></td><br />
<td>''No''</td><br />
<td> You no longer need to manually set the hostname in this file. This file is automatically generated by <code>/etc/init.d/hostname</code>.</td><br />
</tr><tr><br />
<td><code>/etc/conf.d/keymaps</code></td><br />
<td>Optional</td><br />
<td>Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].</td><br />
</tr><tr><br />
<td><code>/etc/conf.d/hwclock</code></td><br />
<td>Optional</td><br />
<td>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.</td><br />
</tr><tr><br />
<td><code>/etc/conf.d/modules</code></td><br />
<td>Optional</td><br />
<td>Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.</td><br />
</tr><tr><br />
<td><code>/etc/conf.d/consolefont</code></td><br />
<td>Optional</td><br />
<td>Allows you to specify the default console font. To apply this font, enable the consolefont service by running rc-update add consolefont.</td><br />
</tr><tr><br />
<td><code>profiles</code></td><br />
<td>Optional</td><br />
<td>Some useful portage settings that may help speed up intial configuration.</td><br />
</tr><br />
{{TableEnd}}<br />
<br />
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 portal|Community]])<br />
<br />
Let's go ahead and see what we have to do. Use <code>nano -w <name_of_file></code> to edit files -- the "<code>-w</code>" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.<br />
<br />
{{fancywarning|It's important to edit your <code>/etc/fstab</code> 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 <code>gdisk</code> or <code>fdisk</code>. Skipping this step may prevent Funtoo Linux from booting successfully.}}<br />
<br />
==== /etc/fstab ====<br />
<br />
<code>/etc/fstab</code> is used by the <code>mount</code> command which is ran when your system boots. Statements of this file inform <code>mount</code> about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit <code>/etc/fstab</code> and ensure that it reflects the partition configuration you used earlier:<br />
<br />
<console><br />
(chroot) # ##i##nano -w /etc/fstab<br />
</console><br />
<br />
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type "<code>Y</code>" when asked if you want to save the modified buffer, or hit Control-O before closing <code>nano</code>. Otherwise your changes will be discarded.<br />
<br />
<pre><br />
# The root filesystem should have a pass number of either 0 or 1.<br />
# All other filesystems should have a pass number of 0 or greater than 1.<br />
#<br />
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.<br />
#<br />
# See the manpage fstab(5) for more information.<br />
#<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
<br />
/dev/sda1 /boot ext2 noauto,noatime 1 2<br />
/dev/sda2 none swap sw 0 0<br />
/dev/sda3 / ext4 noatime 0 1<br />
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0<br />
</pre><br />
<br />
==== /etc/localtime ====<br />
<br />
<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. <br />
<br />
<console><br />
(chroot) # ##i##ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime<br />
</console><br />
<br />
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.<br />
<br />
==== /etc/make.conf ====<br />
<br />
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:<br />
<br />
<pre><br />
MAKEOPTS="-j3" <br />
</pre><br />
<br />
If you are unsure about how many processors/threads you have then use nproc to help you.<br />
<console><br />
(chroot) # ##i##nproc<br />
16<br />
</console><br />
<br />
Set MAKEOPTS to this number plus one:<br />
<br />
<pre><br />
MAKEOPTS="-j17"<br />
</pre><br />
<br />
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].<br />
<br />
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:<br />
<br />
<pre><br />
LINGUAS="fr"<br />
</pre><br />
<br />
==== /etc/conf.d/hwclock ====<br />
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.<br />
<console><br />
(chroot) # ##i##nano -w /etc/conf.d/hwclock<br />
</console><br />
<br />
==== Localization ====<br />
<br />
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]].<br />
<br />
=== Introducing Portage ===<br />
<br />
Portage, the Funtoo Linux package manager has a command called <code>emerge</code> 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:<br />
<br />
<console><br />
(chroot) # ##i##emerge packagename<br />
</console><br />
<br />
When you install a package by specifying its name in the command-line, Portage records its name in the <code>/var/lib/portage/world</code> 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 <code>world</code> set, we can update our entire system by typing:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
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 <code>world</code> set of packages. The options specified tell <code>emerge</code> to:<br />
<br />
* '''<code>a</code>''' - show us what will be emerged, and '''ask''' us if we want to proceed<br />
* '''<code>u</code>''' - ''update'' the packages we specify -- don't emerge them again if they are already emerged.<br />
* '''<code>D</code>''' - Consider the entire dependency tree of packages when looking for updates. In other words, do a '''deep''' update.<br />
* '''<code>N</code>''' - Update any packages that have changed ('''new''') USE settings.<br />
<br />
You should also consider passing <code>--with-bdeps=y</code> when emerging @world, at least once in a while. This will update build dependencies as well.<br />
<br />
Of course, sometimes we want to install a package but not add it to the <code>world</code> 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:<br />
<br />
<console><br />
(chroot) # ##i##emerge -1 packagename<br />
</console><br />
<br />
Advanced users may be interested in the [[Emerge]] wiki page.<br />
<br />
==== Updating World ====<br />
<br />
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.<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
{{fancyimportant|1=<br />
Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.}}<br />
<br />
=== Configuring and installing the Linux kernel ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== Package Sets ====<br />
<br />
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.<br />
<br />
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".<br />
<br />
==== Kernel Package Set ====<br />
<br />
To create the kernel package set, perform the following steps:<br />
<br />
<console><br />
(chroot) # ##i##mkdir /etc/portage/sets<br />
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel<br />
</console><br />
<br />
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:<br />
<br />
<console><br />
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use<br />
</console><br />
<br />
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.<br />
<br />
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.<br />
<br />
==== Building the Kernel ====<br />
<br />
{{Fancynote|1=<br />
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <code>debian-sources</code> for new users.}}<br />
<br />
{{fancyimportant|1=<br />
<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.}}<br />
<br />
Let's emerge our kernel:<br />
<br />
<console><br />
(chroot) # ##i##emerge @kernel<br />
</console><br />
<br />
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.<br />
<br />
{{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>.}}<br />
<br />
{{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.}}<br />
<br />
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.<br />
<br />
=== Installing a Bootloader ===<br />
<br />
{{fancynote|An alternate boot loader called extlinux can be used instead of GRUB if you desire. See the [[Extlinux|extlinux Guide]] for information on how to do this.}}<br />
<br />
==== Installing Grub ====<br />
<br />
The boot loader is responsible for loading the kernel from disk when your computer boots. For new installations, GRUB 2 and Funtoo's boot-update tool should be used as a boot loader. GRUB supports both GPT/GUID and legacy MBR partitioning schemes.<br />
<br />
To use this recommended boot method, first emerge <code>boot-update</code>. This will also cause <code>grub-2</code> to be merged, since it is a dependency of <code>boot-update</code>. (You may need to adjust <code>GRUB_PLATFORMS</code> if you are on a UEFI system. See [[UEFI Install Guide]]).<br />
<br />
<console><br />
(chroot) # ##i##emerge boot-update<br />
</console><br />
<br />
Then, edit <code>/etc/boot.conf</code> and specify "<code>Funtoo Linux genkernel</code>" as the <code>default</code> setting at the top of the file, replacing <code>"Funtoo Linux"</code>. <br />
<br />
<code>/etc/boot.conf</code> should now look like this:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
# if you use bliss-kernel package<br />
# you should change string<br />
# kernel kernel[-v]<br />
# to<br />
# kernel kernel/[-v]/kernel[-v]<br />
kernel kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
If you use bliss-kernel, your <code>/etc/boot.conf</code> should look like:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
kernel kernels/[-v]/kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
Please read <code>man boot.conf</code> for further details.<br />
<br />
===== Running grub-install and boot-update =====<br />
<br />
Finally, we will need to actually install the GRUB boot loader to your disk, and also run <code>boot-update</code> which will generate your boot loader configuration file:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --no-floppy /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
Now you need to update your boot loader configuration file:<br />
<console><br />
(chroot) # ##i##boot-update<br />
</console><br />
You only need to run <code>grub-install</code> when you first install Funtoo Linux, but you need to re-run <code>boot-update</code> every time you modify your <code>/etc/boot.conf</code> file, so your changes are applied on next boot.<br />
<br />
=== Configuring your network ===<br />
<br />
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.<br />
<br />
==== Wi-Fi ====<br />
===== Using NetworkManager =====<br />
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:<br />
<br />
<console><br />
(chroot) # ##i##emerge linux-firmware<br />
(chroot) # ##i##emerge networkmanager<br />
(chroot) # ##i##rc-update add NetworkManager default<br />
</console><br />
<br />
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 <code>default</code> runlevel so it will start when Funtoo Linux boots.<br />
<br />
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:<br />
<br />
<console><br />
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork<br />
</console><br />
<br />
The <code>addwifi</code> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <code>mywifinetwork</code> with the password <code>wifipassword</code>. This network configuration entry is stored in <code>/etc/NetworkManager/system-connections</code> 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.<br />
<br />
===== Using wpa_supplicant =====<br />
If for some reason you don't want to use a tool such as NetworkManager or <code>wicd</code>, you can use wpa_supplicant for wireless network connections.<br />
<br />
First, emerge wpa_supplicant:<br />
<br />
<console><br />
(chroot) ###i## emerge -a wpa_supplicant<br />
</console><br />
<br />
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant.conf.<br />
The syntax is very easy:<br />
<pre><br />
network={<br />
ssid="MyWifiName"<br />
psk="lol42-wifi"<br />
}<br />
<br />
network={<br />
ssid="Other Network"<br />
psk="6d96270004515a0486bb7f76196a72b40c55a47f"<br />
}<br />
</pre><br />
<br />
You will need to add both <code>wpa_supplicant</code> and <code>dhcpcd</code> to the default runlevel. <code>wpa_supplicant</code> will connect to your access point, and <code>dhcpcd</code> will acquire an IP address via DHCP:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
(chroot) # ##i##rc-update add wpa_supplicant default<br />
</console><br />
<br />
==== Desktop (Wired Ethernet) ====<br />
<br />
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 <code>dhcpcd</code> to the default runlevel:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
</console><br />
<br />
When you reboot, <code>dhcpcd</code> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.<br />
<br />
==== Server (Static IP) ====<br />
<br />
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.<br />
<br />
=== Finishing Steps ===<br />
<br />
==== Set your root password ====<br />
It's imperative that you set your root password before rebooting so that you can log in.<br />
<console><br />
(chroot) # ##i##passwd<br />
</console><br />
<br />
===Restart your system ===<br />
<br />
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.<br />
<br />
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.<br />
<console><br />
(chroot) # ##i##exit<br />
# ##i##cd /mnt<br />
# ##i##umount -l funtoo<br />
# ##i##reboot<br />
</console><br />
<br />
{{fancynote|System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.}}<br />
<br />
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 <code>login:</code> prompt. Funtoo Linux has been successfully installed!<br />
=== Profiles ===<br />
<br />
Once you have rebooted into Funtoo Linux, you can further customize your system to your needs by using Funtoo Profiles.<br />
<br />
[[Funtoo 1.0 Profile|Funtoo profiles]] are used to define defaults for Portage specific to your needs. There are 4 basic profile types: arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:<br />
<br />
;arch: typically <code>x86-32bit</code> or <code>x86-64bit</code>, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.<br />
;build: defines whether your system is a <code>current</code>, <code>stable</code> or <code>experimental</code> build. <code>current</code> systems will have newer packages unmasked than <code>stable</code> systems.<br />
;flavor: defines the general type of system, such as <code>server</code> or <code>desktop</code>, and will set default USE flags appropriate for your needs.<br />
;mix-ins: define various optional settings that you may be interested in enabling.<br />
<br />
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.<br />
<br />
Remember that profiles can often be inherited. For example, the <code>desktop</code> flavor inherits the <code>workstation</code> flavor settings, which in turn inherits the <code>X</code> and <code>audio</code> mix-ins. You can view this by using eselect:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile show<br />
Currently set profiles:<br />
arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit<br />
build: gentoo:funtoo/1.0/linux-gnu/build/current<br />
flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde<br />
<br />
Automatically enabled profiles:<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
</console><br />
<br />
To view installed profiles:<br />
<console><br />
(chroot) # ##i##eselect profile list<br />
</console><br />
<br />
To change the profile flavor:<br />
<console><br />
(chroot) # ##i##eselect profile set-flavor 7<br />
</console><br />
<br />
To add a mix-in:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile add 10<br />
</console><br />
<br />
===Next Steps===<br />
<br />
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 [[:Category:Official Documentation|official documentation]], which includes all docs that we officially maintain for installation and operation of Funtoo Linux.<br />
<br />
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.<br />
<br />
{{#ask: [[Category:First Steps]] | format=ul }}<br />
<br />
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Install]]<br />
[[Category:Official Documentation]]<br />
</div><div class="col-md-3 col-hidden-sm col-hidden-xs"><div id="tocwrap" ><br />
__TOC__<br />
</div></div></div></div>Dantrellhttps://www.funtoo.org/index.php?title=News:Testing_GNOME_3.14&diff=6588News:Testing GNOME 3.142014-10-24T06:33:22Z<p>Dantrell: Cleaned up and simplified instructions</p>
<hr />
<div>{{News<br />
|Summary=GNOME 3.14 is now available in Funtoo, masked for testing. Help us test it!<br />
|News Format=Extended<br />
|News Category=General<br />
|Author=Dantrell<br />
|Publication Status=Published<br />
|Publication Date=2014/10/22<br />
|Icon=File:Gnome.jpg<br />
}}<br />
{{Note|This is a News item page, and you can comment using DISQUS at the bottom.}}<br />
<br />
GNOME 3.14 is now available in Funtoo, masked for testing. Please help us test it. If you find bugs, or want more detailed information on what is included, please see [https://bugs.funtoo.org/browse/FL-1637 FL-1637].<br />
<br />
== Preparing ==<br />
<br />
=== sync ===<br />
<br />
First, sync the tree if you haven't recently as you need access to a file in the tree:<br />
<br />
<console><br />
###i## emerge --sync<br />
</console><br />
<br />
=== unmask ===<br />
<br />
Now, reverse the GNOME 3.14 mask file:<br />
<br />
==== package.mask (directory) ====<br />
<br />
<console><br />
###i## cd /etc/portage/package.unmask<br />
###i## ln -s /usr/portage/profiles/package.mask/funtoo-gnome .<br />
</console><br />
<br />
==== package.mask (file) ====<br />
<br />
<console><br />
###i## cat /usr/portage/profiles/package.mask/funtoo-gnome >> /etc/portage/package.unmask<br />
</console><br />
<br />
=== USE flags ===<br />
<br />
Then to simplify matters, enable the gnome mix-in:<br />
<br />
<console><br />
###i## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio<br />
[12] funtoo/1.0/linux-gnu/mix-ins/cinnamon<br />
[13] funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
[14] funtoo/1.0/linux-gnu/mix-ins/dvd<br />
[15] funtoo/1.0/linux-gnu/mix-ins/gnome<br />
[16] funtoo/1.0/linux-gnu/mix-ins/kde<br />
[17] funtoo/1.0/linux-gnu/mix-ins/mate<br />
[18] funtoo/1.0/linux-gnu/mix-ins/media<br />
[19] funtoo/1.0/linux-gnu/mix-ins/print<br />
[20] funtoo/1.0/linux-gnu/mix-ins/python3-only<br />
[21] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat<br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-db<br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-mail<br />
[24] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[25] funtoo/1.0/linux-gnu/mix-ins/X<br />
[26] funtoo/1.0/linux-gnu/mix-ins/xfce<br />
[27] funtoo/1.0/linux-gnu/mix-ins/vmware-guest<br />
[28] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
<br />
<console><br />
###i## eselect profile add funtoo/1.0/linux-gnu/mix-ins/gnome<br />
</console><br />
<br />
== Emerging ==<br />
<br />
=== Installing GNOME 3.14 ===<br />
<br />
===== gnome =====<br />
<br />
To emerge ''gnome'' run the following command:<br />
<br />
<console><br />
###i## emerge gnome<br />
</console><br />
<br />
===== gnome-light =====<br />
<br />
To emerge ''gnome-light'' run the following command:<br />
<br />
<console><br />
###i## emerge gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.12 ===<br />
<br />
To update "gnome" or "gnome-light" run the following command:<br />
<br />
<console><br />
###i## emerge -vauDN world<br />
</console><br />
{{NewsFooter}}</div>Dantrellhttps://www.funtoo.org/index.php?title=News:Testing_GNOME_3.14&diff=6586News:Testing GNOME 3.142014-10-23T23:49:06Z<p>Dantrell: Use the default PORTDIR location</p>
<hr />
<div>{{News<br />
|Summary=GNOME 3.14 is now available in Funtoo, masked for testing. Help us test it!<br />
|News Format=Extended<br />
|News Category=General<br />
|Author=Dantrell<br />
|Publication Status=Published<br />
|Publication Date=2014/10/22<br />
|Icon=File:Gnome.jpg<br />
}}<br />
{{Note|This is a News item page, and you can comment using DISQUS at the bottom.}}<br />
<br />
GNOME 3.14 is now available in Funtoo, masked for testing. Please help us test it. If you find bugs, or want more detailed information on what is included, please see [https://bugs.funtoo.org/browse/FL-1637 FL-1637].<br />
<br />
== Preparing ==<br />
<br />
{{fancywarning|These instructions assume that your /etc/portage/package.{unmask,use} locations are directories.}}<br />
<br />
First, sync the tree if you haven't recently as you need access to a file in the tree:<br />
<br />
<console><br />
###i## emerge --sync<br />
</console><br />
<br />
Now, create a symlink to the GNOME 3.14 mask file, reversijng it in the process:<br />
<br />
<console><br />
###i## cd /etc/portage/package.unmask<br />
###i## ln -s /usr/portage/profiles/package.mask/funtoo-gnome .<br />
</console><br />
<br />
Then to simplify matters, enable the gnome mix-in:<br />
<br />
<console><br />
###i## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio <br />
[12] funtoo/1.0/linux-gnu/mix-ins/console-extras <br />
[13] funtoo/1.0/linux-gnu/mix-ins/dvd <br />
[14] funtoo/1.0/linux-gnu/mix-ins/gnome <br />
[15] funtoo/1.0/linux-gnu/mix-ins/kde <br />
[16] funtoo/1.0/linux-gnu/mix-ins/mate <br />
[17] funtoo/1.0/linux-gnu/mix-ins/media <br />
[18] funtoo/1.0/linux-gnu/mix-ins/print <br />
[19] funtoo/1.0/linux-gnu/mix-ins/python3-only <br />
[20] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat <br />
[21] funtoo/1.0/linux-gnu/mix-ins/server-db <br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-mail <br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[24] funtoo/1.0/linux-gnu/mix-ins/X <br />
[25] funtoo/1.0/linux-gnu/mix-ins/xfce <br />
[26] funtoo/1.0/linux-gnu/mix-ins/vmware-guest <br />
[27] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
<br />
<console><br />
###i## eselect profile add 14<br />
</console><br />
<br />
Finally, add the relevant section to your /etc/portage/package.use/funtoo-gnome file:<br />
<br />
===== gnome-light (without mix-in) =====<br />
<br />
<pre><br />
gnome-extra/evolution-data-server gtk<br />
x11-libs/libxcb xkb<br />
media-libs/cogl gles2<br />
</pre><br />
<br />
===== gnome (with mix-in) =====<br />
<br />
<pre><br />
# required by eog-plugins<br />
media-gfx/eog-plugins python_single_target_python3_3<br />
<br />
# required by evolution<br />
gnome-extra/evolution-data-server gnome-online-accounts<br />
media-libs/libchamplain gtk<br />
<br />
# required by gnome-boxes<br />
net-misc/spice-gtk gtk3 -pulseaudio<br />
<br />
# required by gnome-music<br />
media-sound/gnome-music python_single_target_python3_3<br />
<br />
# required by gnome-photos<br />
dev-libs/libgdata gnome<br />
media-plugins/grilo-plugins upnp-av<br />
</pre><br />
<br />
== Emerging ==<br />
<br />
=== Installing GNOME 3.14 ===<br />
<br />
===== gnome =====<br />
<br />
To emerge ''gnome'' run the following command:<br />
<br />
<console><br />
###i## emerge gnome<br />
</console><br />
<br />
===== gnome-light =====<br />
<br />
To emerge ''gnome-light'' run the following command:<br />
<br />
<console><br />
###i## emerge gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.12 ===<br />
<br />
To update "gnome" or "gnome-light" run the following command:<br />
<br />
<console><br />
###i## emerge -vauDN world<br />
</console><br />
{{NewsFooter}}</div>Dantrellhttps://www.funtoo.org/index.php?title=News:Testing_GNOME_3.14&diff=6546News:Testing GNOME 3.142014-10-22T19:02:22Z<p>Dantrell: Initial commit</p>
<hr />
<div>== Preparing ==<br />
<br />
{{fancywarning|These instructions assume that your /etc/portage/package.{unmask,use} locations are directories.}}<br />
<br />
First, sync the tree if you haven't recently as you need access to a file in the tree:<br />
<br />
<console><br />
##r### ##b## emerge --sync<br />
</console><br />
<br />
Now, create a symlink to the GNOME 3.14 mask file, reversijng it in the process:<br />
<br />
<console><br />
##r### ##b## cd /etc/portage/package.unmask<br />
##r### ##b## ln -s /var/portage/tree/funtoo/profiles/package.mask/funtoo-gnome .<br />
</console><br />
<br />
Then to simplify matters, enable the gnome mix-in:<br />
<br />
<console><br />
##r### ##b## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio <br />
[12] funtoo/1.0/linux-gnu/mix-ins/console-extras <br />
[13] funtoo/1.0/linux-gnu/mix-ins/dvd <br />
[14] funtoo/1.0/linux-gnu/mix-ins/gnome <br />
[15] funtoo/1.0/linux-gnu/mix-ins/kde <br />
[16] funtoo/1.0/linux-gnu/mix-ins/mate <br />
[17] funtoo/1.0/linux-gnu/mix-ins/media <br />
[18] funtoo/1.0/linux-gnu/mix-ins/print <br />
[19] funtoo/1.0/linux-gnu/mix-ins/python3-only <br />
[20] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat <br />
[21] funtoo/1.0/linux-gnu/mix-ins/server-db <br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-mail <br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[24] funtoo/1.0/linux-gnu/mix-ins/X <br />
[25] funtoo/1.0/linux-gnu/mix-ins/xfce <br />
[26] funtoo/1.0/linux-gnu/mix-ins/vmware-guest <br />
[27] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
<br />
<console><br />
##r### ##b## eselect profile add 14<br />
</console><br />
<br />
Finally, add the relevant section to your /etc/portage/package.use/funtoo-gnome file:<br />
<br />
===== gnome-light (without mix-in) =====<br />
<br />
<pre><br />
gnome-extra/evolution-data-server gtk<br />
x11-libs/libxcb xkb<br />
media-libs/cogl gles2<br />
</pre><br />
<br />
===== gnome (with mix-in) =====<br />
<br />
<pre><br />
# required by eog-plugins<br />
media-gfx/eog-plugins python_single_target_python3_3<br />
<br />
# required by evolution<br />
gnome-extra/evolution-data-server gnome-online-accounts<br />
media-libs/libchamplain gtk<br />
<br />
# required by gnome-boxes<br />
net-misc/spice-gtk gtk3 -pulseaudio<br />
<br />
# required by gnome-music<br />
media-sound/gnome-music python_single_target_python3_3<br />
<br />
# required by gnome-photos<br />
dev-libs/libgdata gnome<br />
media-plugins/grilo-plugins upnp-av<br />
</pre><br />
<br />
== Emerging ==<br />
<br />
=== Installing GNOME 3.14 ===<br />
<br />
===== gnome =====<br />
<br />
To emerge ''gnome'' run the following command<br />
<br />
<console><br />
##r### ##b## emerge gnome<br />
</console><br />
<br />
===== gnome-light =====<br />
<br />
To emerge ''gnome-light'' run the following command<br />
<br />
<console><br />
##r### ##b## emerge gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.12 ===<br />
<br />
To update "gnome" or "gnome-light" run the following command:<br />
<br />
<console><br />
##r### ##b## emerge -vauDN world<br />
</console></div>Dantrellhttps://www.funtoo.org/index.php?title=GNOME_First_Steps&diff=5091GNOME First Steps2014-08-24T06:07:14Z<p>Dantrell: </p>
<hr />
<div>== What is GNOME? ==<br />
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." [http://gnome.org GNOME]<br />
<br />
== Prerequisites ==<br />
<br />
Before installing GNOME, ensure that the [[X Window System]] has been installed.<br />
<br />
{{fancywarning|1=<br />
Please note that Linux kernel 3.15.* may still have serious incompatibility with various graphics drivers. If you like to use <tt>gentoo-sources</tt> or <tt>vanilla-sources</tt>, please use a 3.14.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.}}<br />
<br />
== Preparing to emerge ==<br />
<br />
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:<br />
<console><br />
##r### ##b## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio <br />
[12] funtoo/1.0/linux-gnu/mix-ins/console-extras <br />
[13] funtoo/1.0/linux-gnu/mix-ins/dvd <br />
[14] funtoo/1.0/linux-gnu/mix-ins/gnome <br />
[15] funtoo/1.0/linux-gnu/mix-ins/kde <br />
[16] funtoo/1.0/linux-gnu/mix-ins/mate <br />
[17] funtoo/1.0/linux-gnu/mix-ins/media <br />
[18] funtoo/1.0/linux-gnu/mix-ins/print <br />
[19] funtoo/1.0/linux-gnu/mix-ins/python3-only <br />
[20] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat <br />
[21] funtoo/1.0/linux-gnu/mix-ins/server-db <br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-mail <br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[24] funtoo/1.0/linux-gnu/mix-ins/X <br />
[25] funtoo/1.0/linux-gnu/mix-ins/xfce <br />
[26] funtoo/1.0/linux-gnu/mix-ins/vmware-guest <br />
[27] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:<br />
<console><br />
##r### ##b##eselect profile add 14<br />
</console><br />
<br />
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.<br />
<br />
== Emerging == <br />
<br />
You are provided with two packages that will pull in this desktop environment: <br />
<br />
* ''gnome''<br />
<br />
{{fancynote|This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.}}<br />
<br />
* ''gnome-light''<br />
<br />
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}<br />
<br />
=== GNOME 3.12 from a clean install ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.6 ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'', remove nautilus-open-terminal if it is installed as it now bundled into gnome-terminal<br />
<br />
<console><br />
# ##i## emerge -vaC nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN world<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' remove the following packages as there have been changes since 3.6 (you will have up reinstall any packages that have been renamed after gnome-light completes).<br />
<br />
<console><br />
# ##i## emerge -vaC gnome-fallback gnome-panel gnome-screensaver metacity gnome-games gcalctool nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN world<br />
</console><br />
<br />
Finally, restore any applications that have been renamed (such as gcalctool => gnome-calculator)<br />
<br />
<console><br />
# ##i## emerge -va gnome-calculator<br />
</console><br />
<br />
== Subsystems ==<br />
<br />
=== Bluetooth ===<br />
<br />
For bluetooth support, ensure that:<br />
<br />
# Bluetooth support is enabled in your kernel (using modules is fine).<br />
# Your bluetooth hardware is turned on.<br />
# Add the <code>bluetooth</code> startup script to the default runlevel, and start it.<br />
<br />
This can be done as follows:<br />
<br />
<console><br />
# ##i##rc-update add bluetooth default<br />
# ##i##rc<br />
</console><br />
<br />
Once this is done, you should now be able to navigate to ''Settings'' -> ''Bluetooth'' and turn bluetooth on. The icon next to devices should now animate and you should be able to discover and add devices such as keyboards.<br />
<br />
=== Printing ===<br />
<br />
To enable printing support, add <code>cupsd</code> to the default runlevel:<br />
<br />
<console><br />
# ##i##rc-update add cupsd default<br />
# ##i##rc<br />
</console><br />
<br />
You should now be able to navigate to ''Settings'' -> ''Printers'' and add printers to your system, and print.<br />
<br />
=== Scanning ===<br />
<br />
To enable scanning support, add your user account to the <code>lp</code> group. This will allow your user to access the USB scanner.<br />
<br />
Then, <code>emerge xsane</code>, and run it. It should be able to access your scanner.<br />
<br />
== Finishing Touches ==<br />
<br />
=== X ===<br />
<br />
==== Setting up xdm (GUI log-in) ====<br />
<br />
Typically, you will want to use <tt>gdm</tt>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.<br />
<br />
To enable gdm, edit <tt>/etc/conf.d/xdm</tt> and set <tt>DISPLAYMANAGER</tt> to <tt>gdm</tt> instead of <tt>xdm</tt>. Then, perform the following steps to add <tt>xdm</tt> to the default runlevel, and have it start automatically from now on when your system starts:<br />
<br />
<console><br />
# ##i##rc-update add xdm default<br />
</console><br />
<br />
Then, if you want to start it now do<br />
<br />
<console><br />
# ##i##rc<br />
</console><br />
<br />
But you should reboot to avoid having an open login terminal<br />
<br />
==== Setting up xinitrc (text log-in) ====<br />
<br />
Adding the following to your <tt>~/.xinitrc</tt> file is sufficient:<br />
<br />
<pre><br />
# Fix Missing Applications in Gnome<br />
export XDG_MENU_PREFIX=gnome-<br />
<br />
# Properly Launch the Desired X Session<br />
exec ck-launch-session gnome-session<br />
</pre><br />
<br />
Additionaly, if you need support for different input sources, there is no longer a need to configure ibus or scrim in your <tt>.xinitrc</tt> file as GNOME uses ibus natively. Simply configure it in the Control Center under Region & Langauge.<br />
<br />
=== Disable Adwaita Dark Theme ===<br />
<br />
If you do not like the Adwaita Dark Theme it can be disabled by copying then modifying it like so:<br />
<br />
<console><br />
mkdir -p ~/.themes/Adwaita-NoDark<br />
cp -r /usr/share/themes/Adwaita/gtk-* ~/.themes/Adwaita-NoDark<br />
rm ~/.themes/Adwaita-NoDark/gtk-3.0/gtk-dark.css<br />
ln -s gtk.css ~/.themes/Adwaita-NoDark/gtk-3.0/gtk-dark.css<br />
</console><br />
<br />
Then, run gnome-tweak-tool and select select Theme -> GTK+ Theme -> Adwaita-NoDark.<br />
<br />
{{fancynote|If you run GUI programs with the sudo command, then the above steps (excluding running gnome-tweak-tool) must be repeated for the root account.}}<br />
<br />
[https://ask.fedoraproject.org/en/question/10304/how-do-i-ban-apps-from-using-gnome-3-adwaita-dark-theme/ Reference]<br />
<br />
=== Verify the inode/directory MimeType Handler ===<br />
<br />
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:<br />
<br />
<pre><br />
[Added Associations]<br />
inode/directory=nautilus.desktop;baobab.desktop;<br />
</pre><br />
<br />
=== Automatically Starting Applications at Login ===<br />
<br />
When using an old-fashioned <tt>.xinitrc</tt>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <tt>~/.xprofile</tt> file. Here's my sample <tt>.xprofile</tt> to start <tt>xflux</tt> to dim the screen at night:<br />
<br />
<pre><br />
xflux -z 87107<br />
</pre><br />
<br />
Remember to add a <tt>&</tt> at the end of any command that doesn't return to the shell prompt after running.<br />
<br />
[[Category:Desktop Environments]]<br />
[[Category:First Steps]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=GNOME_First_Steps&diff=5051GNOME First Steps2014-08-05T22:27:19Z<p>Dantrell: </p>
<hr />
<div>== What is GNOME? ==<br />
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." [http://gnome.org GNOME]<br />
<br />
== Prerequisites ==<br />
<br />
Before installing GNOME, ensure that the [[X Window System]] has been installed.<br />
<br />
{{fancywarning|1=<br />
Please note that Linux kernel 3.15.* may still have serious incompatibility with various graphics drivers. If you like to use <tt>gentoo-sources</tt> or <tt>vanilla-sources</tt>, please use a 3.14.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.}}<br />
<br />
== Preparing to emerge ==<br />
<br />
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:<br />
<console><br />
##r### ##b## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio <br />
[12] funtoo/1.0/linux-gnu/mix-ins/console-extras <br />
[13] funtoo/1.0/linux-gnu/mix-ins/dvd <br />
[14] funtoo/1.0/linux-gnu/mix-ins/gnome <br />
[15] funtoo/1.0/linux-gnu/mix-ins/kde <br />
[16] funtoo/1.0/linux-gnu/mix-ins/mate <br />
[17] funtoo/1.0/linux-gnu/mix-ins/media <br />
[18] funtoo/1.0/linux-gnu/mix-ins/print <br />
[19] funtoo/1.0/linux-gnu/mix-ins/python3-only <br />
[20] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat <br />
[21] funtoo/1.0/linux-gnu/mix-ins/server-db <br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-mail <br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[24] funtoo/1.0/linux-gnu/mix-ins/X <br />
[25] funtoo/1.0/linux-gnu/mix-ins/xfce <br />
[26] funtoo/1.0/linux-gnu/mix-ins/vmware-guest <br />
[27] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:<br />
<console><br />
##r### ##b##eselect profile add 14<br />
</console><br />
<br />
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.<br />
<br />
== Emerging == <br />
<br />
You are provided with two packages that will pull in this desktop environment: <br />
<br />
* ''gnome''<br />
<br />
{{fancynote|This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.}}<br />
<br />
* ''gnome-light''<br />
<br />
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}<br />
<br />
=== GNOME 3.12 from a clean install ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.6 ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'', remove nautilus-open-terminal if it is installed as it now bundled into gnome-terminal<br />
<br />
<console><br />
# ##i## emerge -vaC nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN world<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' remove the following packages as there have been changes since 3.6 (you will have up reinstall any packages that have been renamed after gnome-light completes).<br />
<br />
<console><br />
# ##i## emerge -vaC gnome-fallback gnome-panel gnome-screensaver metacity gnome-games gcalctool nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN world<br />
</console><br />
<br />
Finally, restore any applications that have been renamed (such as gcalctool => gnome-calculator)<br />
<br />
<console><br />
# ##i## emerge -va gnome-calculator<br />
</console><br />
<br />
== Subsystems ==<br />
<br />
=== Bluetooth ===<br />
<br />
For bluetooth support, ensure that:<br />
<br />
# Bluetooth support is enabled in your kernel (using modules is fine).<br />
# Your bluetooth hardware is turned on.<br />
# Add the <code>bluetooth</code> startup script to the default runlevel, and start it.<br />
<br />
This can be done as follows:<br />
<br />
<console><br />
# ##i##rc-update add bluetooth default<br />
# ##i##rc<br />
</console><br />
<br />
Once this is done, you should now be able to navigate to ''Settings'' -> ''Bluetooth'' and turn bluetooth on. The icon next to devices should now animate and you should be able to discover and add devices such as keyboards.<br />
<br />
=== Printing ===<br />
<br />
To enable printing support, add <code>cupsd</code> to the default runlevel:<br />
<br />
<console><br />
# ##i##rc-update add cupsd default<br />
# ##i##rc<br />
</console><br />
<br />
You should now be able to navigate to ''Settings'' -> ''Printers'' and add printers to your system, and print.<br />
<br />
=== Scanning ===<br />
<br />
To enable scanning support, add your user account to the <code>lp</code> group. This will allow your user to access the USB scanner.<br />
<br />
Then, <code>emerge xsane</code>, and run it. It should be able to access your scanner.<br />
<br />
== Finishing Touches ==<br />
<br />
=== X ===<br />
<br />
==== Setting up xdm (GUI log-in) ====<br />
<br />
Typically, you will want to use <tt>gdm</tt>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.<br />
<br />
To enable gdm, edit <tt>/etc/conf.d/xdm</tt> and set <tt>DISPLAYMANAGER</tt> to <tt>gdm</tt> instead of <tt>xdm</tt>. Then, perform the following steps to add <tt>xdm</tt> to the default runlevel, and have it start automatically from now on when your system starts:<br />
<br />
<console><br />
# ##i##rc-update add xdm default<br />
</console><br />
<br />
Then, if you want to start it now do<br />
<br />
<console><br />
# ##i##rc<br />
</console><br />
<br />
But you should reboot to avoid having an open login terminal<br />
<br />
==== Setting up xinitrc (text log-in) ====<br />
<br />
Adding the following to your <tt>~/.xinitrc</tt> file is sufficient:<br />
<br />
<pre><br />
# Fix Missing Applications in Gnome<br />
export XDG_MENU_PREFIX=gnome-<br />
<br />
# Properly Launch the Desired X Session<br />
exec ck-launch-session gnome-session<br />
</pre><br />
<br />
Additionaly, if you need support for different input sources, there is no longer a need to configure ibus or scrim in your <tt>.xinitrc</tt> file as GNOME uses ibus natively. Simply configure it in the Control Center under Region & Langauge.<br />
<br />
=== Verify the inode/directory MimeType Handler ===<br />
<br />
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:<br />
<br />
<pre><br />
[Added Associations]<br />
inode/directory=nautilus.desktop;baobab.desktop;<br />
</pre><br />
<br />
=== Automatically Starting Applications at Login ===<br />
<br />
When using an old-fashioned <tt>.xinitrc</tt>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <tt>~/.xprofile</tt> file. Here's my sample <tt>.xprofile</tt> to start <tt>xflux</tt> to dim the screen at night:<br />
<br />
<pre><br />
xflux -z 87107<br />
</pre><br />
<br />
Remember to add a <tt>&</tt> at the end of any command that doesn't return to the shell prompt after running.<br />
<br />
[[Category:Desktop Environments]]<br />
[[Category:First Steps]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=Funtoo_Linux_Installation&diff=4991Funtoo Linux Installation2014-08-01T20:09:06Z<p>Dantrell: </p>
<hr />
<div>== Introduction == <br />
<br />
This document was written to help you install Funtoo Linux as concisely as possible, with a minimum number of distracting options regarding system configuration. <br />
<br />
These docs assume you have a "PC compatible" computer system with a standard PC BIOS. Many new computers support UEFI for booting, which is a new firmware interface that frequently replaces the older MBR-based BIOS. If you have a system with UEFI, you will want to use this documentation along with the [[UEFI Install Guide]], which will augment these instructions and explain how to get your system to boot. You may need to change your PC BIOS settings to enable or disable UEFI booting. The [[UEFI Install Guide]] has more information on this, and steps on how to determine if your system supports UEFI.<br />
<br />
We also offer a [[ZFS Install Guide]], which augment the instructions on this page for those who want to install Funtoo Linux on ZFS. If you are installing Funtoo Linux on [[Funtoo Linux Installation on ARM|ARM]] architecture, please see [[Funtoo Linux Installation on ARM]] for notable differences regarding ARM support. An experimental Funtoo Linux build also exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]].<br />
<br />
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.<br />
<br />
== Installation Overview ==<br />
<br />
This is a basic overview of the Funtoo installation process:<br />
<br />
# [[#Live CD|Download and boot the live CD of your choice]].<br />
# [[#Prepare Hard Disk|Prepare your disk]].<br />
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.<br />
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.<br />
# [[#Chroot into Funtoo|Chroot into your new system]].<br />
# [[#Downloading the Portage tree|Download the Portage tree]].<br />
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].<br />
# [[#Configuring and installing the Linux kernel|Install a kernel]].<br />
# [[#Installing a Bootloader|Install a bootloader]].<br />
# [[#Finishing Steps|Complete final steps]].<br />
# [[#Restart your system|Reboot and enjoy]].<br />
<br />
=== Live CD ===<br />
<br />
Funtoo doesn't provide an "official" Funtoo Live CD, but there are plenty of good ones out there to choose from. A great choice is the Gentoo-based [http://www.sysresccd.org/ System Rescue CD] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.<br />
<br />
It is also possible to install Funtoo Linux using many other Linux-based live CDs. Generally, any modern bootable Linux live CD or live USB media will work. See [[Requirements|requirements]] for an overview of what the Live Media must provide to allow a problem-free install of Funtoo Linux.<br />
<br />
To begin a Funtoo Linux installation, download System Rescue CD from:<br />
<br />
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/ The Oregon State University Open Source Lab]<br />
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysresccd/ HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of System Rescue CD, '''be sure to select the <tt>rescue64</tt> 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.<br />
<br />
=== Prepare Hard Disk ===<br />
==== Partitions ====<br />
<br />
Funtoo Linux fully supports traditional MBR partitions, as well as newer GPT/GUID partition formats. See below to determine which partitioning scheme to use:<br />
<br />
===== MBR Partitions =====<br />
<br />
* '''Recommended if your system disk is <=2TB in size'''<br />
* Legacy, DOS partitioning scheme<br />
* Only 4 primary partitions per disk; after that, you must use "logical" partitions<br />
* Does not support 2 TB+ disks for booting<br />
* Compatible with certain problematic systems (such as the HP ProBook 4520)<br />
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)<br />
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo<br />
<br />
{{fancynote|Due to the fact that it is more widely supported on PC hardware, it is best to use MBR partitions if possible.}}<br />
<br />
===== GPT Partitions =====<br />
<br />
* '''Recommended if your disk is >2TB in size'''<br />
* Newer format for Linux systems<br />
* Supports 2 TB+ hard drives for booting<br />
* Supports hundreds of partitions per disk of any size<br />
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI<br />
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy<br />
<br />
{{fancyimportant|If you have a system disk that is 2TB or greater and want to use the space beyond 2TB, you ''must'' partition using the GPT/GUID format. Otherwise, MBR is recommended as the most reliable boot method.}}<br />
<br />
===== Filesystem Resources =====<br />
<br />
Advanced users may be interested in the following topics:<br />
<br />
* [[GUID Booting Guide]]<br />
* [[LVM Install Guide]]<br />
* [[Rootfs over encrypted lvm]]<br />
* [[Rootfs over encrypted lvm over raid-1 on GPT]]<br />
* '''NEW!''' '''[[ZFS Install Guide]] (Also contains instructions for Rootfs over Encrypted ZFS!)'''<br />
<br />
===== Partitioning Recommendations =====<br />
<br />
Below are our partitioning recommendations in table form. For MBR-based partitions, use the MBR Block Device and MBR code columns with <tt>fdisk</tt>. For GPT-based partitions, use the GPT Block Device and GPT Code columns with <tt>gdisk</tt>:<br />
<br />
{| {{table}} <br />
!Partition<br />
!Size<br />
!MBR Block Device (<tt>fdisk</tt>)<br />
!GPT Block Device (<tt>gdisk</tt>)<br />
!Filesystem<br />
!MBR Code<br />
!GPT Code<br />
|-<br />
|<tt>/boot</tt><br />
|500 MB<br />
|<tt>/dev/sda1</tt><br />
|<tt>/dev/sda1</tt><br />
|ext2<br />
|83<br />
|8300<br />
|-<br />
|GRUB boot loader partition<br />
|1 MB<br />
| ''not required for MBR''<br />
|<tt>/dev/sda2</tt><br />
|For GPT/GUID only, skip for MBR - no filesystem.<br />
|''N/A''<br />
|EF02<br />
|-<br />
|swap<br />
|2x RAM for low-memory systems and production servers; otherwise 2GB.<br />
|<tt>/dev/sda2</tt><br />
|<tt>/dev/sda3</tt><br />
|swap (default)<br />
|82<br />
|8200<br />
|-<br />
|<tt>/</tt> (root)<br />
|Rest of the disk, minimum of 10GB.<br />
|<tt>/dev/sda3</tt><br />
|<tt>/dev/sda4</tt><br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
|<tt>/home</tt> (optional) <br />
|User storage and media. Typically most of the disk.<br />
|<tt>/dev/sda4</tt> (if created)<br />
|<tt>/dev/sda5</tt> (if created)<br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
| LVM (optional)<br />
| If you want to create an LVM volume.<br />
| <tt>/dev/sda4</tt> (PV, if created)<br />
| <tt>/dev/sda5</tt> (PV, if created)<br />
| LVM PV<br />
| 8E<br />
| 8E00<br />
|}<br />
<br />
===== Partitioning Using fdisk (MBR) =====<br />
<br />
{{fancyimportant|If you need to create a GPT partition table, see [[Partitioning using gdisk]].}}<br />
<br />
{{fancynote|These install instructions assume you are installing Funtoo Linux to an hard disk using Master Boot Record partition tables (MBR). If you are installing Funtoo Linux on a machine where another OS is installed, there is an existing Linux distribution on your system that you want to keep or any other scenario (such as differing swap size requirements), then you will need to adapt these instructions to suit your needs.}}<br />
<br />
<code>fdisk</code> is the tool used to create an MBR partition table. MBR is well-supported on PCs and is recommended if your system disk is 2TB or smaller.<br />
<br />
====== Preparation ======<br />
<br />
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 <code>/dev/sda</code> is the disk that you want to partition:<br />
<br />
<console><br />
# ##i##fdisk -l /dev/sda<br />
<br />
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk label type: gpt<br />
<br />
<br />
# Start End Size Type Name<br />
1 2048 1250263694 596.2G Linux filesyste Linux filesystem<br />
</console><br />
<br />
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 <code>sgdisk</code>:<br />
<br />
<console><br />
# ##i##sgdisk --zap-all /dev/sda<br />
<br />
Creating new GPT entries.<br />
GPT data structures destroyed! You may now partition the disk using fdisk or<br />
other utilities.<br />
</console><br />
<br />
This output is also nothing to worry about, as the command still succeded:<br />
<br />
<console><br />
***************************************************************<br />
Found invalid GPT and valid MBR; converting MBR to GPT format<br />
in memory. <br />
***************************************************************<br />
</console><br />
<br />
====== Partitioning ======<br />
<br />
Now we will use <code>fdisk</code> to create the MBR partition table and partitions:<br />
<br />
<console><br />
# ##i##fdisk /dev/sda<br />
</console><br />
<br />
Within <code>fdisk</code>, follow these steps:<br />
<br />
'''Empty the partition table''':<br />
<br />
<console><br />
Command (m for help): ##i##o ↵<br />
</console><br />
<br />
'''Create Partition 1''' (boot):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+128M ↵<br />
</console><br />
<br />
'''Create Partition 2''' (swap):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (2,3,4, default 2): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+8G ↵<br />
Command (m for help): ##i##t ↵ <br />
Partition number (1,2, default 2): ##i##2 ↵<br />
Hex code (type L to list all codes): ##i##82 ↵<br />
</console><br />
<br />
'''Create the root partition:'''<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (3,4, default 3): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##↵<br />
</console><br />
<br />
'''Verify the partition table:'''<br />
<br />
<console><br />
Command (m for help): ##i##p<br />
<br />
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0xac67d8f6<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 264191 131072 83 Linux<br />
/dev/sda2 264192 67373055 33554432 82 Linux swap / Solaris<br />
/dev/sda3 67373056 1250263727 591445336 83 Linux<br />
</console><br />
<br />
'''Write the parition table to disk:'''<br />
<br />
<console><br />
Command (m for help): ##i##w<br />
</console><br />
<br />
Your new MBR partition table will now be written to your system disk.<br />
<br />
==== Creating filesystems ====<br />
<br />
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.<br />
<br />
You will not create a filesystem on your swap partition, but will initialize it using the <tt>mkswap</tt> command so that it can be used as disk-based virtual memory. Then we'll run the <tt>swapon</tt> command to make your newly-initialized swap space active within the live CD environment, in case it is needed during the rest of the install process.<br />
<br />
Note that we will not create a filesystem on the GRUB boot loader partition, as GRUB writes binary data directly to that partition when the boot loader is installed, which we'll do later.<br />
<br />
You can see the commands you will need to type below. Like the rest of this document, it assumes that you are using a GPT partitioning scheme. If you are using MBR, your root filesystem will likely be created on <tt>/dev/sda3</tt> instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:<br />
<br />
'''We generally recommend XFS for root filesystems, although ext4 is also a good choice.''' This tutorial assumes the use of XFS. If you want to use ext4, then be sure that your <tt>/etc/fstab</tt> file reflects this.<br />
<br />
{{fancywarning|1=<br />
Please use ext4 exclusively when deploying an OpenVZ host. The Parallels development team tests extensively with ext4, and modern versions of <tt>openvz-rhel6-stable</tt> are '''not''' compatible with XFS, and you may experience kernel bugs.<br />
}}<br />
<br />
'''To use ext4 as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.ext4 /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
'''To use XFS as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.xfs /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
==== Mounting filesystems ====<br />
<br />
Mount the newly-created filesystems as follows, creating <tt>/mnt/funtoo</tt> as the installation mount point:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/sda3 /mnt/funtoo<br />
# ##i##mkdir /mnt/funtoo/boot<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
</console><br />
<br />
Optionally, if you have a separate filesystem for <tt>/home</tt> or anything else:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo/home<br />
# ##i##mount /dev/sda4 /mnt/funtoo/home<br />
</console><br />
<br />
If you have <tt>/tmp</tt> or <tt>/var/tmp</tt> on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:<br />
<br />
<console><br />
# ##i##chmod 1777 /mnt/funtoo/tmp<br />
</console><br />
<br />
=== Installing the Stage 3 tarball ===<br />
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:<br />
* http://ftp.osuosl.org/pub/funtoo - main Funtoo Linux Mirror<br />
* http://ftp.heanet.ie/mirrors/funtoo -European Funtoo Linux mirror<br />
Now, let's navigate the directories on the mirrors to find the appropriate build of Funtoo Linux for you.<br />
<br />
==== Stable or Current? ====<br />
Funtoo Linux has a "stable" build and a "current" build. Most people use the "current" build of Funtoo Linux, and it's generally recommended that you do too. You will find "current' builds in the main <code>/funtoo-current</code> directory on our mirrors, and "stable" builds in <code>/funtoo-stable</code>.<br />
<br />If you want to read more about this, have a look at [[Funtoo_Linux#What_are_the_differences_between_.27stable.27.2C_.27current.27_and_.27experimental.27_.3F|Differences between stable, current and experimental]].<br />
<br />
==== 32 or 64-bit? ====<br />
There are three different types of Funtoo Linux that you can install. If you are installing on an older 32-bit system (if you don't know, then you probably are not) then you want to grab a stage3 tarball from the <code>x86-32bit</code> sub-directory. Most likely, you'll want to grab a 64-bit build from the <code>x86-64bit</code> sub-directory.<br />
<br />
==== Your SubArch ====<br />
Inside <code>/funtoo-current/x86-64bit/</code> on one of our mirrors, you'll see a bunch of directories for various ''subarches'' of Funtoo Linux.<br />
<br />
Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They take advantage of the instruction sets available for each CPU. <br />
<br />
For example, the <code>corei7</code> and <code>corei7-pure64</code> sub-arches require an Intel Core i7 processor to run (this includes Xeon x3400+ series, or other Nehalem-based CPUs such as Xeon x5500/x5600 series.)<br />
<br />
If you are using an AMD-based CPU, download a stage3 from <code>generic_64</code>, <code>amd64-k8</code> or <code>amd64-k10</code>. <br />
<br />
If you are using an Intel-based CPU, download a stage3 from <code>generic_64</code>, <code>atom_64</code>, <code>core2_64</code> or <code>corei7</code>.<br />
<br />
===== Pure64 Builds =====<br />
Inside <code>x86-64bit</code>, you may notice a sub-directory named <code>pure64</code>. These builds are recommended for server systems, and they do not offer any 32-bit compatibility, which is generally not needed on server systems. If you are setting up a desktop or workstation system, it's recommended that you avoid these builds as you will need 32-bit compatibility to run several binary desktop-oriented applications such as Skype. But for servers, pure64 is recommended.<br />
<br />
==== Setting the Date ====<br />
<br />
{{fancyimportant|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.}}<br />
<br />
Now is a good time to verify the date and time are correctly set to UTC. Use the <tt>date</tt> command to verify the date and time:<br />
<br />
<console><br />
# ##i##date<br />
Fri Jul 15 19:47:18 UTC 2011<br />
</console><br />
<br />
If the date and/or time need to be corrected, do so using <tt>date MMDDhhmmYYYY</tt>, keeping in mind <tt>hhmm</tt> are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:<br />
<br />
<console><br />
# ##i##date 071620002011<br />
Fri Jul 16 20:00:00 UTC 2011<br />
</console><br />
<br />
==== Download the Stage3 ====<br />
Once you are in your Funtoo Linux root filesystem, use <tt>wget</tt> 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 <tt>/mnt/funtoo</tt> directory as follows:<br />
<br />
<console># ##i##cd /mnt/funtoo<br />
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz<br />
</console><br />
<br />
<br />
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 <tt>generic_64</tt> or <tt>generic_32</tt> stage. Consult the [[Download]] page for more information.<br />
<br />
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:<br />
<console><br />
# ##i##tar xpf stage3-latest.tar.xz<br />
</console><br />
<br />
{{fancyimportant|It is very important to use <tt>tar</tt>'s "<tt>p</tt>" option when extracting the Stage 3 tarball - it tells <tt>tar</tt> to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}<br />
<br />
=== Chroot into Funtoo ===<br />
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:<br />
<console><br />
# ##i##cd /mnt/funtoo<br />
# ##i##mount -t proc none proc<br />
# ##i##mount --rbind /sys sys<br />
# ##i##mount --rbind /dev dev<br />
</console><br />
<br />
You'll also want to copy over <tt>resolv.conf</tt> in order to have proper DNS name resolution from inside the chroot:<br />
<console><br />
# ##i##cp /etc/resolv.conf etc<br />
</console><br />
<br />
Now you can chroot into your new system. Use <tt>env</tt> before <tt>chroot</tt> to ensure that no environment variables from the installation media are used by your new system:<br />
<br />
<console><br />
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l<br />
</console><br />
<br />
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <tt>uname -r</tt> 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.}}<br />
{{fancyimportant|If you receive the error "<tt>chroot: failed to run command `/bin/bash': Exec format error</tt>", 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.}}<br />
<br />
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:<br />
<console><br />
# ##i##export PS1="(chroot) $PS1"<br />
</console><br />
<br />
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.<br />
<br />
=== Downloading the Portage tree ===<br />
<br />
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}<br />
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 <tt>emerge --sync</tt> from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
</console><br />
<br />
{{fancyimportant|If you receive the error with initial <tt>emerge --sync</tt> due to git protocol restrictions, change <tt>SYNC</tt> variable in <tt>/etc/make.conf</tt>}}<br />
<pre><br />
SYNC="https://github.com/funtoo/ports-2012.git"<br />
</pre><br />
<br />
=== Configuring your system ===<br />
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 <tt>/etc/fstab</tt>. The others are optional. Here are a list of files that you should consider editing:<br />
<br />
{| {{table}}<br />
!File<br />
!Do I need to change it?<br />
!Description<br />
|-<br />
|<tt>/etc/fstab</tt><br />
|'''YES - required'''<br />
|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.<br />
|-<br />
|<tt>/etc/localtime</tt><br />
|''Maybe - recommended''<br />
|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) <br />
|-<br />
|<tt>/etc/make.conf</tt> (symlink) - also known as:<br/><tt>/etc/portage/make.conf</tt><br />
|''Maybe - recommended''<br />
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.<br />
|-<br />
|<tt>/etc/conf.d/hostname</tt><br />
|''Maybe - recommended''<br />
|Used to set system hostname. Set the <tt>hostname</tt> variable to the fully-qualified (with dots, ie. <tt>foo.funtoo.org</tt>) name if you have one. Otherwise, set to the local system hostname (without dots, ie. <tt>foo</tt>). Defaults to <tt>localhost</tt> if not set.<br />
|-<br />
|<tt>/etc/hosts</tt><br />
|''No''<br />
| You no longer need to manually set the hostname in this file. This file is automatically generated by <tt>/etc/init.d/hostname</tt>.<br />
|-<br />
|<tt>/etc/conf.d/keymaps</tt><br />
|Optional<br />
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].<br />
|-<br />
|<tt>/etc/conf.d/hwclock</tt><br />
|Optional<br />
|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.<br />
|-<br />
|<tt>/etc/conf.d/modules</tt><br />
|Optional<br />
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.<br />
|-<br />
|<tt>profiles</tt><br />
|Optional<br />
|Some useful portage settings that may help speed up intial configuration.<br />
|}<br />
<br />
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 portal|Community]])<br />
<br />
Let's go ahead and see what we have to do. Use <tt>nano -w <name_of_file></tt> to edit files -- the "<tt>-w</tt>" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.<br />
<br />
{{fancywarning|It's important to edit your <tt>/etc/fstab</tt> 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 <tt>gdisk</tt> or <tt>fdisk</tt>. Skipping this step may prevent Funtoo Linux from booting successfully.}}<br />
<br />
==== /etc/fstab ====<br />
<br />
<tt>/etc/fstab</tt> is used by the <tt>mount</tt> command which is ran when your system boots. Statements of this file inform <tt>mount</tt> about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit <tt>/etc/fstab</tt> and ensure that it reflects the partition configuration you used earlier:<br />
<br />
<console><br />
(chroot) # ##i##nano -w /etc/fstab<br />
</console><br />
<br />
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type "<tt>Y</tt>" when asked if you want to save the modified buffer, or hit Control-O before closing <tt>nano</tt>. Otherwise your changes will be discarded.<br />
<br />
<pre><br />
# The root filesystem should have a pass number of either 0 or 1.<br />
# All other filesystems should have a pass number of 0 or greater than 1.<br />
#<br />
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.<br />
#<br />
# See the manpage fstab(5) for more information.<br />
#<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
<br />
/dev/sda1 /boot ext2 noatime 1 2<br />
/dev/sda2 none swap sw 0 0<br />
/dev/sda3 / ext4 noatime 0 1<br />
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0<br />
</pre><br />
<br />
==== /etc/localtime ====<br />
<br />
<tt>/etc/localtime</tt> 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 <tt>/etc/localtime</tt> with a symbolic link to the timezone that you wish to use. <br />
<br />
<console><br />
(chroot) # ##i##ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime<br />
</console><br />
<br />
The above sets the timezone to Mountain Standard Time (with daylight savings). Type <tt>ls /usr/share/zoneinfo</tt> to see what timezones are available. There are also sub-directories containing timezones described by location.<br />
<br />
==== /etc/make.conf ====<br />
<br />
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:<br />
<br />
<pre><br />
MAKEOPTS="-j3" <br />
</pre><br />
<br />
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.<br />
<console><br />
(chroot) # ##i##grep "processor" /proc/cpuinfo | wc -l<br />
16<br />
</console><br />
<br />
Set MAKEOPTS to this number plus one:<br />
<br />
<pre><br />
MAKEOPTS="-j17"<br />
</pre><br />
<br />
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 ("<tt>-</tt>") 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].<br />
<br />
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:<br />
<br />
<pre><br />
LINGUAS="fr"<br />
</pre><br />
<br />
==== /etc/conf.d/hwclock ====<br />
If you dual-boot with Windows, you'll need to edit this file and change '''clock''' 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.<br />
<console><br />
(chroot) # ##i##nano -w /etc/conf.d/hwclock<br />
</console><br />
<br />
==== Localization ====<br />
<br />
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]].<br />
<br />
==== Profiles ====<br />
<br />
[[Funtoo 1.0 Profile|Funtoo profiles]] are used to define defaults for Portage specific to your needs. There are 4 basic profile types: arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:<br />
<br />
;arch: typically <tt>x86-32bit</tt> or <tt>x86-64bit</tt>, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.<br />
;build: defines whether your system is a <tt>current</tt>, <tt>stable</tt> or <tt>experimental</tt> build. <tt>current</tt> systems will have newer packages unmasked than <tt>stable</tt> systems.<br />
;flavor: defines the general type of system, such as <tt>server</tt> or <tt>desktop</tt>, and will set default USE flags appropriate for your needs.<br />
;mix-ins: define various optional settings that you may be interested in enabling.<br />
<br />
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.<br />
<br />
Remember that profiles can often be inherited. For example, the <tt>desktop</tt> flavor inherits the <tt>workstation</tt> flavor settings, which in turn inherits the <tt>X</tt> and <tt>audio</tt> mix-ins. You can view this by using eselect:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile show<br />
Currently set profiles:<br />
arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit<br />
build: gentoo:funtoo/1.0/linux-gnu/build/current<br />
flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde<br />
<br />
Automatically enabled profiles:<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
<br />
<br />
</console><br />
<br />
To view installed profiles:<br />
<console><br />
(chroot) # ##i##eselect profile list<br />
</console><br />
<br />
To change the profile flavor:<br />
<console><br />
(chroot) # ##i##eselect profile set-flavor 7<br />
</console><br />
<br />
To add a mix-in:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile add 10<br />
</console><br />
<br />
=== Introducing Portage ===<br />
<br />
Portage, the Funtoo Linux package manager has a command called <tt>emerge</tt> 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:<br />
<br />
<console><br />
(chroot) # ##i##emerge packagename<br />
</console><br />
<br />
When you install a package by specifying its name on the command-line, Portage records its name in the <tt>/var/lib/portage/world</tt> file. It does this because it figures that because you've installed it by name, you want to consider it part of your system, and will want to keep the package updated in the future. This is a handy feature because when packages are added to the ''world set'', we can update our entire system by typing:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
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 <tt>emerge</tt> to:<br />
<br />
* '''<tt>a</tt>''' - show us what will be emerged, and '''ask''' us if we want to proceed<br />
* '''<tt>u</tt>''' - ''update'' the packages we specify -- don't emerge them again if they are already emerged.<br />
* '''<tt>D</tt>''' - Consider the entire dependency tree of packages when looking for updates. In other words, do a '''deep''' update.<br />
* '''<tt>N</tt>''' - Update any packages who have changed ('''new''') USE settings.<br />
<br />
Of course, sometimes we want to install a package but not add it 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:<br />
<br />
<console><br />
(chroot) # ##i##emerge -1 packagename<br />
</console><br />
<br />
Advanced users may be interested in the [[Emerge]] wiki page.<br />
<br />
==== Updating World ====<br />
<br />
Now is actually a very good time to update the entire system and it is very important that you do so before rebooting to resolve various issues.<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
{{fancyimportant|1=<br />
Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.}}<br />
<br />
=== Configuring and installing the Linux kernel ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== Package Sets ====<br />
<br />
Before we install a kernel, we're going to cover a feature of Portage called package sets. Earlier we learned about one such package set called the ''world set''. This is a handy feature because packages in additionally defined package sets are not updated when the ''world set'' is updated. This behavior is generally desired for packages that are time consuming or should not change be updated often without reasons, such as kernel packages.<br />
<br />
==== Kernel Package Set ====<br />
<br />
{{Fancynote|1=<br />
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <tt>debian-sources</tt> for new users.}}<br />
<br />
{{fancyimportant|1=<br />
<tt>debian-sources</tt> with <tt>binary</tt> USE flag requires at least 14GB free in <tt>/var/tmp</tt> and takes around 1 hour to build on a Intel Core i7 Processor.}}<br />
<br />
To create the kernel package set, perform the following steps:<br />
<br />
<console><br />
(chroot) # ##i##mkdir /etc/portage/sets<br />
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel<br />
</console><br />
<br />
Now, we'll want to set a USE variable to tell <tt>debian-sources</tt> 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 <tt>binary</tt> USE variable for <tt>debian-sources</tt>, as follows:<br />
<br />
<console><br />
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use<br />
</console><br />
<br />
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 <tt>binary</tt> USE flag to the <tt>debian-sources</tt> 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.<br />
<br />
Now, when we just want to update our system's packages, we'll type <tt>emerge -auDN @world</tt>, and it will update our world set, leaving out the kernel. Likewise, when we just want to update our kernel, we'll type <tt>emerge -au @kernel</tt>, and it will update our kernel, leaving out the world set.<br />
<br />
==== Building the Kernel ====<br />
<br />
Let's emerge our kernel:<br />
<br />
<console><br />
(chroot) # ##i##emerge @kernel<br />
</console><br />
<br />
Note that while use of the <tt>binary</tt> 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 <tt>MAKEOPTS</tt> in <tt>/etc/make.conf</tt> 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.<br />
<br />
{{fancynote|NVIDIA card users: the <tt>binary</tt> 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 <tt>/etc/modprobe.d/</tt>.}}<br />
<br />
{{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.}}<br />
<br />
Once <tt>emerge</tt> completes, you'll have a brand new kernel and initramfs installed to <tt>/boot</tt>, plus kernel headers installed in <tt>/usr/src/linux</tt>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.<br />
<br />
=== Installing a Bootloader ===<br />
<br />
==== Installing Grub ====<br />
<br />
The boot loader is responsible for loading the kernel from disk when your computer boots. For new installations, GRUB 2 and Funtoo's boot-update tool should be used as a boot loader. GRUB supports both GPT/GUID and legacy MBR partitioning schemes.<br />
<br />
To use this recommended boot method, first emerge <tt>boot-update</tt>. This will also cause <tt>grub-2</tt> to be merged, since it is a dependency of <tt>boot-update</tt>. (You may need to adjust <tt>GRUB_PLATFORMS</tt> if you are on a UEFI system. See [[UEFI Install Guide]]).<br />
<br />
<console><br />
(chroot) # ##i##emerge boot-update<br />
</console><br />
<br />
Then, edit <tt>/etc/boot.conf</tt> and specify "<tt>Funtoo Linux genkernel</tt>" as the <tt>default</tt> setting at the top of the file, replacing <tt>"Funtoo Linux"</tt>. <br />
<br />
<tt>/etc/boot.conf</tt> should now look like this:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
# if you use bliss-kernel package<br />
# you should change string<br />
# kernel kernel[-v]<br />
# to<br />
# kernel kernel/[-v]/kernel[-v]<br />
kernel kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
If you use bliss-kernel, your <tt>/etc/boot.conf</tt> should look like:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
kernel kernels/[-v]/kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
Please read <tt>man boot.conf</tt> for further details.<br />
<br />
===== Running grub-install and boot-update =====<br />
<br />
Finally, we will need to actually install the GRUB boot loader to your disk, and also run <tt>boot-update</tt> which will generate your boot loader configuration file:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --no-floppy /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
You only need to run <tt>grub-install</tt> when you first install Funtoo Linux, but you need to re-run <tt>boot-update</tt> every time you modify your <tt>/etc/boot.conf</tt> file, so your changes are applied on next boot.<br />
<br />
OK - your system should be ready to boot! Well, there are a few more loose ends...<br />
<br />
==== Installing Syslinux/Extlinux ====<br />
<br />
An alternate boot loader called extlinux can be used instead of GRUB if you desire. See the [[Extlinux|extlinux Guide]] for information on how to do this.<br />
<br />
=== Configuring your network ===<br />
<br />
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.<br />
<br />
==== Wi-Fi ====<br />
===== Using NetworkManager =====<br />
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:<br />
<br />
<console><br />
(chroot) # ##i##emerge linux-firmware<br />
(chroot) # ##i##emerge networkmanager<br />
(chroot) # ##i##rc-update add NetworkManager default<br />
</console><br />
<br />
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 <tt>default</tt> runlevel so it will start when Funtoo Linux boots.<br />
<br />
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:<br />
<br />
<console><br />
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork<br />
</console><br />
<br />
The <tt>addwifi</tt> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <tt>mywifinetwork</tt> with the password <tt>wifipassword</tt>. This network configuration entry is stored in <tt>/etc/NetworkManager/system-connections</tt> 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.<br />
<br />
===== Using wpa_supplicant =====<br />
If for some reason you don't want to use a tool such as NetworkManager or <tt>wicd</tt>, you can use wpa_supplicant for wireless network connections.<br />
<br />
First, emerge wpa_supplicant:<br />
<br />
<console><br />
(chroot) ###i## emerge -a wpa_supplicant<br />
</console><br />
<br />
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant.conf.<br />
The syntax is very easy:<br />
<pre><br />
network={<br />
ssid="MyWifiName"<br />
psk="lol42-wifi"<br />
}<br />
<br />
network={<br />
ssid="Other Network"<br />
psk="6d96270004515a0486bb7f76196a72b40c55a47f"<br />
}<br />
</pre><br />
<br />
You will need to add both <tt>wpa_supplicant</tt> and <tt>dhcpcd</tt> to the default runlevel. <tt>wpa_supplicant</tt> will connect to your access point, and <tt>dhcpcd</tt> will acquire an IP address via DHCP:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
(chroot) # ##i##rc-update add wpa_supplicant default<br />
</console><br />
<br />
==== Desktop (Wired Ethernet) ====<br />
<br />
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 <tt>dhcpcd</tt> to the default runlevel:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
</console><br />
<br />
When you reboot, <tt>dhcpcd</tt> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.<br />
<br />
==== Server (Static IP) ====<br />
<br />
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.<br />
<br />
=== Finishing Steps ===<br />
<br />
==== Set your root password ====<br />
It's imperative that you set your root password before rebooting so that you can log in.<br />
<console><br />
(chroot) # ##i##passwd<br />
</console><br />
<br />
===Restart your system ===<br />
<br />
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.<br />
<br />
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.<br />
<console><br />
(chroot) # ##i##exit<br />
# ##i##cd /mnt<br />
# ##i##umount -l funtoo<br />
# ##i##reboot<br />
</console><br />
<br />
{{fancynote|System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.}}<br />
<br />
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 <tt>login:</tt> prompt. Funtoo Linux has been successfully installed!<br />
<br />
===Next Steps===<br />
<br />
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 [[:Category:Official Documentation|official documentation]], which includes all docs that we officially maintain for installation and operation of Funtoo Linux.<br />
<br />
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.<br />
<br />
{{#ask: [[Category:First Steps]] | format=category }}<br />
<br />
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Install]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=Funtoo_Linux_Installation&diff=4987Funtoo Linux Installation2014-07-30T19:08:46Z<p>Dantrell: Emphasized importance of updating world before rebooting.</p>
<hr />
<div>== Introduction == <br />
<br />
This document was written to help you install Funtoo Linux as concisely as possible, with a minimum number of distracting options regarding system configuration. <br />
<br />
These docs assume you have a "PC compatible" computer system with a standard PC BIOS. Many new computers support UEFI for booting, which is a new firmware interface that frequently replaces the older MBR-based BIOS. If you have a system with UEFI, you will want to use this documentation along with the [[UEFI Install Guide]], which will augment these instructions and explain how to get your system to boot. You may need to change your PC BIOS settings to enable or disable UEFI booting. The [[UEFI Install Guide]] has more information on this, and steps on how to determine if your system supports UEFI.<br />
<br />
We also offer a [[ZFS Install Guide]], which augment the instructions on this page for those who want to install Funtoo Linux on ZFS. If you are installing Funtoo Linux on [[Funtoo Linux Installation on ARM|ARM]] architecture, please see [[Funtoo Linux Installation on ARM]] for notable differences regarding ARM support. An experimental Funtoo Linux build also exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]].<br />
<br />
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.<br />
<br />
== Installation Overview ==<br />
<br />
This is a basic overview of the Funtoo installation process:<br />
<br />
# [[#Live CD|Download and boot the live CD of your choice]].<br />
# [[#Prepare Hard Disk|Prepare your disk]].<br />
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.<br />
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.<br />
# [[#Chroot into Funtoo|Chroot into your new system]].<br />
# [[#Downloading the Portage tree|Download the Portage tree]].<br />
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].<br />
# [[#Configuring and installing the Linux kernel|Install a kernel]].<br />
# [[#Installing a Bootloader|Install a bootloader]].<br />
# [[#Finishing Steps|Complete final steps]].<br />
# [[#Restart your system|Reboot and enjoy]].<br />
<br />
=== Live CD ===<br />
<br />
Funtoo doesn't provide an "official" Funtoo Live CD, but there are plenty of good ones out there to choose from. A great choice is the Gentoo-based [http://www.sysresccd.org/ System Rescue CD] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.<br />
<br />
It is also possible to install Funtoo Linux using many other Linux-based live CDs. Generally, any modern bootable Linux live CD or live USB media will work. See [[Requirements|requirements]] for an overview of what the Live Media must provide to allow a problem-free install of Funtoo Linux.<br />
<br />
To begin a Funtoo Linux installation, download System Rescue CD from:<br />
<br />
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/ The Oregon State University Open Source Lab]<br />
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysresccd/ HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of System Rescue CD, '''be sure to select the <tt>rescue64</tt> 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.<br />
<br />
=== Prepare Hard Disk ===<br />
==== Partitions ====<br />
<br />
Funtoo Linux fully supports traditional MBR partitions, as well as newer GPT/GUID partition formats. See below to determine which partitioning scheme to use:<br />
<br />
===== MBR Partitions =====<br />
<br />
* '''Recommended if your system disk is <=2TB in size'''<br />
* Legacy, DOS partitioning scheme<br />
* Only 4 primary partitions per disk; after that, you must use "logical" partitions<br />
* Does not support 2 TB+ disks for booting<br />
* Compatible with certain problematic systems (such as the HP ProBook 4520)<br />
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)<br />
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo<br />
<br />
{{fancynote|Due to the fact that it is more widely supported on PC hardware, it is best to use MBR partitions if possible.}}<br />
<br />
===== GPT Partitions =====<br />
<br />
* '''Recommended if your disk is >2TB in size'''<br />
* Newer format for Linux systems<br />
* Supports 2 TB+ hard drives for booting<br />
* Supports hundreds of partitions per disk of any size<br />
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI<br />
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy<br />
<br />
{{fancyimportant|If you have a system disk that is 2TB or greater and want to use the space beyond 2TB, you ''must'' partition using the GPT/GUID format. Otherwise, MBR is recommended as the most reliable boot method.}}<br />
<br />
===== Filesystem Resources =====<br />
<br />
Advanced users may be interested in the following topics:<br />
<br />
* [[GUID Booting Guide]]<br />
* [[LVM Install Guide]]<br />
* [[Rootfs over encrypted lvm]]<br />
* [[Rootfs over encrypted lvm over raid-1 on GPT]]<br />
* '''NEW!''' '''[[ZFS Install Guide]] (Also contains instructions for Rootfs over Encrypted ZFS!)'''<br />
<br />
===== Partitioning Recommendations =====<br />
<br />
Below are our partitioning recommendations in table form. For MBR-based partitions, use the MBR Block Device and MBR code columns with <tt>fdisk</tt>. For GPT-based partitions, use the GPT Block Device and GPT Code columns with <tt>gdisk</tt>:<br />
<br />
{| {{table}} <br />
!Partition<br />
!Size<br />
!MBR Block Device (<tt>fdisk</tt>)<br />
!GPT Block Device (<tt>gdisk</tt>)<br />
!Filesystem<br />
!MBR Code<br />
!GPT Code<br />
|-<br />
|<tt>/boot</tt><br />
|500 MB<br />
|<tt>/dev/sda1</tt><br />
|<tt>/dev/sda1</tt><br />
|ext2<br />
|83<br />
|8300<br />
|-<br />
|GRUB boot loader partition<br />
|1 MB<br />
| ''not required for MBR''<br />
|<tt>/dev/sda2</tt><br />
|For GPT/GUID only, skip for MBR - no filesystem.<br />
|''N/A''<br />
|EF02<br />
|-<br />
|swap<br />
|2x RAM for low-memory systems and production servers; otherwise 2GB.<br />
|<tt>/dev/sda2</tt><br />
|<tt>/dev/sda3</tt><br />
|swap (default)<br />
|82<br />
|8200<br />
|-<br />
|<tt>/</tt> (root)<br />
|Rest of the disk, minimum of 10GB.<br />
|<tt>/dev/sda3</tt><br />
|<tt>/dev/sda4</tt><br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
|<tt>/home</tt> (optional) <br />
|User storage and media. Typically most of the disk.<br />
|<tt>/dev/sda4</tt> (if created)<br />
|<tt>/dev/sda5</tt> (if created)<br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
| LVM (optional)<br />
| If you want to create an LVM volume.<br />
| <tt>/dev/sda4</tt> (PV, if created)<br />
| <tt>/dev/sda5</tt> (PV, if created)<br />
| LVM PV<br />
| 8E<br />
| 8E00<br />
|}<br />
<br />
===== Partitioning Using fdisk (MBR) =====<br />
<br />
<code>fdisk</code> is the tool used to create an MBR partition table. MBR is well-supported on PCs and is recommended if your system disk is 2TB or smaller.<br />
<br />
{{fancyimportant|If you need to create a GPT partition table, see [[Partitioning using gdisk]].}}<br />
<br />
====== Preparation ======<br />
<br />
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 <code>/dev/sda</code> is the disk that you want to partition:<br />
<br />
<console><br />
# ##i##fdisk -l /dev/sda<br />
<br />
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk label type: gpt<br />
<br />
<br />
# Start End Size Type Name<br />
1 2048 1250263694 596.2G Linux filesyste Linux filesystem<br />
</console><br />
<br />
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 <code>sgdisk</code>:<br />
<br />
<console><br />
# ##i##sgdisk --zap-all /dev/sda<br />
<br />
Creating new GPT entries.<br />
GPT data structures destroyed! You may now partition the disk using fdisk or<br />
other utilities.<br />
</console><br />
<br />
This output is also nothing to worry about, as the command still succeded:<br />
<br />
<console><br />
***************************************************************<br />
Found invalid GPT and valid MBR; converting MBR to GPT format<br />
in memory. <br />
***************************************************************<br />
</console><br />
<br />
====== Partitioning ======<br />
<br />
Now we will use <code>fdisk</code> to create the MBR partition table and partitions:<br />
<br />
<console><br />
# ##i##fdisk /dev/sda<br />
</console><br />
<br />
Within <code>fdisk</code>, follow these steps:<br />
<br />
'''Empty the partition table''':<br />
<br />
<console><br />
Command (m for help): ##i##o ↵<br />
</console><br />
<br />
'''Create Partition 1''' (boot):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+128M ↵<br />
</console><br />
<br />
'''Create Partition 2''' (swap):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (2,3,4, default 2): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+32G ↵<br />
Command (m for help): ##i##t ↵ <br />
Partition number (1,2, default 2): ##i##2 ↵<br />
Hex code (type L to list all codes): ##i##82 ↵<br />
</console><br />
<br />
'''Create the root partition:'''<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (3,4, default 3): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##↵<br />
</console><br />
<br />
'''Verify the partition table:'''<br />
<br />
<console><br />
Command (m for help): ##i##p<br />
<br />
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0xac67d8f6<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 264191 131072 83 Linux<br />
/dev/sda2 264192 67373055 33554432 82 Linux swap / Solaris<br />
/dev/sda3 67373056 1250263727 591445336 83 Linux<br />
</console><br />
<br />
'''Write the parition table to disk:'''<br />
<br />
<console><br />
Command (m for help): ##i##w<br />
</console><br />
<br />
Your new MBR partition table will now be written to your system disk.<br />
<br />
===== Notes Before We Begin =====<br />
<br />
These install instructions assume you are installing Funtoo Linux to an hard disk using Master Boot Record partition tables (MBR). If you are installing Funtoo Linux on a machine where another OS is installed, or there is an existing Linux distribution on your system that you want to keep, then you will need to adapt these instructions to suit your needs.<br />
<br />
==== Creating filesystems ====<br />
<br />
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.<br />
<br />
You will not create a filesystem on your swap partition, but will initialize it using the <tt>mkswap</tt> command so that it can be used as disk-based virtual memory. Then we'll run the <tt>swapon</tt> command to make your newly-initialized swap space active within the live CD environment, in case it is needed during the rest of the install process.<br />
<br />
Note that we will not create a filesystem on the GRUB boot loader partition, as GRUB writes binary data directly to that partition when the boot loader is installed, which we'll do later.<br />
<br />
You can see the commands you will need to type below. Like the rest of this document, it assumes that you are using a GPT partitioning scheme. If you are using MBR, your root filesystem will likely be created on <tt>/dev/sda3</tt> instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:<br />
<br />
'''We generally recommend XFS for root filesystems, although ext4 is also a good choice.''' This tutorial assumes the use of XFS. If you want to use ext4, then be sure that your <tt>/etc/fstab</tt> file reflects this.<br />
<br />
{{fancywarning|1=<br />
Please use ext4 exclusively when deploying an OpenVZ host. The Parallels development team tests extensively with ext4, and modern versions of <tt>openvz-rhel6-stable</tt> are '''not''' compatible with XFS, and you may experience kernel bugs.<br />
}}<br />
<br />
'''To use ext4 as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.ext4 /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
'''To use XFS as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.xfs /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
==== Mounting filesystems ====<br />
<br />
Mount the newly-created filesystems as follows, creating <tt>/mnt/funtoo</tt> as the installation mount point:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/sda3 /mnt/funtoo<br />
# ##i##mkdir /mnt/funtoo/boot<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
</console><br />
<br />
Optionally, if you have a separate filesystem for <tt>/home</tt> or anything else:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo/home<br />
# ##i##mount /dev/sda4 /mnt/funtoo/home<br />
</console><br />
<br />
If you have <tt>/tmp</tt> or <tt>/var/tmp</tt> on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:<br />
<br />
<console><br />
# ##i##chmod 1777 /mnt/funtoo/tmp<br />
</console><br />
<br />
=== Installing the Stage 3 tarball ===<br />
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:<br />
* http://ftp.osuosl.org/pub/funtoo - main Funtoo Linux Mirror<br />
* http://ftp.heanet.ie/mirrors/funtoo -European Funtoo Linux mirror<br />
Now, let's navigate the directories on the mirrors to find the appropriate build of Funtoo Linux for you.<br />
<br />
==== Stable or Current? ====<br />
Funtoo Linux has a "stable" build and a "current" build. Most people use the "current" build of Funtoo Linux, and it's generally recommended that you do too. You will find "current' builds in the main <code>/funtoo-current</code> directory on our mirrors, and "stable" builds in <code>/funtoo-stable</code>.<br />
<br />If you want to read more about this, have a look at [[Funtoo_Linux#What_are_the_differences_between_.27stable.27.2C_.27current.27_and_.27experimental.27_.3F|Differences between stable, current and experimental]].<br />
<br />
==== 32 or 64-bit? ====<br />
There are three different types of Funtoo Linux that you can install. If you are installing on an older 32-bit system (if you don't know, then you probably are not) then you want to grab a stage3 tarball from the <code>x86-32bit</code> sub-directory. Most likely, you'll want to grab a 64-bit build from the <code>x86-64bit</code> sub-directory.<br />
<br />
==== Your SubArch ====<br />
Inside <code>/funtoo-current/x86-64bit/</code> on one of our mirrors, you'll see a bunch of directories for various ''subarches'' of Funtoo Linux.<br />
<br />
Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They take advantage of the instruction sets available for each CPU. <br />
<br />
For example, the <code>corei7</code> and <code>corei7-pure64</code> sub-arches require an Intel Core i7 processor to run (this includes Xeon x3400+ series, or other Nehalem-based CPUs such as Xeon x5500/x5600 series.)<br />
<br />
If you are using an AMD-based CPU, download a stage3 from <code>generic_64</code>, <code>amd64-k8</code> or <code>amd64-k10</code>. <br />
<br />
If you are using an Intel-based CPU, download a stage3 from <code>generic_64</code>, <code>atom_64</code>, <code>core2_64</code> or <code>corei7</code>.<br />
<br />
===== Pure64 Builds =====<br />
Inside <code>x86-64bit</code>, you may notice a sub-directory named <code>pure64</code>. These builds are recommended for server systems, and they do not offer any 32-bit compatibility, which is generally not needed on server systems. If you are setting up a desktop or workstation system, it's recommended that you avoid these builds as you will need 32-bit compatibility to run several binary desktop-oriented applications such as Skype. But for servers, pure64 is recommended.<br />
<br />
==== Setting the Date ====<br />
<br />
{{fancyimportant|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.}}<br />
<br />
Now is a good time to verify the date and time are correctly set to UTC. Use the <tt>date</tt> command to verify the date and time:<br />
<br />
<console><br />
# ##i##date<br />
Fri Jul 15 19:47:18 UTC 2011<br />
</console><br />
<br />
If the date and/or time need to be corrected, do so using <tt>date MMDDhhmmYYYY</tt>, keeping in mind <tt>hhmm</tt> are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:<br />
<br />
<console><br />
# ##i##date 071620002011<br />
Fri Jul 16 20:00:00 UTC 2011<br />
</console><br />
<br />
==== Download the Stage3 ====<br />
Once you are in your Funtoo Linux root filesystem, use <tt>wget</tt> 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 <tt>/mnt/funtoo</tt> directory as follows:<br />
<br />
<console># ##i##cd /mnt/funtoo<br />
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz<br />
</console><br />
<br />
<br />
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 <tt>generic_64</tt> or <tt>generic_32</tt> stage. Consult the [[Download]] page for more information.<br />
<br />
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:<br />
<console><br />
# ##i##tar xpf stage3-latest.tar.xz<br />
</console><br />
<br />
{{fancyimportant|It is very important to use <tt>tar</tt>'s "<tt>p</tt>" option when extracting the Stage 3 tarball - it tells <tt>tar</tt> to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}<br />
<br />
=== Chroot into Funtoo ===<br />
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:<br />
<console><br />
# ##i##cd /mnt/funtoo<br />
# ##i##mount -t proc none proc<br />
# ##i##mount --rbind /sys sys<br />
# ##i##mount --rbind /dev dev<br />
</console><br />
<br />
You'll also want to copy over <tt>resolv.conf</tt> in order to have proper DNS name resolution from inside the chroot:<br />
<console><br />
# ##i##cp /etc/resolv.conf etc<br />
</console><br />
<br />
Now you can chroot into your new system. Use <tt>env</tt> before <tt>chroot</tt> to ensure that no environment variables from the installation media are used by your new system:<br />
<br />
<console><br />
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l<br />
</console><br />
<br />
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <tt>uname -r</tt> 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.}}<br />
{{fancyimportant|If you receive the error "<tt>chroot: failed to run command `/bin/bash': Exec format error</tt>", 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.}}<br />
<br />
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:<br />
<console><br />
# ##i##export PS1="(chroot) $PS1"<br />
</console><br />
<br />
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.<br />
<br />
=== Downloading the Portage tree ===<br />
<br />
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}<br />
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 <tt>emerge --sync</tt> from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
</console><br />
<br />
{{fancyimportant|If you receive the error with initial <tt>emerge --sync</tt> due to git protocol restrictions, change <tt>SYNC</tt> variable in <tt>/etc/make.conf</tt>}}<br />
<pre><br />
SYNC="https://github.com/funtoo/ports-2012.git"<br />
</pre><br />
<br />
=== Configuring your system ===<br />
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 <tt>/etc/fstab</tt>. The others are optional. Here are a list of files that you should consider editing:<br />
<br />
{| {{table}}<br />
!File<br />
!Do I need to change it?<br />
!Description<br />
|-<br />
|<tt>/etc/fstab</tt><br />
|'''YES - required'''<br />
|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.<br />
|-<br />
|<tt>/etc/localtime</tt><br />
|''Maybe - recommended''<br />
|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) <br />
|-<br />
|<tt>/etc/make.conf</tt> (symlink) - also known as:<br/><tt>/etc/portage/make.conf</tt><br />
|''Maybe - recommended''<br />
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.<br />
|-<br />
|<tt>/etc/conf.d/hostname</tt><br />
|''Maybe - recommended''<br />
|Used to set system hostname. Set the <tt>hostname</tt> variable to the fully-qualified (with dots, ie. <tt>foo.funtoo.org</tt>) name if you have one. Otherwise, set to the local system hostname (without dots, ie. <tt>foo</tt>). Defaults to <tt>localhost</tt> if not set.<br />
|-<br />
|<tt>/etc/hosts</tt><br />
|''No''<br />
| You no longer need to manually set the hostname in this file. This file is automatically generated by <tt>/etc/init.d/hostname</tt>.<br />
|-<br />
|<tt>/etc/conf.d/keymaps</tt><br />
|Optional<br />
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].<br />
|-<br />
|<tt>/etc/conf.d/hwclock</tt><br />
|Optional<br />
|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.<br />
|-<br />
|<tt>/etc/conf.d/modules</tt><br />
|Optional<br />
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.<br />
|-<br />
|<tt>profiles</tt><br />
|Optional<br />
|Some useful portage settings that may help speed up intial configuration.<br />
|}<br />
<br />
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 portal|Community]])<br />
<br />
Let's go ahead and see what we have to do. Use <tt>nano -w <name_of_file></tt> to edit files -- the "<tt>-w</tt>" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.<br />
<br />
{{fancywarning|It's important to edit your <tt>/etc/fstab</tt> 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 <tt>gdisk</tt> or <tt>fdisk</tt>. Skipping this step may prevent Funtoo Linux from booting successfully.}}<br />
<br />
==== /etc/fstab ====<br />
<br />
<tt>/etc/fstab</tt> is used by the <tt>mount</tt> command which is ran when your system boots. Statements of this file inform <tt>mount</tt> about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit <tt>/etc/fstab</tt> and ensure that it reflects the partition configuration you used earlier:<br />
<br />
<console><br />
(chroot) # ##i##nano -w /etc/fstab<br />
</console><br />
<br />
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type "<tt>Y</tt>" when asked if you want to save the modified buffer, or hit Control-O before closing <tt>nano</tt>. Otherwise your changes will be discarded.<br />
<br />
<pre><br />
# The root filesystem should have a pass number of either 0 or 1.<br />
# All other filesystems should have a pass number of 0 or greater than 1.<br />
#<br />
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.<br />
#<br />
# See the manpage fstab(5) for more information.<br />
#<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
<br />
/dev/sda1 /boot ext2 noatime 1 2<br />
/dev/sda2 none swap sw 0 0<br />
/dev/sda3 / ext4 noatime 0 1<br />
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0<br />
</pre><br />
<br />
==== /etc/localtime ====<br />
<br />
<tt>/etc/localtime</tt> 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 <tt>/etc/localtime</tt> with a symbolic link to the timezone that you wish to use. <br />
<br />
<console><br />
(chroot) # ##i##ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime<br />
</console><br />
<br />
The above sets the timezone to Mountain Standard Time (with daylight savings). Type <tt>ls /usr/share/zoneinfo</tt> to see what timezones are available. There are also sub-directories containing timezones described by location.<br />
<br />
==== /etc/make.conf ====<br />
<br />
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:<br />
<br />
<pre><br />
MAKEOPTS="-j3" <br />
</pre><br />
<br />
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.<br />
<console><br />
(chroot) # ##i##grep "processor" /proc/cpuinfo | wc -l<br />
16<br />
</console><br />
<br />
Set MAKEOPTS to this number plus one:<br />
<br />
<pre><br />
MAKEOPTS="-j17"<br />
</pre><br />
<br />
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 ("<tt>-</tt>") 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].<br />
<br />
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:<br />
<br />
<pre><br />
LINGUAS="fr"<br />
</pre><br />
<br />
==== /etc/conf.d/hwclock ====<br />
If you dual-boot with Windows, you'll need to edit this file and change '''clock''' 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.<br />
<console><br />
(chroot) # ##i##nano -w /etc/conf.d/hwclock<br />
</console><br />
<br />
==== Localization ====<br />
<br />
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]].<br />
<br />
==== Profiles ====<br />
<br />
[[Funtoo 1.0 Profile|Funtoo profiles]] are used to define defaults for Portage specific to your needs. There are 4 basic profile types: arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:<br />
<br />
;arch: typically <tt>x86-32bit</tt> or <tt>x86-64bit</tt>, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.<br />
;build: defines whether your system is a <tt>current</tt>, <tt>stable</tt> or <tt>experimental</tt> build. <tt>current</tt> systems will have newer packages unmasked than <tt>stable</tt> systems.<br />
;flavor: defines the general type of system, such as <tt>server</tt> or <tt>desktop</tt>, and will set default USE flags appropriate for your needs.<br />
;mix-ins: define various optional settings that you may be interested in enabling.<br />
<br />
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.<br />
<br />
Remember that profiles can often be inherited. For example, the <tt>desktop</tt> flavor inherits the <tt>workstation</tt> flavor settings, which in turn inherits the <tt>X</tt> and <tt>audio</tt> mix-ins. You can view this by using eselect:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile show<br />
Currently set profiles:<br />
arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit<br />
build: gentoo:funtoo/1.0/linux-gnu/build/current<br />
flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde<br />
<br />
Automatically enabled profiles:<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
<br />
<br />
</console><br />
<br />
To view installed profiles:<br />
<console><br />
(chroot) # ##i##eselect profile list<br />
</console><br />
<br />
To change the profile flavor:<br />
<console><br />
(chroot) # ##i##eselect profile set-flavor 7<br />
</console><br />
<br />
To add a mix-in:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile add 10<br />
</console><br />
<br />
=== Introducing Portage ===<br />
<br />
Portage, the Funtoo Linux package manager has a command called <tt>emerge</tt> 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:<br />
<br />
<console><br />
(chroot) # ##i##emerge packagename<br />
</console><br />
<br />
When you install a package by specifying its name on the command-line, Portage records its name in the <tt>/var/lib/portage/world</tt> file. It does this because it figures that because you've installed it by name, you want to consider it part of your system, and will want to keep the package updated in the future. This is a handy feature because when packages are added to the ''world set'', we can update our entire system by typing:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
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 <tt>emerge</tt> to:<br />
<br />
* '''<tt>a</tt>''' - show us what will be emerged, and '''ask''' us if we want to proceed<br />
* '''<tt>u</tt>''' - ''update'' the packages we specify -- don't emerge them again if they are already emerged.<br />
* '''<tt>D</tt>''' - Consider the entire dependency tree of packages when looking for updates. In other words, do a '''deep''' update.<br />
* '''<tt>N</tt>''' - Update any packages who have changed ('''new''') USE settings.<br />
<br />
Of course, sometimes we want to install a package but not add it 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:<br />
<br />
<console><br />
(chroot) # ##i##emerge -1 packagename<br />
</console><br />
<br />
Advanced users may be interested in the [[Emerge]] wiki page.<br />
<br />
==== Updating World ====<br />
<br />
Now is actually a very good time to update the entire system and it is very important that you do so before rebooting to resolve various issues.<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
{{fancyimportant|1=<br />
Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.}}<br />
<br />
=== Configuring and installing the Linux kernel ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== Package Sets ====<br />
<br />
Before we install a kernel, we're going to cover a feature of Portage called package sets. Earlier we learned about one such package set called the ''world set''. This is a handy feature because packages in additionally defined package sets are not updated when the ''world set'' is updated. This behavior is generally desired for packages that are time consuming or should not change be updated often without reasons, such as kernel packages.<br />
<br />
==== Kernel Package Set ====<br />
<br />
{{Fancynote|1=<br />
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <tt>debian-sources</tt> for new users.}}<br />
<br />
{{fancyimportant|1=<br />
<tt>debian-sources</tt> with <tt>binary</tt> USE flag requires at least 14GB free in <tt>/var/tmp</tt> and takes around 1 hour to build on a Intel Core i7 Processor.}}<br />
<br />
To create the kernel package set, perform the following steps:<br />
<br />
<console><br />
(chroot) # ##i##mkdir /etc/portage/sets<br />
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel<br />
</console><br />
<br />
Now, we'll want to set a USE variable to tell <tt>debian-sources</tt> 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 <tt>binary</tt> USE variable for <tt>debian-sources</tt>, as follows:<br />
<br />
<console><br />
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use<br />
</console><br />
<br />
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 <tt>binary</tt> USE flag to the <tt>debian-sources</tt> 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.<br />
<br />
Now, when we just want to update our system's packages, we'll type <tt>emerge -auDN @world</tt>, and it will update our world set, leaving out the kernel. Likewise, when we just want to update our kernel, we'll type <tt>emerge -au @kernel</tt>, and it will update our kernel, leaving out the world set.<br />
<br />
==== Building the Kernel ====<br />
<br />
Let's emerge our kernel:<br />
<br />
<console><br />
(chroot) # ##i##emerge @kernel<br />
</console><br />
<br />
Note that while use of the <tt>binary</tt> 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 <tt>MAKEOPTS</tt> in <tt>/etc/make.conf</tt> 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.<br />
<br />
{{fancynote|NVIDIA card users: the <tt>binary</tt> 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 <tt>/etc/modprobe.d/</tt>.}}<br />
<br />
{{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.}}<br />
<br />
Once <tt>emerge</tt> completes, you'll have a brand new kernel and initramfs installed to <tt>/boot</tt>, plus kernel headers installed in <tt>/usr/src/linux</tt>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.<br />
<br />
=== Installing a Bootloader ===<br />
<br />
==== Installing Grub ====<br />
<br />
The boot loader is responsible for loading the kernel from disk when your computer boots. For new installations, GRUB 2 and Funtoo's boot-update tool should be used as a boot loader. GRUB supports both GPT/GUID and legacy MBR partitioning schemes.<br />
<br />
To use this recommended boot method, first emerge <tt>boot-update</tt>. This will also cause <tt>grub-2</tt> to be merged, since it is a dependency of <tt>boot-update</tt>. (You may need to adjust <tt>GRUB_PLATFORMS</tt> if you are on a UEFI system. See [[UEFI Install Guide]]).<br />
<br />
<console><br />
(chroot) # ##i##emerge boot-update<br />
</console><br />
<br />
Then, edit <tt>/etc/boot.conf</tt> and specify "<tt>Funtoo Linux genkernel</tt>" as the <tt>default</tt> setting at the top of the file, replacing <tt>"Funtoo Linux"</tt>. <br />
<br />
<tt>/etc/boot.conf</tt> should now look like this:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
# if you use bliss-kernel package<br />
# you should change string<br />
# kernel kernel[-v]<br />
# to<br />
# kernel kernel/[-v]/kernel[-v]<br />
kernel kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
If you use bliss-kernel, your <tt>/etc/boot.conf</tt> should look like:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
kernel kernels/[-v]/kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
Please read <tt>man boot.conf</tt> for further details.<br />
<br />
===== Running grub-install and boot-update =====<br />
<br />
Finally, we will need to actually install the GRUB boot loader to your disk, and also run <tt>boot-update</tt> which will generate your boot loader configuration file:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --no-floppy /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
You only need to run <tt>grub-install</tt> when you first install Funtoo Linux, but you need to re-run <tt>boot-update</tt> every time you modify your <tt>/etc/boot.conf</tt> file, so your changes are applied on next boot.<br />
<br />
OK - your system should be ready to boot! Well, there are a few more loose ends...<br />
<br />
==== Installing Syslinux/Extlinux ====<br />
<br />
An alternate boot loader called extlinux can be used instead of GRUB if you desire. See the [[Extlinux|extlinux Guide]] for information on how to do this.<br />
<br />
=== Configuring your network ===<br />
<br />
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.<br />
<br />
==== Wi-Fi ====<br />
===== Using NetworkManager =====<br />
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:<br />
<br />
<console><br />
(chroot) # ##i##emerge linux-firmware<br />
(chroot) # ##i##emerge networkmanager<br />
(chroot) # ##i##rc-update add NetworkManager default<br />
</console><br />
<br />
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 <tt>default</tt> runlevel so it will start when Funtoo Linux boots.<br />
<br />
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:<br />
<br />
<console><br />
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork<br />
</console><br />
<br />
The <tt>addwifi</tt> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <tt>mywifinetwork</tt> with the password <tt>wifipassword</tt>. This network configuration entry is stored in <tt>/etc/NetworkManager/system-connections</tt> 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.<br />
<br />
===== Using wpa_supplicant =====<br />
If for some reason you don't want to use a tool such as NetworkManager or <tt>wicd</tt>, you can use wpa_supplicant for wireless network connections.<br />
<br />
First, emerge wpa_supplicant:<br />
<br />
<console><br />
(chroot) ###i## emerge -a wpa_supplicant<br />
</console><br />
<br />
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant.conf.<br />
The syntax is very easy:<br />
<pre><br />
network={<br />
ssid="MyWifiName"<br />
psk="lol42-wifi"<br />
}<br />
<br />
network={<br />
ssid="Other Network"<br />
psk="6d96270004515a0486bb7f76196a72b40c55a47f"<br />
}<br />
</pre><br />
<br />
You will need to add both <tt>wpa_supplicant</tt> and <tt>dhcpcd</tt> to the default runlevel. <tt>wpa_supplicant</tt> will connect to your access point, and <tt>dhcpcd</tt> will acquire an IP address via DHCP:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
(chroot) # ##i##rc-update add wpa_supplicant default<br />
</console><br />
<br />
==== Desktop (Wired Ethernet) ====<br />
<br />
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 <tt>dhcpcd</tt> to the default runlevel:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
</console><br />
<br />
When you reboot, <tt>dhcpcd</tt> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.<br />
<br />
==== Server (Static IP) ====<br />
<br />
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.<br />
<br />
=== Finishing Steps ===<br />
<br />
==== Set your root password ====<br />
It's imperative that you set your root password before rebooting so that you can log in.<br />
<console><br />
(chroot) # ##i##passwd<br />
</console><br />
<br />
===Restart your system ===<br />
<br />
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.<br />
<br />
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.<br />
<console><br />
(chroot) # ##i##exit<br />
# ##i##cd /mnt<br />
# ##i##umount -l funtoo<br />
# ##i##reboot<br />
</console><br />
<br />
{{fancynote|System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.}}<br />
<br />
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 <tt>login:</tt> prompt. Funtoo Linux has been successfully installed!<br />
<br />
===Next Steps===<br />
<br />
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 [[:Category:Official Documentation|official documentation]], which includes all docs that we officially maintain for installation and operation of Funtoo Linux.<br />
<br />
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.<br />
<br />
{{#ask: [[Category:First Steps]] | format=category }}<br />
<br />
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Install]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=Funtoo_Linux_Installation&diff=4986Funtoo Linux Installation2014-07-30T16:00:58Z<p>Dantrell: Updated debian-sources space and time requirements.</p>
<hr />
<div>== Introduction == <br />
<br />
This document was written to help you install Funtoo Linux as concisely as possible, with a minimum number of distracting options regarding system configuration. <br />
<br />
These docs assume you have a "PC compatible" computer system with a standard PC BIOS. Many new computers support UEFI for booting, which is a new firmware interface that frequently replaces the older MBR-based BIOS. If you have a system with UEFI, you will want to use this documentation along with the [[UEFI Install Guide]], which will augment these instructions and explain how to get your system to boot. You may need to change your PC BIOS settings to enable or disable UEFI booting. The [[UEFI Install Guide]] has more information on this, and steps on how to determine if your system supports UEFI.<br />
<br />
We also offer a [[ZFS Install Guide]], which augment the instructions on this page for those who want to install Funtoo Linux on ZFS. If you are installing Funtoo Linux on [[Funtoo Linux Installation on ARM|ARM]] architecture, please see [[Funtoo Linux Installation on ARM]] for notable differences regarding ARM support. An experimental Funtoo Linux build also exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]].<br />
<br />
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.<br />
<br />
== Installation Overview ==<br />
<br />
This is a basic overview of the Funtoo installation process:<br />
<br />
# [[#Live CD|Download and boot the live CD of your choice]].<br />
# [[#Prepare Hard Disk|Prepare your disk]].<br />
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.<br />
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.<br />
# [[#Chroot into Funtoo|Chroot into your new system]].<br />
# [[#Downloading the Portage tree|Download the Portage tree]].<br />
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].<br />
# [[#Configuring and installing the Linux kernel|Install a kernel]].<br />
# [[#Installing a Bootloader|Install a bootloader]].<br />
# [[#Finishing Steps|Complete final steps]].<br />
# [[#Restart your system|Reboot and enjoy]].<br />
<br />
=== Live CD ===<br />
<br />
Funtoo doesn't provide an "official" Funtoo Live CD, but there are plenty of good ones out there to choose from. A great choice is the Gentoo-based [http://www.sysresccd.org/ System Rescue CD] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.<br />
<br />
It is also possible to install Funtoo Linux using many other Linux-based live CDs. Generally, any modern bootable Linux live CD or live USB media will work. See [[Requirements|requirements]] for an overview of what the Live Media must provide to allow a problem-free install of Funtoo Linux.<br />
<br />
To begin a Funtoo Linux installation, download System Rescue CD from:<br />
<br />
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/ The Oregon State University Open Source Lab]<br />
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysresccd/ HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of System Rescue CD, '''be sure to select the <tt>rescue64</tt> 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.<br />
<br />
=== Prepare Hard Disk ===<br />
==== Partitions ====<br />
<br />
Funtoo Linux fully supports traditional MBR partitions, as well as newer GPT/GUID partition formats. See below to determine which partitioning scheme to use:<br />
<br />
===== MBR Partitions =====<br />
<br />
* '''Recommended if your system disk is <=2TB in size'''<br />
* Legacy, DOS partitioning scheme<br />
* Only 4 primary partitions per disk; after that, you must use "logical" partitions<br />
* Does not support 2 TB+ disks for booting<br />
* Compatible with certain problematic systems (such as the HP ProBook 4520)<br />
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)<br />
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo<br />
<br />
{{fancynote|Due to the fact that it is more widely supported on PC hardware, it is best to use MBR partitions if possible.}}<br />
<br />
===== GPT Partitions =====<br />
<br />
* '''Recommended if your disk is >2TB in size'''<br />
* Newer format for Linux systems<br />
* Supports 2 TB+ hard drives for booting<br />
* Supports hundreds of partitions per disk of any size<br />
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI<br />
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy<br />
<br />
{{fancyimportant|If you have a system disk that is 2TB or greater and want to use the space beyond 2TB, you ''must'' partition using the GPT/GUID format. Otherwise, MBR is recommended as the most reliable boot method.}}<br />
<br />
===== Filesystem Resources =====<br />
<br />
Advanced users may be interested in the following topics:<br />
<br />
* [[GUID Booting Guide]]<br />
* [[LVM Install Guide]]<br />
* [[Rootfs over encrypted lvm]]<br />
* [[Rootfs over encrypted lvm over raid-1 on GPT]]<br />
* '''NEW!''' '''[[ZFS Install Guide]] (Also contains instructions for Rootfs over Encrypted ZFS!)'''<br />
<br />
===== Partitioning Recommendations =====<br />
<br />
Below are our partitioning recommendations in table form. For MBR-based partitions, use the MBR Block Device and MBR code columns with <tt>fdisk</tt>. For GPT-based partitions, use the GPT Block Device and GPT Code columns with <tt>gdisk</tt>:<br />
<br />
{| {{table}} <br />
!Partition<br />
!Size<br />
!MBR Block Device (<tt>fdisk</tt>)<br />
!GPT Block Device (<tt>gdisk</tt>)<br />
!Filesystem<br />
!MBR Code<br />
!GPT Code<br />
|-<br />
|<tt>/boot</tt><br />
|500 MB<br />
|<tt>/dev/sda1</tt><br />
|<tt>/dev/sda1</tt><br />
|ext2<br />
|83<br />
|8300<br />
|-<br />
|GRUB boot loader partition<br />
|1 MB<br />
| ''not required for MBR''<br />
|<tt>/dev/sda2</tt><br />
|For GPT/GUID only, skip for MBR - no filesystem.<br />
|''N/A''<br />
|EF02<br />
|-<br />
|swap<br />
|2x RAM for low-memory systems and production servers; otherwise 2GB.<br />
|<tt>/dev/sda2</tt><br />
|<tt>/dev/sda3</tt><br />
|swap (default)<br />
|82<br />
|8200<br />
|-<br />
|<tt>/</tt> (root)<br />
|Rest of the disk, minimum of 10GB.<br />
|<tt>/dev/sda3</tt><br />
|<tt>/dev/sda4</tt><br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
|<tt>/home</tt> (optional) <br />
|User storage and media. Typically most of the disk.<br />
|<tt>/dev/sda4</tt> (if created)<br />
|<tt>/dev/sda5</tt> (if created)<br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
| LVM (optional)<br />
| If you want to create an LVM volume.<br />
| <tt>/dev/sda4</tt> (PV, if created)<br />
| <tt>/dev/sda5</tt> (PV, if created)<br />
| LVM PV<br />
| 8E<br />
| 8E00<br />
|}<br />
<br />
===== Partitioning Using fdisk (MBR) =====<br />
<br />
<code>fdisk</code> is the tool used to create an MBR partition table. MBR is well-supported on PCs and is recommended if your system disk is 2TB or smaller.<br />
<br />
{{fancyimportant|If you need to create a GPT partition table, see [[Partitioning using gdisk]].}}<br />
<br />
====== Preparation ======<br />
<br />
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 <code>/dev/sda</code> is the disk that you want to partition:<br />
<br />
<console><br />
# ##i##fdisk -l /dev/sda<br />
<br />
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk label type: gpt<br />
<br />
<br />
# Start End Size Type Name<br />
1 2048 1250263694 596.2G Linux filesyste Linux filesystem<br />
</console><br />
<br />
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 <code>sgdisk</code>:<br />
<br />
<console><br />
# ##i##sgdisk --zap-all /dev/sda<br />
<br />
Creating new GPT entries.<br />
GPT data structures destroyed! You may now partition the disk using fdisk or<br />
other utilities.<br />
</console><br />
<br />
This output is also nothing to worry about, as the command still succeded:<br />
<br />
<console><br />
***************************************************************<br />
Found invalid GPT and valid MBR; converting MBR to GPT format<br />
in memory. <br />
***************************************************************<br />
</console><br />
<br />
====== Partitioning ======<br />
<br />
Now we will use <code>fdisk</code> to create the MBR partition table and partitions:<br />
<br />
<console><br />
# ##i##fdisk /dev/sda<br />
</console><br />
<br />
Within <code>fdisk</code>, follow these steps:<br />
<br />
'''Empty the partition table''':<br />
<br />
<console><br />
Command (m for help): ##i##o ↵<br />
</console><br />
<br />
'''Create Partition 1''' (boot):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+128M ↵<br />
</console><br />
<br />
'''Create Partition 2''' (swap):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (2,3,4, default 2): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+32G ↵<br />
Command (m for help): ##i##t ↵ <br />
Partition number (1,2, default 2): ##i##2 ↵<br />
Hex code (type L to list all codes): ##i##82 ↵<br />
</console><br />
<br />
'''Create the root partition:'''<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (3,4, default 3): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##↵<br />
</console><br />
<br />
'''Verify the partition table:'''<br />
<br />
<console><br />
Command (m for help): ##i##p<br />
<br />
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0xac67d8f6<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 264191 131072 83 Linux<br />
/dev/sda2 264192 67373055 33554432 82 Linux swap / Solaris<br />
/dev/sda3 67373056 1250263727 591445336 83 Linux<br />
</console><br />
<br />
'''Write the parition table to disk:'''<br />
<br />
<console><br />
Command (m for help): ##i##w<br />
</console><br />
<br />
Your new MBR partition table will now be written to your system disk.<br />
<br />
===== Notes Before We Begin =====<br />
<br />
These install instructions assume you are installing Funtoo Linux to an hard disk using Master Boot Record partition tables (MBR). If you are installing Funtoo Linux on a machine where another OS is installed, or there is an existing Linux distribution on your system that you want to keep, then you will need to adapt these instructions to suit your needs.<br />
<br />
==== Creating filesystems ====<br />
<br />
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.<br />
<br />
You will not create a filesystem on your swap partition, but will initialize it using the <tt>mkswap</tt> command so that it can be used as disk-based virtual memory. Then we'll run the <tt>swapon</tt> command to make your newly-initialized swap space active within the live CD environment, in case it is needed during the rest of the install process.<br />
<br />
Note that we will not create a filesystem on the GRUB boot loader partition, as GRUB writes binary data directly to that partition when the boot loader is installed, which we'll do later.<br />
<br />
You can see the commands you will need to type below. Like the rest of this document, it assumes that you are using a GPT partitioning scheme. If you are using MBR, your root filesystem will likely be created on <tt>/dev/sda3</tt> instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:<br />
<br />
'''We generally recommend XFS for root filesystems, although ext4 is also a good choice.''' This tutorial assumes the use of XFS. If you want to use ext4, then be sure that your <tt>/etc/fstab</tt> file reflects this.<br />
<br />
{{fancywarning|1=<br />
Please use ext4 exclusively when deploying an OpenVZ host. The Parallels development team tests extensively with ext4, and modern versions of <tt>openvz-rhel6-stable</tt> are '''not''' compatible with XFS, and you may experience kernel bugs.<br />
}}<br />
<br />
'''To use ext4 as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.ext4 /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
'''To use XFS as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.xfs /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
==== Mounting filesystems ====<br />
<br />
Mount the newly-created filesystems as follows, creating <tt>/mnt/funtoo</tt> as the installation mount point:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/sda3 /mnt/funtoo<br />
# ##i##mkdir /mnt/funtoo/boot<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
</console><br />
<br />
Optionally, if you have a separate filesystem for <tt>/home</tt> or anything else:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo/home<br />
# ##i##mount /dev/sda4 /mnt/funtoo/home<br />
</console><br />
<br />
If you have <tt>/tmp</tt> or <tt>/var/tmp</tt> on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:<br />
<br />
<console><br />
# ##i##chmod 1777 /mnt/funtoo/tmp<br />
</console><br />
<br />
=== Installing the Stage 3 tarball ===<br />
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:<br />
* http://ftp.osuosl.org/pub/funtoo - main Funtoo Linux Mirror<br />
* http://ftp.heanet.ie/mirrors/funtoo -European Funtoo Linux mirror<br />
Now, let's navigate the directories on the mirrors to find the appropriate build of Funtoo Linux for you.<br />
<br />
==== Stable or Current? ====<br />
Funtoo Linux has a "stable" build and a "current" build. Most people use the "current" build of Funtoo Linux, and it's generally recommended that you do too. You will find "current' builds in the main <code>/funtoo-current</code> directory on our mirrors, and "stable" builds in <code>/funtoo-stable</code>.<br />
<br />If you want to read more about this, have a look at [[Funtoo_Linux#What_are_the_differences_between_.27stable.27.2C_.27current.27_and_.27experimental.27_.3F|Differences between stable, current and experimental]].<br />
<br />
==== 32 or 64-bit? ====<br />
There are three different types of Funtoo Linux that you can install. If you are installing on an older 32-bit system (if you don't know, then you probably are not) then you want to grab a stage3 tarball from the <code>x86-32bit</code> sub-directory. Most likely, you'll want to grab a 64-bit build from the <code>x86-64bit</code> sub-directory.<br />
<br />
==== Your SubArch ====<br />
Inside <code>/funtoo-current/x86-64bit/</code> on one of our mirrors, you'll see a bunch of directories for various ''subarches'' of Funtoo Linux.<br />
<br />
Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They take advantage of the instruction sets available for each CPU. <br />
<br />
For example, the <code>corei7</code> and <code>corei7-pure64</code> sub-arches require an Intel Core i7 processor to run (this includes Xeon x3400+ series, or other Nehalem-based CPUs such as Xeon x5500/x5600 series.)<br />
<br />
If you are using an AMD-based CPU, download a stage3 from <code>generic_64</code>, <code>amd64-k8</code> or <code>amd64-k10</code>. <br />
<br />
If you are using an Intel-based CPU, download a stage3 from <code>generic_64</code>, <code>atom_64</code>, <code>core2_64</code> or <code>corei7</code>.<br />
<br />
===== Pure64 Builds =====<br />
Inside <code>x86-64bit</code>, you may notice a sub-directory named <code>pure64</code>. These builds are recommended for server systems, and they do not offer any 32-bit compatibility, which is generally not needed on server systems. If you are setting up a desktop or workstation system, it's recommended that you avoid these builds as you will need 32-bit compatibility to run several binary desktop-oriented applications such as Skype. But for servers, pure64 is recommended.<br />
<br />
==== Setting the Date ====<br />
<br />
{{fancyimportant|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.}}<br />
<br />
Now is a good time to verify the date and time are correctly set to UTC. Use the <tt>date</tt> command to verify the date and time:<br />
<br />
<console><br />
# ##i##date<br />
Fri Jul 15 19:47:18 UTC 2011<br />
</console><br />
<br />
If the date and/or time need to be corrected, do so using <tt>date MMDDhhmmYYYY</tt>, keeping in mind <tt>hhmm</tt> are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:<br />
<br />
<console><br />
# ##i##date 071620002011<br />
Fri Jul 16 20:00:00 UTC 2011<br />
</console><br />
<br />
==== Download the Stage3 ====<br />
Once you are in your Funtoo Linux root filesystem, use <tt>wget</tt> 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 <tt>/mnt/funtoo</tt> directory as follows:<br />
<br />
<console># ##i##cd /mnt/funtoo<br />
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz<br />
</console><br />
<br />
<br />
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 <tt>generic_64</tt> or <tt>generic_32</tt> stage. Consult the [[Download]] page for more information.<br />
<br />
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:<br />
<console><br />
# ##i##tar xpf stage3-latest.tar.xz<br />
</console><br />
<br />
{{fancyimportant|It is very important to use <tt>tar</tt>'s "<tt>p</tt>" option when extracting the Stage 3 tarball - it tells <tt>tar</tt> to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}<br />
<br />
=== Chroot into Funtoo ===<br />
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:<br />
<console><br />
# ##i##cd /mnt/funtoo<br />
# ##i##mount -t proc none proc<br />
# ##i##mount --rbind /sys sys<br />
# ##i##mount --rbind /dev dev<br />
</console><br />
<br />
You'll also want to copy over <tt>resolv.conf</tt> in order to have proper DNS name resolution from inside the chroot:<br />
<console><br />
# ##i##cp /etc/resolv.conf etc<br />
</console><br />
<br />
Now you can chroot into your new system. Use <tt>env</tt> before <tt>chroot</tt> to ensure that no environment variables from the installation media are used by your new system:<br />
<br />
<console><br />
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l<br />
</console><br />
<br />
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <tt>uname -r</tt> 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.}}<br />
{{fancyimportant|If you receive the error "<tt>chroot: failed to run command `/bin/bash': Exec format error</tt>", 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.}}<br />
<br />
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:<br />
<console><br />
# ##i##export PS1="(chroot) $PS1"<br />
</console><br />
<br />
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.<br />
<br />
=== Downloading the Portage tree ===<br />
<br />
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}<br />
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 <tt>emerge --sync</tt> from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
</console><br />
<br />
{{fancyimportant|If you receive the error with initial <tt>emerge --sync</tt> due to git protocol restrictions, change <tt>SYNC</tt> variable in <tt>/etc/make.conf</tt>}}<br />
<pre><br />
SYNC="https://github.com/funtoo/ports-2012.git"<br />
</pre><br />
<br />
=== Configuring your system ===<br />
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 <tt>/etc/fstab</tt>. The others are optional. Here are a list of files that you should consider editing:<br />
<br />
{| {{table}}<br />
!File<br />
!Do I need to change it?<br />
!Description<br />
|-<br />
|<tt>/etc/fstab</tt><br />
|'''YES - required'''<br />
|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.<br />
|-<br />
|<tt>/etc/localtime</tt><br />
|''Maybe - recommended''<br />
|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) <br />
|-<br />
|<tt>/etc/make.conf</tt> (symlink) - also known as:<br/><tt>/etc/portage/make.conf</tt><br />
|''Maybe - recommended''<br />
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.<br />
|-<br />
|<tt>/etc/conf.d/hostname</tt><br />
|''Maybe - recommended''<br />
|Used to set system hostname. Set the <tt>hostname</tt> variable to the fully-qualified (with dots, ie. <tt>foo.funtoo.org</tt>) name if you have one. Otherwise, set to the local system hostname (without dots, ie. <tt>foo</tt>). Defaults to <tt>localhost</tt> if not set.<br />
|-<br />
|<tt>/etc/hosts</tt><br />
|''No''<br />
| You no longer need to manually set the hostname in this file. This file is automatically generated by <tt>/etc/init.d/hostname</tt>.<br />
|-<br />
|<tt>/etc/conf.d/keymaps</tt><br />
|Optional<br />
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].<br />
|-<br />
|<tt>/etc/conf.d/hwclock</tt><br />
|Optional<br />
|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.<br />
|-<br />
|<tt>/etc/conf.d/modules</tt><br />
|Optional<br />
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.<br />
|-<br />
|<tt>profiles</tt><br />
|Optional<br />
|Some useful portage settings that may help speed up intial configuration.<br />
|}<br />
<br />
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 portal|Community]])<br />
<br />
Let's go ahead and see what we have to do. Use <tt>nano -w <name_of_file></tt> to edit files -- the "<tt>-w</tt>" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.<br />
<br />
{{fancywarning|It's important to edit your <tt>/etc/fstab</tt> 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 <tt>gdisk</tt> or <tt>fdisk</tt>. Skipping this step may prevent Funtoo Linux from booting successfully.}}<br />
<br />
==== /etc/fstab ====<br />
<br />
<tt>/etc/fstab</tt> is used by the <tt>mount</tt> command which is ran when your system boots. Statements of this file inform <tt>mount</tt> about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit <tt>/etc/fstab</tt> and ensure that it reflects the partition configuration you used earlier:<br />
<br />
<console><br />
(chroot) # ##i##nano -w /etc/fstab<br />
</console><br />
<br />
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type "<tt>Y</tt>" when asked if you want to save the modified buffer, or hit Control-O before closing <tt>nano</tt>. Otherwise your changes will be discarded.<br />
<br />
<pre><br />
# The root filesystem should have a pass number of either 0 or 1.<br />
# All other filesystems should have a pass number of 0 or greater than 1.<br />
#<br />
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.<br />
#<br />
# See the manpage fstab(5) for more information.<br />
#<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
<br />
/dev/sda1 /boot ext2 noatime 1 2<br />
/dev/sda2 none swap sw 0 0<br />
/dev/sda3 / ext4 noatime 0 1<br />
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0<br />
</pre><br />
<br />
==== /etc/localtime ====<br />
<br />
<tt>/etc/localtime</tt> 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 <tt>/etc/localtime</tt> with a symbolic link to the timezone that you wish to use. <br />
<br />
<console><br />
(chroot) # ##i##ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime<br />
</console><br />
<br />
The above sets the timezone to Mountain Standard Time (with daylight savings). Type <tt>ls /usr/share/zoneinfo</tt> to see what timezones are available. There are also sub-directories containing timezones described by location.<br />
<br />
==== /etc/make.conf ====<br />
<br />
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:<br />
<br />
<pre><br />
MAKEOPTS="-j3" <br />
</pre><br />
<br />
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.<br />
<console><br />
(chroot) # ##i##grep "processor" /proc/cpuinfo | wc -l<br />
16<br />
</console><br />
<br />
Set MAKEOPTS to this number plus one:<br />
<br />
<pre><br />
MAKEOPTS="-j17"<br />
</pre><br />
<br />
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 ("<tt>-</tt>") 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].<br />
<br />
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:<br />
<br />
<pre><br />
LINGUAS="fr"<br />
</pre><br />
<br />
==== /etc/conf.d/hwclock ====<br />
If you dual-boot with Windows, you'll need to edit this file and change '''clock''' 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.<br />
<console><br />
(chroot) # ##i##nano -w /etc/conf.d/hwclock<br />
</console><br />
<br />
==== Localization ====<br />
<br />
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]].<br />
<br />
==== Profiles ====<br />
<br />
[[Funtoo 1.0 Profile|Funtoo profiles]] are used to define defaults for Portage specific to your needs. There are 4 basic profile types: arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:<br />
<br />
;arch: typically <tt>x86-32bit</tt> or <tt>x86-64bit</tt>, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.<br />
;build: defines whether your system is a <tt>current</tt>, <tt>stable</tt> or <tt>experimental</tt> build. <tt>current</tt> systems will have newer packages unmasked than <tt>stable</tt> systems.<br />
;flavor: defines the general type of system, such as <tt>server</tt> or <tt>desktop</tt>, and will set default USE flags appropriate for your needs.<br />
;mix-ins: define various optional settings that you may be interested in enabling.<br />
<br />
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.<br />
<br />
Remember that profiles can often be inherited. For example, the <tt>desktop</tt> flavor inherits the <tt>workstation</tt> flavor settings, which in turn inherits the <tt>X</tt> and <tt>audio</tt> mix-ins. You can view this by using eselect:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile show<br />
Currently set profiles:<br />
arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit<br />
build: gentoo:funtoo/1.0/linux-gnu/build/current<br />
flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde<br />
<br />
Automatically enabled profiles:<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
<br />
<br />
</console><br />
<br />
To view installed profiles:<br />
<console><br />
(chroot) # ##i##eselect profile list<br />
</console><br />
<br />
To change the profile flavor:<br />
<console><br />
(chroot) # ##i##eselect profile set-flavor 7<br />
</console><br />
<br />
To add a mix-in:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile add 10<br />
</console><br />
<br />
=== Configuring and installing the Linux kernel ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== Package Sets ====<br />
<br />
Before we install a kernel, we're going to cover something about Portage, the Funtoo Linux package manager which will help us in our kernel installation efforts. Portage has a command called <tt>emerge</tt> which is used to build and install packages from source, and it takes care of installing all of the package's dependencies. You call emerge like this:<br />
<br />
<console><br />
(chroot) # ##i##emerge packagename<br />
</console><br />
<br />
All of the package's dependencies will be built from source, and installed, as well as the package itself.<br />
<br />
When you install a package by specifying its name on the command-line, Portage records its name in the <tt>/var/lib/portage/world</tt> file. It does this because it figures that because you've installed it by name, you want to consider it part of your system, and will want to keep the package updated in the future. This is a handy feature -- when packages are added to the ''world set'', we can update our entire system by typing:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
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 <tt>emerge</tt> to:<br />
<br />
* '''<tt>a</tt>''' - show us what will be emerged, and '''ask''' us if we want to proceed<br />
* '''<tt>u</tt>''' - ''update'' the packages we specify -- don't emerge them again if they are already emerged.<br />
* '''<tt>D</tt>''' - Consider the entire dependency tree of packages when looking for updates. In other words, do a '''deep''' update.<br />
* '''<tt>N</tt>''' - Update any packages who have changed ('''new''') USE settings.<br />
<br />
While this is a handy feature, most people don't want to be forced to update their kernel whenever they update all their system's packages. So we're going to create a new package set, called <tt>kernel</tt>, which contains our Linux kernel. When we want to update it, we'll type:<br />
<br />
<console><br />
(chroot) # ##i##emerge -u @kernel<br />
</console><br />
<br />
When we just want to update our system's packages, we'll type <tt>emerge -auDN @world</tt>, and it will update our world set, leaving out the kernel. Let's look at how to do this:<br />
<br />
==== Kernel Package Set ====<br />
<br />
{{Fancynote|1=<br />
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <tt>debian-sources</tt> for new users.}}<br />
<br />
{{fancyimportant|1=<br />
<tt>debian-sources</tt> with <tt>binary</tt> USE flag requires at least 14GB free in <tt>/var/tmp</tt> and takes around 1 hour to build on a Intel Core i7 Processor.}}<br />
<br />
To create the kernel package set, perform the following steps:<br />
<br />
<console><br />
(chroot) # ##i##mkdir /etc/portage/sets<br />
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel<br />
</console><br />
<br />
Now, we'll want to set a USE variable to tell <tt>debian-sources</tt> 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 <tt>binary</tt> USE variable for <tt>debian-sources</tt>, as follows:<br />
<br />
<console><br />
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use<br />
</console><br />
<br />
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 <tt>binary</tt> USE flag to the <tt>debian-sources</tt> 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.<br />
<br />
==== Building the Kernel ====<br />
<br />
Now, let's emerge our kernel:<br />
<br />
<console><br />
(chroot) # ##i##emerge @kernel<br />
</console><br />
<br />
Note that while use of the <tt>binary</tt> 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 <tt>MAKEOPTS</tt> in <tt>/etc/make.conf</tt> 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.<br />
<br />
{{fancynote|NVIDIA card users: the <tt>binary</tt> 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 <tt>/etc/modprobe.d/</tt>.}}<br />
<br />
{{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.}}<br />
<br />
Once <tt>emerge</tt> completes, you'll have a brand new kernel and initramfs installed to <tt>/boot</tt>, plus kernel headers installed in <tt>/usr/src/linux</tt>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.<br />
<br />
=== Installing a Bootloader ===<br />
<br />
==== Installing Grub ====<br />
<br />
The boot loader is responsible for loading the kernel from disk when your computer boots. For new installations, GRUB 2 and Funtoo's boot-update tool should be used as a boot loader. GRUB supports both GPT/GUID and legacy MBR partitioning schemes.<br />
<br />
To use this recommended boot method, first emerge <tt>boot-update</tt>. This will also cause <tt>grub-2</tt> to be merged, since it is a dependency of <tt>boot-update</tt>. (You may need to adjust <tt>GRUB_PLATFORMS</tt> if you are on a UEFI system. See [[UEFI Install Guide]]).<br />
<br />
<console><br />
(chroot) # ##i##emerge boot-update<br />
</console><br />
<br />
Then, edit <tt>/etc/boot.conf</tt> and specify "<tt>Funtoo Linux genkernel</tt>" as the <tt>default</tt> setting at the top of the file, replacing <tt>"Funtoo Linux"</tt>. <br />
<br />
<tt>/etc/boot.conf</tt> should now look like this:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
# if you use bliss-kernel package<br />
# you should change string<br />
# kernel kernel[-v]<br />
# to<br />
# kernel kernel/[-v]/kernel[-v]<br />
kernel kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
If you use bliss-kernel, your <tt>/etc/boot.conf</tt> should look like:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
kernel kernels/[-v]/kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
Please read <tt>man boot.conf</tt> for further details.<br />
<br />
===== Running grub-install and boot-update =====<br />
<br />
Finally, we will need to actually install the GRUB boot loader to your disk, and also run <tt>boot-update</tt> which will generate your boot loader configuration file:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --no-floppy /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
You only need to run <tt>grub-install</tt> when you first install Funtoo Linux, but you need to re-run <tt>boot-update</tt> every time you modify your <tt>/etc/boot.conf</tt> file, so your changes are applied on next boot.<br />
<br />
OK - your system should be ready to boot! Well, there are a few more loose ends...<br />
<br />
==== Installing Syslinux/Extlinux ====<br />
<br />
An alternate boot loader called extlinux can be used instead of GRUB if you desire. See the [[Extlinux|extlinux Guide]] for information on how to do this.<br />
<br />
=== Configuring your network ===<br />
<br />
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.<br />
<br />
==== Wi-Fi ====<br />
===== Using NetworkManager =====<br />
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:<br />
<br />
<console><br />
(chroot) # ##i##emerge linux-firmware<br />
(chroot) # ##i##emerge networkmanager<br />
(chroot) # ##i##rc-update add NetworkManager default<br />
</console><br />
<br />
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 <tt>default</tt> runlevel so it will start when Funtoo Linux boots.<br />
<br />
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:<br />
<br />
<console><br />
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork<br />
</console><br />
<br />
The <tt>addwifi</tt> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <tt>mywifinetwork</tt> with the password <tt>wifipassword</tt>. This network configuration entry is stored in <tt>/etc/NetworkManager/system-connections</tt> 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.<br />
<br />
===== Using wpa_supplicant =====<br />
If for some reason you don't want to use a tool such as NetworkManager or <tt>wicd</tt>, you can use wpa_supplicant for wireless network connections.<br />
<br />
First, emerge wpa_supplicant:<br />
<br />
<console><br />
(chroot) ###i## emerge -a wpa_supplicant<br />
</console><br />
<br />
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant.conf.<br />
The syntax is very easy:<br />
<pre><br />
network={<br />
ssid="MyWifiName"<br />
psk="lol42-wifi"<br />
}<br />
<br />
network={<br />
ssid="Other Network"<br />
psk="6d96270004515a0486bb7f76196a72b40c55a47f"<br />
}<br />
</pre><br />
<br />
You will need to add both <tt>wpa_supplicant</tt> and <tt>dhcpcd</tt> to the default runlevel. <tt>wpa_supplicant</tt> will connect to your access point, and <tt>dhcpcd</tt> will acquire an IP address via DHCP:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
(chroot) # ##i##rc-update add wpa_supplicant default<br />
</console><br />
<br />
==== Desktop (Wired Ethernet) ====<br />
<br />
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 <tt>dhcpcd</tt> to the default runlevel:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
</console><br />
<br />
When you reboot, <tt>dhcpcd</tt> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.<br />
<br />
==== Server (Static IP) ====<br />
<br />
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.<br />
<br />
=== Finishing Steps ===<br />
<br />
==== Set your root password ====<br />
It's imperative that you set your root password before rebooting so that you can log in.<br />
<console><br />
(chroot) # ##i##passwd<br />
</console><br />
<br />
===Restart your system ===<br />
<br />
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.<br />
<br />
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.<br />
<console><br />
(chroot) # ##i##exit<br />
# ##i##cd /mnt<br />
# ##i##umount -l funtoo<br />
# ##i##reboot<br />
</console><br />
<br />
{{fancynote|System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.}}<br />
<br />
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 <tt>login:</tt> prompt. Funtoo Linux has been successfully installed!<br />
<br />
===Next Steps===<br />
<br />
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 [[:Category:Official Documentation|official documentation]], which includes all docs that we officially maintain for installation and operation of Funtoo Linux.<br />
<br />
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.<br />
<br />
{{#ask: [[Category:First Steps]] | format=category }}<br />
<br />
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Install]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=Funtoo_Linux_Installation&diff=4974Funtoo Linux Installation2014-07-24T11:06:41Z<p>Dantrell: Referenced the LVM Install Guide.</p>
<hr />
<div>== Introduction == <br />
<br />
This document was written to help you install Funtoo Linux as concisely as possible, with a minimum number of distracting options regarding system configuration. <br />
<br />
These docs assume you have a "PC compatible" computer system with a standard PC BIOS. Many new computers support UEFI for booting, which is a new firmware interface that frequently replaces the older MBR-based BIOS. If you have a system with UEFI, you will want to use this documentation along with the [[UEFI Install Guide]], which will augment these instructions and explain how to get your system to boot. You may need to change your PC BIOS settings to enable or disable UEFI booting. The [[UEFI Install Guide]] has more information on this, and steps on how to determine if your system supports UEFI.<br />
<br />
We also offer a [[ZFS Install Guide]], which augment the instructions on this page for those who want to install Funtoo Linux on ZFS. If you are installing Funtoo Linux on [[Funtoo Linux Installation on ARM|ARM]] architecture, please see [[Funtoo Linux Installation on ARM]] for notable differences regarding ARM support. An experimental Funtoo Linux build also exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]].<br />
<br />
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.<br />
<br />
== Installation Overview ==<br />
<br />
This is a basic overview of the Funtoo installation process:<br />
<br />
# [[#Live CD|Download and boot the live CD of your choice]].<br />
# [[#Prepare Hard Disk|Prepare your disk]].<br />
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.<br />
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.<br />
# [[#Chroot into Funtoo|Chroot into your new system]].<br />
# [[#Downloading the Portage tree|Download the Portage tree]].<br />
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].<br />
# [[#Configuring and installing the Linux kernel|Install a kernel]].<br />
# [[#Installing a Bootloader|Install a bootloader]].<br />
# [[#Finishing Steps|Complete final steps]].<br />
# [[#Restart your system|Reboot and enjoy]].<br />
<br />
=== Live CD ===<br />
<br />
Funtoo doesn't provide an "official" Funtoo Live CD, but there are plenty of good ones out there to choose from. A great choice is the Gentoo-based [http://www.sysresccd.org/ System Rescue CD] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.<br />
<br />
It is also possible to install Funtoo Linux using many other Linux-based live CDs. Generally, any modern bootable Linux live CD or live USB media will work. See [[Requirements|requirements]] for an overview of what the Live Media must provide to allow a problem-free install of Funtoo Linux.<br />
<br />
To begin a Funtoo Linux installation, download System Rescue CD from:<br />
<br />
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/ The Oregon State University Open Source Lab]<br />
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysresccd/ HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of System Rescue CD, '''be sure to select the <tt>rescue64</tt> 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.<br />
<br />
=== Prepare Hard Disk ===<br />
==== Partitions ====<br />
<br />
Funtoo Linux fully supports traditional MBR partitions, as well as newer GPT/GUID partition formats. See below to determine which partitioning scheme to use:<br />
<br />
===== MBR Partitions =====<br />
<br />
* '''Recommended if your system disk is <=2TB in size'''<br />
* Legacy, DOS partitioning scheme<br />
* Only 4 primary partitions per disk; after that, you must use "logical" partitions<br />
* Does not support 2 TB+ disks for booting<br />
* Compatible with certain problematic systems (such as the HP ProBook 4520)<br />
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)<br />
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo<br />
<br />
{{fancynote|Due to the fact that it is more widely supported on PC hardware, it is best to use MBR partitions if possible.}}<br />
<br />
===== GPT Partitions =====<br />
<br />
* '''Recommended if your disk is >2TB in size'''<br />
* Newer format for Linux systems<br />
* Supports 2 TB+ hard drives for booting<br />
* Supports hundreds of partitions per disk of any size<br />
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI<br />
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy<br />
<br />
{{fancyimportant|If you have a system disk that is 2TB or greater and want to use the space beyond 2TB, you ''must'' partition using the GPT/GUID format. Otherwise, MBR is recommended as the most reliable boot method.}}<br />
<br />
===== Filesystem Resources =====<br />
<br />
Advanced users may be interested in the following topics:<br />
<br />
* [[GUID Booting Guide]]<br />
* [[LVM Install Guide]]<br />
* [[Rootfs over encrypted lvm]]<br />
* [[Rootfs over encrypted lvm over raid-1 on GPT]]<br />
* '''NEW!''' '''[[ZFS Install Guide]] (Also contains instructions for Rootfs over Encrypted ZFS!)'''<br />
<br />
===== Partitioning Recommendations =====<br />
<br />
Below are our partitioning recommendations in table form. For MBR-based partitions, use the MBR Block Device and MBR code columns with <tt>fdisk</tt>. For GPT-based partitions, use the GPT Block Device and GPT Code columns with <tt>gdisk</tt>:<br />
<br />
{| {{table}} <br />
!Partition<br />
!Size<br />
!MBR Block Device (<tt>fdisk</tt>)<br />
!GPT Block Device (<tt>gdisk</tt>)<br />
!Filesystem<br />
!MBR Code<br />
!GPT Code<br />
|-<br />
|<tt>/boot</tt><br />
|500 MB<br />
|<tt>/dev/sda1</tt><br />
|<tt>/dev/sda1</tt><br />
|ext2<br />
|83<br />
|8300<br />
|-<br />
|GRUB boot loader partition<br />
|1 MB<br />
| ''not required for MBR''<br />
|<tt>/dev/sda2</tt><br />
|For GPT/GUID only, skip for MBR - no filesystem.<br />
|''N/A''<br />
|EF02<br />
|-<br />
|swap<br />
|2x RAM for low-memory systems and production servers; otherwise 2GB.<br />
|<tt>/dev/sda2</tt><br />
|<tt>/dev/sda3</tt><br />
|swap (default)<br />
|82<br />
|8200<br />
|-<br />
|<tt>/</tt> (root)<br />
|Rest of the disk, minimum of 10GB.<br />
|<tt>/dev/sda3</tt><br />
|<tt>/dev/sda4</tt><br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
|<tt>/home</tt> (optional) <br />
|User storage and media. Typically most of the disk.<br />
|<tt>/dev/sda4</tt> (if created)<br />
|<tt>/dev/sda5</tt> (if created)<br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
| LVM (optional)<br />
| If you want to create an LVM volume.<br />
| <tt>/dev/sda4</tt> (PV, if created)<br />
| <tt>/dev/sda5</tt> (PV, if created)<br />
| LVM PV<br />
| 8E<br />
| 8E00<br />
|}<br />
<br />
===== Partitioning Using fdisk (MBR) =====<br />
<br />
<code>fdisk</code> is the tool used to create an MBR partition table. MBR is well-supported on PCs and is recommended if your system disk is 2TB or smaller.<br />
<br />
{{fancyimportant|If you need to create a GPT partition table, see [[Partitioning using gdisk]].}}<br />
<br />
====== Preparation ======<br />
<br />
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 <code>/dev/sda</code> is the disk that you want to partition:<br />
<br />
<console><br />
# ##i##fdisk -l /dev/sda<br />
<br />
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk label type: gpt<br />
<br />
<br />
# Start End Size Type Name<br />
1 2048 1250263694 596.2G Linux filesyste Linux filesystem<br />
</console><br />
<br />
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 <code>sgdisk</code>:<br />
<br />
<console><br />
# ##i##sgdisk --zap-all /dev/sda<br />
<br />
Creating new GPT entries.<br />
GPT data structures destroyed! You may now partition the disk using fdisk or<br />
other utilities.<br />
</console><br />
<br />
This output is also nothing to worry about, as the command still succeded:<br />
<br />
<console><br />
***************************************************************<br />
Found invalid GPT and valid MBR; converting MBR to GPT format<br />
in memory. <br />
***************************************************************<br />
</console><br />
<br />
====== Partitioning ======<br />
<br />
Now we will use <code>fdisk</code> to create the MBR partition table and partitions:<br />
<br />
<console><br />
# ##i##fdisk /dev/sda<br />
</console><br />
<br />
Within <code>fdisk</code>, follow these steps:<br />
<br />
'''Empty the partition table''':<br />
<br />
<console><br />
Command (m for help): ##i##o ↵<br />
</console><br />
<br />
'''Create Partition 1''' (boot):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+128M ↵<br />
</console><br />
<br />
'''Create Partition 2''' (swap):<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (2,3,4, default 2): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+32G ↵<br />
Command (m for help): ##i##t ↵ <br />
Partition number (1,2, default 2): ##i##2 ↵<br />
Hex code (type L to list all codes): ##i##82 ↵<br />
</console><br />
<br />
'''Create the root partition:'''<br />
<br />
<console><br />
Command (m for help): ##i##n ↵<br />
Partition type (default p): ##i##↵<br />
Partition number (3,4, default 3): ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##↵<br />
</console><br />
<br />
'''Verify the partition table:'''<br />
<br />
<console><br />
Command (m for help): ##i##p<br />
<br />
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0xac67d8f6<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 264191 131072 83 Linux<br />
/dev/sda2 264192 67373055 33554432 82 Linux swap / Solaris<br />
/dev/sda3 67373056 1250263727 591445336 83 Linux<br />
</console><br />
<br />
'''Write the parition table to disk:'''<br />
<br />
<console><br />
Command (m for help): ##i##w<br />
</console><br />
<br />
Your new MBR partition table will now be written to your system disk.<br />
<br />
===== Notes Before We Begin =====<br />
<br />
These install instructions assume you are installing Funtoo Linux to an hard disk using Master Boot Record partition tables (MBR). If you are installing Funtoo Linux on a machine where another OS is installed, or there is an existing Linux distribution on your system that you want to keep, then you will need to adapt these instructions to suit your needs.<br />
<br />
==== Creating filesystems ====<br />
<br />
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.<br />
<br />
You will not create a filesystem on your swap partition, but will initialize it using the <tt>mkswap</tt> command so that it can be used as disk-based virtual memory. Then we'll run the <tt>swapon</tt> command to make your newly-initialized swap space active within the live CD environment, in case it is needed during the rest of the install process.<br />
<br />
Note that we will not create a filesystem on the GRUB boot loader partition, as GRUB writes binary data directly to that partition when the boot loader is installed, which we'll do later.<br />
<br />
You can see the commands you will need to type below. Like the rest of this document, it assumes that you are using a GPT partitioning scheme. If you are using MBR, your root filesystem will likely be created on <tt>/dev/sda3</tt> instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:<br />
<br />
'''We generally recommend XFS for root filesystems, although ext4 is also a good choice.''' This tutorial assumes the use of XFS. If you want to use ext4, then be sure that your <tt>/etc/fstab</tt> file reflects this.<br />
<br />
{{fancywarning|1=<br />
Please use ext4 exclusively when deploying an OpenVZ host. The Parallels development team tests extensively with ext4, and modern versions of <tt>openvz-rhel6-stable</tt> are '''not''' compatible with XFS, and you may experience kernel bugs.<br />
}}<br />
<br />
'''To use ext4 as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.ext4 /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
'''To use XFS as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.xfs /dev/sda3<br />
# ##i##mkswap /dev/sda2<br />
# ##i##swapon /dev/sda2<br />
</console><br />
<br />
==== Mounting filesystems ====<br />
<br />
Mount the newly-created filesystems as follows, creating <tt>/mnt/funtoo</tt> as the installation mount point:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/sda3 /mnt/funtoo<br />
# ##i##mkdir /mnt/funtoo/boot<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
</console><br />
<br />
Optionally, if you have a separate filesystem for <tt>/home</tt> or anything else:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo/home<br />
# ##i##mount /dev/sda4 /mnt/funtoo/home<br />
</console><br />
<br />
If you have <tt>/tmp</tt> or <tt>/var/tmp</tt> on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:<br />
<br />
<console><br />
# ##i##chmod 1777 /mnt/funtoo/tmp<br />
</console><br />
<br />
=== Installing the Stage 3 tarball ===<br />
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:<br />
* http://ftp.osuosl.org/pub/funtoo - main Funtoo Linux Mirror<br />
* http://ftp.heanet.ie/mirrors/funtoo -European Funtoo Linux mirror<br />
Now, let's navigate the directories on the mirrors to find the appropriate build of Funtoo Linux for you.<br />
<br />
==== Stable or Current? ====<br />
Funtoo Linux has a "stable" build and a "current" build. Most people use the "current" build of Funtoo Linux, and it's generally recommended that you do too. You will find "current' builds in the main <code>/funtoo-current</code> directory on our mirrors, and "stable" builds in <code>/funtoo-stable</code>.<br />
<br />If you want to read more about this, have a look at [[Funtoo_Linux#What_are_the_differences_between_.27stable.27.2C_.27current.27_and_.27experimental.27_.3F|Differences between stable, current and experimental]].<br />
<br />
==== 32 or 64-bit? ====<br />
There are three different types of Funtoo Linux that you can install. If you are installing on an older 32-bit system (if you don't know, then you probably are not) then you want to grab a stage3 tarball from the <code>x86-32bit</code> sub-directory. Most likely, you'll want to grab a 64-bit build from the <code>x86-64bit</code> sub-directory.<br />
<br />
==== Your SubArch ====<br />
Inside <code>/funtoo-current/x86-64bit/</code> on one of our mirrors, you'll see a bunch of directories for various ''subarches'' of Funtoo Linux.<br />
<br />
Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They take advantage of the instruction sets available for each CPU. <br />
<br />
For example, the <code>corei7</code> and <code>corei7-pure64</code> sub-arches require an Intel Core i7 processor to run (this includes Xeon x3400+ series, or other Nehalem-based CPUs such as Xeon x5500/x5600 series.)<br />
<br />
If you are using an AMD-based CPU, download a stage3 from <code>generic_64</code>, <code>amd64-k8</code> or <code>amd64-k10</code>. <br />
<br />
If you are using an Intel-based CPU, download a stage3 from <code>generic_64</code>, <code>atom_64</code>, <code>core2_64</code> or <code>corei7</code>.<br />
<br />
===== Pure64 Builds =====<br />
Inside <code>x86-64bit</code>, you may notice a sub-directory named <code>pure64</code>. These builds are recommended for server systems, and they do not offer any 32-bit compatibility, which is generally not needed on server systems. If you are setting up a desktop or workstation system, it's recommended that you avoid these builds as you will need 32-bit compatibility to run several binary desktop-oriented applications such as Skype. But for servers, pure64 is recommended.<br />
<br />
==== Setting the Date ====<br />
<br />
{{fancyimportant|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.}}<br />
<br />
Now is a good time to verify the date and time are correctly set to UTC. Use the <tt>date</tt> command to verify the date and time:<br />
<br />
<console><br />
# ##i##date<br />
Fri Jul 15 19:47:18 UTC 2011<br />
</console><br />
<br />
If the date and/or time need to be corrected, do so using <tt>date MMDDhhmmYYYY</tt>, keeping in mind <tt>hhmm</tt> are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:<br />
<br />
<console><br />
# ##i##date 071620002011<br />
Fri Jul 16 20:00:00 UTC 2011<br />
</console><br />
<br />
==== Download the Stage3 ====<br />
Once you are in your Funtoo Linux root filesystem, use <tt>wget</tt> 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 <tt>/mnt/funtoo</tt> directory as follows:<br />
<br />
<console># ##i##cd /mnt/funtoo<br />
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz<br />
</console><br />
<br />
<br />
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 <tt>generic_64</tt> or <tt>generic_32</tt> stage. Consult the [[Download]] page for more information.<br />
<br />
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:<br />
<console><br />
# ##i##tar xpf stage3-latest.tar.xz<br />
</console><br />
<br />
{{fancyimportant|It is very important to use <tt>tar</tt>'s "<tt>p</tt>" option when extracting the Stage 3 tarball - it tells <tt>tar</tt> to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}<br />
<br />
=== Chroot into Funtoo ===<br />
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:<br />
<console><br />
# ##i##cd /mnt/funtoo<br />
# ##i##mount -t proc none proc<br />
# ##i##mount --rbind /sys sys<br />
# ##i##mount --rbind /dev dev<br />
</console><br />
<br />
You'll also want to copy over <tt>resolv.conf</tt> in order to have proper DNS name resolution from inside the chroot:<br />
<console><br />
# ##i##cp /etc/resolv.conf etc<br />
</console><br />
<br />
Now you can chroot into your new system. Use <tt>env</tt> before <tt>chroot</tt> to ensure that no environment variables from the installation media are used by your new system:<br />
<br />
<console><br />
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l<br />
</console><br />
<br />
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <tt>uname -r</tt> 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.}}<br />
{{fancyimportant|If you receive the error "<tt>chroot: failed to run command `/bin/bash': Exec format error</tt>", 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.}}<br />
<br />
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:<br />
<console><br />
# ##i##export PS1="(chroot) $PS1"<br />
</console><br />
<br />
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.<br />
<br />
=== Downloading the Portage tree ===<br />
<br />
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}<br />
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 <tt>emerge --sync</tt> from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
</console><br />
<br />
{{fancyimportant|If you receive the error with initial <tt>emerge --sync</tt> due to git protocol restrictions, change <tt>SYNC</tt> variable in <tt>/etc/make.conf</tt>}}<br />
<pre><br />
SYNC="https://github.com/funtoo/ports-2012.git"<br />
</pre><br />
<br />
=== Configuring your system ===<br />
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 <tt>/etc/fstab</tt>. The others are optional. Here are a list of files that you should consider editing:<br />
<br />
{| {{table}}<br />
!File<br />
!Do I need to change it?<br />
!Description<br />
|-<br />
|<tt>/etc/fstab</tt><br />
|'''YES - required'''<br />
|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.<br />
|-<br />
|<tt>/etc/localtime</tt><br />
|''Maybe - recommended''<br />
|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) <br />
|-<br />
|<tt>/etc/make.conf</tt> (symlink) - also known as:<br/><tt>/etc/portage/make.conf</tt><br />
|''Maybe - recommended''<br />
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.<br />
|-<br />
|<tt>/etc/conf.d/hostname</tt><br />
|''Maybe - recommended''<br />
|Used to set system hostname. Set the <tt>hostname</tt> variable to the fully-qualified (with dots, ie. <tt>foo.funtoo.org</tt>) name if you have one. Otherwise, set to the local system hostname (without dots, ie. <tt>foo</tt>). Defaults to <tt>localhost</tt> if not set.<br />
|-<br />
|<tt>/etc/hosts</tt><br />
|''No''<br />
| You no longer need to manually set the hostname in this file. This file is automatically generated by <tt>/etc/init.d/hostname</tt>.<br />
|-<br />
|<tt>/etc/conf.d/keymaps</tt><br />
|Optional<br />
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].<br />
|-<br />
|<tt>/etc/conf.d/hwclock</tt><br />
|Optional<br />
|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.<br />
|-<br />
|<tt>/etc/conf.d/modules</tt><br />
|Optional<br />
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.<br />
|-<br />
|<tt>profiles</tt><br />
|Optional<br />
|Some useful portage settings that may help speed up intial configuration.<br />
|}<br />
<br />
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 portal|Community]])<br />
<br />
Let's go ahead and see what we have to do. Use <tt>nano -w <name_of_file></tt> to edit files -- the "<tt>-w</tt>" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.<br />
<br />
{{fancywarning|It's important to edit your <tt>/etc/fstab</tt> 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 <tt>gdisk</tt> or <tt>fdisk</tt>. Skipping this step may prevent Funtoo Linux from booting successfully.}}<br />
<br />
==== /etc/fstab ====<br />
<br />
<tt>/etc/fstab</tt> is used by the <tt>mount</tt> command which is ran when your system boots. Statements of this file inform <tt>mount</tt> about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit <tt>/etc/fstab</tt> and ensure that it reflects the partition configuration you used earlier:<br />
<br />
<console><br />
(chroot) # ##i##nano -w /etc/fstab<br />
</console><br />
<br />
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type "<tt>Y</tt>" when asked if you want to save the modified buffer, or hit Control-O before closing <tt>nano</tt>. Otherwise your changes will be discarded.<br />
<br />
<pre><br />
# The root filesystem should have a pass number of either 0 or 1.<br />
# All other filesystems should have a pass number of 0 or greater than 1.<br />
#<br />
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.<br />
#<br />
# See the manpage fstab(5) for more information.<br />
#<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
<br />
/dev/sda1 /boot ext2 noatime 1 2<br />
/dev/sda2 none swap sw 0 0<br />
/dev/sda3 / ext4 noatime 0 1<br />
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0<br />
</pre><br />
<br />
==== /etc/localtime ====<br />
<br />
<tt>/etc/localtime</tt> 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 <tt>/etc/localtime</tt> with a symbolic link to the timezone that you wish to use. <br />
<br />
<console><br />
(chroot) # ##i##ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime<br />
</console><br />
<br />
The above sets the timezone to Mountain Standard Time (with daylight savings). Type <tt>ls /usr/share/zoneinfo</tt> to see what timezones are available. There are also sub-directories containing timezones described by location.<br />
<br />
==== /etc/make.conf ====<br />
<br />
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:<br />
<br />
<pre><br />
MAKEOPTS="-j3" <br />
</pre><br />
<br />
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.<br />
<console><br />
(chroot) # ##i##grep "processor" /proc/cpuinfo | wc -l<br />
16<br />
</console><br />
<br />
Set MAKEOPTS to this number plus one:<br />
<br />
<pre><br />
MAKEOPTS="-j17"<br />
</pre><br />
<br />
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 ("<tt>-</tt>") 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].<br />
<br />
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:<br />
<br />
<pre><br />
LINGUAS="fr"<br />
</pre><br />
<br />
==== /etc/conf.d/hwclock ====<br />
If you dual-boot with Windows, you'll need to edit this file and change '''clock''' 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.<br />
<console><br />
(chroot) # ##i##nano -w /etc/conf.d/hwclock<br />
</console><br />
<br />
==== Localization ====<br />
<br />
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]].<br />
<br />
==== Profiles ====<br />
<br />
[[Funtoo 1.0 Profile|Funtoo profiles]] are used to define defaults for Portage specific to your needs. There are 4 basic profile types: arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:<br />
<br />
;arch: typically <tt>x86-32bit</tt> or <tt>x86-64bit</tt>, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.<br />
;build: defines whether your system is a <tt>current</tt>, <tt>stable</tt> or <tt>experimental</tt> build. <tt>current</tt> systems will have newer packages unmasked than <tt>stable</tt> systems.<br />
;flavor: defines the general type of system, such as <tt>server</tt> or <tt>desktop</tt>, and will set default USE flags appropriate for your needs.<br />
;mix-ins: define various optional settings that you may be interested in enabling.<br />
<br />
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.<br />
<br />
Remember that profiles can often be inherited. For example, the <tt>desktop</tt> flavor inherits the <tt>workstation</tt> flavor settings, which in turn inherits the <tt>X</tt> and <tt>audio</tt> mix-ins. You can view this by using eselect:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile show<br />
Currently set profiles:<br />
arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit<br />
build: gentoo:funtoo/1.0/linux-gnu/build/current<br />
flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde<br />
<br />
Automatically enabled profiles:<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
<br />
<br />
</console><br />
<br />
To view installed profiles:<br />
<console><br />
(chroot) # ##i##eselect profile list<br />
</console><br />
<br />
To change the profile flavor:<br />
<console><br />
(chroot) # ##i##eselect profile set-flavor 7<br />
</console><br />
<br />
To add a mix-in:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile add 10<br />
</console><br />
<br />
=== Configuring and installing the Linux kernel ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== Package Sets ====<br />
<br />
Before we install a kernel, we're going to cover something about Portage, the Funtoo Linux package manager which will help us in our kernel installation efforts. Portage has a command called <tt>emerge</tt> which is used to build and install packages from source, and it takes care of installing all of the package's dependencies. You call emerge like this:<br />
<br />
<console><br />
(chroot) # ##i##emerge packagename<br />
</console><br />
<br />
All of the package's dependencies will be built from source, and installed, as well as the package itself.<br />
<br />
When you install a package by specifying its name on the command-line, Portage records its name in the <tt>/var/lib/portage/world</tt> file. It does this because it figures that because you've installed it by name, you want to consider it part of your system, and will want to keep the package updated in the future. This is a handy feature -- when packages are added to the ''world set'', we can update our entire system by typing:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
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 <tt>emerge</tt> to:<br />
<br />
* '''<tt>a</tt>''' - show us what will be emerged, and '''ask''' us if we want to proceed<br />
* '''<tt>u</tt>''' - ''update'' the packages we specify -- don't emerge them again if they are already emerged.<br />
* '''<tt>D</tt>''' - Consider the entire dependency tree of packages when looking for updates. In other words, do a '''deep''' update.<br />
* '''<tt>N</tt>''' - Update any packages who have changed ('''new''') USE settings.<br />
<br />
While this is a handy feature, most people don't want to be forced to update their kernel whenever they update all their system's packages. So we're going to create a new package set, called <tt>kernel</tt>, which contains our Linux kernel. When we want to update it, we'll type:<br />
<br />
<console><br />
(chroot) # ##i##emerge -u @kernel<br />
</console><br />
<br />
When we just want to update our system's packages, we'll type <tt>emerge -auDN @world</tt>, and it will update our world set, leaving out the kernel. Let's look at how to do this:<br />
<br />
==== Kernel Package Set ====<br />
<br />
To create the kernel package set, perform the following steps:<br />
<br />
<console><br />
(chroot) # ##i##mkdir /etc/portage/sets<br />
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel<br />
</console><br />
<br />
Now, we'll want to set a USE variable to tell <tt>debian-sources</tt> 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 <tt>binary</tt> USE variable for <tt>debian-sources</tt>, as follows:<br />
<br />
<console><br />
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use<br />
</console><br />
<br />
{{Fancynote|1=<br />
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <tt>debian-sources</tt> for new users.}}<br />
<br />
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 <tt>binary</tt> USE flag to the <tt>debian-sources</tt> 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.<br />
<br />
==== Building the Kernel ====<br />
<br />
Now, let's emerge our kernel:<br />
<br />
<console><br />
(chroot) # ##i##emerge @kernel<br />
</console><br />
<br />
Note that while use of the <tt>binary</tt> 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 <tt>MAKEOPTS</tt> in <tt>/etc/make.conf</tt> 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.<br />
<br />
{{fancyimportant|1=<br />
<tt>debian-sources</tt> with <tt>binary</tt> USE flag requires at least 12GB free in <tt>/var/tmp</tt>.}}<br />
<br />
{{fancynote|NVIDIA card users: the <tt>binary</tt> 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 <tt>/etc/modprobe.d/</tt>.}}<br />
<br />
{{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.}}<br />
<br />
Once <tt>emerge</tt> completes, you'll have a brand new kernel and initramfs installed to <tt>/boot</tt>, plus kernel headers installed in <tt>/usr/src/linux</tt>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.<br />
<br />
=== Installing a Bootloader ===<br />
<br />
==== Installing Grub ====<br />
<br />
The boot loader is responsible for loading the kernel from disk when your computer boots. For new installations, GRUB 2 and Funtoo's boot-update tool should be used as a boot loader. GRUB supports both GPT/GUID and legacy MBR partitioning schemes.<br />
<br />
To use this recommended boot method, first emerge <tt>boot-update</tt>. This will also cause <tt>grub-2</tt> to be merged, since it is a dependency of <tt>boot-update</tt>. (You may need to adjust <tt>GRUB_PLATFORMS</tt> if you are on a UEFI system. See [[UEFI Install Guide]]).<br />
<br />
<console><br />
(chroot) # ##i##emerge boot-update<br />
</console><br />
<br />
Then, edit <tt>/etc/boot.conf</tt> and specify "<tt>Funtoo Linux genkernel</tt>" as the <tt>default</tt> setting at the top of the file, replacing <tt>"Funtoo Linux"</tt>. <br />
<br />
<tt>/etc/boot.conf</tt> should now look like this:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
# if you use bliss-kernel package<br />
# you should change string<br />
# kernel kernel[-v]<br />
# to<br />
# kernel kernel/[-v]/kernel[-v]<br />
kernel kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
If you use bliss-kernel, your <tt>/etc/boot.conf</tt> should look like:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
kernel kernels/[-v]/kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
Please read <tt>man boot.conf</tt> for further details.<br />
<br />
===== Running grub-install and boot-update =====<br />
<br />
Finally, we will need to actually install the GRUB boot loader to your disk, and also run <tt>boot-update</tt> which will generate your boot loader configuration file:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --no-floppy /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
You only need to run <tt>grub-install</tt> when you first install Funtoo Linux, but you need to re-run <tt>boot-update</tt> every time you modify your <tt>/etc/boot.conf</tt> file, so your changes are applied on next boot.<br />
<br />
OK - your system should be ready to boot! Well, there are a few more loose ends...<br />
<br />
==== Installing Syslinux/Extlinux ====<br />
<br />
An alternate boot loader called extlinux can be used instead of GRUB if you desire. See the [[Extlinux|extlinux Guide]] for information on how to do this.<br />
<br />
=== Configuring your network ===<br />
<br />
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.<br />
<br />
==== Wi-Fi ====<br />
===== Using NetworkManager =====<br />
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:<br />
<br />
<console><br />
(chroot) # ##i##emerge linux-firmware<br />
(chroot) # ##i##emerge networkmanager<br />
(chroot) # ##i##rc-update add NetworkManager default<br />
</console><br />
<br />
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 <tt>default</tt> runlevel so it will start when Funtoo Linux boots.<br />
<br />
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:<br />
<br />
<console><br />
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork<br />
</console><br />
<br />
The <tt>addwifi</tt> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <tt>mywifinetwork</tt> with the password <tt>wifipassword</tt>. This network configuration entry is stored in <tt>/etc/NetworkManager/system-connections</tt> 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.<br />
<br />
===== Using wpa_supplicant =====<br />
If for some reason you don't want to use a tool such as NetworkManager or <tt>wicd</tt>, you can use wpa_supplicant for wireless network connections.<br />
<br />
First, emerge wpa_supplicant:<br />
<br />
<console><br />
(chroot) ###i## emerge -a wpa_supplicant<br />
</console><br />
<br />
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant.conf.<br />
The syntax is very easy:<br />
<pre><br />
network={<br />
ssid="MyWifiName"<br />
psk="lol42-wifi"<br />
}<br />
<br />
network={<br />
ssid="Other Network"<br />
psk="6d96270004515a0486bb7f76196a72b40c55a47f"<br />
}<br />
</pre><br />
<br />
You will need to add both <tt>wpa_supplicant</tt> and <tt>dhcpcd</tt> to the default runlevel. <tt>wpa_supplicant</tt> will connect to your access point, and <tt>dhcpcd</tt> will acquire an IP address via DHCP:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
(chroot) # ##i##rc-update add wpa_supplicant default<br />
</console><br />
<br />
==== Desktop (Wired Ethernet) ====<br />
<br />
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 <tt>dhcpcd</tt> to the default runlevel:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
</console><br />
<br />
When you reboot, <tt>dhcpcd</tt> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.<br />
<br />
==== Server (Static IP) ====<br />
<br />
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.<br />
<br />
=== Finishing Steps ===<br />
<br />
==== Set your root password ====<br />
It's imperative that you set your root password before rebooting so that you can log in.<br />
<console><br />
(chroot) # ##i##passwd<br />
</console><br />
<br />
===Restart your system ===<br />
<br />
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.<br />
<br />
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.<br />
<console><br />
(chroot) # ##i##exit<br />
# ##i##cd /mnt<br />
# ##i##umount -l funtoo<br />
# ##i##reboot<br />
</console><br />
<br />
{{fancynote|System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.}}<br />
<br />
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 <tt>login:</tt> prompt. Funtoo Linux has been successfully installed!<br />
<br />
===Next Steps===<br />
<br />
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 [[:Category:Official Documentation|official documentation]], which includes all docs that we officially maintain for installation and operation of Funtoo Linux.<br />
<br />
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.<br />
<br />
{{#ask: [[Category:First Steps]] | format=category }}<br />
<br />
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Install]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=LVM_Install_Guide&diff=4973LVM Install Guide2014-07-24T11:05:12Z<p>Dantrell: Added more information.</p>
<hr />
<div>== Introduction ==<br />
<br />
{{fancynote|This tutorial will show you how to install Funtoo, including the rootfs, on logical volumes. This guide is meant to complement the regular [[Funtoo_Linux_Installation|Funtoo Installation Guide]]. It is recommended that you open it in another tab/window and follow along with it as we will only be documenting the steps that are different or in addition to the regular guide.}}<br />
<br />
LVM (Logical Volume Management) offers a much more flexible way of managing your storage devices. Not only does it allow you to resize your volumes <br />
<br />
== Live CD ==<br />
<br />
Please read the [[Funtoo Linux Installation#Live CD|Live CD]] section in the regular guide. The only thing you need in addition to the [[Requirements|requirements]] it mentions is the sys-fs/lvm2 package or equivalent. If you use [http://www.sysresccd.org/ System Rescue CD], it includes the lvm2 package.<br />
<br />
== Prepare the drives and partitions ==<br />
<br />
{{fancynote|For this guide, we are assuming you are using MBR, that you have a /dev/sda1 (a boot drive) and /dev/sdb1 (a system drive), and that you are only using LVM with one drive, even though LVM supports adding multiple hard disks and partitions to a volume group. Please adapt these instructions to suit your needs.}}<br />
<br />
Preparing the hard disk for an LVM install isn't much different from a normal install except that we won't be creating a bunch of partitions as we are going to use logical volumes instead.<br />
<br />
Find the disk:<br />
<br />
<console><br />
# fdisk -l<br />
</console><br />
<br />
Verify the disk:<br />
<br />
<console><br />
# fdisk -l /dev/sdb<br />
</console><br />
<br />
Zap the disk:<br />
<br />
<console><br />
# sgdisk --zap-all /dev/sdb<br />
</console><br />
<br />
Create the partition table:<br />
<br />
{{fancynote|If you are using MBR, review paritioning [[Funtoo_Linux_Installation#Partitioning_Using_fdisk_.28MBR.29|Partitioning Using fdisk]] and if you are using GPT, review [[Partitioning using gdisk]]. The basic idea is to create what ncessary and then allocate the rest for LVM.}}<br />
<br />
For MBR, this is the boot partition (if you want it on the system drive), every else goes to LVM like so:<br />
<br />
<console><br />
# fdisk /dev/sdb<br />
</console><br />
<br />
<pre><br />
Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0xaa6abfe1<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 2048 264191 131072 83 Linux<br />
/dev/sdb2 264192 1250263727 624999768 83 Linux<br />
</pre><br />
<br />
For GPT, this is the BIOS boot partion and the boot partition (if you want them on the system drive), every else goes to LVM like so:<br />
<br />
<console><br />
# gdisk /dev/sdb<br />
</console><br />
<br />
<pre><br />
Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0x6ba8799c<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sdb1 2048 6143 2048 ef EFI (FAT-12/16/32)<br />
/dev/sdb2 6144 268287 131072 83 Linux<br />
/dev/sdb3 268288 1250263727 624997720 83 Linux<br />
</pre><br />
<br />
You'll notice in both cases that a swap partition wasn't created. This is becasue if one is desired, it can be done in LVM.<br />
<br />
Create the physical volume:<br />
<br />
{{fancynote|As a remindiner, for this guide, we are assuming you are using MBR, that you have a /dev/sda1 (a boot drive) and /dev/sdb1 (a system drive), and that you are only using LVM with one drive. Change this to suit your purposes.}}<br />
<br />
Our first step is to create a physical volume which basically just tells the lvm where to write the data to.<br />
<br />
<console><br />
# pvcreate -f -f /dev/sdb1<br />
</console><br />
<br />
<pre><br />
Physical volume "/dev/sdb1" successfully created<br />
</pre><br />
<br />
Display the physical volume:<br />
<br />
<console><br />
# pvdisplay<br />
</console><br />
<br />
<pre><br />
"/dev/sdb1" is a new physical volume of "596.17 GiB"<br />
--- NEW Physical volume ---<br />
PV Name /dev/sdb1<br />
VG Name <br />
PV Size 596.17 GiB<br />
Allocatable NO<br />
PE Size 0 <br />
Total PE 0<br />
Free PE 0<br />
Allocated PE 0<br />
PV UUID IDDrWr-t3PD-7t31-fRQ3-pay2-eMGy-1NgrD0<br />
</pre><br />
<br />
Create the volume group:<br />
<br />
Now that we have a place to store our data we need to create a volume group for it. A volume group is simply a named group of at least one physical volume. This allows multiple physical volumes to be used to store data. In our simple example we only have one physical volume so we'll create a volume group and add our physical volume to it in one command. We are going to call our volume group "funtoo" but you can name it anything you want. <br />
<br />
<console><br />
# vgcreate funtoo /dev/sdb1<br />
</console><br />
<br />
<pre><br />
Volume group "funtoo" successfully created<br />
</pre><br />
<br />
Display the volume group:<br />
<br />
<console><br />
# vgdisplay<br />
</console><br />
<br />
<pre><br />
--- Volume group ---<br />
VG Name funtoo<br />
System ID <br />
Format lvm2<br />
Metadata Areas 1<br />
Metadata Sequence No 1<br />
VG Access read/write<br />
VG Status resizable<br />
MAX LV 0<br />
Cur LV 0<br />
Open LV 0<br />
Max PV 0<br />
Cur PV 1<br />
Act PV 1<br />
VG Size 596.17 GiB<br />
PE Size 4.00 MiB<br />
Total PE 152619<br />
Alloc PE / Size 0 / 0 <br />
Free PE / Size 152619 / 596.17 GiB<br />
VG UUID jFubWA-SGaa-w3C7-Zrst-9Hqo-mWPZ-9JqYZ4<br />
</pre><br />
<br />
Create the logical volumes:<br />
<br />
We now come to the heart of using LVM, logical volumes. Here we get to create logical volumes to store our data. Remember that the best part of LVM is the ability to resize volumes later on the fly so keep that in mind when deciding how big to make volumes. No need to allocate all your space right away. Also keep in mind when choosing a file system type that it must support resizing in order to take advantage of LVM's resizing features.<br />
<br />
For our simple example we are only going to create 4 logical volumes and use them for: (SWAP) /(ROOT), /home/my and /home/my/media.<br />
<br />
<console><br />
# lvcreate -L 32G -n SWAP funtoo<br />
</console><br />
<br />
<pre><br />
Logical volume "SWAP" created<br />
</pre><br />
<br />
<console><br />
# lvcreate -L 64G -n ROOT funtoo<br />
</console><br />
<br />
<pre><br />
Logical volume "ROOT" created<br />
</pre><br />
<br />
<console><br />
# lvcreate -L 128G -n home_my funtoo<br />
</console><br />
<br />
<pre><br />
Logical volume "home_my" created<br />
</pre><br />
<br />
<console><br />
# lvcreate -L 256G -n home_my_media funtoo<br />
</console><br />
<br />
<pre><br />
Logical volume "home_my_media" created<br />
</pre><br />
<br />
Display the logical volumes:<br />
<br />
<console><br />
# lvdisplay<br />
</console><br />
<br />
<pre><br />
--- Logical volume ---<br />
LV Path /dev/funtoo/SWAP<br />
LV Name SWAP<br />
VG Name funtoo<br />
LV UUID VkdEAk-Jshp-qcQ0-jU7m-m7f4-fyG6-1FZJlh<br />
LV Write Access read/write<br />
LV Creation host, time funtoo, 2014-07-24 04:39:19 -0400<br />
LV Status available<br />
# open 0<br />
LV Size 32.00 GiB<br />
Current LE 8192<br />
Segments 1<br />
Allocation inherit<br />
Read ahead sectors auto<br />
- currently set to 256<br />
Block device 253:1<br />
<br />
--- Logical volume ---<br />
LV Path /dev/funtoo/ROOT<br />
LV Name ROOT<br />
VG Name funtoo<br />
LV UUID 2WE7dL-R5BN-dM78-eMx5-hwS8-SjWJ-mUjzL4<br />
LV Write Access read/write<br />
LV Creation host, time funtoo, 2014-07-24 04:39:24 -0400<br />
LV Status available<br />
# open 0<br />
LV Size 64.00 GiB<br />
Current LE 16384<br />
Segments 1<br />
Allocation inherit<br />
Read ahead sectors auto<br />
- currently set to 256<br />
Block device 253:2<br />
<br />
--- Logical volume ---<br />
LV Path /dev/funtoo/home_my<br />
LV Name home_my<br />
VG Name funtoo<br />
LV UUID OJnpYM-399Y-8pa3-iMTY-Nle3-IyK1-keDtng<br />
LV Write Access read/write<br />
LV Creation host, time funtoo, 2014-07-24 04:40:16 -0400<br />
LV Status available<br />
# open 0<br />
LV Size 128.00 GiB<br />
Current LE 32768<br />
Segments 1<br />
Allocation inherit<br />
Read ahead sectors auto<br />
- currently set to 256<br />
Block device 253:3<br />
<br />
--- Logical volume ---<br />
LV Path /dev/funtoo/home_my_media<br />
LV Name home_my_media<br />
VG Name funtoo<br />
LV UUID tt7cin-igC4-VD85-fDKV-J692-fV3F-auJYcU<br />
LV Write Access read/write<br />
LV Creation host, time funtoo, 2014-07-24 04:40:30 -0400<br />
LV Status available<br />
# open 0<br />
LV Size 256.00 GiB<br />
Current LE 65536<br />
Segments 1<br />
Allocation inherit<br />
Read ahead sectors auto<br />
- currently set to 256<br />
Block device 253:4<br />
</pre><br />
<br />
Activate swap:<br />
<br />
<console><br />
# mkswap /dev/mapper/funtoo-SWAP<br />
</console><br />
<br />
<pre><br />
Setting up swapspace version 1, size = 33554428 KiB<br />
no label, UUID=ccc83857-28da-4508-a393-84e974e0eeb1<br />
</pre><br />
<br />
<console><br />
# swapon /dev/mapper/funtoo-SWAP<br />
</console><br />
<br />
Create the filesystems:<br />
<br />
{{fancynote|Before proceeding you should read through the brief section [[Funtoo Linux Installation#Creating filesystems|Creating filesystems]] in the install guide and decide what type of filesystem you would like to use. Do not actually create any file systems though, we will cover that below.}}<br />
<br />
<console><br />
# mkfs.ext2 /dev/sda1<br />
</console><br />
<br />
<pre><br />
[...]<br />
</pre><br />
<br />
<console><br />
# mkfs.ext4 /dev/mapper/funtoo-ROOT<br />
</console><br />
<br />
<pre><br />
mke2fs 1.42.10 (18-May-2014)<br />
Creating filesystem with 16777216 4k blocks and 4194304 inodes<br />
Filesystem UUID: 0ab8f9ab-e824-4d69-a9c4-201d4ccd99ac<br />
Superblock backups stored on blocks: <br />
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, <br />
4096000, 7962624, 11239424<br />
<br />
Allocating group tables: done <br />
Writing inode tables: done <br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done <br />
</pre><br />
<br />
<console><br />
# mkfs.ext4 /dev/mapper/funtoo-home_my<br />
</console><br />
<br />
<pre><br />
mke2fs 1.42.10 (18-May-2014)<br />
Creating filesystem with 33554432 4k blocks and 8388608 inodes<br />
Filesystem UUID: 46e394c1-3635-4f13-ba51-10c537d2b5ed<br />
Superblock backups stored on blocks: <br />
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, <br />
4096000, 7962624, 11239424, 20480000, 23887872<br />
<br />
Allocating group tables: done <br />
Writing inode tables: done <br />
Creating journal (32768 blocks): done<br />
Writing superblocks and filesystem accounting information: done <br />
</pre><br />
<br />
<console><br />
# mkfs.xfs /dev/mapper/funtoo-home_my_media<br />
</console><br />
<br />
<pre><br />
meta-data=/dev/mapper/funtoo-home_my_media isize=256 agcount=4, agsize=16777216 blks<br />
= sectsz=512 attr=2, projid32bit=0<br />
data = bsize=4096 blocks=67108864, imaxpct=25<br />
= sunit=0 swidth=0 blks<br />
naming =version 2 bsize=4096 ascii-ci=0<br />
log =internal log bsize=4096 blocks=32768, version=2<br />
= sectsz=512 sunit=0 blks, lazy-count=1<br />
realtime =none extsz=4096 blocks=0, rtextents=0<br />
</pre><br />
<br />
Label the filesystems:<br />
<br />
<console><br />
# e2label /dev/sda1 boot<br />
</console><br />
<br />
== Prepare for chroot ==<br />
<br />
Activiate the volumes:<br />
<br />
<console><br />
# vgscan<br />
# vgchange -a y<br />
</console><br />
<br />
Mount the filesystems:<br />
<br />
<console><br />
# mkdir -p /mnt/funtoo<br />
# mount /dev/mapper/funtoo-ROOT /mnt/funtoo<br />
# mkdir -p /mnt/funtoo/boot<br />
# mount /dev/sda1 /mnt/funtoo/boot<br />
# mkdir -p /mnt/funtoo/home/my<br />
# mount /dev/mapper/funtoo-home_my /mnt/funtoo/home/my<br />
# mkdir -p /mnt/funtoo/home/my/media<br />
# mount /dev/mapper/funtoo-home_my_media /mnt/funtoo/home/my/media<br />
</console><br />
<br />
Install the bootloader:<br />
<br />
<console><br />
# grub-install /dev/sda1<br />
</console><br />
<br />
== Resume from Funtoo Linux Installation ==<br />
<br />
You may safely resume from [http://www.funtoo.org/Funtoo_Linux_Installation#Installing_the_Stage_3_tarball Installing the Stage 3 tarball] with few exceptions:<br />
<br />
=== fstab ===<br />
<br />
<pre><br />
# <filesystem> <mountpoint> <type> <opts> <dump> <pass><br />
/dev/funtoo/SWAP none swap sw 0 0<br />
/dev/funtoo/ROOT / ext4 noatime 0 1<br />
LABEL=boot /boot ext2 noatime 0 0<br />
/dev/funtoo/home_my /home/my ext4 noatime 0 2<br />
/dev/funtoo/home_my_media /home/my/media xfs noatime 0 2<br />
</pre><br />
<br />
=== kernel ===<br />
<br />
Enable kernel options:<br />
{{kernelop<br />
|title=<br />
|desc=<br />
General setup ---><br />
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Device Drivers ---><br />
Generic Driver Options ---> <br />
[*] Maintain a devtmpfs filesystem to mount at /dev<br />
}}<br />
{{kernelop<br />
|title=<br />
|desc=<br />
Device Drivers ---><br />
[*] Multiple devices driver support ---><br />
<*>Device Mapper Support<br />
}}<br />
<br />
Build initramfs (genkernel):<br />
<br />
{{fancynote|This builds only an initramfs with lvm support. It does not build the whole kernel so you still have to do that.}}<br />
<br />
<console><br />
# genkernel --lvm initramfs<br />
</console><br />
<br />
=== boot-update ===<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux"<br />
timeout 3<br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel kernel-genkernel-x86_64-3.14.13<br />
initrd initramfs-genkernel-x86_64-3.14.13<br />
params += dolvm real_root=/dev/mapper/funtoo-ROOT rootfstype=ext4 resume=swap:/dev/mapper/funtoo-SWAP quiet<br />
}<br />
</pre><br />
<br />
=== software ===<br />
<br />
<console><br />
# emerge -va lvm2<br />
</console><br />
<br />
For the most part, LVM "just works" without any additional configuration. This is especially true for versions below 2.02.107. If you are using >=sys-fs/lvm2-2.02.107 with Funtoo, there are two features be desired that are turned off by default:<br />
<br />
The Metadata Daemon ([https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/metadatadaemon.html lvmetad])<br />
<br />
Thinly-Provisioned Logical Volumes ([https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/thinprovisioned_volumes.html Thin Volumes])<br />
<br />
Enabling either is simply a matter of enabling their USE flags.<br />
<br />
== Cleaning up ==<br />
<br />
<console><br />
# exit<br />
# cd /<br />
# cat /proc/mounts | grep funtoo | awk '{print $2}' | grep "^$MOUNTPOINT" | sort -r | xargs umount<br />
# umount /mnt/funtoo<br />
# swapoff -v /dev/mapper/funtoo-SWAP<br />
# vgchange -a n<br />
# init 0<br />
</console><br />
<br />
== Special notes ==<br />
<br />
=== Resizing ===<br />
<br />
{{fancynote|Resizing is filesystem specific. Most can be grown but cannot be shrunk.}}<br />
<br />
==== Growing /home/my by 8G ====<br />
<br />
<console><br />
# lvextend -L+8G /dev/mapper/funtoo-home_my<br />
</console><br />
<br />
===== ext2/ext3/ext4 =====<br />
<br />
<console><br />
# resize2fs /mnt/funtoo/home/my<br />
</console><br />
<br />
===== xfs =====<br />
<br />
<console><br />
# xfs_growfs /mnt/funtoo/home/my<br />
</console><br />
<br />
==== Shrinking /home/my by 8G ====<br />
<br />
{{fancynote|You generally need to umount first.}}<br />
<br />
===== ext2/ext3/ext4 =====<br />
<br />
<console><br />
# umount /mnt/funtoo/home/my<br />
# lvreduce -r -L -8G /dev/mapper/funtoo-home_my<br />
</console><br />
<br />
===== xfs =====<br />
<br />
XFS cannot be shrunk.<br />
<br />
== Beyond the basics ==<br />
<br />
The [[LVM Fun]] page may be of interest.<br />
<br />
As well as these pages from Red Hat: [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/snapshot_command.html Creating Snapshot Volumes]<br />
[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/thinly_provisioned_volume_creation.html Creating Thinly-Provionsed Logical Volumes]<br />
[https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/mirror_create.html Creating Mirrored Volumes]<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Install]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=ZFS_as_Root_Filesystem&diff=4972ZFS as Root Filesystem2014-07-24T06:08:33Z<p>Dantrell: Fixed issue with chronological flow.</p>
<hr />
<div>== Introduction ==<br />
<br />
This tutorial will show you how to install Funtoo on ZFS (rootfs). This tutorial is meant to be an "overlay" over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.<br />
<br />
=== Introduction to ZFS ===<br />
<br />
Since ZFS is a new technology for Linux, it can be helpful to understand some of its benefits, particularly in comparison to BTRFS, another popular next-generation Linux filesystem:<br />
<br />
* On Linux, the ZFS code can be updated independently of the kernel to obtain the latest fixes. btrfs is exclusive to Linux and you need to build the latest kernel sources to get the latest fixes.<br />
<br />
* ZFS is supported on multiple platforms. The platforms with the best support are Solaris, FreeBSD and Linux. Other platforms with varying degrees of support are NetBSD, Mac OS X and Windows. btrfs is exclusive to Linux.<br />
<br />
* ZFS has the Adaptive Replacement Cache replacement algorithm while btrfs uses the Linux kernel's Last Recently Used replacement algorithm. The former often has an overwhelmingly superior hit rate, which means fewer disk accesses.<br />
<br />
* ZFS has the ZFS Intent Log and SLOG devices, which accelerates small synchronous write performance.<br />
<br />
* ZFS handles internal fragmentation gracefully, such that you can fill it until 100%. Internal fragmentation in btrfs can make btrfs think it is full at 10%. Btrfs has no automatic rebalancing code, so it requires a manual rebalance to correct it.<br />
<br />
* ZFS has raidz, which is like RAID 5/6 (or a hypothetical RAID 7 that supports 3 parity disks), except it does not suffer from the RAID write hole issue thanks to its use of CoW and a variable stripe size. btrfs gained integrated RAID 5/6 functionality in Linux 3.9. However, its implementation uses a stripe cache that can only partially mitigate the effect of the RAID write hole.<br />
<br />
* ZFS send/receive implementation supports incremental update when doing backups. btrfs' send/receive implementation requires sending the entire snapshot.<br />
<br />
* ZFS supports data deduplication, which is a memory hog and only works well for specialized workloads. btrfs has no equivalent.<br />
<br />
* ZFS datasets have a hierarchical namespace while btrfs subvolumes have a flat namespace.<br />
<br />
* ZFS has the ability to create virtual block devices called zvols in its namespace. btrfs has no equivalent and must rely on the loop device for this functionality, which is cumbersome.<br />
<br />
The only area where btrfs is ahead of ZFS is in the area of small file<br />
efficiency. btrfs supports a feature called block suballocation, which<br />
enables it to store small files far more efficiently than ZFS. It is<br />
possible to use another filesystem (e.g. reiserfs) on top of a ZFS zvol<br />
to obtain similar benefits (with arguably better data integrity) when<br />
dealing with many small files (e.g. the portage tree).<br />
<br />
For a quick tour of ZFS and have a big picture of its common operations you can consult the page [[ZFS Fun]].<br />
<br />
=== Disclaimers ===<br />
<br />
{{fancywarning|This guide is a work in progress. Expect some quirks.}}<br />
{{fancyimportant|'''Since ZFS was really designed for 64 bit systems, we are only recommending and supporting 64 bit platforms and installations. We will not be supporting 32 bit platforms'''!}}<br />
<br />
== Video Tutorial ==<br />
<br />
As a companion to the installation instructions below, a YouTube video tutorial is now available:<br />
<br />
{{#widget:YouTube|id=SWyThdxNoP8|width=640|height=360}}<br />
<br />
== Downloading the ISO (With ZFS) ==<br />
In order for us to install Funtoo on ZFS, you will need an environment that already provides the ZFS tools. Therefore we will download a customized version of System Rescue CD with ZFS included. <br />
<br />
<pre><br />
Name: sysresccd-4.0.1_zfs_0.6.2.iso (545 MB)<br />
Release Date: 2014-02-25<br />
md5sum 01f4e6929247d54db77ab7be4d156d85<br />
</pre><br />
<br />
<br />
'''[http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/ Download System Rescue CD with ZFS]'''<br /><br />
<br />
== Creating a bootable USB from ISO (From a Linux Environment) ==<br />
After you download the iso, you can do the following steps to create a bootable USB:<br />
<br />
<console><br />
Make a temporary directory<br />
# ##i##mkdir /tmp/loop<br />
<br />
Mount the iso<br />
# ##i##mount -o ro,loop /root/sysresccd-4.0.1_zfs_0.6.2.iso /tmp/loop<br />
<br />
Run the usb installer<br />
# ##i##/tmp/loop/usb_inst.sh<br />
</console><br />
<br />
That should be all you need to do to get your flash drive working.<br />
<br />
== Booting the ISO ==<br />
<br />
{{fancywarning|'''When booting into the ISO, Make sure that you select the "Alternate 64 bit kernel (altker64)". The ZFS modules have been built specifically for this kernel rather than the standard kernel. If you select a different kernel, you will get a fail to load module stack error message.'''}}<br />
<br />
== Creating partitions ==<br />
There are two ways to partition your disk: You can use your entire drive and let ZFS automatically partition it for you, or you can do it manually.<br />
<br />
We will be showing you how to partition it '''manually''' because if you partition it manually you get to create your own layout, you get to have your own separate /boot partition (Which is nice since not every bootloader supports booting from ZFS pools), and you get to boot into RAID10, RAID5 (RAIDZ) pools and any other layouts due to you having a separate /boot partition.<br />
<br />
==== gdisk (GPT Style) ====<br />
<br />
'''A Fresh Start''':<br />
<br />
First lets make sure that the disk is completely wiped from any previous disk labels and partitions.<br />
We will also assume that <tt>/dev/sda</tt> is the target drive.<br /><br />
<br />
<console><br />
# ##i##sgdisk -Z /dev/sda<br />
</console><br />
<br />
{{fancywarning|This is a destructive operation and the program will not ask you for confirmation! Make sure you really don't want anything on this disk.}}<br />
<br />
Now that we have a clean drive, we will create the new layout.<br />
<br />
First open up the application:<br />
<br />
<console><br />
# ##i##gdisk /dev/sda<br />
</console><br />
<br />
'''Create Partition 1''' (boot):<br />
<console><br />
Command: ##i##n ↵<br />
Partition Number: ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+250M ↵<br />
Hex Code: ##i##↵<br />
</console><br />
<br />
'''Create Partition 2''' (BIOS Boot Partition):<br />
<console>Command: ##i##n ↵<br />
Partition Number: ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+32M ↵<br />
Hex Code: ##i##EF02 ↵<br />
</console><br />
<br />
'''Create Partition 3''' (ZFS):<br />
<console>Command: ##i##n ↵<br />
Partition Number: ##i##↵<br />
First sector: ##i##↵<br />
Last sector: ##i##↵<br />
Hex Code: ##i##bf00 ↵<br />
<br />
Command: ##i##p ↵<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 514047 250.0 MiB 8300 Linux filesystem<br />
2 514048 579583 32.0 MiB EF02 BIOS boot partition<br />
3 579584 1953525134 931.2 GiB BF00 Solaris root<br />
<br />
Command: ##i##w ↵<br />
</console><br />
<br />
<br />
=== Format your /boot partition ===<br />
<br />
<console><br />
# ##i##mkfs.ext2 -m 1 /dev/sda1<br />
</console><br />
<br />
=== Encryption (Optional) ===<br />
If you want encryption, then create your encrypted vault(s) now by doing the following:<br />
<br />
<console><br />
# ##i##cryptsetup luksFormat /dev/sda3<br />
# ##i##cryptsetup luksOpen /dev/sda3 vault_1<br />
</console><br />
<br />
{{fancywarning|On some machines, a combination of ZFS and LUKS has caused instability and system crashes.}}<br />
<br />
=== Create the zpool ===<br />
We will first create the pool. The pool will be named `tank` and the disk will be aligned to 4096 (using ashift=12)<br />
<console># ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo tank /dev/sda3</console><br />
<br />
{{fancyimportant|If you are using encrypted root, change '''/dev/sda3 to /dev/mapper/vault_1'''.}}<br />
<br />
{{fancynote| If you have a previous pool that you would like to import, you can do a: '''zpool import -f -R /mnt/funtoo <pool_name>'''.}}<br />
<br />
=== Create the zfs datasets ===<br />
We will now create some datasets. For this installation, we will create a small but future proof amount of datasets. We will have a dataset for the OS (/), and your swap. We will also show you how to create some optional datasets: <tt>/home</tt>, <tt>/var</tt>, <tt>/usr/src</tt>, and <tt>/usr/portage</tt>.<br />
<br />
<console><br />
Create some empty containers for organization purposes, and make the dataset that will hold /<br />
# ##i##zfs create -p tank/funtoo<br />
# ##i##zfs create -o mountpoint=/ tank/funtoo/root<br />
<br />
Optional, but recommended datasets: /home<br />
# ##i##zfs create -o mountpoint=/home tank/funtoo/home<br />
<br />
Optional datasets: /usr/src, /usr/portage/{distfiles,packages}<br />
# ##i##zfs create -o mountpoint=/usr/src tank/funtoo/src<br />
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off tank/funtoo/portage<br />
# ##i##zfs create -o mountpoint=/usr/portage/distfiles tank/funtoo/portage/distfiles<br />
# ##i##zfs create -o mountpoint=/usr/portage/packages tank/funtoo/portage/packages<br />
</console><br />
<br />
=== Create your swap zvol ===<br />
For modern machines that have greater than 4 GB of RAM, A swap size of 2G should be enough. However if your machine doesn't have a lot of RAM, the rule of thumb is either 2x the RAM or RAM + 1 GB.<br />
<br />
For this tutorial we will assume that it is a newer machine and make a 2 GB swap.<br />
<br />
<console><br />
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -o volblocksize=4K -V 2G tank/swap<br />
</console><br />
<br />
=== Format your swap zvol ===<br />
<console><br />
# ##i##mkswap -f /dev/zvol/tank/swap<br />
# ##i##swapon /dev/zvol/tank/swap<br />
</console><br />
<br />
Now we will continue to install funtoo.<br />
<br />
== Installing Funtoo ==<br />
<br />
=== Pre-Chroot ===<br />
<br />
<console><br />
Go into the directory that you will chroot into<br />
# ##i##cd /mnt/funtoo<br />
<br />
Make a boot folder and mount your boot drive<br />
# ##i##mkdir boot<br />
# ##i##mount /dev/sda1 boot<br />
</console><br />
<br />
[[Funtoo_Linux_Installation|Now download and extract the Funtoo stage3 ...]]<br />
<br />
Once you've extracted the stage3, do a few more preparations and chroot into your new funtoo environment:<br />
<br />
<console><br />
Bind the kernel related directories<br />
# ##i##mount -t proc none proc<br />
# ##i##mount --rbind /dev dev<br />
# ##i##mount --rbind /sys sys<br />
<br />
Copy network settings<br />
# ##i##cp -f /etc/resolv.conf etc<br />
<br />
Make the zfs folder in 'etc' and copy your zpool.cache<br />
# ##i##mkdir etc/zfs<br />
# ##i##cp /etc/zfs/zpool.cache etc/zfs<br />
<br />
Chroot into Funtoo<br />
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l<br />
</console><br />
<br />
=== In Chroot ===<br />
<br />
<console><br />
Create a symbolic link to your mountpoints<br />
# ##i##ln -sf /proc/mounts /etc/mtab<br />
<br />
Sync your tree<br />
# ##i##emerge --sync<br />
</console><br />
<br />
=== Add filesystems to /etc/fstab ===<br />
<br />
Before we continue to compile and or install our kernel in the next step, we will edit the <tt>/etc/fstab</tt> file because if we decide to install our kernel through portage, portage will need to know where our <tt>/boot</tt> is, so that it can place the files in there. <br />
<br />
Edit <tt>/etc/fstab</tt>:<br />
<br />
<pre><br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
<br />
/dev/sda1 /boot ext2 defaults 0 2<br />
/dev/zvol/tank/swap none swap sw 0 0<br />
</pre><br />
<br />
== Kernel Configuration ==<br />
To speed up this step, you can install a pre-configured/compiled kernel called '''bliss-kernel'''. This kernel already has the correct configurations for ZFS and a variety of other scenarios. It's a vanilla kernel from kernel.org without any external patches.<br />
<br />
To install {{Package|sys-kernel/bliss-kernel}} type the following:<br />
<br />
<console><br />
# ##i##emerge bliss-kernel<br />
</console><br />
<br />
Now make sure that your <tt>/usr/src/linux symlink</tt> is pointing to this kernel by typing the following:<br />
<br />
<console><br />
# ##i##eselect kernel list<br />
Available kernel symlink targets:<br />
[1] linux-3.12.13-KS.02 *<br />
</console><br />
<br />
You should see a star next to the version you installed. In this case it was 3.12.13-KS.02. If it's not set, you can type '''eselect kernel set #'''.<br />
<br />
== Installing the ZFS userspace tools and kernel modules ==<br />
Emerge {{Package|sys-fs/zfs}}. This package will bring in {{Package|sys-kernel/spl}}, and {{Package|sys-fs/zfs-kmod}} as its dependencies:<br />
<br />
<console><br />
# ##i##emerge zfs<br />
</console><br />
<br />
Check to make sure that the zfs tools are working. The <code>zpool.cache</code> file that you copied before should be displayed.<br />
<br />
<console><br />
# ##i##zpool status<br />
# ##i##zfs list<br />
</console><br />
<br />
If everything worked, continue.<br />
<br />
== Create the initramfs ==<br />
There are two ways to do this, you can use "genkernel" or "bliss-initramfs". Both will be shown.<br />
<br />
=== genkernel ===<br />
Install genkernel and run it:<br />
<console><br />
# ##i##emerge genkernel<br />
<br />
You only need to add --luks if you used encryption<br />
# ##i##genkernel --zfs --luks initramfs<br />
</console><br />
<br />
=== Bliss Initramfs Creator ===<br />
If you are encrypting your drives, then add the "luks" use flag to your package.use before emerging:<br />
<br />
<console><br />
# ##i##echo "sys-kernel/bliss-initramfs luks" >> /etc/portage/package.use<br />
</console><br />
<br />
Now install the program and run it:<br />
<console><br />
# ##i##emerge bliss-initramfs<br />
<br />
You can either run it without any parameters to get an interactive menu<br />
or you can pass the parameters directly. 1 = zfs, 6 = encrypted zfs, and the kernel name.<br />
# ##i##bliss-initramfs 1 3.12.13-KS.02<br />
</console><br />
<br />
=== Moving into the correct location ===<br />
Place the file that was generated by the above applications into either your /boot folder (If you are using boot-update) or into your /boot/kernels/3.12.13-KS.02 folder (If you are using bliss-boot). For bliss-boot, the file needs to be called 'initrd' rather than 'initrd-3.12.13-KS.02'.<br />
<br />
==== boot-update ====<br />
<console><br />
# ##i##mv initrd-3.12.13-KS.02 /boot<br />
</console><br />
<br />
==== bliss-boot ====<br />
<console><br />
# ##i##mv initrd-3.12.13-KS.02 /boot/kernels/3.12.13-KS.02/initrd<br />
</console><br />
<br />
== Installing & Configuring the Bootloader ==<br />
<br />
=== GRUB 2 (Optional if you are using another bootloader) ===<br />
<console><br />
# ##i##emerge grub<br />
</console><br />
<br />
You can check that grub is version 2.00 by typing the following command:<br />
<br />
<console><br />
# ##i##grub-install --version<br />
grub-install (GRUB) 2.00<br />
</console><br />
<br />
Now install grub to the drive itself (not a partition):<br />
<console><br />
# ##i##grub-install /dev/sda<br />
</console><br />
<br />
You should receive the following message:<br />
<br />
<console><br />
Installation finished. No error reported.<br />
</console><br />
<br />
You should now see some a grub directory with some files inside your /boot folder:<br />
<br />
<console><br />
# ##i##ls -l /boot/grub<br />
total 2520<br />
-rw-r--r-- 1 root root 1024 Jan 4 16:09 grubenv<br />
drwxr-xr-x 2 root root 8192 Jan 12 14:29 i386-pc<br />
drwxr-xr-x 2 root root 4096 Jan 12 14:28 locale<br />
-rw-r--r-- 1 root root 2555597 Feb 4 11:50 unifont.pf2<br />
</console><br />
<br />
=== Extlinux (Optional if you are using another bootloader) ===<br />
To install extlinux, you can follow the guide here: [[Extlinux|Link to Extlinux Guide]].<br />
<br />
=== LILO (Optional if you are using another bootloader) ===<br />
To install lilo you can type the following:<br />
<br />
<console><br />
# ##i##emerge lilo<br />
</console><br />
<br />
=== boot-update ===<br />
boot-update comes as a dependency of grub2, so if you already installed grub, it's already on your system!<br />
<br />
==== Genkernel ====<br />
If your using genkernel you must add 'real_root=ZFS=<root>' and 'dozfs' to your params.<br />
Example entry for <tt>/etc/boot.conf</tt>:<br />
<br />
<pre><br />
"Funtoo ZFS" {<br />
kernel vmlinuz[-v]<br />
initrd initramfs-genkernel-x86_64[-v]<br />
params real_root=ZFS=tank/funtoo/root<br />
params += dozfs=force<br />
# Also add 'params += crypt_root=/dev/sda3' if you used encryption<br />
# Adjust the above setting to your system if needed<br />
}<br />
</pre><br />
<br />
==== Bliss Initramfs Creator ====<br />
If you used Bliss Initramfs Creator then all you need to do is add 'root=<root>' to your params.<br />
Example entry for <tt>/etc/boot.conf</tt>:<br />
<br />
<pre><br />
"Funtoo ZFS" {<br />
kernel vmlinuz[-v]<br />
initrd initrd[-v]<br />
params root=tank/funtoo/root quiet<br />
# If you have an encrypted device with a regular passphrase,<br />
# you can add the following line<br />
params += enc_root=/dev/sda3 enc_type=pass<br />
}<br />
</pre><br />
<br />
After editing /etc/boot.conf, you just need to run boot-update to update grub.cfg<br />
<br />
<console><br />
###i## boot-update<br />
</console><br />
<br />
=== bliss-boot ===<br />
This is a new program that is designed to generate a simple, human-readable/editable, configuration file for a variety of bootloaders. It currently supports grub2, extlinux, and lilo.<br />
<br />
You can install it via the following command:<br />
<console><br />
# ##i##emerge bliss-boot<br />
</console><br />
<br />
==== Bootloader Configuration ====<br />
In order to generate our bootloader configuration file, we will first configure bliss-boot so that it knows what we want. The 'bliss-boot' configuration file is located in '''/etc/bliss-boot/conf.py'''. Open that file and make sure that the following variables are set appropriately:<br />
<br />
<pre><br />
# This should be set to the bootloader you installed earlier: (grub2, extlinux, and lilo are the available options)<br />
bootloader = "grub2"<br />
<br />
# This should be set to the kernel you installed earlier<br />
default = "3.12.13-KS.02" <br />
</pre><br />
<br />
Scroll all the way down until you find 'kernels'. You will need to add the kernels and the options<br />
you want for these kernels here. Below are a few configuration options depending if you are using<br />
'''bliss-initramfs''' or '''genkernel'''.<br />
<br />
===== Genkernel =====<br />
<br />
<pre><br />
kernel = {<br />
'3.12.13-KS.02' : 'real_root=ZFS=tank/funtoo/root dozfs=force quiet',<br />
}<br />
</pre><br />
<br />
'''If you are using encryption you can add the crypt_root option:'''<br />
<br />
<pre><br />
kernel = {<br />
'3.12.13-KS.02' : 'real_root=ZFS=tank/funtoo/root dozfs=force crypt_root=/dev/sda3 quiet',<br />
}<br />
</pre><br />
<br />
===== Bliss Initramfs Creator =====<br />
<pre><br />
kernel = {<br />
'3.12.13-KS.02' : 'root=tank/funtoo/root quiet',<br />
}<br />
</pre><br />
<br />
'''If you are using encryption then you would let the initramfs know:'''<br />
<br />
#"What type of encryption authentication you want to use? ('''enc_type=''')<br />
::* pass = will ask for passphrase directly<br />
::* key = a plain unencrypted key file<br />
::* key_gpg = an encrypted key file<br />
#"Where is the encrypted drive?" ('''enc_root=''')<br />
#"Where is the root pool after it has been decrypted?" ('''root=''')<br />
<br />
<pre><br />
kernel = {<br />
'3.12.13-KS.02' : 'root=tank/funtoo/root enc_root=/dev/sda3 enc_type=pass quiet',<br />
}<br />
</pre><br />
<br />
==== Generate the configuration ====<br />
Now that we have configure our '''/etc/bliss-boot/conf.py''' file, we can generate our config. Simply run the following command:<br />
<br />
<console><br />
# ##i##bliss-boot<br />
</console><br />
<br />
This will generate a configuration file for the bootloader you specified previously in your current directory. You can check your config file before hand to make sure it doesn't have any errors. Simply open either: grub.cfg, extlinux.conf, or lilo.conf.<br />
<br />
Once you have checked it for errors, place this file in the correct directory:<br />
<br />
* grub2 = /boot/grub/<br />
* extlinux = /boot/extlinux/<br />
* lilo = /etc/lilo.conf<br />
<br />
=== LILO (Optional if you are using another bootloader) ===<br />
Now that bliss-boot generated the lilo.conf file, move that config file to its appropriate location<br />
and install lilo to the MBR:<br />
<br />
<console><br />
# ##i##mv lilo.conf /etc<br />
# ##i##lilo<br />
<br />
You should see the following:<br />
<br />
Warning: LBA32 addressing assumed<br />
Added Funtoo + *<br />
One warning was issued<br />
</console><br />
<br />
== Final configuration ==<br />
=== Add the zfs tools to openrc ===<br />
<console># ##i##rc-update add zfs boot</console><br />
<br />
=== Clean up and reboot ===<br />
We are almost done, we are just going to clean up, '''set our root password''', and unmount whatever we mounted and get out.<br />
<br />
<console><br />
Delete the stage3 tarball that you downloaded earlier so it doesn't take up space.<br />
# ##i##cd /<br />
# ##i##rm stage3-latest.tar.xz<br />
<br />
Set your root password<br />
# ##i##passwd<br />
>> Enter your password, you won't see what you are writing (for security reasons), but it is there!<br />
<br />
Get out of the chroot environment<br />
# ##i##exit<br />
<br />
Unmount all the kernel filesystem stuff and boot (if you have a separate /boot)<br />
# ##i##umount -l proc dev sys boot<br />
<br />
Turn off the swap<br />
# ##i##swapoff /dev/zvol/tank/swap<br />
<br />
Export the zpool<br />
# ##i##cd /<br />
# ##i##zpool export tank<br />
<br />
Reboot<br />
# ##i##reboot<br />
</console><br />
<br />
{{fancyimportant|'''Don't forget to set your root password as stated above before exiting chroot and rebooting. If you don't set the root password, you won't be able to log into your new system.'''}}<br />
<br />
and that should be enough to get your system to boot on ZFS.<br />
<br />
== After reboot ==<br />
<br />
=== Forgot to reset password? ===<br />
==== System Rescue CD ====<br />
If you aren't using bliss-initramfs, then you can reboot back into your sysresccd and reset through there by mounting your drive, chrooting, and then typing passwd. <br />
<br />
Example:<br />
<console><br />
# ##i##zpool import -f -R /mnt/funtoo tank<br />
# ##i##chroot /mnt/funtoo bash -l<br />
# ##i##passwd<br />
# ##i##exit<br />
# ##i##zpool export -f tank<br />
# ##i##reboot<br />
</console><br />
<br />
==== Using bliss-initramfs ====<br />
If you forgot to reset your password and are using '''bliss-initramfs''', you can add the '''su''' option to your bootloader parameters and the initramfs will throw you into the rootfs of your drive. In there you can run 'passwd' and then type 'exit'. Once you type 'exit', the initramfs will continue to boot your system as normal.<br />
<br />
=== Create initial ZFS Snapshot ===<br />
Continue to set up anything you need in terms of /etc configurations. Once you have everything the way you like it, take a snapshot of your system. You will be using this snapshot to revert back to this state if anything ever happens to your system down the road. The snapshots are cheap, and almost instant. <br />
<br />
To take the snapshot of your system, type the following:<br />
<console># ##i##zfs snapshot -r tank@install</console><br />
<br />
To see if your snapshot was taken, type:<br />
<console># ##i##zfs list -t snapshot</console><br />
<br />
If your machine ever fails and you need to get back to this state, just type (This will only revert your / dataset while keeping the rest of your data intact):<br />
<console># ##i##zfs rollback tank/funtoo/root@install</console><br />
<br />
{{fancyimportant|'''For a detailed overview, presentation of ZFS' capabilities, as well as usage examples, please refer to the [[ZFS_Fun|ZFS Fun]] page.'''}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Starting from scratch ===<br />
If your installation has gotten screwed up for whatever reason and you need a fresh restart, you can do the following from sysresccd to start fresh:<br />
<br />
<console><br />
Destroy the pool and any snapshots and datasets it has<br />
# ##i##zpool destroy -R -f tank<br />
<br />
This deletes the files from /dev/sda1 so that even after we zap, recreating the drive in the exact sector<br />
position and size will not give us access to the old files in this partition.<br />
# ##i##mkfs.ext2 /dev/sda1<br />
# ##i##sgdisk -Z /dev/sda<br />
</console><br />
<br />
Now start the guide again :).<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Filesystems]]<br />
[[Category:Featured]]<br />
[[Category:Install]]<br />
<br />
__NOTITLE__</div>Dantrellhttps://www.funtoo.org/index.php?title=Funtoo_Linux_Installation&diff=4950Funtoo Linux Installation2014-07-23T18:02:36Z<p>Dantrell: Added steps to use fdisk</p>
<hr />
<div>== Introduction == <br />
__TOC__<br />
This document was written to help you install Funtoo Linux as concisely as possible, with a minimum number of distracting options regarding system configuration. <br />
<br />
These docs assume you have a "PC compatible" computer system with a standard PC BIOS. Many new computers support UEFI for booting, which is a new firmware interface that frequently replaces the older MBR-based BIOS. If you have a system with UEFI, you will want to use this documentation along with the [[UEFI Install Guide]], which will augment these instructions and explain how to get your system to boot. You may need to change your PC BIOS settings to enable or disable UEFI booting. The [[UEFI Install Guide]] has more information on this, and steps on how to determine if your system supports UEFI.<br />
<br />
We also offer a [[ZFS Install Guide]], which augment the instructions on this page for those who want to install Funtoo Linux on ZFS. If you are installing Funtoo Linux on [[Funtoo Linux Installation on ARM|ARM]] architecture, please see [[Funtoo Linux Installation on ARM]] for notable differences regarding ARM support. An experimental Funtoo Linux build also exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]].<br />
<br />
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.<br />
<br />
== Installation Overview ==<br />
<br />
This is a basic overview of the Funtoo installation process:<br />
<br />
# [[#Live CD|Download and boot the live CD of your choice]].<br />
# [[#Prepare Hard Disk|Prepare your disk]].<br />
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.<br />
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.<br />
# [[#Chroot into Funtoo|Chroot into your new system]].<br />
# [[#Downloading the Portage tree|Download the Portage tree]].<br />
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].<br />
# [[#Configuring and installing the Linux kernel|Install a kernel]].<br />
# [[#Installing a Bootloader|Install a bootloader]].<br />
# [[#Finishing Steps|Complete final steps]].<br />
# [[#Restart your system|Reboot and enjoy]].<br />
<br />
=== Live CD ===<br />
<br />
Funtoo doesn't provide an "official" Funtoo Live CD, but there are plenty of good ones out there to choose from. A great choice is the Gentoo-based [http://www.sysresccd.org/ System Rescue CD] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.<br />
<br />
It is also possible to install Funtoo Linux using many other Linux-based live CDs. Generally, any modern bootable Linux live CD or live USB media will work. See [[Requirements|requirements]] for an overview of what the Live Media must provide to allow a problem-free install of Funtoo Linux.<br />
<br />
To begin a Funtoo Linux installation, download System Rescue CD from:<br />
<br />
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/ The Oregon State University Open Source Lab]<br />
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysresccd/ HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of System Rescue CD, '''be sure to select the <tt>rescue64</tt> 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.<br />
<br />
=== Prepare Hard Disk ===<br />
==== Partitions ====<br />
<br />
Funtoo Linux fully supports traditional MBR partitions, as well as newer GPT/GUID partition formats. Funtoo Linux recommends the use of the GPT partitioning scheme, since it is newer and more flexible. Here are the various trade-offs between each partitioning scheme:<br />
<br />
===== GPT Partitions =====<br />
<br />
* Newer, preferred format for Linux systems<br />
* Supports 2 TB+ hard drives for booting<br />
* Supports hundreds of partitions per disk of any size<br />
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI<br />
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy<br />
<br />
===== MBR Partitions =====<br />
<br />
* Legacy, DOS partitioning scheme<br />
* Only 4 primary partitions per disk; after that, you must use "logical" partitions<br />
* Does not support 2 TB+ disks for booting<br />
* Compatible with certain problematic systems (such as the HP ProBook 4520)<br />
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)<br />
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo<br />
<br />
{{fancyimportant|If you plan to use partitions of 2 TB or greater, you ''must'' partition using the GPT/GUID format. Also note that there are small percentage of PCs that will not boot properly with GPT. For these systems, using MBR partitions or a primary drive with an MBR partition may be required in order to boot.}}<br />
<br />
===== Partitioning Recommendations =====<br />
<br />
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with <tt>gdisk</tt>. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with <tt>fdisk</tt>:<br />
<br />
{| {{table}} <br />
!Partition<br />
!Size<br />
!MBR Block Device (<tt>fdisk</tt>)<br />
!GPT Block Device (<tt>gdisk</tt>)<br />
!Filesystem<br />
!MBR Code<br />
!GPT Code<br />
|-<br />
|<tt>/boot</tt><br />
|500 MB<br />
|<tt>/dev/sda1</tt><br />
|<tt>/dev/sda1</tt><br />
|ext2<br />
|83<br />
|8300<br />
|-<br />
|GRUB boot loader partition<br />
|32 MB<br />
| ''not required for MBR''<br />
|<tt>/dev/sda2</tt><br />
|For GPT/GUID only, skip for MBR - no filesystem.<br />
|''N/A''<br />
|EF02<br />
|-<br />
|swap<br />
|2x RAM for low-memory systems and production servers; otherwise 2GB.<br />
|<tt>/dev/sda2</tt><br />
|<tt>/dev/sda3</tt><br />
|swap (default)<br />
|82<br />
|8200<br />
|-<br />
|<tt>/</tt> (root)<br />
|Rest of the disk, minimum of 10GB.<br />
|<tt>/dev/sda3</tt><br />
|<tt>/dev/sda4</tt><br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
|<tt>/home</tt> (optional) <br />
|User storage and media. Typically most of the disk.<br />
|<tt>/dev/sda4</tt> (if created)<br />
|<tt>/dev/sda5</tt> (if created)<br />
|XFS recommended, alternatively ext4<br />
|83<br />
|8300<br />
|-<br />
| LVM (optional)<br />
| If you want to create an LVM volume.<br />
| <tt>/dev/sda4</tt> (PV, if created)<br />
| <tt>/dev/sda5</tt> (PV, if created)<br />
| LVM PV<br />
| 8E<br />
| 8E00<br />
|}<br />
<br />
==== Partitioning Using gdisk ====<br />
<br />
===== Notes Before We Begin =====<br />
<br />
These install instructions assume you are installing Funtoo Linux to an empty hard disk using GUID partition tables (GPT). If you are installing Funtoo Linux on a machine where another OS is installed, or there is an existing Linux distribution on your system that you want to keep, then you will need to adapt these instructions to suit your needs.<br />
<br />
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the <tt>fdisk</tt> command instead of <tt>gdisk</tt>, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the <br />
'''MBR Block Device (<tt>fdisk</tt>)''' and '''MBR Code''' columns. <tt>fdisk</tt> works just like <tt>gdisk</tt>, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.<br />
<br />
Advanced users may be interested in the following topics:<br />
<br />
* [[GUID Booting Guide]]<br />
* [[Rootfs over encrypted lvm]]<br />
* [[Rootfs over encrypted lvm over raid-1 on GPT]]<br />
* '''NEW!''' '''[[ZFS Install Guide]] (Also contains instructions for Rootfs over Encrypted ZFS!)'''<br />
<br />
===== Using gdisk =====<br />
<br />
The first step after booting SystemRescueCd is to use <tt>gdisk</tt> to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically <tt>/dev/sda</tt>, the first disk in the system:<br />
<br />
<console># ##i##gdisk /dev/sda</console><br />
You should find <tt>gdisk</tt> very similar to <tt>fdisk</tt>. Here is the partition table we want to end up with:<br />
<br />
<console>Command (? for help): ##i##p<br />
Disk /dev/sda: 234441648 sectors, 111.8 GiB<br />
Logical sector size: 512 bytes<br />
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931<br />
Partition table holds up to 128 entries<br />
First usable sector is 34, last usable sector is 234441614<br />
Partitions will be aligned on 2048-sector boundaries<br />
Total free space is 2014 sectors (1007.0 KiB)<br />
<br />
Number Start (sector) End (sector) Size Code Name<br />
1 2048 206847 500.0 MiB 8300 Linux filesystem<br />
2 206848 272383 32.0 MiB EF02 BIOS boot partition<br />
3 272384 8660991 4.0 GiB 8200 Linux swap<br />
4 8660992 234441614 107.7 GiB 8300 Linux filesystem<br />
<br />
Command (? for help): </console><br />
<br />
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB "BIOS boot partition" (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.<br />
<br />
===== For new <tt>gdisk</tt> users =====<br />
<br />
These partitions were created using the "<tt>n</tt>" command from within <tt>gdisk</tt>. The <tt>gdisk</tt> commands to create the partition table above are as follows. Adapt sizes as necessary, although these defaults will work for most users. The partition codes entered below can be found in the [[#Partitioning Recommendations|Partitioning Recommendations]] table below, in the GPT Code column.<br />
<br />
Within <tt>gdisk</tt>, follow these steps:<br />
<br />
'''Create a new empty partition table''' (This ''will'' erase all data on the disk when saved):<br />
<br />
<console><br />
Command: ##i##o ↵<br />
This option deletes all partitions and creates a new protective MBR.<br />
Proceed? (Y/N): ##i##y ↵<br />
</console><br />
<br />
'''Create Partition 1''' (boot):<br />
<br />
<console><br />
Command: ##i##n ↵<br />
Partition Number: ##i##1 ↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+500M ↵<br />
Hex Code: ##i##↵<br />
</console><br />
<br />
'''Create Partition 2''' (GRUB):<br />
<br />
<console><br />
Command: ##i##n ↵<br />
Partition Number: ##i##2 ↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+1M ↵<br />
Hex Code: ##i##EF02 ↵<br />
</console><br />
<br />
'''Create Partition 3''' (swap):<br />
<br />
<console><br />
Command: ##i##n ↵<br />
Partition Number: ##i##3 ↵<br />
First sector: ##i##↵<br />
Last sector: ##i##+4G ↵<br />
Hex Code: ##i##8200 ↵<br />
</console><br />
<br />
'''Create Partition 4''' (root):<br />
<br />
<console><br />
Command: ##i##n ↵<br />
Partition Number: ##i##4 ↵<br />
First sector: ##i##↵<br />
Last sector: ##i##↵##!i## (for rest of disk)<br />
Hex Code: ##i##↵<br />
</console><br />
<br />
Along the way, you can type "<tt>p</tt>" and hit Enter to view your current partition table. If you make a mistake, you can type "<tt>d</tt>" to delete an existing partition that you created. When you are satisfied with your partition setup, type "<tt>w</tt>" to write your configuration to disk:<br />
<br />
'''Write Partition Table To Disk''':<br />
<br />
<console><br />
Command: ##i##w ↵<br />
Do you want to proceed? (Y/N): ##i##Y ↵<br />
</console><br />
<br />
The partition table will now be written to disk and <tt>gdisk</tt> will close.<br />
<br />
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:<br />
<br />
* <tt>/dev/sda1</tt>, which will be used to hold the <tt>/boot</tt> filesystem, <br />
* <tt>/dev/sda2</tt>, which will be used directly by the new GRUB,<br />
* <tt>/dev/sda3</tt>, which will be used for swap space, and <br />
* <tt>/dev/sda4</tt>, which will hold your root filesystem.<br />
<br />
===== For Previous fdisk users =====<br />
<br />
If you have installed Gentoo Linux before, the one thing that is likely new to you here is the GRUB boot loader partition, which is listed as "BIOS boot partition" within <tt>gdisk</tt>. This partition is required for GRUB 2 to boot GPT/GUID boot disks. What is it? In GRUB-speak, this partition is essentially the location of the meat of GRUB's boot loading code. If you've used GRUB Legacy in the past, this partition is where the new GRUB stores the equivalent of the <tt>stage1_5</tt> and <tt>stage2</tt> files in legacy GRUB. Since GPT-based partition tables have less dead space at the beginning of the disk than their MBR equivalents, an explicitly defined partition of code <tt>EF02</tt> is required to hold the guts of the boot loader.<br />
<br />
In all other respects, the partition table is similar to that which you might create for an MBR-based disk during a Gentoo Linux installation. We have a boot and a root partition with code <tt>0700</tt>, and a Linux swap partition with code <tt>8200</tt>.<br />
<br />
==== Partitioning Using fdisk ====<br />
<br />
===== Notes Before We Begin =====<br />
<br />
These install instructions assume you are installing Funtoo Linux to an hard disk using Master Boot Record partition tables (MBR). If you are installing Funtoo Linux on a machine where another OS is installed, or there is an existing Linux distribution on your system that you want to keep, then you will need to adapt these instructions to suit your needs.<br />
<br />
===== Using fdisk =====<br />
<br />
Find the disk:<br />
<br />
<console><br />
# fdisk -l<br />
</console><br />
<br />
Verify the disk:<br />
<br />
<console><br />
# fdisk -l /dev/sda<br />
</console><br />
<br />
<pre><br />
Disk /dev/sda: 640.1 GB, 640135028736 bytes, 1250263728 sectors<br />
Units = sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disk label type: gpt<br />
<br />
<br />
# Start End Size Type Name<br />
1 2048 1250263694 596.2G Linux filesyste Linux filesystem<br />
</pre><br />
<br />
====== Zap the disk outside of fdisk ======<br />
<br />
(Optional if doing through fdisk) Zap the disk<br />
<br />
<console><br />
sgdisk --zap-all /dev/sda<br />
</console><br />
<br />
{{fancynote|--zap-all destroys GPT and MBR data structures}}<br />
<br />
<pre><br />
Creating new GPT entries.<br />
GPT data structures destroyed! You may now partition the disk using fdisk or<br />
other utilities.<br />
</pre><br />
<br />
This output is also nothing to worry baout, the command still succeded:<br />
<br />
<pre><br />
***************************************************************<br />
Found invalid GPT and valid MBR; converting MBR to GPT format<br />
in memory. <br />
***************************************************************<br />
<br />
<br />
Warning! Secondary partition table overlaps the last partition by<br />
33 blocks!<br />
You will need to delete this partition or resize it in another utility.<br />
GPT data structures destroyed! You may now partition the disk using fdisk or<br />
other utilities.<br />
</pre><br />
<br />
Start fdisk:<br />
<br />
<console><br />
# fdisk /dev/sda<br />
</console><br />
<br />
<pre><br />
Welcome to fdisk (util-linux 2.24.2).<br />
Changes will remain in memory only, until you decide to write them.<br />
Be careful before using the write command.<br />
<br />
Device does not contain a recognized partition table.<br />
<br />
Created a new DOS disklabel with disk identifier 0x83d740d3.<br />
</pre><br />
<br />
====== Zap the disk inside of fdisk ======<br />
<br />
Start fdisk:<br />
<br />
<console><br />
# fdisk /dev/sda<br />
</console><br />
<br />
<pre><br />
Welcome to fdisk (util-linux 2.24.2).<br />
Changes will remain in memory only, until you decide to write them.<br />
Be careful before using the write command.<br />
</pre><br />
<br />
Pull up the help menu:<br />
<br />
<console><br />
Command (m for help): m<br />
</console><br />
<br />
<pre><br />
Help:<br />
<br />
Generic<br />
d delete a partition<br />
l list known partition types<br />
n add a new partition<br />
p print the partition table<br />
t change a partition type<br />
v verify the partition table<br />
<br />
Misc<br />
m print this menu<br />
x extra functionality (experts only)<br />
<br />
Save & Exit<br />
w write table to disk and exit<br />
q quit without saving changes<br />
<br />
Create a new label<br />
g create a new empty GPT partition table<br />
G create a new empty SGI (IRIX) partition table<br />
o create a new empty DOS partition table<br />
s create a new empty Sun partition table<br />
</pre><br />
<br />
Empty the partition table:<br />
<br />
<console><br />
Command (m for help): o<br />
</console><br />
<br />
Created a new DOS disklabel with disk identifier 0x42b3af42<br />
<br />
List the parititons and delete them by hand:<br />
<br />
<console><br />
Command (m for help): p<br />
</console><br />
<br />
<pre><br />
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: gpt<br />
Disk identifier: 378E28D3-274A-4B3D-9A1A-E0F78DE625DB<br />
<br />
Device Start End Size Type<br />
/dev/sda1 2048 1250263694 596.2G Linux filesystem<br />
</pre><br />
<br />
Delete the partitions:<br />
<br />
<console><br />
Command (m for help): d<br />
</console><br />
<br />
<pre><br />
Selected partition 1<br />
<br />
Partition 1 has been deleted.<br />
</pre><br />
<br />
{{fancynote|There was only had 1 partiton so it was auoamtically selected and deleted. If there was more than 1, it would have to be manually selected.}}<br />
<br />
<console><br />
Partition number (1,2, default 2): 1<br />
</console><br />
<br />
<pre><br />
Partition 1 has been deleted.<br />
</pre><br />
<br />
====== Create partitions ======<br />
<br />
(Optional, if not creating elsewhere) Create the boot partition:<br />
<br />
<console><br />
Command (m for help): n<br />
<br />
Partition type:<br />
p primary (0 primary, 0 extended, 4 free)<br />
e extended<br />
Select (default p): <br />
<br />
Using default response p.<br />
Partition number (1-4, default 1): <br />
First sector (2048-1250263727, default 2048): <br />
Last sector, +sectors or +size{K,M,G,T,P} (2048-1250263727, default 1250263727): +128M<br />
</console><br />
<br />
<pre><br />
Created a new partition 1 of type 'Linux' and of size 128 MiB.<br />
</pre><br />
<br />
(Optional, if not needed) Create the swap partition:<br />
<br />
<console><br />
Command (m for help): n<br />
<br />
Partition type:<br />
p primary (1 primary, 0 extended, 3 free)<br />
e extended<br />
Select (default p): <br />
<br />
Using default response p.<br />
Partition number (2-4, default 2): <br />
First sector (264192-1250263727, default 264192): <br />
Last sector, +sectors or +size{K,M,G,T,P} (264192-1250263727, default 1250263727): +32G<br />
</console><br />
<br />
<pre><br />
Created a new partition 2 of type 'Linux' and of size 32 GiB.<br />
</pre><br />
<br />
<console><br />
Command (m for help): t<br />
Partition number (1,2, default 2): 2<br />
Hex code (type L to list all codes): 82<br />
</console><br />
<br />
<pre><br />
Changed type of partition 'Linux' to 'Linux swap / Solaris'.<br />
</pre><br />
<br />
Create the root partition:<br />
<br />
<console><br />
Command (m for help): n<br />
<br />
Partition type:<br />
p primary (2 primary, 0 extended, 2 free)<br />
e extended<br />
Select (default p): <br />
<br />
Using default response p.<br />
Partition number (3,4, default 3): <br />
First sector (67373056-1250263727, default 67373056): <br />
Last sector, +sectors or +size{K,M,G,T,P} (67373056-1250263727, default 1250263727): <br />
</console><br />
<br />
<pre><br />
Created a new partition 3 of type 'Linux' and of size 564 GiB.<br />
</pre><br />
<br />
Verify the partition table:<br />
<br />
<console><br />
Command (m for help): p<br />
</console><br />
<br />
<pre><br />
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0xac67d8f6<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 264191 131072 83 Linux<br />
/dev/sda2 264192 67373055 33554432 82 Linux swap / Solaris<br />
/dev/sda3 67373056 1250263727 591445336 83 Linux<br />
</pre><br />
<br />
Write the parition table:<br />
<br />
<console><br />
Command (m for help): w<br />
</console><br />
<br />
<pre><br />
The partition table has been altered.<br />
Calling ioctl() to re-read partition table.<br />
Syncing disks.<br />
</pre><br />
<br />
Check the disk:<br />
<br />
<console><br />
# fdisk -l /dev/sda<br />
</console><br />
<br />
<pre><br />
Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: dos<br />
Disk identifier: 0xac67d8f6<br />
<br />
Device Boot Start End Blocks Id System<br />
/dev/sda1 2048 264191 131072 83 Linux<br />
/dev/sda2 264192 67373055 33554432 82 Linux swap / Solaris<br />
/dev/sda3 67373056 1250263727 591445336 83 Linux<br />
</pre><br />
<br />
==== Creating filesystems ====<br />
<br />
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.<br />
<br />
You will not create a filesystem on your swap partition, but will initialize it using the <tt>mkswap</tt> command so that it can be used as disk-based virtual memory. Then we'll run the <tt>swapon</tt> command to make your newly-initialized swap space active within the live CD environment, in case it is needed during the rest of the install process.<br />
<br />
Note that we will not create a filesystem on the GRUB boot loader partition, as GRUB writes binary data directly to that partition when the boot loader is installed, which we'll do later.<br />
<br />
You can see the commands you will need to type below. Like the rest of this document, it assumes that you are using a GPT partitioning scheme. If you are using MBR, your root filesystem will likely be created on <tt>/dev/sda3</tt> instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:<br />
<br />
'''We generally recommend XFS for root filesystems, although ext4 is also a good choice.''' This tutorial assumes the use of XFS. If you want to use ext4, then be sure that your <tt>/etc/fstab</tt> file reflects this.<br />
<br />
{{fancywarning|1=<br />
Please use ext4 exclusively when deploying an OpenVZ host. The Parallels development team tests extensively with ext4, and modern versions of <tt>openvz-rhel6-stable</tt> are '''not''' compatible with XFS, and you may experience kernel bugs.<br />
}}<br />
<br />
'''To use XFS as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.xfs /dev/sda4<br />
# ##i##mkswap /dev/sda3<br />
# ##i##swapon /dev/sda3<br />
</console><br />
<br />
'''To use ext4 as your root filesystem:'''<br />
<br />
<console><br />
# ##i##mke2fs -t ext2 /dev/sda1 <br />
# ##i##mkfs.ext4 /dev/sda4<br />
# ##i##mkswap /dev/sda3<br />
# ##i##swapon /dev/sda3<br />
</console><br />
<br />
==== Mounting filesystems ====<br />
<br />
Mount the newly-created filesystems as follows, creating <tt>/mnt/funtoo</tt> as the installation mount point:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo<br />
# ##i##mount /dev/sda4 /mnt/funtoo<br />
# ##i##mkdir /mnt/funtoo/boot<br />
# ##i##mount /dev/sda1 /mnt/funtoo/boot<br />
</console><br />
<br />
Optionally, if you have a separate filesystem for <tt>/home</tt> or anything else:<br />
<br />
<console><br />
# ##i##mkdir /mnt/funtoo/home<br />
# ##i##mount /dev/sda5 /mnt/funtoo/home<br />
</console><br />
<br />
If you have <tt>/tmp</tt> or <tt>/var/tmp</tt> on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:<br />
<br />
<console><br />
# ##i##chmod 1777 /mnt/funtoo/tmp<br />
</console><br />
<br />
=== Installing the Stage 3 tarball ===<br />
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:<br />
* http://ftp.osuosl.org/pub/funtoo - main Funtoo Linux Mirror<br />
* http://ftp.heanet.ie/mirrors/funtoo -European Funtoo Linux mirror<br />
Now, let's navigate the directories on the mirrors to find the appropriate build of Funtoo Linux for you.<br />
<br />
==== Stable or Current? ====<br />
Funtoo Linux has a "stable" build and a "current" build. Most people use the "current" build of Funtoo Linux, and it's generally recommended that you do too. You will find "current' builds in the main <code>/funtoo-current</code> directory on our mirrors, and "stable" builds in <code>/funtoo-stable</code>.<br />
<br />If you want to read more about this, have a look at [[Funtoo_Linux#What_are_the_differences_between_.27stable.27.2C_.27current.27_and_.27experimental.27_.3F|Differences between stable, current and experimental]].<br />
<br />
==== 32 or 64-bit? ====<br />
There are three different types of Funtoo Linux that you can install. If you are installing on an older 32-bit system (if you don't know, then you probably are not) then you want to grab a stage3 tarball from the <code>x86-32bit</code> sub-directory. Most likely, you'll want to grab a 64-bit build from the <code>x86-64bit</code> sub-directory.<br />
<br />
==== Your SubArch ====<br />
Inside <code>/funtoo-current/x86-64bit/</code> on one of our mirrors, you'll see a bunch of directories for various ''subarches'' of Funtoo Linux.<br />
<br />
Subarches are builds of Funtoo Linux that are designed to run on a particular type of CPU, to offer the best possible performance. They take advantage of the instruction sets available for each CPU. <br />
<br />
For example, the <code>corei7</code> and <code>corei7-pure64</code> sub-arches require an Intel Core i7 processor to run (this includes Xeon x3400+ series, or other Nehalem-based CPUs such as Xeon x5500/x5600 series.)<br />
<br />
If you are using an AMD-based CPU, download a stage3 from <code>generic_64</code>, <code>amd64-k8</code> or <code>amd64-k10</code>. <br />
<br />
If you are using an Intel-based CPU, download a stage3 from <code>generic_64</code>, <code>atom_64</code>, <code>core2_64</code> or <code>corei7</code>.<br />
<br />
===== Pure64 Builds =====<br />
Inside <code>x86-64bit</code>, you may notice a sub-directory named <code>pure64</code>. These builds are recommended for server systems, and they do not offer any 32-bit compatibility, which is generally not needed on server systems. If you are setting up a desktop or workstation system, it's recommended that you avoid these builds as you will need 32-bit compatibility to run several binary desktop-oriented applications such as Skype. But for servers, pure64 is recommended.<br />
<br />
==== Setting the Date ====<br />
<br />
{{fancyimportant|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.}}<br />
<br />
Now is a good time to verify the date and time are correctly set to UTC. Use the <tt>date</tt> command to verify the date and time:<br />
<br />
<console><br />
# ##i##date<br />
Fri Jul 15 19:47:18 UTC 2011<br />
</console><br />
<br />
If the date and/or time need to be corrected, do so using <tt>date MMDDhhmmYYYY</tt>, keeping in mind <tt>hhmm</tt> are in 24-hour format. The example below changes the date and time to "July 16th, 2011 @ 8:00PM" UTC:<br />
<br />
<console><br />
# ##i##date 071620002011<br />
Fri Jul 16 20:00:00 UTC 2011<br />
</console><br />
<br />
==== Download the Stage3 ====<br />
Once you are in your Funtoo Linux root filesystem, use <tt>wget</tt> 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 <tt>/mnt/funtoo</tt> directory as follows:<br />
<br />
<console># ##i##cd /mnt/funtoo<br />
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz<br />
</console><br />
<br />
<br />
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 <tt>generic_64</tt> or <tt>generic_32</tt> stage. Consult the [[Download]] page for more information.<br />
<br />
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:<br />
<console><br />
# ##i##tar xpf stage3-latest.tar.xz<br />
</console><br />
<br />
{{fancyimportant|It is very important to use <tt>tar</tt>'s "<tt>p</tt>" option when extracting the Stage 3 tarball - it tells <tt>tar</tt> to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}<br />
<br />
=== Chroot into Funtoo ===<br />
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:<br />
<console><br />
# ##i##cd /mnt/funtoo<br />
# ##i##mount -t proc none proc<br />
# ##i##mount --rbind /sys sys<br />
# ##i##mount --rbind /dev dev<br />
</console><br />
<br />
You'll also want to copy over <tt>resolv.conf</tt> in order to have proper DNS name resolution from inside the chroot:<br />
<console><br />
# ##i##cp /etc/resolv.conf etc<br />
</console><br />
<br />
Now you can chroot into your new system. Use <tt>env</tt> before <tt>chroot</tt> to ensure that no environment variables from the installation media are used by your new system:<br />
<br />
<console><br />
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l<br />
</console><br />
<br />
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use <tt>uname -r</tt> 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.}}<br />
{{fancyimportant|If you receive the error "<tt>chroot: failed to run command `/bin/bash': Exec format error</tt>", 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.}}<br />
<br />
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:<br />
<console><br />
# ##i##export PS1="(chroot) $PS1"<br />
</console><br />
<br />
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.<br />
<br />
=== Downloading the Portage tree ===<br />
<br />
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}<br />
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 <tt>emerge --sync</tt> from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
</console><br />
<br />
{{fancyimportant|If you receive the error with initial <tt>emerge --sync</tt> due to git protocol restrictions, change <tt>SYNC</tt> variable in <tt>/etc/make.conf</tt>}}<br />
<pre><br />
SYNC="https://github.com/funtoo/ports-2012.git"<br />
</pre><br />
<br />
=== Configuring your system ===<br />
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 <tt>/etc/fstab</tt>. The others are optional. Here are a list of files that you should consider editing:<br />
<br />
{| {{table}}<br />
!File<br />
!Do I need to change it?<br />
!Description<br />
|-<br />
|<tt>/etc/fstab</tt><br />
|'''YES - required'''<br />
|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.<br />
|-<br />
|<tt>/etc/localtime</tt><br />
|''Maybe - recommended''<br />
|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) <br />
|-<br />
|<tt>/etc/make.conf</tt> (symlink) - also known as:<br/><tt>/etc/portage/make.conf</tt><br />
|''Maybe - recommended''<br />
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.<br />
|-<br />
|<tt>/etc/conf.d/hostname</tt><br />
|''Maybe - recommended''<br />
|Used to set system hostname. Set the <tt>hostname</tt> variable to the fully-qualified (with dots, ie. <tt>foo.funtoo.org</tt>) name if you have one. Otherwise, set to the local system hostname (without dots, ie. <tt>foo</tt>). Defaults to <tt>localhost</tt> if not set.<br />
|-<br />
|<tt>/etc/hosts</tt><br />
|''No''<br />
| You no longer need to manually set the hostname in this file. This file is automatically generated by <tt>/etc/init.d/hostname</tt>.<br />
|-<br />
|<tt>/etc/conf.d/keymaps</tt><br />
|Optional<br />
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].<br />
|-<br />
|<tt>/etc/conf.d/hwclock</tt><br />
|Optional<br />
|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.<br />
|-<br />
|<tt>/etc/conf.d/modules</tt><br />
|Optional<br />
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.<br />
|-<br />
|<tt>profiles</tt><br />
|Optional<br />
|Some useful portage settings that may help speed up intial configuration.<br />
|}<br />
<br />
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 portal|Community]])<br />
<br />
Let's go ahead and see what we have to do. Use <tt>nano -w <name_of_file></tt> to edit files -- the "<tt>-w</tt>" disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.<br />
<br />
{{fancywarning|It's important to edit your <tt>/etc/fstab</tt> 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 <tt>gdisk</tt> or <tt>fdisk</tt>. Skipping this step may prevent Funtoo Linux from booting successfully.}}<br />
<br />
==== /etc/fstab ====<br />
<br />
<tt>/etc/fstab</tt> is used by the <tt>mount</tt> command which is ran when your system boots. Statements of this file inform <tt>mount</tt> about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit <tt>/etc/fstab</tt> and ensure that it reflects the partition configuration you used earlier:<br />
<br />
<console><br />
(chroot) # ##i##nano -w /etc/fstab<br />
</console><br />
<br />
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type "<tt>Y</tt>" when asked if you want to save the modified buffer, or hit Control-O before closing <tt>nano</tt>. Otherwise your changes will be discarded.<br />
<br />
<pre><br />
# The root filesystem should have a pass number of either 0 or 1.<br />
# All other filesystems should have a pass number of 0 or greater than 1.<br />
#<br />
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.<br />
#<br />
# See the manpage fstab(5) for more information.<br />
#<br />
# <fs> <mountpoint> <type> <opts> <dump/pass><br />
<br />
/dev/sda1 /boot ext2 noatime 1 2<br />
/dev/sda3 none swap sw 0 0<br />
/dev/sda4 / ext4 noatime 0 1<br />
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0<br />
</pre><br />
<br />
==== /etc/localtime ====<br />
<br />
<tt>/etc/localtime</tt> 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 <tt>/etc/localtime</tt> with a symbolic link to the timezone that you wish to use. <br />
<br />
<console><br />
(chroot) # ##i##ln -sf /usr/share/zoneinfo/MST7MDT /etc/localtime<br />
</console><br />
<br />
The above sets the timezone to Mountain Standard Time (with daylight savings). Type <tt>ls /usr/share/zoneinfo</tt> to see what timezones are available. There are also sub-directories containing timezones described by location.<br />
<br />
==== /etc/make.conf ====<br />
<br />
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:<br />
<br />
<pre><br />
MAKEOPTS="-j3" <br />
</pre><br />
<br />
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.<br />
<console><br />
(chroot) # ##i##grep "processor" /proc/cpuinfo | wc -l<br />
16<br />
</console><br />
<br />
Set MAKEOPTS to this number plus one:<br />
<br />
<pre><br />
MAKEOPTS="-j17"<br />
</pre><br />
<br />
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 ("<tt>-</tt>") 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].<br />
<br />
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:<br />
<br />
<pre><br />
LINGUAS="fr"<br />
</pre><br />
<br />
==== /etc/conf.d/hwclock ====<br />
If you dual-boot with Windows, you'll need to edit this file and change '''clock''' 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.<br />
<console><br />
(chroot) # ##i##nano -w /etc/conf.d/hwclock<br />
</console><br />
<br />
==== Localization ====<br />
<br />
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]].<br />
<br />
==== Profiles ====<br />
<br />
[[Funtoo 1.0 Profile|Funtoo profiles]] are used to define defaults for Portage specific to your needs. There are 4 basic profile types: arch, build, [[Flavors and Mix-ins|flavor, and mix-ins]]:<br />
<br />
;arch: typically <tt>x86-32bit</tt> or <tt>x86-64bit</tt>, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.<br />
;build: defines whether your system is a <tt>current</tt>, <tt>stable</tt> or <tt>experimental</tt> build. <tt>current</tt> systems will have newer packages unmasked than <tt>stable</tt> systems.<br />
;flavor: defines the general type of system, such as <tt>server</tt> or <tt>desktop</tt>, and will set default USE flags appropriate for your needs.<br />
;mix-ins: define various optional settings that you may be interested in enabling.<br />
<br />
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.<br />
<br />
Remember that profiles can often be inherited. For example, the <tt>desktop</tt> flavor inherits the <tt>workstation</tt> flavor settings, which in turn inherits the <tt>X</tt> and <tt>audio</tt> mix-ins. You can view this by using eselect:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile show<br />
Currently set profiles:<br />
arch: gentoo:funtoo/1.0/linux-gnu/arch/x86-64bit<br />
build: gentoo:funtoo/1.0/linux-gnu/build/current<br />
flavor: gentoo:funtoo/1.0/linux-gnu/flavor/desktop<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/kde<br />
<br />
Automatically enabled profiles:<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/print<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/X<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/audio<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/dvd<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/media<br />
mix-ins: gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras<br />
<br />
<br />
</console><br />
<br />
To view installed profiles:<br />
<console><br />
(chroot) # ##i##eselect profile list<br />
</console><br />
<br />
To change the profile flavor:<br />
<console><br />
(chroot) # ##i##eselect profile set-flavor 7<br />
</console><br />
<br />
To add a mix-in:<br />
<br />
<console><br />
(chroot) # ##i##eselect profile add 10<br />
</console><br />
<br />
=== Configuring and installing the Linux kernel ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
==== Package Sets ====<br />
<br />
Before we install a kernel, we're going to cover something about Portage, the Funtoo Linux package manager which will help us in our kernel installation efforts. Portage has a command called <tt>emerge</tt> which is used to build and install packages from source, and it takes care of installing all of the package's dependencies. You call emerge like this:<br />
<br />
<console><br />
(chroot) # ##i##emerge packagename<br />
</console><br />
<br />
All of the package's dependencies will be built from source, and installed, as well as the package itself.<br />
<br />
When you install a package by specifying its name on the command-line, Portage records its name in the <tt>/var/lib/portage/world</tt> file. It does this because it figures that because you've installed it by name, you want to consider it part of your system, and will want to keep the package updated in the future. This is a handy feature -- when packages are added to the ''world set'', we can update our entire system by typing:<br />
<br />
<console><br />
(chroot) # ##i##emerge --sync<br />
(chroot) # ##i##emerge -auDN @world<br />
</console><br />
<br />
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 <tt>emerge</tt> to:<br />
<br />
* '''<tt>a</tt>''' - show us what will be emerged, and '''ask''' us if we want to proceed<br />
* '''<tt>u</tt>''' - ''update'' the packages we specify -- don't emerge them again if they are already emerged.<br />
* '''<tt>D</tt>''' - Consider the entire dependency tree of packages when looking for updates. In other words, do a '''deep''' update.<br />
* '''<tt>N</tt>''' - Update any packages who have changed ('''new''') USE settings.<br />
<br />
While this is a handy feature, most people don't want to be forced to update their kernel whenever they update all their system's packages. So we're going to create a new package set, called <tt>kernel</tt>, which contains our Linux kernel. When we want to update it, we'll type:<br />
<br />
<console><br />
(chroot) # ##i##emerge -u @kernel<br />
</console><br />
<br />
When we just want to update our system's packages, we'll type <tt>emerge -auDN @world</tt>, and it will update our world set, leaving out the kernel. Let's look at how to do this:<br />
<br />
==== Kernel Package Set ====<br />
<br />
To create the kernel package set, perform the following steps:<br />
<br />
<console><br />
(chroot) # ##i##mkdir /etc/portage/sets<br />
(chroot) # ##i##echo sys-kernel/debian-sources > /etc/portage/sets/kernel<br />
</console><br />
<br />
Now, we'll want to set a USE variable to tell <tt>debian-sources</tt> 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 <tt>binary</tt> USE variable for <tt>debian-sources</tt>, as follows:<br />
<br />
<console><br />
(chroot) # ##i##echo "sys-kernel/debian-sources binary" >> /etc/portage/package.use<br />
</console><br />
<br />
{{Fancynote|1=<br />
See [[Funtoo Linux Kernels]] for a full list of kernels supported in Funtoo Linux. We recommend <tt>debian-sources</tt> for new users.}}<br />
<br />
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 <tt>binary</tt> USE flag to the <tt>debian-sources</tt> 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.<br />
<br />
==== Building the Kernel ====<br />
<br />
Now, let's emerge our kernel:<br />
<br />
<console><br />
(chroot) # ##i##emerge @kernel<br />
</console><br />
<br />
Note that while use of the <tt>binary</tt> 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 <tt>MAKEOPTS</tt> in <tt>/etc/make.conf</tt> 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.<br />
<br />
{{fancyimportant|1=<br />
<tt>debian-sources</tt> with <tt>binary</tt> USE flag requires at least 12GB free in <tt>/var/tmp</tt>.}}<br />
<br />
{{fancynote|NVIDIA card users: the <tt>binary</tt> 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 <tt>/etc/modprobe.d/</tt>.}}<br />
<br />
{{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.}}<br />
<br />
Once <tt>emerge</tt> completes, you'll have a brand new kernel and initramfs installed to <tt>/boot</tt>, plus kernel headers installed in <tt>/usr/src/linux</tt>, and you'll be ready to configure the boot loader to load these to boot your Funtoo Linux system.<br />
<br />
=== Installing a Bootloader ===<br />
<br />
==== Installing Grub ====<br />
<br />
The boot loader is responsible for loading the kernel from disk when your computer boots. For new installations, GRUB 2 and Funtoo's boot-update tool should be used as a boot loader. GRUB supports both GPT/GUID and legacy MBR partitioning schemes.<br />
<br />
To use this recommended boot method, first emerge <tt>boot-update</tt>. This will also cause <tt>grub-2</tt> to be merged, since it is a dependency of <tt>boot-update</tt>. (You may need to adjust <tt>GRUB_PLATFORMS</tt> if you are on a UEFI system. See [[UEFI Install Guide]]).<br />
<br />
<console><br />
(chroot) # ##i##emerge boot-update<br />
</console><br />
<br />
Then, edit <tt>/etc/boot.conf</tt> and specify "<tt>Funtoo Linux genkernel</tt>" as the <tt>default</tt> setting at the top of the file, replacing <tt>"Funtoo Linux"</tt>. <br />
<br />
<tt>/etc/boot.conf</tt> should now look like this:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
# if you use bliss-kernel package<br />
# you should change string<br />
# kernel kernel[-v]<br />
# to<br />
# kernel kernel/[-v]/kernel[-v]<br />
kernel kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
If you use bliss-kernel, your <tt>/etc/boot.conf</tt> should look like:<br />
<br />
<pre><br />
boot {<br />
generate grub<br />
default "Funtoo Linux genkernel"<br />
timeout 3 <br />
}<br />
<br />
"Funtoo Linux" {<br />
kernel bzImage[-v]<br />
# params += nomodeset<br />
}<br />
<br />
"Funtoo Linux genkernel" {<br />
kernel kernels/[-v]/kernel[-v]<br />
initrd initramfs[-v]<br />
params += real_root=auto <br />
# params += nomodeset<br />
} <br />
</pre><br />
<br />
Please read <tt>man boot.conf</tt> for further details.<br />
<br />
===== Running grub-install and boot-update =====<br />
<br />
Finally, we will need to actually install the GRUB boot loader to your disk, and also run <tt>boot-update</tt> which will generate your boot loader configuration file:<br />
<br />
<console><br />
(chroot) # ##i##grub-install --no-floppy /dev/sda<br />
(chroot) # ##i##boot-update<br />
</console><br />
<br />
You only need to run <tt>grub-install</tt> when you first install Funtoo Linux, but you need to re-run <tt>boot-update</tt> every time you modify your <tt>/etc/boot.conf</tt> file, so your changes are applied on next boot.<br />
<br />
OK - your system should be ready to boot! Well, there are a few more loose ends...<br />
<br />
==== Installing Syslinux/Extlinux ====<br />
<br />
An alternate boot loader called extlinux can be used instead of GRUB if you desire. See the [[Extlinux|extlinux Guide]] for information on how to do this.<br />
<br />
=== Configuring your network ===<br />
<br />
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.<br />
<br />
==== Wi-Fi ====<br />
===== Using NetworkManager =====<br />
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:<br />
<br />
<console><br />
(chroot) # ##i##emerge linux-firmware<br />
(chroot) # ##i##emerge networkmanager<br />
(chroot) # ##i##rc-update add NetworkManager default<br />
</console><br />
<br />
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 <tt>default</tt> runlevel so it will start when Funtoo Linux boots.<br />
<br />
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:<br />
<br />
<console><br />
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork<br />
</console><br />
<br />
The <tt>addwifi</tt> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <tt>mywifinetwork</tt> with the password <tt>wifipassword</tt>. This network configuration entry is stored in <tt>/etc/NetworkManager/system-connections</tt> 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.<br />
<br />
===== Using wpa_supplicant =====<br />
If for some reason you don't want to use a tool such as NetworkManager or <tt>wicd</tt>, you can use wpa_supplicant for wireless network connections.<br />
<br />
First, emerge wpa_supplicant:<br />
<br />
<console><br />
(chroot) ###i## emerge -a wpa_supplicant<br />
</console><br />
<br />
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant.conf.<br />
The syntax is very easy:<br />
<pre><br />
network={<br />
ssid="MyWifiName"<br />
psk="lol42-wifi"<br />
}<br />
<br />
network={<br />
ssid="Other Network"<br />
psk="6d96270004515a0486bb7f76196a72b40c55a47f"<br />
}<br />
</pre><br />
<br />
You will need to add both <tt>wpa_supplicant</tt> and <tt>dhcpcd</tt> to the default runlevel. <tt>wpa_supplicant</tt> will connect to your access point, and <tt>dhcpcd</tt> will acquire an IP address via DHCP:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
(chroot) # ##i##rc-update add wpa_supplicant default<br />
</console><br />
<br />
==== Desktop (Wired Ethernet) ====<br />
<br />
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 <tt>dhcpcd</tt> to the default runlevel:<br />
<br />
<console><br />
(chroot) # ##i##rc-update add dhcpcd default<br />
</console><br />
<br />
When you reboot, <tt>dhcpcd</tt> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.<br />
<br />
==== Server (Static IP) ====<br />
<br />
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.<br />
<br />
=== Finishing Steps ===<br />
<br />
==== Set your root password ====<br />
It's imperative that you set your root password before rebooting so that you can log in.<br />
<console><br />
(chroot) # ##i##passwd<br />
</console><br />
<br />
===Restart your system ===<br />
<br />
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.<br />
<br />
Leave the chroot, change directory to /mnt, unmount your Funtoo partitions, and reboot.<br />
<console><br />
(chroot) # ##i##exit<br />
# ##i##cd /mnt<br />
# ##i##umount -l funtoo<br />
# ##i##reboot<br />
</console><br />
<br />
{{fancynote|System Rescue CD will gracefully unmount your new Funtoo filesystems as part of its normal shutdown sequence.}}<br />
<br />
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 <tt>login:</tt> prompt. Funtoo Linux has been successfully installed!<br />
<br />
===Next Steps===<br />
<br />
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 [[:Category:Official Documentation|official documentation]], which includes all docs that we officially maintain for installation and operation of Funtoo Linux.<br />
<br />
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.<br />
<br />
{{#ask: [[Category:First Steps]] | format=category }}<br />
<br />
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.<br />
<br />
[[Category:HOWTO]]<br />
[[Category:Install]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=GNOME_First_Steps&diff=4938GNOME First Steps2014-07-20T19:06:43Z<p>Dantrell: Tweaked the emerge target</p>
<hr />
<div>== What is GNOME? ==<br />
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." [http://gnome.org GNOME]<br />
<br />
== Prerequisites ==<br />
<br />
Before installing GNOME, ensure that the [[X Window System]] has been installed.<br />
<br />
{{fancywarning|1=<br />
Please note that Linux kernel 3.15.* may still have serious incompatibility with various graphics drivers. If you like to use <tt>gentoo-sources</tt> or <tt>vanilla-sources</tt>, please use a 3.14.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.}}<br />
<br />
== Preparing to emerge ==<br />
<br />
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:<br />
<console><br />
##r### ##b## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio <br />
[12] funtoo/1.0/linux-gnu/mix-ins/console-extras <br />
[13] funtoo/1.0/linux-gnu/mix-ins/dvd <br />
[14] funtoo/1.0/linux-gnu/mix-ins/gnome <br />
[15] funtoo/1.0/linux-gnu/mix-ins/kde <br />
[16] funtoo/1.0/linux-gnu/mix-ins/mate <br />
[17] funtoo/1.0/linux-gnu/mix-ins/media <br />
[18] funtoo/1.0/linux-gnu/mix-ins/print <br />
[19] funtoo/1.0/linux-gnu/mix-ins/python3-only <br />
[20] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat <br />
[21] funtoo/1.0/linux-gnu/mix-ins/server-db <br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-mail <br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[24] funtoo/1.0/linux-gnu/mix-ins/X <br />
[25] funtoo/1.0/linux-gnu/mix-ins/xfce <br />
[26] funtoo/1.0/linux-gnu/mix-ins/vmware-guest <br />
[27] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:<br />
<console><br />
##r### ##b##eselect profile add 14<br />
</console><br />
<br />
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.<br />
<br />
== Emerging == <br />
<br />
You are provided with two packages that will pull in this desktop environment: <br />
<br />
* ''gnome''<br />
<br />
{{fancynote|This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.}}<br />
<br />
* ''gnome-light''<br />
<br />
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}<br />
<br />
=== GNOME 3.12 from a clean install ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.6 ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'', remove nautilus-open-terminal if it is installed as it now bundled into gnome-terminal<br />
<br />
<console><br />
# ##i## emerge -vaC nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN world<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' remove the following packages as there have been changes since 3.6 (you will have up reinstall any packages that have been renamed after gnome-light completes).<br />
<br />
<console><br />
# ##i## emerge -vaC gnome-fallback gnome-panel gnome-screensaver metacity gnome-games gcalctool nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN world<br />
</console><br />
<br />
Finally, restore any applications that have been renamed (such as gcalctool => gnome-calculator)<br />
<br />
<console><br />
# ##i## emerge -va gnome-calculator<br />
</console><br />
<br />
== Finishing Touches ==<br />
<br />
=== Set up a Display Manager ===<br />
<br />
Typically, you will want to use <tt>gdm</tt>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.<br />
<br />
To enable gdm, edit <tt>/etc/conf.d/xdm</tt> and set <tt>DISPLAYMANAGER</tt> to <tt>gdm</tt> instead of <tt>xdm</tt>. Then, perform the following steps to add <tt>xdm</tt> to the default runlevel, and have it start automatically from now on when your system starts:<br />
<br />
<console><br />
# ##i##rc-update add xdm default<br />
</console><br />
<br />
Then, if you want to start it now do<br />
<br />
<console><br />
# ##i##rc<br />
</console><br />
<br />
But you should reboot to avoid having an open login terminal<br />
<br />
=== Verify the inode/directory MimeType Handler ===<br />
<br />
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:<br />
<br />
<pre><br />
[Added Associations]<br />
inode/directory=nautilus.desktop;baobab.desktop;<br />
</pre><br />
<br />
=== Automatically Starting Applications at Login ===<br />
<br />
When using an old-fashioned <tt>.xinitrc</tt>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <tt>~/.xprofile</tt> file. Here's my sample <tt>.xprofile</tt> to start <tt>xflux</tt> to dim the screen at night:<br />
<br />
<pre><br />
xflux -z 87107<br />
</pre><br />
<br />
Remember to add a <tt>&</tt> at the end of any command that doesn't return to the shell prompt after running.<br />
<br />
[[Category:Desktop Environments]]<br />
[[Category:First Steps]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=GNOME_First_Steps&diff=4937GNOME First Steps2014-07-20T06:36:14Z<p>Dantrell: Fix some typos</p>
<hr />
<div>== What is GNOME? ==<br />
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." [http://gnome.org GNOME]<br />
<br />
== Prerequisites ==<br />
<br />
Before installing GNOME, ensure that the [[X Window System]] has been installed.<br />
<br />
{{fancywarning|1=<br />
Please note that Linux kernel 3.15.* may still have serious incompatibility with various graphics drivers. If you like to use <tt>gentoo-sources</tt> or <tt>vanilla-sources</tt>, please use a 3.14.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.}}<br />
<br />
== Preparing to emerge ==<br />
<br />
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:<br />
<console><br />
##r### ##b## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio <br />
[12] funtoo/1.0/linux-gnu/mix-ins/console-extras <br />
[13] funtoo/1.0/linux-gnu/mix-ins/dvd <br />
[14] funtoo/1.0/linux-gnu/mix-ins/gnome <br />
[15] funtoo/1.0/linux-gnu/mix-ins/kde <br />
[16] funtoo/1.0/linux-gnu/mix-ins/mate <br />
[17] funtoo/1.0/linux-gnu/mix-ins/media <br />
[18] funtoo/1.0/linux-gnu/mix-ins/print <br />
[19] funtoo/1.0/linux-gnu/mix-ins/python3-only <br />
[20] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat <br />
[21] funtoo/1.0/linux-gnu/mix-ins/server-db <br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-mail <br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[24] funtoo/1.0/linux-gnu/mix-ins/X <br />
[25] funtoo/1.0/linux-gnu/mix-ins/xfce <br />
[26] funtoo/1.0/linux-gnu/mix-ins/vmware-guest <br />
[27] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:<br />
<console><br />
##r### ##b##eselect profile add 14<br />
</console><br />
<br />
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.<br />
<br />
== Emerging == <br />
<br />
You are provided with two packages that will pull in this desktop environment: <br />
<br />
* ''gnome''<br />
<br />
{{fancynote|This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.}}<br />
<br />
* ''gnome-light''<br />
<br />
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}<br />
<br />
=== GNOME 3.12 from a clean install ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.6 ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'', remove nautilus-open-terminal if it is installed as it now bundled into gnome-terminal<br />
<br />
<console><br />
# ##i## emerge -vaC nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' remove the following packages as there have been changes since 3.6 (you will have up reinstall any packages that have been renamed after gnome-light completes).<br />
<br />
<console><br />
# ##i## emerge -vaC gnome-fallback gnome-panel gnome-screensaver metacity gnome-games gcalctool nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN gnome-light<br />
</console><br />
<br />
Finally, restore any applications that have been renamed (such as gcalctool => gnome-calculator)<br />
<br />
<console><br />
# ##i## emerge -va gnome-calculator<br />
</console><br />
<br />
== Finishing Touches ==<br />
<br />
=== Set up a Display Manager ===<br />
<br />
Typically, you will want to use <tt>gdm</tt>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.<br />
<br />
To enable gdm, edit <tt>/etc/conf.d/xdm</tt> and set <tt>DISPLAYMANAGER</tt> to <tt>gdm</tt> instead of <tt>xdm</tt>. Then, perform the following steps to add <tt>xdm</tt> to the default runlevel, and have it start automatically from now on when your system starts:<br />
<br />
<console><br />
# ##i##rc-update add xdm default<br />
</console><br />
<br />
Then, if you want to start it now do<br />
<br />
<console><br />
# ##i##rc<br />
</console><br />
<br />
But you should reboot to avoid having an open login terminal<br />
<br />
=== Verify the inode/directory MimeType Handler ===<br />
<br />
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:<br />
<br />
<pre><br />
[Added Associations]<br />
inode/directory=nautilus.desktop;baobab.desktop;<br />
</pre><br />
<br />
=== Automatically Starting Applications at Login ===<br />
<br />
When using an old-fashioned <tt>.xinitrc</tt>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <tt>~/.xprofile</tt> file. Here's my sample <tt>.xprofile</tt> to start <tt>xflux</tt> to dim the screen at night:<br />
<br />
<pre><br />
xflux -z 87107<br />
</pre><br />
<br />
Remember to add a <tt>&</tt> at the end of any command that doesn't return to the shell prompt after running.<br />
<br />
[[Category:Desktop Environments]]<br />
[[Category:First Steps]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=GNOME_First_Steps&diff=4936GNOME First Steps2014-07-20T05:32:01Z<p>Dantrell: Updated to reflect the transition to GNOME 3.12</p>
<hr />
<div>== What is GNOME? ==<br />
"GNOME 3 is an easy and elegant way to use your computer. It is designed to put you in control and bring freedom to everybody. GNOME 3 is developed by the GNOME community, a diverse, international group of contributors that is supported by an independent, non-profit foundation." [http://gnome.org GNOME]<br />
<br />
== Prerequisites ==<br />
<br />
Before installing GNOME, ensure that the [[X Window System]] has been installed.<br />
<br />
{{fancywarning|1=<br />
Please note that Linux kernel 3.15.* may still have serious incompatibility with various graphics drivers. If you like to use <tt>gentoo-sources</tt> or <tt>vanilla-sources</tt>, please use a 3.14.* kernel. This is of particular importance if you plan to run GNOME, and want to use NVIDIA (commercial or nouveau) or ATI (ati-drivers) graphics drivers.}}<br />
<br />
== Preparing to emerge ==<br />
<br />
To get your system ready to emerge gnome, it is recommended that you first set the gnome profile mix-in. To accomplish this, do the following:<br />
<console><br />
##r### ##b## eselect profile list<br />
##g##Currently available mix-ins profiles: <br />
[11] funtoo/1.0/linux-gnu/mix-ins/audio <br />
[12] funtoo/1.0/linux-gnu/mix-ins/console-extras <br />
[13] funtoo/1.0/linux-gnu/mix-ins/dvd <br />
[14] funtoo/1.0/linux-gnu/mix-ins/gnome <br />
[15] funtoo/1.0/linux-gnu/mix-ins/kde <br />
[16] funtoo/1.0/linux-gnu/mix-ins/mate <br />
[17] funtoo/1.0/linux-gnu/mix-ins/media <br />
[18] funtoo/1.0/linux-gnu/mix-ins/print <br />
[19] funtoo/1.0/linux-gnu/mix-ins/python3-only <br />
[20] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat <br />
[21] funtoo/1.0/linux-gnu/mix-ins/server-db <br />
[22] funtoo/1.0/linux-gnu/mix-ins/server-mail <br />
[23] funtoo/1.0/linux-gnu/mix-ins/server-web<br />
[24] funtoo/1.0/linux-gnu/mix-ins/X <br />
[25] funtoo/1.0/linux-gnu/mix-ins/xfce <br />
[26] funtoo/1.0/linux-gnu/mix-ins/vmware-guest <br />
[27] funtoo/1.0/linux-gnu/mix-ins/hardened<br />
</console><br />
After seeing a list of available profiles, we want to add in the appropriate number for the gnome mix-in. To do this, run the following:<br />
<console><br />
##r### ##b##eselect profile add 14<br />
</console><br />
<br />
By enabling the gnome mix-in, various USE and other settings will be optimized to provide you with a pain-free GNOME installation experience.<br />
<br />
== Emerging == <br />
<br />
You are provided with two packages that will pull in this desktop environment: <br />
<br />
* ''gnome''<br />
<br />
{{fancynote|This is the "whole shabang" - pulls in a range of applications made for the gnome desktop environment including a few games, an archive manager, a system monitor, a web browser, a terminal, etc.}}<br />
<br />
* ''gnome-light''<br />
<br />
{{fancynote|As the name implies, this pulls in the base minimal you need to get a functioning GNOME Desktop Environment.}}<br />
<br />
=== GNOME 3.12 from a clean install ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' run the following command<br />
<br />
<console><br />
# ##i## emerge -va gnome-light<br />
</console><br />
<br />
=== Upgrading from GNOME 3.16 ===<br />
<br />
==== gnome ====<br />
<br />
To emerge ''gnome'', remove nautilus-open-terminal if it is installed as it now bundled into gnome-terminal<br />
<br />
<console><br />
# ##i## emerge -vaC nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN gnome<br />
</console><br />
<br />
==== gnome-light ====<br />
<br />
To emerge ''gnome-light'' remove the following packages as there have been changes since 3.6 (you will have up reinstall any packages that have been renamed after gnome-light completes).<br />
<br />
<console><br />
# ##i## emerge -vaC gnome-fallback gnome-panel gnome-screensaver metacity gnome-games gcalctool nautilus-open-terminal<br />
</console><br />
<br />
Then, run the following command<br />
<br />
<console><br />
# ##i## emerge -vauDN gnome-light<br />
</console><br />
<br />
Finally, restore any applications that have been renamed (such as gcalctool => gnome-calculator)<br />
<br />
<console><br />
# ##i## emerge -va gnome-calculator<br />
</console><br />
<br />
== Finishing Touches ==<br />
<br />
=== Set up a Display Manager ===<br />
<br />
Typically, you will want to use <tt>gdm</tt>, the GNOME display manager, to log in to GNOME. This will allow you to log in graphically, rather than using the text console.<br />
<br />
To enable gdm, edit <tt>/etc/conf.d/xdm</tt> and set <tt>DISPLAYMANAGER</tt> to <tt>gdm</tt> instead of <tt>xdm</tt>. Then, perform the following steps to add <tt>xdm</tt> to the default runlevel, and have it start automatically from now on when your system starts:<br />
<br />
<console><br />
# ##i##rc-update add xdm default<br />
</console><br />
<br />
Then, if you want to start it now do<br />
<br />
<console><br />
# ##i##rc<br />
</console><br />
<br />
But you should reboot to avoid having na open login terminal<br />
<br />
=== Verify the inode/directory MimeType Handler ===<br />
<br />
In some odd instances, baobab might take priority over nautilus when handling the inode/directory MimeType. If this behavior is not desired, add the following to /home/~/.local/share/applications/mimeapps.list:<br />
<br />
<pre><br />
[Added Associations]<br />
inode/directory=nautilus.desktop;baobab.desktop;<br />
</pre><br />
<br />
=== Automatically Starting Applications at Login ===<br />
<br />
When using an old-fashioned <tt>.xinitrc</tt>, starting up applications when X starts is relatively easy. When using GDM, this can still be accomplished, by using the <tt>~/.xprofile</tt> file. Here's my sample <tt>.xprofile</tt> to start <tt>xflux</tt> to dim the screen at night:<br />
<br />
<pre><br />
xflux -z 87107<br />
</pre><br />
<br />
Remember to add a <tt>&</tt> at the end of any command that doesn't return to the shell prompt after running.<br />
<br />
[[Category:Desktop Environments]]<br />
[[Category:First Steps]]<br />
[[Category:Official Documentation]]</div>Dantrellhttps://www.funtoo.org/index.php?title=User:Dantrell&diff=4890User:Dantrell2014-07-14T05:38:00Z<p>Dantrell: Created page with "{{Person |Geoloc= |Location name=United States of America |Blogs= }}"</p>
<hr />
<div>{{Person<br />
|Geoloc=<br />
|Location name=United States of America<br />
|Blogs=<br />
}}</div>Dantrell