
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.funtoo.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.funtoo.org/api.php?action=feedcontributions&amp;user=Oleg&amp;feedformat=atom</id>
		<title>Funtoo Linux - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.funtoo.org/api.php?action=feedcontributions&amp;user=Oleg&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Special:Contributions/Oleg"/>
		<updated>2013-06-20T01:45:11Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.6</generator>

	<entry>
		<id>http://www.funtoo.org/wiki/Creating_System_Rescue_CD_ZFS_Modules</id>
		<title>Creating System Rescue CD ZFS Modules</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Creating_System_Rescue_CD_ZFS_Modules"/>
				<updated>2013-06-15T17:55:44Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Using the premade iso */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This HOWTO will show you how to create your own zfs srm or download the prebuilt zfs srm module from my website.&lt;br /&gt;
&lt;br /&gt;
== Adding the overlay ==&lt;br /&gt;
There are scripts that I've written that will make this process much easier for you. So we will first set up the overlay to a directory on your machine, let's say '''&amp;quot;/home/example/overlays/fearedbliss&amp;quot;''':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# Make the overlays directory if it doesn't exist&lt;br /&gt;
# ##i##mkdir /home/example/overlays&lt;br /&gt;
&lt;br /&gt;
# Clone my overlay into this directory&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/funtoo-overlay.git&lt;br /&gt;
&lt;br /&gt;
# Rename the &amp;quot;funtoo-overlay&amp;quot; folder to &amp;quot;fearedbliss&amp;quot;&lt;br /&gt;
# ##i##mv funtoo-overlay fearedbliss&lt;br /&gt;
&lt;br /&gt;
# Add the overlay to your /etc/portage/make.conf so portage knows its existence.&lt;br /&gt;
# ##i##echo 'PORTDIR_OVERLAY=&amp;quot;/home/example/overlays/fearedbliss ${PORTDIR_OVERLAY}&amp;quot;' &amp;gt;&amp;gt; /etc/portage/make.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that the overlay has been added, let's continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling a compatible kernel ==&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is decide for which version of System Rescue CD you will be building for. Each System Rescue CD version has a different set of kernels. Specifically each version has a Stable kernel and an Alternate Kernel. The stable kernels get minor version increments every release (Sometimes major ones but usually doesn't happen too quickly), the Alternate kernels tend to move up much faster. For example System Rescue CD had the following stable/alternate kernels:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Version !! Stable !! Alternate&lt;br /&gt;
|-&lt;br /&gt;
| 3.7.0 || 3.4.47 || 3.9.4&lt;br /&gt;
|-&lt;br /&gt;
| 3.5.0 || 3.4.37 || 3.8.4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Download kernel and patches===&lt;br /&gt;
Once you decide which version you want to use, you can go to http://kernel.sysresccd.org/ and pick the version you want. After you do this, download all the stuff in that directory and put them in their own folder (a work directory). The files that are named std-sources are the patches for the regular stable kernel, the patches named alt-sources are the patches for the alternate kernel. Once you have the patches, go to kernel.org and also download the initial release of the kernel sources you want. For example, if you want to build an srm for 3.4.2 which uses the 3.4.35 kernel, just download the 3.4 (3.4.0) kernel. You just need to download the initial release because one of the patches you downloaded earlier is the patch to update the 3.4.0 to 3.4.35.&lt;br /&gt;
&lt;br /&gt;
Once you download the kernel you want, let's extract and patch it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##tar xf linux-3.4.tar.bz2&lt;br /&gt;
# ##i##mv linux-3.4 linux-3.4.35-std342-amd64&lt;br /&gt;
# ##i##bzcat std-sources-3.4-01-stable-3.4.35.patch.bz2 | patch -p1 -d linux-3.4.35-std342-amd64&lt;br /&gt;
# ##i##bzcat std-sources-3.4-02-fc16.patch.bz2 | patch -p1 -d linux-3.4.35-std342-amd64&lt;br /&gt;
# ##i##bzcat std-sources-3.4-03-aufs.patch.bz2 | patch -p1 -d linux-3.4.35-std342-amd64&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Retrieve kernel configuration===&lt;br /&gt;
Once that is complete, you will need to get the kernel config specifically for the kernel and architecture you want. The easiest way I found to do this was to download the System Rescue CD you want, and then boot it inside a VM. Once you are inside the VM, go to the /root directory, and it will be a file named kernel-&amp;lt;version&amp;gt;.conf. Copy this file over SSH and put it in a safe location. Also copy it over into the linux kernel directory and rename it to .config.&lt;br /&gt;
&lt;br /&gt;
===Build the kernel===&lt;br /&gt;
Once you copy the kernel config over, do a make menuconfig to begin. You will only need to change two settings inside the config, add the proper kernel name, and remove the old initramfs source files directory. This directory doesn't exist locally. This is a remnant of upstream's build process.&lt;br /&gt;
&lt;br /&gt;
Follow the below tree structure, and make it equal to what is below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
General Setup -&amp;gt;&lt;br /&gt;
 (-std342-amd64) Local version - append to kernel release&lt;br /&gt;
 [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support  ()    Initramfs source file(s)&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Local version above will end up making the kernel modules directory be 3.4.35-std342-amd64. The reason the kernel modules directory has to be equal to this is because our directory will be merged into the System Rescue CD later on, so the names need to be exactly the same so that the System Rescue CD system can find our kernel modules.&lt;br /&gt;
&lt;br /&gt;
If you want to build an srm (which you do), you also need to change the following inside the kernel config so that squashfs-tools can work later on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
File Systems -&amp;gt;&lt;br /&gt;
Miscellaneous Filesystems -&amp;gt;&lt;br /&gt;
 &amp;lt;*&amp;gt;   SquashFS 4.0 - Squashed file system support&lt;br /&gt;
  [*]     Squashfs XATTR support&lt;br /&gt;
  [*]     Include support for ZLIB compressed file systems&lt;br /&gt;
  [*]     Include support for LZO compressed file systems&lt;br /&gt;
  [*]     Include support for XZ compressed file systems&lt;br /&gt;
  [ ]     Use 4K device block size?&lt;br /&gt;
  [ ]     Additional option for memory-constrained systems&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now save and exit, and continue to build your kernel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|If you have multiple cores, do a make -j&amp;lt;# of processors+1&amp;gt; to build faster. Example: '''make -j9''' for an 8 core machine.}}&lt;br /&gt;
&lt;br /&gt;
=== Using the overlay ===&lt;br /&gt;
Inside the overlay, there are ebuilds already prepared that will download the kernel, patch it, and perform any required substitutions. Afterwards you literally just go into your /usr/src/&amp;lt;kernel&amp;gt; directory, and run make. To see the available versions, run the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Versions available for standard kernel&lt;br /&gt;
# ##i##equery y -O std-sources&lt;br /&gt;
&lt;br /&gt;
[I]3.4.37-r1 | o ~ o o o o o o o o o o o | o 3.4.37 | fearedbliss&lt;br /&gt;
&lt;br /&gt;
Versions available for alternate kernel&lt;br /&gt;
# ##i##equery y -O alt-sources&lt;br /&gt;
&lt;br /&gt;
[I]3.8.4 | o ~ o o o o o o o o o o o | o 3.8.4 | fearedbliss&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I haven't written the ebuilds in a way where it's easy to tell (at first glance) what System Rescue CD version you need. However, you can check the ebuild and you will see the version of the CD inside there. You can also check the chart above.&lt;br /&gt;
&lt;br /&gt;
If you wanted to install the standard kernel sources, you just emerge it like any other application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge std-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the kernel and the kernel module are installed, you need to make the SRM.&lt;br /&gt;
&lt;br /&gt;
== Creating the SRM ==&lt;br /&gt;
It's time to gather the required files and pack them together in order for it to become an SRM. An SRM is nothing more than a directory that has been compressed with squashfs. Thankfully I've written a script that will build it for you, and you can install it from the overlay.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You also need to have spl, zfs, and zfs-kmod installed on your system before you try to make the srm. Emerging '''&amp;quot;bliss-initramfs&amp;quot;''' should automatically pull those packages. If it doesn't, make sure you install them.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-kernel/bliss-initramfs srm&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge bliss-initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You should now have the following directory layout inside the '''/opt/bliss-initramfs''' folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
octopus bliss-initramfs # ls -l&lt;br /&gt;
total 117&lt;br /&gt;
-rw-r--r-- 1 root root 6718 May 23 18:05 CHANGES&lt;br /&gt;
-rw-r--r-- 1 root root  176 May 23 18:05 CREDITS&lt;br /&gt;
-rw-r--r-- 1 root root  431 May 23 18:05 HELP&lt;br /&gt;
-rw-r--r-- 1 root root 1397 May 23 18:05 LICENSE&lt;br /&gt;
-rw-r--r-- 1 root root 1852 May 23 18:05 README&lt;br /&gt;
-rw-r--r-- 1 root root 3194 May 23 18:05 USAGE&lt;br /&gt;
-rwxr-xr-x 1 root root 2891 May 23 18:05 createInit&lt;br /&gt;
drwxr-xr-x 3 root root    4 May 23 18:11 files&lt;br /&gt;
drwxr-xr-x 3 root root    6 May 23 18:11 hooks&lt;br /&gt;
drwxr-xr-x 2 root root    5 May 23 22:01 resources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run the '''createInit''' script and follow the instructions for the kernel you want to make the srm for (In this case it's '''3.4.37-std350-amd64'''):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
| Bliss Initramfs Creator - v1.8.1&lt;br /&gt;
| Author: Jonathan Vasquez &amp;lt;jvasquez1011@gmail.com&amp;gt;&lt;br /&gt;
| Distributed under the Simplified BSD License&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Which initramfs would you like to generate:&lt;br /&gt;
&amp;gt;&amp;gt; 1. ZFS&lt;br /&gt;
&amp;gt;&amp;gt; 2. Encrypted ZFS (LUKS + ZFS)&lt;br /&gt;
&amp;gt;&amp;gt; 3. More Options&lt;br /&gt;
&amp;gt;&amp;gt; 4. Exit Program&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Current choice [1]: ##i##3 ↵&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; More Options:&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; 1. ZFS - System Rescue Module&lt;br /&gt;
&amp;gt;&amp;gt; 2. Back&lt;br /&gt;
&amp;gt;&amp;gt; 3. Exit Program&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Current choice [1]: ##i##↵&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Creating a ZFS System Rescue Module!&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Do you want to use the current kernel: 3.8.13-ALL? [Y/n]: ##i##n ↵&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Please enter the kernel name: ##i##3.4.37-std350-amd64 ↵&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Detected 64 bit platform&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Checking to see if modules directory exists for 3.4.37-std350-amd64...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Creating SRMs for 3.4.37-std350-amd64...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Creating directory structure for initramfs...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Checking preliminary binaries...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Checking binaries...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Using ZFS&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Checking modules...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Copying binaries...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Copying modules...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Copying documentation...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Copying udev rules...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Compressing kernel modules...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Getting dependencies...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Copying dependencies...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Configuring files...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Creating and Packing SRMs...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Complete :)&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you should have two new files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
-rw-r--r-- 1 root root 2068480 May 24 01:05 zfs-core-3.4.37-std350-amd64.srm&lt;br /&gt;
-rw-r--r-- 1 root root  483328 May 24 01:05 zfs-kmod-3.4.37-std350-amd64.srm&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now all you need to do is put those two files in the root of your USB directory.&lt;br /&gt;
&lt;br /&gt;
If you are making srms for both the standard and alternate kernels, you will end up with two zfs-core files and two zfs-kmod files (1 set for each kernel). You don't need to put the zfs-core that it makes for one of the kernels. The zfs-core srm only has zfs program binaries, man pages, udev rules, and a few other things. The zfs-kmod is the srm that has the kernel modules (and only the kernel modules). So you can easily just put two zfs-kmods (one for each kernel version) and just re-use the same zfs-core for both of them.&lt;br /&gt;
&lt;br /&gt;
== Using the prebuilt srm ==&lt;br /&gt;
&lt;br /&gt;
=== Download the SRM ===&lt;br /&gt;
If you didn't build your own srm and want to use the prebuilt one, just emerge '''&amp;quot;zfs-srm&amp;quot;''' from the overlay:&lt;br /&gt;
&lt;br /&gt;
(Instructions on [[Creating_System_Rescue_CD_ZFS_Modules#Adding_the_overlay|adding the overlay]] can be found at the top of this page)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge zfs-srm&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can check available versions just as you did above for the kernels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Available versions of the zfs-srm&lt;br /&gt;
# ##i##equery y -O zfs-srm&lt;br /&gt;
&lt;br /&gt;
[I]3.5.0 | o ~ o o o o o o o o o o o | o 3.5.0 | fearedbliss&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(These versions match the version of the System Rescue CD).&lt;br /&gt;
&lt;br /&gt;
Installing the zfs-srm will automatically pull the '''&amp;quot;bliss-isomaker&amp;quot;''' package which is just a script that assists you with rebuilding the System Rescue CD ISO so that the ISO includes the ZFS srms. The script lets you make a bootable ISO or a bootable USB.&lt;br /&gt;
&lt;br /&gt;
Once it's installed, switch to the /opt/bliss-isomaker folder &lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /opt/bliss-isomaker&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now see a directory layout that looks similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
octopus bliss-isomaker # ls -l&lt;br /&gt;
total 100&lt;br /&gt;
drwxr-xr-x 2 root root    5 May 24 01:41 3.5.0&lt;br /&gt;
-rw-r--r-- 1 root root 1397 May 24 01:31 LICENSE&lt;br /&gt;
-rw-r--r-- 1 root root  312 May 24 01:31 README&lt;br /&gt;
-rw-r--r-- 1 root root  576 May 24 01:31 USAGE&lt;br /&gt;
-rwxr-xr-x 1 root root 3228 May 24 01:31 create&lt;br /&gt;
drwxr-xr-x 2 root root    3 May 24 01:41 iso&lt;br /&gt;
drwxr-xr-x 2 root root    4 May 24 01:41 resources&lt;br /&gt;
drwxr-xr-x 2 root root    3 May 24 01:41 srm&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The layout is as follows:&lt;br /&gt;
* 3.5.0 - This folder contains the System Rescue CD 3.5.0 specific srms for both the standard and alternate kernel that were installed by emerge.&lt;br /&gt;
* create - A script to automatically recreate the system rescue cd iso or usb with the zfs stuff included&lt;br /&gt;
* iso - directory to place your system rescue cd iso in&lt;br /&gt;
* srm - directory that has the srms&lt;br /&gt;
* resources - the files in this folder contain function calls that the 'create' script uses. You don't need to worry about these.&lt;br /&gt;
&lt;br /&gt;
=== Installing the SRM ===&lt;br /&gt;
There are a few ways to do this, you can either use one of the scripts, or you can do it manually. Before anything, make sure to copy the SRMs from the &amp;lt;Version&amp;gt; folder to the srm folder if you are using a prebuilt one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp 3.5.0/* srm&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Generating a new iso ====&lt;br /&gt;
If you just want to remake a new iso so that you can burn onto a cd or use in a virtual machine, just copy your iso over to the iso directory, and run the 'create' script. The new iso will be located in the iso directory as well with a -zfs ending. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Running the script with 1 (or iso) chooses to make an iso. You can also pass the version as well.&lt;br /&gt;
# ##i##./create 1&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
# ##i##./create iso 3.5.0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating a fresh usb ====&lt;br /&gt;
If you want to have zfs on a usb with system rescue cd, put the iso in your iso dir, and then run the usb script. It will ask you what usb you want to format (This will delete everything), and then install system rescue cd onto it. Once that is done it will copy the zfs stuff over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Running the script with 2 (or usb) chooses to make an usb. You can also pass the version as well.&lt;br /&gt;
# ##i##./create 2&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
# ##i##./create usb 3.5.0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Manual installation onto a usb ====&lt;br /&gt;
Assuming that your installing to a flash drive and that the flash drive is mounted in /mnt&lt;br /&gt;
&lt;br /&gt;
1. Mount your usb drive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mount /dev/sdX# /mnt/usbstick&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Where X# is the letter and number of your device. Immediately after you plug your usb in, type `dmesg | tail` in the console and you should see it.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Copy the zfs .srms to /mnt/usbstick&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp zfs-core-3.4.37-std350-amd64.srm zfs-kmod-3.4.37-std350-amd64.srm zfs-kmod-3.8.4-alt350-amd64.srm /mnt/usbstick&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. List your /mnt/usbstick directory and you should see something similar to the following in your /mnt/usbstick&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
octopus 3.5.0 # ls -l /mnt/usbstick&lt;br /&gt;
total 305028&lt;br /&gt;
drwxr-xr-x 3 root root      4096 May 23 20:51 boot&lt;br /&gt;
drwxr-xr-x 2 root root      4096 May 23 20:51 bootdisk&lt;br /&gt;
drwxr-xr-x 2 root root      4096 May 23 20:51 bootprog&lt;br /&gt;
drwxr-xr-x 3 root root      4096 May 23 20:51 efi&lt;br /&gt;
drwxr-xr-x 2 root root      4096 May 23 20:51 ntpasswd&lt;br /&gt;
-rwxr-xr-x 1 root root      2349 May 23 20:51 readme.txt&lt;br /&gt;
drwxr-xr-x 3 root root      4096 May 23 20:52 syslinux&lt;br /&gt;
-rwxr-xr-x 1 root root 309252096 May 23 20:51 sysrcd.dat&lt;br /&gt;
-rwxr-xr-x 1 root root        45 May 23 20:51 sysrcd.md5&lt;br /&gt;
drwxr-xr-x 2 root root      4096 May 23 20:51 usb_inst&lt;br /&gt;
-rwxr-xr-x 1 root root     15889 May 23 20:51 usb_inst.sh&lt;br /&gt;
-rwxr-xr-x 1 root root       877 May 23 20:51 usbstick.htm&lt;br /&gt;
-rwxr-xr-x 1 root root         6 May 23 20:51 version&lt;br /&gt;
-rwxr-xr-x 1 root root   2068480 May 23 20:51 zfs-core-3.4.37-std350-amd64.srm&lt;br /&gt;
-rwxr-xr-x 1 root root    483328 May 23 20:51 zfs-kmod-3.4.37-std350-amd64.srm&lt;br /&gt;
-rwxr-xr-x 1 root root    483328 May 23 20:51 zfs-kmod-3.8.4-alt350-amd64.srm&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now un-mount your flash drive and boot it into the machine that you want to use ZFS on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##umount /mnt/usbstick&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Booting into the correct kernel ==&lt;br /&gt;
'''If you are using the standard srm:'''&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
C) Standard 64bit kernel (rescue64) with more choice... &amp;gt;&lt;br /&gt;
1. SystemRescueCd with default options&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''If you are using the alternative srm:'''&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
E) Alternative 64bit kernel (altker64) with more choice... &amp;gt;&lt;br /&gt;
1. SystemRescueCd with default options&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Run 'depmod' so that the new modules can be seen by the kernel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##depmod&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|You must run '''depmod'''. If you don't, then you will get failed to load the ZFS stack error!}}&lt;br /&gt;
&lt;br /&gt;
3. Use ZFS as usual. If you type '''zpool status''' and then type '''dmesg | tail''',&lt;br /&gt;
&lt;br /&gt;
you should see something that says:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
ZFS: Loaded module v0.6.1-1, ZFS pool version 5000, ZFS filesystem version 5&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you see the above, then the modules loaded successfully!&lt;br /&gt;
&lt;br /&gt;
Enjoy System Rescue CD with ZFS :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using the premade iso ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;If you don't want to do any of the above stuff but just want the ISO with the ZFS SRMs already included, simply [http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/systemrescuecd-x86-3.7.0-zfs.iso/ Download the ISO].&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Extlinux</id>
		<title>Extlinux</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Extlinux"/>
				<updated>2013-06-12T15:44:39Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* GPT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is ExtLinux? =&lt;br /&gt;
&lt;br /&gt;
ExtLinux is a pretty simple and modern systemloader, bundled with the syslinux tools, installation is really simple for it and fast, and thanks to our CoreTeam member Slashbeast the configuration runs automated in an awesome way.&lt;br /&gt;
&lt;br /&gt;
= Installing ExtLinux for funtoo =&lt;br /&gt;
&lt;br /&gt;
Installing ExtLinux for funtoo is known to work and supported too. If you like to try it just emerge syslinux&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge syslinux&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with that you have the complete syslinux tools installed. Another helpful tool you should merge with syslinux is slashbeast's lazykernel tool, so let us merge it too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge lazykernel&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing extlinux ==&lt;br /&gt;
&lt;br /&gt;
to install extlinux just follow these steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##install -d /boot/extlinux&lt;br /&gt;
# ##i##extlinux --install /boot/extlinux&lt;br /&gt;
# ##i##cd /boot&lt;br /&gt;
# ##i##ln -s . boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the next steps are different depending if you use an MBR or GPT setup and the HDD you installed on and want to boot from. Let us now for general take /dev/sda as your boot device.&lt;br /&gt;
&lt;br /&gt;
=== MBR ===&lt;br /&gt;
&lt;br /&gt;
If you set up your disk with MBR partition scheme just do the next steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda&lt;br /&gt;
# ##i##cp /usr/share/syslinux/menu.c32 /boot/extlinux/&lt;br /&gt;
# ##i##cp /usr/share/syslinux/libutil.c32 /boot/extlinux/&lt;br /&gt;
# ##i##touch /boot/extlinux/extlinux.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPT ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##sgdisk /dev/sda --attributes=1:set:2&lt;br /&gt;
# ##i##sgdisk /dev/sda --attributes=1:show&lt;br /&gt;
1:2:1 (legacy BIOS bootable)&lt;br /&gt;
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda&lt;br /&gt;
# ##i##cp /usr/share/syslinux/menu.c32 /boot/extlinux/&lt;br /&gt;
# ##i##cp /usr/share/syslinux/libutil.c32 /boot/extlinux/&lt;br /&gt;
# ##i##touch /boot/extlinux/extlinux.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the Kernel ==&lt;br /&gt;
&lt;br /&gt;
Now if you followed our advice to install lazykernel we have a pretty nice way to solve all the setup with a bit of prework and finish it then. If not you should go to the manual part. :)&lt;br /&gt;
&lt;br /&gt;
=== lazykernel way ===&lt;br /&gt;
&lt;br /&gt;
As you setup lazykernel, we now need to edit /etc/lazykernel.conf&lt;br /&gt;
&lt;br /&gt;
make it to look like somethink like that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# After configuring, hash or remove line below.&lt;br /&gt;
#CONFIGUREFIRST&lt;br /&gt;
&lt;br /&gt;
# Number of the kernels to keep so `lazykernel clean` will not propose to remove them. Default: 3&lt;br /&gt;
keep_kernels=5&lt;br /&gt;
&lt;br /&gt;
# Sort kernels by 'version' (biggest version first) or by 'mtime' (latest images first). Default: mtime&lt;br /&gt;
# Sorting by version may fail and 3.3.0-rc2 will be marked as newer than 3.3.0.&lt;br /&gt;
#sort_by='version'&lt;br /&gt;
sort_by=mtime&lt;br /&gt;
&lt;br /&gt;
# The name for menu entry.&lt;br /&gt;
menu_entry_name=&amp;quot;Funtoo Linux&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Specify what initramfs image to use, if any. (Optional)&lt;br /&gt;
initramfs='initramfs.cpio.gz'&lt;br /&gt;
&lt;br /&gt;
# Append kernel params, usualy you use it to specify rootfs device, but you can use it to pass switches to initramfs as well. (Optional)&lt;br /&gt;
#kernel_params='root=/dev/sda2'&lt;br /&gt;
#kernel_params=&amp;quot;rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-rootfs uswsusp resume=/dev/mapper/vg-swap&amp;quot;&lt;br /&gt;
kernel_params=&amp;quot;rootfstype=ext4 luks enc_root=/dev/sdb3 lvm root=/dev/mapper/vg-root uswsusp resume=/dev/mapper/vg-swap&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
please make sure to comment out or delete the second line of the config file, else it will spit out an error for you... :)&lt;br /&gt;
&lt;br /&gt;
Now let us setup our kernel with lazykernel if you have a manual kernel just run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd &amp;lt;kernel build dir&amp;gt;&lt;br /&gt;
# ##i##lazykernel auto&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
that will generate the modules for you, copy your kernel form /usr/src/linux over to /boot and generate the /boot/extlinux/extlinux.conf for you. The manual kernel will be the only supported one by lazykernel.&lt;br /&gt;
&lt;br /&gt;
That's all you are ready to boot. :)&lt;br /&gt;
&lt;br /&gt;
=== manual extlinux.conf ===&lt;br /&gt;
&lt;br /&gt;
For other kernels, like those created by genkernel or by the binary USE-flag you need to edit your config by yourself. Just open /boot/extlinux/extlinux.conf in your favorite editor and setup something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TIMEOUT 30&lt;br /&gt;
UI menu.c32&lt;br /&gt;
&lt;br /&gt;
MENU TITLE Boot Menu&lt;br /&gt;
MENU COLOR title        1;37;40&lt;br /&gt;
MENU COLOR border       30;40&lt;br /&gt;
MENU COLOR unsel        37;40&lt;br /&gt;
&lt;br /&gt;
LABEL funtoo1&lt;br /&gt;
        MENU LABEL Funtoo Linux KERNEL-VERSION&lt;br /&gt;
        LINUX /&amp;lt;kernel&amp;gt;&lt;br /&gt;
        INITRD /&amp;lt;initramfs&amp;gt;&lt;br /&gt;
        APPEND rootfstype=ext4 luks enc_root=/dev/sdb3 lvm root=/dev/mapper/vg-root uswsusp resume=/dev/mapper/vg-swap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's all again you are ready for boot. You can also define several LABELs in that list to have multiple kernels been booted... :)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Extlinux</id>
		<title>Extlinux</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Extlinux"/>
				<updated>2013-06-12T15:44:14Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* MBR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is ExtLinux? =&lt;br /&gt;
&lt;br /&gt;
ExtLinux is a pretty simple and modern systemloader, bundled with the syslinux tools, installation is really simple for it and fast, and thanks to our CoreTeam member Slashbeast the configuration runs automated in an awesome way.&lt;br /&gt;
&lt;br /&gt;
= Installing ExtLinux for funtoo =&lt;br /&gt;
&lt;br /&gt;
Installing ExtLinux for funtoo is known to work and supported too. If you like to try it just emerge syslinux&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge syslinux&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with that you have the complete syslinux tools installed. Another helpful tool you should merge with syslinux is slashbeast's lazykernel tool, so let us merge it too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge lazykernel&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing extlinux ==&lt;br /&gt;
&lt;br /&gt;
to install extlinux just follow these steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##install -d /boot/extlinux&lt;br /&gt;
# ##i##extlinux --install /boot/extlinux&lt;br /&gt;
# ##i##cd /boot&lt;br /&gt;
# ##i##ln -s . boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the next steps are different depending if you use an MBR or GPT setup and the HDD you installed on and want to boot from. Let us now for general take /dev/sda as your boot device.&lt;br /&gt;
&lt;br /&gt;
=== MBR ===&lt;br /&gt;
&lt;br /&gt;
If you set up your disk with MBR partition scheme just do the next steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda&lt;br /&gt;
# ##i##cp /usr/share/syslinux/menu.c32 /boot/extlinux/&lt;br /&gt;
# ##i##cp /usr/share/syslinux/libutil.c32 /boot/extlinux/&lt;br /&gt;
# ##i##touch /boot/extlinux/extlinux.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPT ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##sgdisk /dev/sda --attributes=1:set:2&lt;br /&gt;
# ##i##sgdisk /dev/sda --attributes=1:show&lt;br /&gt;
1:2:1 (legacy BIOS bootable)&lt;br /&gt;
# ##i##dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda&lt;br /&gt;
# ##i##cp /usr/share/syslinux/menu.c32 /boot/extlinux/&lt;br /&gt;
# ##i##touch /boot/extlinux/extlinux.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up the Kernel ==&lt;br /&gt;
&lt;br /&gt;
Now if you followed our advice to install lazykernel we have a pretty nice way to solve all the setup with a bit of prework and finish it then. If not you should go to the manual part. :)&lt;br /&gt;
&lt;br /&gt;
=== lazykernel way ===&lt;br /&gt;
&lt;br /&gt;
As you setup lazykernel, we now need to edit /etc/lazykernel.conf&lt;br /&gt;
&lt;br /&gt;
make it to look like somethink like that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# After configuring, hash or remove line below.&lt;br /&gt;
#CONFIGUREFIRST&lt;br /&gt;
&lt;br /&gt;
# Number of the kernels to keep so `lazykernel clean` will not propose to remove them. Default: 3&lt;br /&gt;
keep_kernels=5&lt;br /&gt;
&lt;br /&gt;
# Sort kernels by 'version' (biggest version first) or by 'mtime' (latest images first). Default: mtime&lt;br /&gt;
# Sorting by version may fail and 3.3.0-rc2 will be marked as newer than 3.3.0.&lt;br /&gt;
#sort_by='version'&lt;br /&gt;
sort_by=mtime&lt;br /&gt;
&lt;br /&gt;
# The name for menu entry.&lt;br /&gt;
menu_entry_name=&amp;quot;Funtoo Linux&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Specify what initramfs image to use, if any. (Optional)&lt;br /&gt;
initramfs='initramfs.cpio.gz'&lt;br /&gt;
&lt;br /&gt;
# Append kernel params, usualy you use it to specify rootfs device, but you can use it to pass switches to initramfs as well. (Optional)&lt;br /&gt;
#kernel_params='root=/dev/sda2'&lt;br /&gt;
#kernel_params=&amp;quot;rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-rootfs uswsusp resume=/dev/mapper/vg-swap&amp;quot;&lt;br /&gt;
kernel_params=&amp;quot;rootfstype=ext4 luks enc_root=/dev/sdb3 lvm root=/dev/mapper/vg-root uswsusp resume=/dev/mapper/vg-swap&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
please make sure to comment out or delete the second line of the config file, else it will spit out an error for you... :)&lt;br /&gt;
&lt;br /&gt;
Now let us setup our kernel with lazykernel if you have a manual kernel just run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd &amp;lt;kernel build dir&amp;gt;&lt;br /&gt;
# ##i##lazykernel auto&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
that will generate the modules for you, copy your kernel form /usr/src/linux over to /boot and generate the /boot/extlinux/extlinux.conf for you. The manual kernel will be the only supported one by lazykernel.&lt;br /&gt;
&lt;br /&gt;
That's all you are ready to boot. :)&lt;br /&gt;
&lt;br /&gt;
=== manual extlinux.conf ===&lt;br /&gt;
&lt;br /&gt;
For other kernels, like those created by genkernel or by the binary USE-flag you need to edit your config by yourself. Just open /boot/extlinux/extlinux.conf in your favorite editor and setup something like the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TIMEOUT 30&lt;br /&gt;
UI menu.c32&lt;br /&gt;
&lt;br /&gt;
MENU TITLE Boot Menu&lt;br /&gt;
MENU COLOR title        1;37;40&lt;br /&gt;
MENU COLOR border       30;40&lt;br /&gt;
MENU COLOR unsel        37;40&lt;br /&gt;
&lt;br /&gt;
LABEL funtoo1&lt;br /&gt;
        MENU LABEL Funtoo Linux KERNEL-VERSION&lt;br /&gt;
        LINUX /&amp;lt;kernel&amp;gt;&lt;br /&gt;
        INITRD /&amp;lt;initramfs&amp;gt;&lt;br /&gt;
        APPEND rootfstype=ext4 luks enc_root=/dev/sdb3 lvm root=/dev/mapper/vg-root uswsusp resume=/dev/mapper/vg-swap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's all again you are ready for boot. You can also define several LABELs in that list to have multiple kernels been booted... :)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2013-06-11T00:54:33Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Downloading the ISO (With ZFS) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to install Funtoo on ZFS (rootfs). This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to ZFS ===&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* ZFS has the ZFS Intent Log and SLOG devices, which accelerates small synchronous write performance.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* ZFS send/receive implementation supports incremental update when doing backups. btrfs' send/receive implementation requires sending the entire snapshot.&lt;br /&gt;
&lt;br /&gt;
* ZFS supports data deduplication, which is a memory hog and only works well for specialized workloads. btrfs has no equivalent.&lt;br /&gt;
&lt;br /&gt;
* ZFS datasets have a hierarchical namespace while btrfs subvolumes have a flat namespace.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
The only area where btrfs is ahead of ZFS is in the area of small file&lt;br /&gt;
efficiency. btrfs supports a feature called block suballocation, which&lt;br /&gt;
enables it to store small files far more efficiently than ZFS. It is&lt;br /&gt;
possible to use another filesystem (e.g. reiserfs) on top of a ZFS zvol&lt;br /&gt;
to obtain similar benefits (with arguably better data integrity) when&lt;br /&gt;
dealing with many small files (e.g. the portage tree).&lt;br /&gt;
&lt;br /&gt;
=== Disclaimers ===&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This guide is a work in progress. Expect some quirks.}}&lt;br /&gt;
{{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'''!}}&lt;br /&gt;
&lt;br /&gt;
== Video Tutorial ==&lt;br /&gt;
&lt;br /&gt;
As a companion to the install instructions below, a YouTube video ZFS install tutorial is now available:&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=MXyBamArues|width=640|height=360}}&lt;br /&gt;
&lt;br /&gt;
== Downloading the ISO (With ZFS) ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS tools. Therefore we will download the premade System Rescue CD with ZFS SRMs (System Rescue Modules) already included.&lt;br /&gt;
&lt;br /&gt;
This is just a file that when combined with System Rescue CD, gives you those tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: systemrescuecd-x86-3.7.0-zfs (402 MiB)&lt;br /&gt;
Release Date: 2013-06-09&lt;br /&gt;
md5sum 62605474641ce2b1a07fec8330377208&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''[http://ftp.osuosl.org/pub/funtoo/distfiles/sysresccd/systemrescuecd-x86-3.7.0-zfs.iso Download System Rescue CD 3.7.0 with ZFS]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== fdisk (MBR Style) ====&lt;br /&gt;
&lt;br /&gt;
'''A Fresh Start''':&lt;br /&gt;
&lt;br /&gt;
First lets make sure that the disk is completely wiped from any previous disk labels and partitions.&lt;br /&gt;
We will also assume that &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt; is the target drive.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command (m for help): ##i##o ↵&lt;br /&gt;
Building a new DOS disklabel with disk identifier 0xbeead864.&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This is a destructive operation. Make sure you really don't want anything on this disk.}}&lt;br /&gt;
&lt;br /&gt;
Now that we have a clean drive, we will create the new layout.&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code: ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gdisk (GPT Style) ====&lt;br /&gt;
&lt;br /&gt;
'''A Fresh Start''':&lt;br /&gt;
&lt;br /&gt;
First lets make sure that the disk is completely wiped from any previous disk labels and partitions.&lt;br /&gt;
We will also assume that &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt; is the target drive.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##gdisk /dev/sda&lt;br /&gt;
&lt;br /&gt;
Command: ##i##x ↵&lt;br /&gt;
Expert command: ##i##z ↵&lt;br /&gt;
About to wipe out GPT on /dev/sda. Proceed?: ##i##y ↵&lt;br /&gt;
GPT data structures destroyed! You may now partition the disk using fdisk or other utilities.&lt;br /&gt;
Blank out MBR?: ##i##y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This is a destructive operation. Make sure you really don't want anything on this disk.}}&lt;br /&gt;
&lt;br /&gt;
Now that we have a clean drive, we will create the new layout.&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&amp;lt;console&amp;gt;Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (ZFS):&lt;br /&gt;
&amp;lt;console&amp;gt;Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf00 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048          579583   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          579584      1953525134   931.2 GiB   BF00  Solaris root&lt;br /&gt;
&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
Format your separate /boot partition:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##mkfs.ext2 /dev/sda1&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Encryption (Optional) ===&lt;br /&gt;
If you want encryption, then create your encrypted vault(s) now by doing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cryptsetup -c aes-xts-plain64 luksFormat /dev/sda2&lt;br /&gt;
# ##i##cryptsetup luksOpen /dev/sda2 vault_1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you followed the manual GPT partitioning instructions, you should change '''/dev/sda2 to /dev/sda3'''.}}&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you followed the manual GPT partitioning instructions, you should change '''/dev/sda2 to /dev/sda3'''. If you are using encrypted root, then change '''/dev/sda2 to vault_1'''.}}&lt;br /&gt;
&lt;br /&gt;
{{fancynote|If you have a previous pool that you would like to import, you can do a: '''zpool import -f -R /mnt/funtoo &amp;lt;pool_name&amp;gt;'''}}&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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: /home, /var, /usr/src, and /usr/portage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional, but recommended datasets: /home, /root&lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&lt;br /&gt;
Optional datasets: /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating a separate portage dataset (optional) ====&lt;br /&gt;
Creating a separate portage dataset could be useful if you would like to keep your portage tree, distfiles (source code files), and packages (your compiled binaries if you have FEATURES=&amp;quot;buildpkg&amp;quot; enabled) in a safe place (or if you want to back up this directory up easily). &lt;br /&gt;
&lt;br /&gt;
Create the datasets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap zvol ===&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of SWAP (This is kinda big though).'''&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -o volblocksize=4K -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap zvol ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Last minute checks and touches ===&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the '''zpool.cache''' file to your new environment.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##touch /mnt/funtoo/etc/mtab&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
[[Funtoo_Linux_Installation|Download and install the Funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&lt;br /&gt;
Mount your boot drive&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##mount --rbind /proc proc&lt;br /&gt;
# ##i##mount --rbind /dev dev&lt;br /&gt;
# ##i##mount --rbind /sys sys&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&lt;br /&gt;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . /bin/bash -l&lt;br /&gt;
&lt;br /&gt;
Sync your tree&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
{{fancynote|The below configurations are the requirements for &amp;quot;Bliss Initramfs Creator&amp;quot;. Some of these might not be needed for genkernel.}}&lt;br /&gt;
&lt;br /&gt;
Tested with kernels 2.6.32 - 3.9.X&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its own scheduler and the CFQ one conflicts with it. Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;- Linux Kernel&lt;br /&gt;
ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
  &amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
  &amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
  &amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
  &amp;gt;&amp;gt; [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&lt;br /&gt;
  # Only if you want to make an SRM&lt;br /&gt;
  &amp;gt; File systems ---&amp;gt;&lt;br /&gt;
  &amp;gt;&amp;gt; Miscellaneous filesystems ---&amp;gt;&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; &amp;lt;*&amp;gt; SquashFS 4.0 - Squashed file system support&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; [*] Squashfs XATTR support&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; [*] Include support for ZLIB compressed file systems&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; [*] Include support for LZO compressed file systems&lt;br /&gt;
  &amp;gt;&amp;gt;&amp;gt; [*] Include support for XZ compressed file systems&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&lt;br /&gt;
&lt;br /&gt;
- app-arch/cpio&lt;br /&gt;
- sys-apps/busybox&lt;br /&gt;
- sys-kernel/spl&lt;br /&gt;
- sys-fs/zfs&lt;br /&gt;
- sys-fs/zfs-kmod&lt;br /&gt;
&lt;br /&gt;
For SRM creation:&lt;br /&gt;
- sys-fs/squashfs-tools&lt;br /&gt;
&lt;br /&gt;
For LUKS support:&lt;br /&gt;
- sys-fs/cryptsetup&lt;br /&gt;
&lt;br /&gt;
- Linux Kernel&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
  [*] Multiple devices driver support (RAID and LVM) ---&amp;gt;&lt;br /&gt;
  &amp;lt;*&amp;gt; Device mapper support&lt;br /&gt;
  &amp;lt;*&amp;gt; Crypt target support&lt;br /&gt;
&lt;br /&gt;
  Cryptographic API ---&amp;gt;&lt;br /&gt;
  &amp;lt;*&amp;gt; XTS support&lt;br /&gt;
  -*- AES cipher algorithms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge -av zfs&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Install the bootloader ==&lt;br /&gt;
&lt;br /&gt;
=== GRUB 2 ===&lt;br /&gt;
Before you do this, make sure this checklist is followed:&lt;br /&gt;
* Installed kernel and kernel modules&lt;br /&gt;
* Installed zfs package from the tree&lt;br /&gt;
* /dev, /proc, /sys are mounted in the chroot environment&lt;br /&gt;
&lt;br /&gt;
Once all this is checked, let's install grub2. First we need to enable the &amp;quot;libzfs&amp;quot; use flag so zfs support is compiled for grub2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##echo &amp;quot;sys-boot/grub libzfs&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we will compile grub2:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge -av grub&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can check that grub is version 2.00 by doing the following command:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##grub-install --version&lt;br /&gt;
grub-install (GRUB) 2.00&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try to install grub2:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##grub-install --no-floppy /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should receive the following message&lt;br /&gt;
&amp;lt;console&amp;gt;Installation finished. No error reported.&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not, then go back to the above checklist.&lt;br /&gt;
&lt;br /&gt;
=== Extlinux ===&lt;br /&gt;
There are four things we need to do for extlinux:&lt;br /&gt;
&lt;br /&gt;
# Install extlinux bootloader&lt;br /&gt;
# Write the .bin to the front of the target disk&lt;br /&gt;
# Toggle BIOS partition flag&lt;br /&gt;
# Write a extlinux configuration file&lt;br /&gt;
&lt;br /&gt;
First emerge extlinux:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge -av syslinux&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create a /boot/extlinux directory:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /boot&lt;br /&gt;
# ##i##mkdir /boot/extlinux&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change into the extlinux dir and install the bootloader:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /boot/extlinux&lt;br /&gt;
# ##i##extlinux --install .&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MBR ====&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##fdisk /dev/sda&lt;br /&gt;
&lt;br /&gt;
Command: ##i##a ↵&lt;br /&gt;
Partition number: ##i##1 ↵&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Printing the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; partition layout should show a star next to &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;console&amp;gt;/dev/sda   *    2048    514047    256000    83    Linux&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flash the .bin to the front of the disk:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##dd conv=notrunc bs=440 count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPT ===&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##sgdisk /dev/sda --attributes=1:set:2&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flash the .bin to the front of the disk:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##dd conv=notrunc bs=440 count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will write the extlinux/grub configuration file in the next section.&lt;br /&gt;
&lt;br /&gt;
=== Create a boot symlink ===&lt;br /&gt;
We will create a boot symlink so that we can have &amp;quot;consistent&amp;quot; boot configurations without any errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /boot&lt;br /&gt;
# ##i##ln -s . boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a symlink called 'boot' inside /boot that points to /boot :).&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my bliss initramfs creator. I will show you both.&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example: kernel name is: vmlinuz-3.8.5-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
/boot partition is: /dev/sda1 (on GPT)&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''genkernel entries need verification'''&lt;br /&gt;
'''grub.cfg''':&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.8.5&amp;quot; {&lt;br /&gt;
        insmod part_gpt&lt;br /&gt;
        insmod ext2&lt;br /&gt;
&lt;br /&gt;
        set root=(hd0,gpt1)&lt;br /&gt;
&lt;br /&gt;
        linux /vmlinuz-3.8.5-ALL real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
        initrd /initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you followed the way to set up a separate partition to boot of (/dev/sda1 in this guid) you need to modify the entries in your grub.cfg, since grub will now not search inside zfs: &lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.8.5&amp;quot; {  &lt;br /&gt;
  insmod zfs&lt;br /&gt;
  linux /vmlinuz-3.8.5-ALL real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
  initrd /initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''extlinux.conf''':&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.8.5-ALL&lt;br /&gt;
  KERNEL /vmlinuz-3.8.5-ALL&lt;br /&gt;
  INITRD /initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
I've written an ebuild to install the creator for you on your machine. The ebuild is in my overlay so we will first add my overlay to your machine. &lt;br /&gt;
&lt;br /&gt;
First we will clone it to a directory on your machine, let's say &amp;quot;/home/example/overlays/fearedbliss&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# Make the overlays directory if it doesn't exist&lt;br /&gt;
# ##i##mkdir /home/example/overlays&lt;br /&gt;
&lt;br /&gt;
# Clone my overlay into this directory&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/funtoo-overlay.git&lt;br /&gt;
&lt;br /&gt;
# Rename the &amp;quot;funtoo-overlay&amp;quot; folder to &amp;quot;fearedbliss&amp;quot;&lt;br /&gt;
# ##i##mv funtoo-overlay fearedbliss&lt;br /&gt;
&lt;br /&gt;
# Add the overlay to your /etc/portage/make.conf so portage knows its existence.&lt;br /&gt;
# ##i##echo 'PORTDIR_OVERLAY=&amp;quot;/home/example/overlays/fearedbliss ${PORTDIR_OVERLAY}&amp;quot;' &amp;gt;&amp;gt; /etc/portage/make.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can install the creator, but before we do that, if you are encrypting your drives, then add the &amp;quot;luks&amp;quot; use flag to your package.use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-kernel/bliss-initramfs luks&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now install the creator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge bliss-initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then go into the install directory, run the script as root, and place it into /boot:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##cd /opt/bliss-initramfs&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file. Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example: Kernel name is: vmlinuz-3.8.5-ALL&lt;br /&gt;
initramfs name is: initrd-3.8.5-ALL.img&lt;br /&gt;
/boot partition is: /dev/sda1 (on GPT)&lt;br /&gt;
Encrypted partitions (If any, example: /dev/sda2, /dev/sdb3, /dev/sdc4)&lt;br /&gt;
Pool root is: rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''grub.cfg''':&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.8.5&amp;quot; {&lt;br /&gt;
        insmod part_gpt&lt;br /&gt;
        insmod ext2&lt;br /&gt;
&lt;br /&gt;
        set root=(hd0,gpt1)&lt;br /&gt;
&lt;br /&gt;
        linux /vmlinuz-3.8.5-ALL root=rpool/ROOT/funtoo quiet&lt;br /&gt;
        # Let's say you have 3 drives that are encrypted, and your pool (which also contains your root) is on here&lt;br /&gt;
        # linux /vmlinuz-3.8.5-ALL root=rpool/ROOT/funtoo enc_root=/dev/sda2,/dev/sdb3,/dev/sdc4 quiet&lt;br /&gt;
        initrd /initrd-3.8.5-ALL.img&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''extlinux.conf:'''&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo  &lt;br /&gt;
  MENU LABEL Funtoo 3.8.5-ALL  &lt;br /&gt;
  KERNEL /vmlinuz-3.8.5-ALL  &lt;br /&gt;
  INITRD /initrd-3.8.5-ALL.img  &lt;br /&gt;
  APPEND root=rpool/ROOT/funtoo quiet&lt;br /&gt;
  # Let's say you have 3 drives that are encrypted, and your pool (which also contains your root) is on here&lt;br /&gt;
  # APPEND root=rpool/ROOT/funtoo enc_root=/dev/sda2,/dev/sdb3,/dev/sdc4 quiet&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##rc-update add zfs boot&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
# Do not add the /boot line below if you are using whole-disk zfs&lt;br /&gt;
/dev/sda1               /boot           ext2            defaults        0 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to clean up, '''set our root password''', and unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Delete the stage3/portage tarballs you downloaded earlier so they don't take up space.&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##rm stage3-latest.tar.xz&lt;br /&gt;
# ##i##rm /usr/portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Set your root password&lt;br /&gt;
# ##i##passwd&lt;br /&gt;
&amp;gt;&amp;gt; Enter your password, you won't see what you are writing (for security reasons), but it is there!&lt;br /&gt;
&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot (if you have a separate /boot)&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount -l proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{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.'''}}&lt;br /&gt;
&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. &lt;br /&gt;
&lt;br /&gt;
To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zfs snapshot rpool/ROOT/funtoo@install&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zfs list -t snapshot&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zfs rollback rpool/ROOT/funtoo@install&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Filesystems]]&lt;br /&gt;
[[Category:Featured]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOTITLE__&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Welcome</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Welcome"/>
				<updated>2013-06-10T04:43:18Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; width: 35%&amp;quot;&amp;gt;&lt;br /&gt;
{{#widget:Donate|blurb=Your support helps Funtoo grow! Donate Today.}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
== Get on the UserMap! ==&lt;br /&gt;
{{#compound_query:[[Category:People]] [[Role type::Staff]];?Geoloc;icon=Purplemarker.png;limit=9999&lt;br /&gt;
    |[[Category:People]][[Role type::Contributor]];?Geoloc;icon=Orangemarker.png;limit=9999&lt;br /&gt;
    |[[Category:People]][[Role type::User]];?Geoloc;icon=Greenmarker.png;limit=9999&lt;br /&gt;
    |format=googlemaps3|height=275|zoom=1|type=hybrid|markercluster=yes}}&lt;br /&gt;
See our full-size [[Usermap]] and find out how to become part of the Funtoo Universe!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{Litecoin|blurb=Check it out: Mine litecoins for Funtoo!}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
=== Latest Commits: ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed entries=7 url=&amp;quot;https://github.com/funtoo/funtoo-overlay/commits/master.atom&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
=== Featured Resources: ===&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
category = Featured&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy2&amp;quot;&amp;gt;&lt;br /&gt;
=== [[image:Feed-icon-28x28.png|link=http://forums.funtoo.org/extern.php?action=feed&amp;amp;type=atom]] Latest Forum Posts ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed entries=6 url=&amp;quot;http://forums.funtoo.org/extern.php?action=feed&amp;amp;type=atom&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy2&amp;quot;&amp;gt;&lt;br /&gt;
=== [[image:Feed-icon-28x28.png|link=http://feeds.feedburner.com/planet_larry]] Planet Larry ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed type=&amp;quot;planet&amp;quot; entries=6 url=&amp;quot;http://feeds.feedburner.com/planet_larry&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Welcome to the Funtoo Wiki! =&lt;br /&gt;
&lt;br /&gt;
[[Funtoo Linux]] is a Linux-based operating system created by [[user:Drobbins|Daniel Robbins]], the creator and former Chief Architect of Gentoo Linux. Funtoo Linux is a Free software, or &amp;quot;Open Source&amp;quot; operating system. All distribution source code is freely available, and it can be used and distributed free of charge.&lt;br /&gt;
&lt;br /&gt;
Who develops and improves Funtoo Linux? '''You do.''' We are a completely open, self-serve meta-distribution that centers around the needs of our users. Any user can contribute code and help improve Funtoo Linux functionality on our [http://bugs.funtoo.org bug tracker]. Submitted code is reviewed for quality by Daniel Robbins and a small group of Funtoo Linux staff.&lt;br /&gt;
&lt;br /&gt;
== Featured Video ==&lt;br /&gt;
&lt;br /&gt;
In this video, Jonathan Vasquez ([[User:Fearedbliss|fearedbliss]]) walks you through the process of installing Funtoo Linux with ZFS. See the [[ZFS Install Guide]] for detailed instructions.&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=SuCjLjVV800|width=640|height=360}}&lt;br /&gt;
&lt;br /&gt;
== Meta-Distribution, Optimized ==&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux is also a ''meta''-distribution, which means that it is built automatically from source code and is customized with the functionality that ''you'' want it to have, and ''without'' the unnecessary features and &amp;quot;bloat&amp;quot; that you want to avoid. &lt;br /&gt;
&lt;br /&gt;
In addition, a Funtoo Linux system is [[Download|optimized for your CPU]], and we offer optimized versions for ''Intel Core i7'', ''Intel Atom'', ''AMD Opteron'', and other processors and architectures. &lt;br /&gt;
&lt;br /&gt;
These combination of factors work together to create an extremely high-performance and flexible computing platform -- a platform where ''you'' are in control, and your system performs optimally. We believe that Funtoo Linux is the most ideal expression of how operating system technology &amp;quot;should&amp;quot; work, and we continually strive to make it better.&lt;br /&gt;
&lt;br /&gt;
== The Gentoo Ecosystem ==&lt;br /&gt;
&lt;br /&gt;
We are committed to maintaining high-levels of compatibility and collaboration with the Gentoo Linux project, and challenge ourselves to innovate while providing new approaches that can be easily leveraged by the Gentoo Community. We appreciate the support we receive from members of the Gentoo Community and strive to contribute back to the larger [[Gentoo Ecosystem]].&lt;br /&gt;
&lt;br /&gt;
== Ultimate Flexibility for Developers ==&lt;br /&gt;
&lt;br /&gt;
Does your Linux distribution allow multiple versions of &amp;lt;tt&amp;gt;php&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[python]]&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ruby&amp;lt;/tt&amp;gt; installed happily alongside each other? Funtoo Linux does. Are you tired of hand-building key packages from source to configure them exactly the way you want? Funtoo Linux allows you to tweak the build-time features of packages using handy things called USE variables. Other distributions are forced to either leave stuff out that you want, or include stuff you don't want.&lt;br /&gt;
&lt;br /&gt;
== Virtualization ==&lt;br /&gt;
&lt;br /&gt;
We support the [[OpenVZ]] project and build up-to-date Funtoo Linux OpenVZ containers that you can [[Download|download]]. Also see [[VagrantUp]] for a nice way to deploy VirtualBox-based Funtoo Linux systems. [[Metro]], our automated distro build tool, is capable of building OpenVZ, Linux VServer and [[Linux Containers]] (LXC) images. Funtoo Linux also makes an excellent virtualization host system for [[Xen]].&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo Linux]] features native [[wikipedia:UTF-8|UTF-8]] support enabled by default, a [[wikipedia:Git (software)|git]]-based, [[Portage Tree|distributed Portage Tree]] and funtoo overlay, an enhanced [[Portage]] with more compact mini-manifest tree, automated imports of new [http://www.gentoo.org Gentoo] changes every 12 hours, [[GUID Booting Guide|GPT/GUID boot support]] and [[Boot-Update|streamlined boot configuration]], [[Funtoo Linux Networking|enhanced network configuration]], up-to-date [http://ftp.osuosl.org/pub/funtoo/funtoo-stable/ stable] and [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ current] Funtoo [[Stage Tarball|stages]], all built using Funtoo's [[Metro]] build tool. We also offer Ubuntu Server, Debian, RHEL and Fedora-based [[Funtoo Linux Kernels|kernels]].&lt;br /&gt;
&lt;br /&gt;
Funtoo is currently supported on the following processor families :&lt;br /&gt;
* PC-compatible, both 32 and 64-bit (''x86-32bit'', ''x86-64bit'')&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* Learn more about [[Funtoo Linux]].&lt;br /&gt;
* Why you should [[Choose Funtoo]]: ...and how its different than other distros.&lt;br /&gt;
* Visit [[:Category:Projects|Funtoo Linux Projects]] and also look at the stuff online for [[Metro]].&lt;br /&gt;
* Learn [[:Category:Linux Core Concepts| Core Linux concepts]] from articles originally written by Daniel Robbins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOTITLE__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
[[Category:Funtoo|*]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2013-06-08T18:18:20Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: changed correct genkernel line (was example for freadbliss initramfs)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to install Funtoo on ZFS (rootfs). This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
=== Introduction to ZFS ===&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* ZFS has the ZFS Intent Log and SLOG devices, which accelerates small synchronous write performance.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
* ZFS send/receive implementation supports incremental update when doing backups. btrfs' send/receive implementation requires sending the entire snapshot.&lt;br /&gt;
&lt;br /&gt;
* ZFS supports data deduplication, which is a memory hog and only works well for specialized workloads. btrfs has no equivalent.&lt;br /&gt;
&lt;br /&gt;
* ZFS datasets have a hierarchical namespace while btrfs subvolumes have a flat namespace.&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
The only area where btrfs is ahead of ZFS is in the area of small file&lt;br /&gt;
efficiency. btrfs supports a feature called block suballocation, which&lt;br /&gt;
enables it to store small files far more efficiently than ZFS. It is&lt;br /&gt;
possible to use another filesystem (e.g. reiserfs) on top of a ZFS zvol&lt;br /&gt;
to obtain similar benefits (with arguably better data integrity) when&lt;br /&gt;
dealing with many small files (e.g. the portage tree).&lt;br /&gt;
&lt;br /&gt;
=== Disclaimers ===&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This guide is a work in progress. Expect some quirks.}}&lt;br /&gt;
{{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'''!}}&lt;br /&gt;
&lt;br /&gt;
== Video Tutorial ==&lt;br /&gt;
&lt;br /&gt;
As a companion to the install instructions below, a YouTube video ZFS install tutorial is now available:&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=MXyBamArues|width=640|height=360}}&lt;br /&gt;
&lt;br /&gt;
== Setting up your environment ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS tools. We will be downloading two things: &lt;br /&gt;
&lt;br /&gt;
# System Rescue CD, &lt;br /&gt;
# ZFS System Rescue Module (SRM)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is just a file that when combined with System Rescue CD, gives you those tools.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: SystemRescueCd-x86-3.5.0 (390 MiB)&lt;br /&gt;
Release Date: 2013-03-25&lt;br /&gt;
md5sum 48552b9e905872bd5061eb112b73ea20&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Funtoo now has mirrored copies of System Rescue CD and the ZFS SRM at the links below.&lt;br /&gt;
&lt;br /&gt;
[http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.5.0.iso Download System Rescue CD 3.5.0]&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/zfs-3.4.37-std350-amd64_0.6.1.tar.xz Download the ZFS System Rescue Module]&lt;br /&gt;
&lt;br /&gt;
[[Creating_System_Rescue_CD_ZFS_Modules|Follow the instructions here to download and place the srm into your flash drive]].&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== fdisk (MBR Style) ====&lt;br /&gt;
&lt;br /&gt;
'''A Fresh Start''':&lt;br /&gt;
&lt;br /&gt;
First lets make sure that the disk is completely wiped from any previous disk labels and partitions.&lt;br /&gt;
We will also assume that &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt; is the target drive.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command (m for help): ##i##o ↵&lt;br /&gt;
Building a new DOS disklabel with disk identifier 0xbeead864.&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This is a destructive operation. Make sure you really don't want anything on this disk.}}&lt;br /&gt;
&lt;br /&gt;
Now that we have a clean drive, we will create the new layout.&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code: ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gdisk (GPT Style) ====&lt;br /&gt;
&lt;br /&gt;
'''A Fresh Start''':&lt;br /&gt;
&lt;br /&gt;
First lets make sure that the disk is completely wiped from any previous disk labels and partitions.&lt;br /&gt;
We will also assume that &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt; is the target drive.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##gdisk /dev/sda&lt;br /&gt;
&lt;br /&gt;
Command: ##i##x ↵&lt;br /&gt;
Expert command: ##i##z ↵&lt;br /&gt;
About to wipe out GPT on /dev/sda. Proceed?: ##i##y ↵&lt;br /&gt;
GPT data structures destroyed! You may now partition the disk using fdisk or other utilities.&lt;br /&gt;
Blank out MBR?: ##i##y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This is a destructive operation. Make sure you really don't want anything on this disk.}}&lt;br /&gt;
&lt;br /&gt;
Now that we have a clean drive, we will create the new layout.&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&amp;lt;console&amp;gt;Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (ZFS):&lt;br /&gt;
&amp;lt;console&amp;gt;Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf00 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048          579583   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          579584      1953525134   931.2 GiB   BF00  Solaris root&lt;br /&gt;
&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
Format your separate /boot partition:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##mkfs.ext2 /dev/sda1&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&amp;lt;/console&amp;gt;&lt;br /&gt;
{{fancyimportant|If you followed the manual GPT partitioning instructions, you should change /dev/sda2 to /dev/sda3.}}{{fancynote|If you have a previous pool that you would like to import, you can do a: '''zpool import -f -R /mnt/funtoo &amp;lt;pool_name&amp;gt;'''}}&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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: /home, /var, /usr/src, and /usr/portage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional, but recommended datasets: /home, /root&lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&lt;br /&gt;
Optional datasets: /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating a separate portage dataset (optional) ====&lt;br /&gt;
Creating a separate portage dataset could be useful if you would like to keep your portage tree, distfiles (source code files), and packages (your compiled binaries if you have FEATURES=&amp;quot;buildpkg&amp;quot; enabled) in a safe place (or if you want to back up this directory up easily). &lt;br /&gt;
&lt;br /&gt;
Create the datasets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap zvol ===&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of SWAP (This is kinda big though).'''&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -o volblocksize=4K -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap zvol ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Last minute checks and touches ===&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the '''zpool.cache''' file to your new environment.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##touch /mnt/funtoo/etc/mtab&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
[[Funtoo_Linux_Installation|Download and install the Funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&lt;br /&gt;
Mount your boot drive&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##mount --rbind /proc proc&lt;br /&gt;
# ##i##mount --rbind /dev dev&lt;br /&gt;
# ##i##mount --rbind /sys sys&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&lt;br /&gt;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . /bin/bash -l&lt;br /&gt;
&lt;br /&gt;
Sync your tree&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
{{fancynote|The below configurations are the requirements for &amp;quot;Bliss Initramfs Creator&amp;quot;. Some of these might not be needed for genkernel.}}&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 2.6.32, 3.2.34, 3.6.X, 3.7.X, 3.8.X.&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its own scheduler and the CFQ one conflicts with it. Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
&amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
&lt;br /&gt;
Cryptographic API ---&amp;gt;&lt;br /&gt;
&amp;lt;*&amp;gt; Deflate compression algorithm&lt;br /&gt;
&amp;lt;*&amp;gt; Zlib compression algorithm&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge -av zfs&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be displayed.&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Install the bootloader ==&lt;br /&gt;
&lt;br /&gt;
=== GRUB 2 ===&lt;br /&gt;
Before you do this, make sure this checklist is followed:&lt;br /&gt;
* Installed kernel and kernel modules&lt;br /&gt;
* Installed zfs package from the tree&lt;br /&gt;
* /dev, /proc, /sys are mounted in the chroot environment&lt;br /&gt;
&lt;br /&gt;
Once all this is checked, let's install grub2. First we need to enable the &amp;quot;libzfs&amp;quot; use flag so zfs support is compiled for grub2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##echo &amp;quot;sys-boot/grub libzfs&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we will compile grub2:&lt;br /&gt;
{{fancyimportant|GRUB should be _at least_ version 2.0.0 since 2.0.0 added zfs support. 1.99,.98 will not work.}}&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge -av grub&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, you can check that grub is version 2.00 by doing the following command:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##grub-install --version&lt;br /&gt;
grub-install (GRUB) 2.00&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now try to install grub2:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##grub-install --no-floppy /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should receive the following message&lt;br /&gt;
&amp;lt;console&amp;gt;Installation finished. No error reported.&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not, then go back to the above checklist.&lt;br /&gt;
=== Extlinux ===&lt;br /&gt;
There are four things we need to do for extlinux:&lt;br /&gt;
&lt;br /&gt;
# Install extlinux bootloader&lt;br /&gt;
# Write the .bin to the front of the target disk&lt;br /&gt;
# Toggle BIOS partition flag&lt;br /&gt;
# Write a extlinux configuration file&lt;br /&gt;
&lt;br /&gt;
First emerge extlinux:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge -av syslinux&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create a /boot/extlinux directory:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /boot&lt;br /&gt;
# ##i##mkdir /boot/extlinux&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change into the extlinux dir and install the bootloader:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /boot/extlinux&lt;br /&gt;
# ##i##extlinux --install .&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MBR ====&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##fdisk /dev/sda&lt;br /&gt;
&lt;br /&gt;
Command: ##i##a ↵&lt;br /&gt;
Partition number: ##i##1 ↵&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Printing the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; partition layout should show a star next to &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;console&amp;gt;/dev/sda   *    2048    514047    256000    83    Linux&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flash the .bin to the front of the disk:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##dd conv=notrunc bs=440 count=1 if=/usr/share/syslinux/mbr.bin of=/dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPT ===&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##sgdisk /dev/sda --attributes=1:set:2&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Flash the .bin to the front of the disk:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##dd conv=notrunc bs=440 count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will write the extlinux/grub configuration file in the next section.&lt;br /&gt;
&lt;br /&gt;
=== Create a boot symlink ===&lt;br /&gt;
We will create a boot symlink so that we can have &amp;quot;consistent&amp;quot; boot configurations without any errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /boot&lt;br /&gt;
# ##i##ln -s . boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a symlink called 'boot' inside /boot that points to /boot :).&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my bliss initramfs creator. I will show you both.&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example: kernel name is: vmlinuz-3.8.5-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
/boot partition is: /dev/sda1 (on GPT)&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''genkernel entries need verification'''&lt;br /&gt;
'''grub.cfg''':&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.8.5&amp;quot; {&lt;br /&gt;
        insmod part_gpt&lt;br /&gt;
        insmod ext2&lt;br /&gt;
&lt;br /&gt;
        set root=(hd0,gpt1)&lt;br /&gt;
&lt;br /&gt;
        linux /boot/vmlinuz-3.8.5-ALL real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
        initrd /boot/initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you followed the way to set up a separate partition to boot of (/dev/sda1 in this guid) you need to modify the entries in your grub.cfg, since grub will now not search inside zfs: &lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.8.5&amp;quot; {  &lt;br /&gt;
  insmod zfs&lt;br /&gt;
  linux /vmlinuz-3.8.5-ALL real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
  initrd /initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''extlinux.conf''':&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.8.5-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.8.5-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.8.5-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
I've written an ebuild to install the creator for you on your machine. The ebuild is in my overlay so we will first add my overlay to your machine. &lt;br /&gt;
&lt;br /&gt;
First we will clone it to a directory on your machine, let's say &amp;quot;/home/example/overlays/fearedbliss&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# Make the overlays directory if it doesn't exist&lt;br /&gt;
# ##i##mkdir /home/example/overlays&lt;br /&gt;
&lt;br /&gt;
# Clone my overlay into this directory&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/funtoo-overlay.git&lt;br /&gt;
&lt;br /&gt;
# Rename the &amp;quot;funtoo-overlay&amp;quot; folder to &amp;quot;fearedbliss&amp;quot;&lt;br /&gt;
# ##i##mv funtoo-overlay fearedbliss&lt;br /&gt;
&lt;br /&gt;
# Add the overlay to your /etc/portage/make.conf so portage knows its existence.&lt;br /&gt;
# ##i##echo 'PORTDIR_OVERLAY=&amp;quot;/home/example/overlays/fearedbliss ${PORTDIR_OVERLAY}&amp;quot;' &amp;gt;&amp;gt; /etc/portage/make.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can install the creator with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge bliss-initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into the install directory, run the script as root, and place it into /boot:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##cd /opt/bliss-initramfs&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file. Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example: Kernel name is: vmlinuz-3.8.5-ALL&lt;br /&gt;
initramfs name is: initrd-3.8.5-ALL.img&lt;br /&gt;
/boot partition is: /dev/sda1 (on GPT)&lt;br /&gt;
Pool root is: rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''grub.cfg''':&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.8.5&amp;quot; {&lt;br /&gt;
        insmod part_gpt&lt;br /&gt;
        insmod ext2&lt;br /&gt;
&lt;br /&gt;
        set root=(hd0,gpt1)&lt;br /&gt;
&lt;br /&gt;
        linux /boot/vmlinuz-3.8.5-ALL root=rpool/ROOT/funtoo quiet&lt;br /&gt;
        initrd /boot/initrd-3.8.5-ALL.img&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''extlinux.conf:'''&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo  &lt;br /&gt;
  MENU LABEL Funtoo 3.8.5-ALL  &lt;br /&gt;
  KERNEL /boot/vmlinuz-3.8.5-ALL  &lt;br /&gt;
  INITRD /boot/initrd-3.8.5-ALL.img  &lt;br /&gt;
  APPEND root=rpool/ROOT/funtoo quiet&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##rc-update add zfs boot&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
# Do not add the /boot line below if you are using whole-disk zfs&lt;br /&gt;
/dev/sda1               /boot           ext2            defaults        0 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to clean up, '''set our root password''', and unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Delete the stage3/portage tarballs you downloaded earlier so they don't take up space.&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##rm stage3-latest.tar.xz&lt;br /&gt;
# ##i##rm /usr/portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Set your root password&lt;br /&gt;
# ##i##passwd&lt;br /&gt;
&amp;gt;&amp;gt; Enter your password, you won't see what you are writing (for security reasons), but it is there!&lt;br /&gt;
&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot (if you have a separate /boot)&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount -l proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{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.'''}}&lt;br /&gt;
&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. &lt;br /&gt;
&lt;br /&gt;
To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zfs snapshot rpool/ROOT/funtoo@install&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zfs list -t snapshot&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zfs rollback rpool/ROOT/funtoo@install&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recovery Environment ===&lt;br /&gt;
On ZFS it is extremely easy to create a recovery environment using an already working snapshot. So that's what we will be doing. Create a clone of the @install snapshot which you will use for recovery purposes. If something happens to your main install, you can boot into this clone and fix the main one. One of the differences (maybe the only difference) between a clone and a snapshot is that a clone is rewritable while a snapshot is only read-only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##zfs clone rpool/ROOT/funtoo@install rpool/ROOT/recovery&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Add the clone to your grub.cfg ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
# Funtoo Recovery&lt;br /&gt;
menuentry &amp;quot;Funtoo Recovery - 3.7.3&amp;quot; {  &lt;br /&gt;
  insmod zfs&lt;br /&gt;
  linux /ROOT/funtoo/@/boot/vmlinuz-3.7.3-ALL root=rpool/ROOT/recovery quiet&lt;br /&gt;
  initrd /ROOT/funtoo/@/boot/initrd-3.7.3-ALL.img&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Add the clone to your extlinux.conf ====&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo-recovery    &lt;br /&gt;
  MENU LABEL Funtoo Recovery    &lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.3-ALL    &lt;br /&gt;
  INITRD /boot/initrd-3.7.3-ALL.img    &lt;br /&gt;
  APPEND root=rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Things to watch out for ====&lt;br /&gt;
Since your recovery clone will tend to get old as you use your main system, and since your recovery and other stuff are on the same pool, we don't want the new pool stuff to be mounted when we launch recovery. We also don't want video drivers to be conflicting.&lt;br /&gt;
# Make sure that nvidia/nouveau stuff are blacklisted.&lt;br /&gt;
# Make sure that your /boot and /lib/modules for the kernel in your 'recovery' are matching.&lt;br /&gt;
# Disable the zfs openrc script so that nothing else gets automatically mounted. Only your rootfs.&lt;br /&gt;
&lt;br /&gt;
You can do the above stuff by mounting your copy and chrooting into it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Mount the recovery clone&lt;br /&gt;
# ##i##mkdir /mnt/recovery&lt;br /&gt;
# ##i##mount -t zfs -o zfsutil rpool/ROOT/recovery /mnt/recovery&lt;br /&gt;
# ##i##cd /mnt/recovery&lt;br /&gt;
&lt;br /&gt;
Mount the kernel devices&lt;br /&gt;
# ##i##mount --rbind /proc ./proc&lt;br /&gt;
# ##i##mount --rbind /dev ./dev&lt;br /&gt;
# ##i##mount --rbind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy zpool.cache&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache etc/zfs&lt;br /&gt;
&lt;br /&gt;
Chroot into the new environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash --login&lt;br /&gt;
&lt;br /&gt;
Disable zfs/zfs-shutdown openrc scripts&lt;br /&gt;
# ##i##rc-config delete zfs boot&lt;br /&gt;
&lt;br /&gt;
Blacklist nouveau/nvidia drivers&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nouveau&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nvidia&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are done doing your changes, just umount and exit the chroot:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount -l proc dev sys&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting into the recovery ====&lt;br /&gt;
Just start your machine and pick the '''Funtoo Recovery''' option from the Boot Menu.&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Filesystems]]&lt;br /&gt;
[[Category:Featured]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOTITLE__&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-06-08T14:02:33Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Undo revision 9351 by Oleg (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;a href=http://www.michaelkorsbuybags2013jp.com/&amp;gt;マイケルコース バッグ 2013&amp;lt;/a&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;a href=http://www.michaelkorsbuybags2013jp.com/&amp;gt;マイケルコース バッグ 2013&amp;lt;/a&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;a href=http://www.seikojpsale.com/&amp;gt;セイコー ブライツ&amp;lt;/a&amp;gt;&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-06-08T13:57:33Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 175.42.11.98 (talk) to last revision by Oleg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;a href=http://www.burberrystoreoutlet2013jp.com/&amp;gt;バーバリー メンズ&amp;lt;/a&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;a href=http://www.coachbagsguka2013.com/&amp;gt;コーチ 財布 &amp;lt;/a&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;a href=http://www.coachcheaponline2013.com/&amp;gt;coach 財布&amp;lt;/a&amp;gt;&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-06-07T16:11:12Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 175.42.11.98 (talk) to last revision by 112.111.54.187&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;a href=http://www.burberrystoreoutlet2013jp.com/&amp;gt;バーバリー メンズ&amp;lt;/a&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;a href=http://www.coachbagsguka2013.com/&amp;gt;コーチ 財布 &amp;lt;/a&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;a href=http://www.coachcheaponline2013.com/&amp;gt;coach 財布&amp;lt;/a&amp;gt;&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-06-02T14:08:26Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 36.248.102.115 (talk) to last revision by Oleg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PandaBoard''' is a low-power, low-cost single-board computer development platform based on the Texas Instruments OMAP4430 system on a chip (SoC). The board has been available to the public since 27 October 2010. It is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
The '''PandaBoard ES''' is a newer version based on the OMAP4460 SoC, with the CPU and GPU running at higher clock rates. The board has been available to the public since 16 November 2011. Like its predecessor, it is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
The OMAP4430 SoC on the PandaBoard features a dual-core 1&amp;amp;nbsp;GHz ARM Cortex-A9 MPCore CPU, a 304&amp;amp;nbsp;MHz PowerVR SGX540 graphics processing unit (GPU), a Texas Instruments TMS320C6400 digital signal processor (DSP), and 1&amp;amp;nbsp;GiB of DDR2 SDRAM. &lt;br /&gt;
&lt;br /&gt;
The PandaBoard ES uses a newer SoC, with a dual-core 1.2&amp;amp;nbsp;GHz CPU and 384&amp;amp;nbsp;MHz GPU. Primary persistent storage is via an Secure Digital (SD) Card slot allowing SDHC cards up to 32&amp;amp;nbsp;GB to be used. The board includes wired 10/100 Ethernet as well as wireless Ethernet and bluetooth connectivity. The board can output video signals via Digital Visual Interface (DVI) and HDMI interfaces. It also has 3.5&amp;amp;nbsp;mm audio connectors. It has two Universal Serial Bus (USB) host ports and one USB On-The-Go port, supporting USB 2.0.&lt;br /&gt;
&lt;br /&gt;
=== CPUinfo ===&lt;br /&gt;
* Pandaboard&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Processor       : ARMv7 Processor rev 2 (v7l)&lt;br /&gt;
processor       : 0&lt;br /&gt;
BogoMIPS        : 599.22&lt;br /&gt;
&lt;br /&gt;
processor       : 1&lt;br /&gt;
BogoMIPS        : 582.68&lt;br /&gt;
&lt;br /&gt;
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls&lt;br /&gt;
CPU implementer : 0x41&lt;br /&gt;
CPU architecture: 7&lt;br /&gt;
CPU variant     : 0x1&lt;br /&gt;
CPU part        : 0xc09&lt;br /&gt;
CPU revision    : 2&lt;br /&gt;
&lt;br /&gt;
Hardware        : OMAP4 Panda board&lt;br /&gt;
Revision        : 0020&lt;br /&gt;
Serial          : 0000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Funtoo Linux Instalation ==&lt;br /&gt;
First of all you have to prepare/format your SD card (ALL DATA WILL BE LOST!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sdcardsetup.sh &lt;br /&gt;
# sdcardsetup.sh script&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ ! &amp;quot;$1&amp;quot; = &amp;quot;/dev/sda&amp;quot; ] ; then&lt;br /&gt;
        DRIVE=$1&lt;br /&gt;
        if [ -b &amp;quot;$DRIVE&amp;quot; ] ; then&lt;br /&gt;
                dd if=/dev/zero of=$DRIVE bs=1024 count=1024&lt;br /&gt;
                SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`&lt;br /&gt;
                echo DISK SIZE - $SIZE bytes&lt;br /&gt;
                CYLINDERS=`echo $SIZE/255/63/512 | bc`&lt;br /&gt;
                echo CYLINDERS - $CYLINDERS&lt;br /&gt;
                {&lt;br /&gt;
                echo ,9,0x0C,*&lt;br /&gt;
                echo ,,,-&lt;br /&gt;
                } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE&lt;br /&gt;
                mkfs.vfat -F 32 -n &amp;quot;boot&amp;quot; ${DRIVE}1&lt;br /&gt;
                mke2fs -j -L &amp;quot;rootfs&amp;quot; ${DRIVE}2&lt;br /&gt;
        fi &lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the general steps from [[Funtoo on ARM#Installing Funtoo]].&lt;br /&gt;
&lt;br /&gt;
These steps include:&lt;br /&gt;
* Extract stage3 to the 2nd partition of the SD card&lt;br /&gt;
* Extract portage snapshot (required to emerge things and ntp(see below))&lt;br /&gt;
* Setup fstab&lt;br /&gt;
* Setup root password&lt;br /&gt;
* Configure hostname and networking (optional, but recommended)&lt;br /&gt;
* Enable SSH access (optional, but recommended)&lt;br /&gt;
* Enable serial console access (optional, but recommended)&lt;br /&gt;
* Correct RTC &amp;quot;bug&amp;quot; with swclock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling serial console access ===&lt;br /&gt;
These are instructions specific for Pandaboard.&lt;br /&gt;
 nano -w /mnt/SD_root/etc/inittab&lt;br /&gt;
 s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100&lt;br /&gt;
&lt;br /&gt;
=== Kernel and bootloader ===&lt;br /&gt;
Here you can find kernel and bootloader files for a quick start.&lt;br /&gt;
Put these on first partition of your SD card. Archive name boot.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
Of course you can build your own kernel and U-Boot files, but these are provided here so you don't have to go through the cross-compiling pains and can use your Pandaboard to do native compiling once running.&lt;br /&gt;
&lt;br /&gt;
=== Modules and firmware ===&lt;br /&gt;
Put these inside /lib folder on second partition. Archive name modules.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Pandaboard]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/MATE_Desktop</id>
		<title>MATE Desktop</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/MATE_Desktop"/>
				<updated>2013-05-27T04:47:17Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up MATE profile ==&lt;br /&gt;
As many of you have read recently, we have brought MATE into our main tree. Which can be added via profile mix-in. It is simple to do so:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##eselect profile list&lt;br /&gt;
##i##Currently available arch profiles:&lt;br /&gt;
  [1]   funtoo/1.0/linux-gnu/arch/x86-64bit * &lt;br /&gt;
  [2]   funtoo/1.0/linux-gnu/arch/x86-64bit/pure64&lt;br /&gt;
##i##Currently available build profiles:&lt;br /&gt;
  [3]   funtoo/1.0/linux-gnu/build/stable&lt;br /&gt;
  [4]   funtoo/1.0/linux-gnu/build/current *&lt;br /&gt;
  [5]   funtoo/1.0/linux-gnu/build/experimental&lt;br /&gt;
##i##Currently available flavor profiles:  &lt;br /&gt;
  [6]  funtoo/1.0/linux-gnu/flavor/minimal&lt;br /&gt;
  [7]  funtoo/1.0/linux-gnu/flavor/core *   &lt;br /&gt;
  [8]  funtoo/1.0/linux-gnu/flavor/desktop&lt;br /&gt;
  [9]  funtoo/1.0/linux-gnu/flavor/workstation&lt;br /&gt;
##i##Currently available mix-ins profiles:&lt;br /&gt;
  [10]  funtoo/1.0/linux-gnu/mix-ins/audio&lt;br /&gt;
  [11]  funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
  [12]  funtoo/1.0/linux-gnu/mix-ins/dvd&lt;br /&gt;
  [13]  funtoo/1.0/linux-gnu/mix-ins/gnome&lt;br /&gt;
  [14]  funtoo/1.0/linux-gnu/mix-ins/kde&lt;br /&gt;
  [15]  funtoo/1.0/linux-gnu/mix-ins/mate&lt;br /&gt;
  [16]  funtoo/1.0/linux-gnu/mix-ins/media&lt;br /&gt;
  [17]  funtoo/1.0/linux-gnu/mix-ins/print&lt;br /&gt;
  [18]  funtoo/1.0/linux-gnu/mix-ins/python3-only&lt;br /&gt;
  [19]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat&lt;br /&gt;
  [20]  funtoo/1.0/linux-gnu/mix-ins/server-db&lt;br /&gt;
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-mail&lt;br /&gt;
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-web&lt;br /&gt;
  [23]  funtoo/1.0/linux-gnu/mix-ins/X&lt;br /&gt;
  [24]  funtoo/1.0/linux-gnu/mix-ins/xfce&lt;br /&gt;
  [25]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest&lt;br /&gt;
# ##i##eselect profile add funtoo/1.0/linux-gnu/mix-ins/mate&lt;br /&gt;
# ##i##emerge -uDNav @world&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
== USE flags ==&lt;br /&gt;
There is a use.mask on GTK3 for libcanberra which is required for a clean merge of MATE. A quick work around would be adding this to &amp;lt;tt&amp;gt;/etc/portage/&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##install -d /etc/portage/profile/&lt;br /&gt;
# ##i##echo &amp;quot;media-libs/libcanberra -gtk3&amp;quot; &amp;gt;&amp;gt; /etc/portage/profile/package.use.mask&lt;br /&gt;
# ##i##echo &amp;quot;media-libs/libcanberra gtk gtk3&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
== MATE set ==&lt;br /&gt;
MATE desktop set require manual step as described below&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##install -d /etc/portage/sets/&lt;br /&gt;
# ##i##cp /usr/portage/sets/mate /etc/portage/sets&lt;br /&gt;
# ##i##emerge @mate&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
You're good to go!&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/MATE_Desktop</id>
		<title>MATE Desktop</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/MATE_Desktop"/>
				<updated>2013-05-27T04:44:38Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Setting up MATE profile ==&lt;br /&gt;
As many of you have read recently, we have brought MATE into our main tree. Which can be added via profile mix-in. It is simple to do so:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##eselect profile list&lt;br /&gt;
##i##Currently available arch profiles:&lt;br /&gt;
  [1]   funtoo/1.0/linux-gnu/arch/x86-64bit * &lt;br /&gt;
  [2]   funtoo/1.0/linux-gnu/arch/x86-64bit/pure64&lt;br /&gt;
##i##Currently available build profiles:&lt;br /&gt;
  [3]   funtoo/1.0/linux-gnu/build/stable&lt;br /&gt;
  [4]   funtoo/1.0/linux-gnu/build/current *&lt;br /&gt;
  [5]   funtoo/1.0/linux-gnu/build/experimental&lt;br /&gt;
##i##Currently available flavor profiles:  &lt;br /&gt;
  [6]  funtoo/1.0/linux-gnu/flavor/minimal&lt;br /&gt;
  [7]  funtoo/1.0/linux-gnu/flavor/core *   &lt;br /&gt;
  [8]  funtoo/1.0/linux-gnu/flavor/desktop&lt;br /&gt;
  [9]  funtoo/1.0/linux-gnu/flavor/workstation&lt;br /&gt;
##i##Currently available mix-ins profiles:&lt;br /&gt;
  [10]  funtoo/1.0/linux-gnu/mix-ins/audio&lt;br /&gt;
  [11]  funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
  [12]  funtoo/1.0/linux-gnu/mix-ins/dvd&lt;br /&gt;
  [13]  funtoo/1.0/linux-gnu/mix-ins/gnome&lt;br /&gt;
  [14]  funtoo/1.0/linux-gnu/mix-ins/kde&lt;br /&gt;
  [15]  funtoo/1.0/linux-gnu/mix-ins/mate&lt;br /&gt;
  [16]  funtoo/1.0/linux-gnu/mix-ins/media&lt;br /&gt;
  [17]  funtoo/1.0/linux-gnu/mix-ins/print&lt;br /&gt;
  [18]  funtoo/1.0/linux-gnu/mix-ins/python3-only&lt;br /&gt;
  [19]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat&lt;br /&gt;
  [20]  funtoo/1.0/linux-gnu/mix-ins/server-db&lt;br /&gt;
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-mail&lt;br /&gt;
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-web&lt;br /&gt;
  [23]  funtoo/1.0/linux-gnu/mix-ins/X&lt;br /&gt;
  [24]  funtoo/1.0/linux-gnu/mix-ins/xfce&lt;br /&gt;
  [25]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest&lt;br /&gt;
# ##i##eselect profile add funtoo/1.0/linux-gnu/mix-ins/mate&lt;br /&gt;
# ##i##emerge -uDNav @world&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
== USE flags ==&lt;br /&gt;
There is a use.mask on GTK3 for libcanberra which is required for a clean merge of MATE. A quick work around would be adding this to &amp;lt;tt&amp;gt;/etc/portage/&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##install -d /etc/portage/profile/&lt;br /&gt;
# ##i##echo &amp;quot;media-libs/libcanberra -gtk3&amp;quot; &amp;gt;&amp;gt; /etc/portage/profile/package.use.mask&lt;br /&gt;
# ##i##echo &amp;quot;media-libs/libcanberra gtk3&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
== MATE set ==&lt;br /&gt;
MATE desktop set require manual step as described below&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##install -d /etc/portage/sets/&lt;br /&gt;
# ##i##cp /usr/portage/sets/mate /etc/portage/sets&lt;br /&gt;
# ##i##emerge @mate&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
You're good to go!&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-05-25T08:04:35Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 112.111.13.185 (talk) to last revision by Oleg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PandaBoard''' is a low-power, low-cost single-board computer development platform based on the Texas Instruments OMAP4430 system on a chip (SoC). The board has been available to the public since 27 October 2010. It is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
The '''PandaBoard ES''' is a newer version based on the OMAP4460 SoC, with the CPU and GPU running at higher clock rates. The board has been available to the public since 16 November 2011. Like its predecessor, it is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
The OMAP4430 SoC on the PandaBoard features a dual-core 1&amp;amp;nbsp;GHz ARM Cortex-A9 MPCore CPU, a 304&amp;amp;nbsp;MHz PowerVR SGX540 graphics processing unit (GPU), a Texas Instruments TMS320C6400 digital signal processor (DSP), and 1&amp;amp;nbsp;GiB of DDR2 SDRAM. &lt;br /&gt;
&lt;br /&gt;
The PandaBoard ES uses a newer SoC, with a dual-core 1.2&amp;amp;nbsp;GHz CPU and 384&amp;amp;nbsp;MHz GPU. Primary persistent storage is via an Secure Digital (SD) Card slot allowing SDHC cards up to 32&amp;amp;nbsp;GB to be used. The board includes wired 10/100 Ethernet as well as wireless Ethernet and bluetooth connectivity. The board can output video signals via Digital Visual Interface (DVI) and HDMI interfaces. It also has 3.5&amp;amp;nbsp;mm audio connectors. It has two Universal Serial Bus (USB) host ports and one USB On-The-Go port, supporting USB 2.0.&lt;br /&gt;
&lt;br /&gt;
=== CPUinfo ===&lt;br /&gt;
* Pandaboard&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Processor       : ARMv7 Processor rev 2 (v7l)&lt;br /&gt;
processor       : 0&lt;br /&gt;
BogoMIPS        : 599.22&lt;br /&gt;
&lt;br /&gt;
processor       : 1&lt;br /&gt;
BogoMIPS        : 582.68&lt;br /&gt;
&lt;br /&gt;
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls&lt;br /&gt;
CPU implementer : 0x41&lt;br /&gt;
CPU architecture: 7&lt;br /&gt;
CPU variant     : 0x1&lt;br /&gt;
CPU part        : 0xc09&lt;br /&gt;
CPU revision    : 2&lt;br /&gt;
&lt;br /&gt;
Hardware        : OMAP4 Panda board&lt;br /&gt;
Revision        : 0020&lt;br /&gt;
Serial          : 0000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Funtoo Linux Instalation ==&lt;br /&gt;
First of all you have to prepare/format your SD card (ALL DATA WILL BE LOST!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sdcardsetup.sh &lt;br /&gt;
# sdcardsetup.sh script&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ ! &amp;quot;$1&amp;quot; = &amp;quot;/dev/sda&amp;quot; ] ; then&lt;br /&gt;
        DRIVE=$1&lt;br /&gt;
        if [ -b &amp;quot;$DRIVE&amp;quot; ] ; then&lt;br /&gt;
                dd if=/dev/zero of=$DRIVE bs=1024 count=1024&lt;br /&gt;
                SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`&lt;br /&gt;
                echo DISK SIZE - $SIZE bytes&lt;br /&gt;
                CYLINDERS=`echo $SIZE/255/63/512 | bc`&lt;br /&gt;
                echo CYLINDERS - $CYLINDERS&lt;br /&gt;
                {&lt;br /&gt;
                echo ,9,0x0C,*&lt;br /&gt;
                echo ,,,-&lt;br /&gt;
                } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE&lt;br /&gt;
                mkfs.vfat -F 32 -n &amp;quot;boot&amp;quot; ${DRIVE}1&lt;br /&gt;
                mke2fs -j -L &amp;quot;rootfs&amp;quot; ${DRIVE}2&lt;br /&gt;
        fi &lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the general steps from [[Funtoo on ARM#Installing Funtoo]].&lt;br /&gt;
&lt;br /&gt;
These steps include:&lt;br /&gt;
* Extract stage3 to the 2nd partition of the SD card&lt;br /&gt;
* Extract portage snapshot (required to emerge things and ntp(see below))&lt;br /&gt;
* Setup fstab&lt;br /&gt;
* Setup root password&lt;br /&gt;
* Configure hostname and networking (optional, but recommended)&lt;br /&gt;
* Enable SSH access (optional, but recommended)&lt;br /&gt;
* Enable serial console access (optional, but recommended)&lt;br /&gt;
* Correct RTC &amp;quot;bug&amp;quot; with swclock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling serial console access ===&lt;br /&gt;
These are instructions specific for Pandaboard.&lt;br /&gt;
 nano -w /mnt/SD_root/etc/inittab&lt;br /&gt;
 s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100&lt;br /&gt;
&lt;br /&gt;
=== Kernel and bootloader ===&lt;br /&gt;
Here you can find kernel and bootloader files for a quick start.&lt;br /&gt;
Put these on first partition of your SD card. Archive name boot.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
Of course you can build your own kernel and U-Boot files, but these are provided here so you don't have to go through the cross-compiling pains and can use your Pandaboard to do native compiling once running.&lt;br /&gt;
&lt;br /&gt;
=== Modules and firmware ===&lt;br /&gt;
Put these inside /lib folder on second partition. Archive name modules.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Pandaboard]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux</id>
		<title>Funtoo Linux</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux"/>
				<updated>2013-05-25T08:03:00Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Gentoo buuilds no longer provided&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Getting Started =&lt;br /&gt;
Start by [[Funtoo Linux Installation|installing Funtoo]]. If you have questions, someone has probably asked them already in our [[Funtoo Linux FAQ]]. Otherwise, there are other [[Funtoo Wiki:Community portal|community resources]] available. For more information on the vision of Funtoo, see: [[vision]]&lt;br /&gt;
&lt;br /&gt;
= Differences between Funtoo Linux and Gentoo Linux =&lt;br /&gt;
&lt;br /&gt;
From an installation perspective, the main difference between Funtoo Linux and Gentoo Linux is that Funtoo Linux has a different Portage tree. We store our Portage tree in a git repository. Our Portage tree does track the Gentoo repository (we import Gentoo changes almost every day,) but our tree does contain some significant changes from Gentoo's tree.&lt;br /&gt;
&lt;br /&gt;
For the purpose of users Funtoo Linux decided to run a three modeled tree, the stable, the current and the experimental tree. Experimental tree is designed for Core Team in general to work on new features and is a seperated tree not available by keywords, for stable Funtoo uses the &amp;quot;*&amp;quot; arch-keyword and for current the &amp;quot;~*&amp;quot; arch-keyword. Most of the time current and experimental do not differ, but in cases of new features or toolchain updates both differ as some testings might break your system, so we like to keep this away from users while we test. Read more about it under [[Funtoo Linux#What are the differences between 'stable', 'current' and 'experimental' ?|What are the differences between 'stable', 'current' and 'experimental' ?]]&lt;br /&gt;
&lt;br /&gt;
Here is a basic overview of how Funtoo Linux differ from Gentoo Linux:&lt;br /&gt;
&lt;br /&gt;
{| {{Table}}&lt;br /&gt;
!||colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;|stable||colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color: #f78888;&amp;quot;|current||colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color: #f70088;&amp;quot;|experimental&lt;br /&gt;
|-&lt;br /&gt;
!Category&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |Gentoo Linux&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |Funtoo Linux&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |Gentoo Linux&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |Funtoo Linux&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |Gentoo Linux&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |Funtoo Linux&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!portage&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |2.1.11.31&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |2.3.5-r5 (funtoo)&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; | 2.1.11.40&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |2.3.5-r5 (funtoo)&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |2.3.5-r5 (funtoo)&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!portage tree&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |rsync-based&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |git-based&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |rsync-based&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |git-based&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |git-based&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!glibc&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |2.15-r3&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |2.15-r3&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |2.16.0&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |2.15-r3&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |2.15-r3&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!gcc&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |4.6.3&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |4.6.3&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |4.6.3&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |4.6.3&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |4.6.3&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!udev&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |171-r9&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |171-r8&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |197-r1&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |171-r8&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |171-r8&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!init scripts&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |openrc&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |openrc&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |openrc&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |openrc&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |openrc&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!perl&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |5.12.4-r1&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |5.12.4-r1&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |5.16.1&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |5.16.1&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |5.16.1&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!ruby&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |1.8.7_p370&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |1.8.7_p370&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |1.8.7_p371&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |1.8.7_p371&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |1.8.7_p371&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!core openresolv&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |no&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |yes&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |no&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |yes&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |yes&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!custom pkgs&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |[[Portage (Funtoo)|portage]], udev, grub, coreboot, openrc, and [http://github.com/funtoo/funtoo-overlay more]&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |[[Portage (Funtoo)|portage]], udev, grub, coreboot, openrc, and [http://github.com/funtoo/funtoo-overlay more]&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |[[Portage (Funtoo)|portage]], udev, grub, coreboot, openrc, and [http://github.com/funtoo/funtoo-overlay more]&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!merged overlays&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |None&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |[https://github.com/slashbeast/foo-overlay slashbeast], [https://github.com/adessemond/bar-overlay A. Dessemond], [https://github.com/funtoo/flora flora]&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |None&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |[https://github.com/slashbeast/foo-overlay slashbeast], [https://github.com/adessemond/bar-overlay A. Dessemond], [https://github.com/funtoo/flora flora]&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |[https://github.com/slashbeast/foo-overlay slashbeast], [https://github.com/adessemond/bar-overlay A. Dessemond], [https://github.com/funtoo/flora flora]&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!upstream tree&lt;br /&gt;
|colspan=&amp;quot;1&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;| &lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |None&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |gentoo stable&lt;br /&gt;
|style=&amp;quot;background-color: #ddf;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |None&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |gentoo unstable&lt;br /&gt;
|style=&amp;quot;background-color: #f78888;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|style=&amp;quot;background-color:#87CEEB;&amp;quot; |N/A&lt;br /&gt;
|style=&amp;quot;background-color:#A0E75A;&amp;quot; |gentoo unstable&lt;br /&gt;
|style=&amp;quot;background-color: #f70088;&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!||colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color: #ddf;&amp;quot;|stable||colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color: #f78888;&amp;quot;|current||colspan=&amp;quot;4&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;background-color: #f70088;&amp;quot;|experimental&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= What are the differences between 'stable', 'current' and 'experimental' ? =&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux follows a continuous development cycle. This means that new packages are continuously added to the [[Portage Tree]] and others are periodically improved with patches and bug fixes. &lt;br /&gt;
&lt;br /&gt;
When a package is considered to be stable, it is tagged as such, and means that you are very unlikely to have trouble with it during installation and in daily usage. All other packages are typically tagged as 'current' meaning they have undergone less widespread testing and you are more likely to experience issues with the software itself, or a package build failure. However, in day-to-day experience:&lt;br /&gt;
&lt;br /&gt;
* Funtoo 'experimental' is the the development tree for CoreTeam members, it generally is the Funtoo 'current' tree to which tools are added that are right now at a testing, if one of these testing circles is done and finished the 'experimental' tree is merged into the 'current' tree and will so long not difer from it, until new packages with heavy impact are there for being tested. This tree is just designed for CoreTeam members as troubles might be more common here than in 'current'.&lt;br /&gt;
&lt;br /&gt;
* '''Funtoo 'current' is almost as stable as Funtoo 'stable'''', although some troubles may appear from time to time. Some distributions name their 'current' branch 'unstable' but we do not because it implies that &amp;quot;unstable == unusable&amp;quot; (Funtoo current '''IS''' usable for a daily usage in production environments, depending on your requirements). &lt;br /&gt;
&lt;br /&gt;
* Funtoo 'stable' can, per definition, lag '''a long ways behind''' 'current'. This branch is recommended for setting up servers which have standard and very well supported hardware for a long time. If you have a desktop machine which requires the most recent drivers / kernel available using 'stable' may not be a solution for you. Efforts are also made to ensure compatibility with stable Red Hat Enterprise Linux 5 kernels for use in environments where stability is of the utmost importance.&lt;br /&gt;
&lt;br /&gt;
= What's Been Done So Far =&lt;br /&gt;
&lt;br /&gt;
My technical goals for Funtoo Linux are to focus on improving the core Gentoo system, ie. what you'd find inside a stage3. I also have been working to improve general Gentoo technologies, such as migrating Portage to git, and ensuring that Funtoo is easily buildable in an automated way, by creating Metro. These changes are intended to empower me to improve Funtoo more easily, and are shared with you so that you can benefit from them as well.&lt;br /&gt;
&lt;br /&gt;
These improvements are detailed below:&lt;br /&gt;
&lt;br /&gt;
== Git-based Portage Tree ==&lt;br /&gt;
&lt;br /&gt;
One of the first things I did was migrate Gentoo's development Portage tree from cvs to git, and migrate Gentoo's user Portage tree from rsync to git. This was done to help me work more effectively, since git is simply a much more powerful and efficient tool than cvs.&lt;br /&gt;
&lt;br /&gt;
Zack Medico, Portage/emerge maintainer, has enhanced the 2.2 version of Portage so that it is compatible with git. This allows ''users'' to pull a Portage tree from a git repository. This can often be more efficient than rsync, although the git repository does take up more space on disk. But I did not switch away from rsync because it wasn't fast enough.&lt;br /&gt;
&lt;br /&gt;
More important for me is the fact that users can pull from the same repositories that I use for Funtoo development. This simplifies Funtoo infrastructure considerably, keeping things more fun for me :)&lt;br /&gt;
&lt;br /&gt;
Git also provides integrity-checking functionality that is superior to that which currently exists in Portage, which will allow improved data integrity checks in future versions of Portage. This work is not yet finished, or even really started, but by using git we are starting to move in this direction. This work will continue as I have time.&lt;br /&gt;
&lt;br /&gt;
== Forked Tree ==&lt;br /&gt;
&lt;br /&gt;
Funtoo has its own Portage tree that is 99% identical to Gentoo's Portage tree. I merge changes from Gentoo into our tree every 12 hours, using an automated process. Our tree has a few significant differences from the Gentoo Portage tree.&lt;br /&gt;
&lt;br /&gt;
I created my own Portage tree for a multitude of reasons. The main reason for creating the tree was so I could get improvements into my Portage tree immediately, changes which Gentoo developers may or may not be interested in adding to the official Gentoo tree. I don't want to wait around or try to convince someone to add a fix I need.&lt;br /&gt;
&lt;br /&gt;
== Metro and Daily Builds ==&lt;br /&gt;
&lt;br /&gt;
[[Metro]] is a tool I created to build Gentoo and Funtoo releases in an automated way. For around a year, I have been using Gentoo's catalyst, and now [[Metro]] to build daily releases of Funtoo. These stages are available on the [[Download|Download page]].&lt;br /&gt;
&lt;br /&gt;
Metro is a big improvement over Gentoo's automated build tool, catalyst, which I originally wrote but has not aged well over the years. Metro is still missing some functionality that exists in catalyst, most notably LiveCD support (I haven't created a Funtoo LiveCD yet, which is why :) but in nearly all other respects is much more capable than catalyst. I will continue to maintain and improve Metro as I have time. The daily builds serve as a good ongoing test for Metro as well as the integrity of the Funtoo Portage tree.&lt;br /&gt;
&lt;br /&gt;
== Forkable - Empowering Developers ==&lt;br /&gt;
&lt;br /&gt;
Combine the transition to git with Metro, and Funtoo is now actually quite easy to fork, unlike Gentoo. If you wanted to create your own derivative of Funtoo or Gentoo, you could simply clone my git repository and then set up Metro to build releases of this variant. With some basic familiarity with git, this can all be accomplished by an single individual in a single day.&lt;br /&gt;
&lt;br /&gt;
Why is this important? If you love Gentoo like I do, but want to work on Gentoo independently, so that you have your own personal &amp;amp;quot;fun, too&amp;amp;quot; project where ''you'' are Chief Architect, you have all the tools you need to make this happen. There is no longer a need to become an official Gentoo developer in order to grow in your Gentoo knowledge.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Core System Changes ==&lt;br /&gt;
Funtoo has several core system changes, and I plan to continue to focus on improving the core system quite a bit. Funtoo has its own &amp;lt;tt&amp;gt;sys-fs/udev&amp;lt;/tt&amp;gt; package, its own &amp;lt;tt&amp;gt;sys-apps/baselayout&amp;lt;/tt&amp;gt;, its own &amp;lt;tt&amp;gt;sys-apps/openrc&amp;lt;/tt&amp;gt; (which is used by default), along with various other packages and improvements. Work is currently under way on a [[Unified Configuration]] structure as well as new, improved profile method which allows specifying multiple profiles (See [[Multiple Profiles]]).&lt;br /&gt;
&lt;br /&gt;
== Articles ==&lt;br /&gt;
On the [[:Category:Articles|Articles]] page, you'll notice a number of technical articles and HOWTOs. My original IBM developerWorks Linux articles are gradually being added to the site and updated as time permits.&lt;br /&gt;
&lt;br /&gt;
Every now and then, I will be adding interesting new content, such as the intriguing [http://www.funtoo.org/en/security/slowloris/ Slowloris DOS Mitigation Guide], which details various mitigations for the Slowloris DOS that affects the Apache Web server. This article was co-authored with Ryan Vick, a security researcher who is a friend of mine.&lt;br /&gt;
&lt;br /&gt;
= What's in the Works =&lt;br /&gt;
In addition to various ongoing [[:Category:Projects|Funtoo Linux Projects]], there are other efforts.&lt;br /&gt;
&lt;br /&gt;
== Funtoo Filesystem Hierarchy ==&lt;br /&gt;
&lt;br /&gt;
The [[Funtoo Filesystem Hierarchy]] seeks to document the specific nuances of the Funtoo fileystem hierarchy beyond what is in the [http://pathname.com/fhs/ Filesystem Hierarchy Standard] already.&lt;br /&gt;
&lt;br /&gt;
[[Category:Funtoo]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/MATE_Desktop</id>
		<title>MATE Desktop</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/MATE_Desktop"/>
				<updated>2013-05-21T16:50:53Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As many of you have read recently, we have brought MATE into our main tree. Which can be added via profile mix-in. It is simple to do so:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##eselect profile list&lt;br /&gt;
##i##Currently available arch profiles:&lt;br /&gt;
  [1]   funtoo/1.0/linux-gnu/arch/x86-64bit * &lt;br /&gt;
  [2]   funtoo/1.0/linux-gnu/arch/x86-64bit/pure64&lt;br /&gt;
##i##Currently available build profiles:&lt;br /&gt;
  [3]   funtoo/1.0/linux-gnu/build/stable&lt;br /&gt;
  [4]   funtoo/1.0/linux-gnu/build/current *&lt;br /&gt;
  [5]   funtoo/1.0/linux-gnu/build/experimental&lt;br /&gt;
##i##Currently available flavor profiles:  &lt;br /&gt;
  [6]  funtoo/1.0/linux-gnu/flavor/minimal&lt;br /&gt;
  [7]  funtoo/1.0/linux-gnu/flavor/core *   &lt;br /&gt;
  [8]  funtoo/1.0/linux-gnu/flavor/desktop&lt;br /&gt;
  [9]  funtoo/1.0/linux-gnu/flavor/workstation&lt;br /&gt;
##i##Currently available mix-ins profiles:&lt;br /&gt;
  [10]  funtoo/1.0/linux-gnu/mix-ins/audio&lt;br /&gt;
  [11]  funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
  [12]  funtoo/1.0/linux-gnu/mix-ins/dvd&lt;br /&gt;
  [13]  funtoo/1.0/linux-gnu/mix-ins/gnome&lt;br /&gt;
  [14]  funtoo/1.0/linux-gnu/mix-ins/kde&lt;br /&gt;
  [15]  funtoo/1.0/linux-gnu/mix-ins/mate&lt;br /&gt;
  [16]  funtoo/1.0/linux-gnu/mix-ins/media&lt;br /&gt;
  [17]  funtoo/1.0/linux-gnu/mix-ins/print&lt;br /&gt;
  [18]  funtoo/1.0/linux-gnu/mix-ins/python3-only&lt;br /&gt;
  [19]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat&lt;br /&gt;
  [20]  funtoo/1.0/linux-gnu/mix-ins/server-db&lt;br /&gt;
  [21]  funtoo/1.0/linux-gnu/mix-ins/server-mail&lt;br /&gt;
  [22]  funtoo/1.0/linux-gnu/mix-ins/server-web&lt;br /&gt;
  [23]  funtoo/1.0/linux-gnu/mix-ins/X&lt;br /&gt;
  [24]  funtoo/1.0/linux-gnu/mix-ins/xfce&lt;br /&gt;
  [25]  funtoo/1.0/linux-gnu/mix-ins/vmware-guest&lt;br /&gt;
# ##i##eselect profile add funtoo/1.0/linux-gnu/mix-ins/mate&lt;br /&gt;
# ##i##emerge -uDNav @world&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
There is a use.mask on GTK3 for libcanberra which is required for a clean merge of MATE. A quick work around would be adding this to &amp;lt;tt&amp;gt;/etc/portage/&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##install -d /etc/portage/profile/&lt;br /&gt;
# ##i##echo &amp;quot;media-libs/libcanberra -gtk3&amp;quot; &amp;gt;&amp;gt; /etc/portage/profile/package.use.mask&lt;br /&gt;
# ##i##echo &amp;quot;media-libs/libcanberra gtk3&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge -av mate&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
You're good to go!&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-05-17T02:08:45Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 36.248.100.88 (talk) to last revision by Oleg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PandaBoard''' is a low-power, low-cost single-board computer development platform based on the Texas Instruments OMAP4430 system on a chip (SoC). The board has been available to the public since 27 October 2010. It is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
The '''PandaBoard ES''' is a newer version based on the OMAP4460 SoC, with the CPU and GPU running at higher clock rates. The board has been available to the public since 16 November 2011. Like its predecessor, it is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
The OMAP4430 SoC on the PandaBoard features a dual-core 1&amp;amp;nbsp;GHz ARM Cortex-A9 MPCore CPU, a 304&amp;amp;nbsp;MHz PowerVR SGX540 graphics processing unit (GPU), a Texas Instruments TMS320C6400 digital signal processor (DSP), and 1&amp;amp;nbsp;GiB of DDR2 SDRAM. &lt;br /&gt;
&lt;br /&gt;
The PandaBoard ES uses a newer SoC, with a dual-core 1.2&amp;amp;nbsp;GHz CPU and 384&amp;amp;nbsp;MHz GPU. Primary persistent storage is via an Secure Digital (SD) Card slot allowing SDHC cards up to 32&amp;amp;nbsp;GB to be used. The board includes wired 10/100 Ethernet as well as wireless Ethernet and bluetooth connectivity. The board can output video signals via Digital Visual Interface (DVI) and HDMI interfaces. It also has 3.5&amp;amp;nbsp;mm audio connectors. It has two Universal Serial Bus (USB) host ports and one USB On-The-Go port, supporting USB 2.0.&lt;br /&gt;
&lt;br /&gt;
=== CPUinfo ===&lt;br /&gt;
* Pandaboard&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Processor       : ARMv7 Processor rev 2 (v7l)&lt;br /&gt;
processor       : 0&lt;br /&gt;
BogoMIPS        : 599.22&lt;br /&gt;
&lt;br /&gt;
processor       : 1&lt;br /&gt;
BogoMIPS        : 582.68&lt;br /&gt;
&lt;br /&gt;
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls&lt;br /&gt;
CPU implementer : 0x41&lt;br /&gt;
CPU architecture: 7&lt;br /&gt;
CPU variant     : 0x1&lt;br /&gt;
CPU part        : 0xc09&lt;br /&gt;
CPU revision    : 2&lt;br /&gt;
&lt;br /&gt;
Hardware        : OMAP4 Panda board&lt;br /&gt;
Revision        : 0020&lt;br /&gt;
Serial          : 0000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Funtoo Linux Instalation ==&lt;br /&gt;
First of all you have to prepare/format your SD card (ALL DATA WILL BE LOST!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sdcardsetup.sh &lt;br /&gt;
# sdcardsetup.sh script&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ ! &amp;quot;$1&amp;quot; = &amp;quot;/dev/sda&amp;quot; ] ; then&lt;br /&gt;
        DRIVE=$1&lt;br /&gt;
        if [ -b &amp;quot;$DRIVE&amp;quot; ] ; then&lt;br /&gt;
                dd if=/dev/zero of=$DRIVE bs=1024 count=1024&lt;br /&gt;
                SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`&lt;br /&gt;
                echo DISK SIZE - $SIZE bytes&lt;br /&gt;
                CYLINDERS=`echo $SIZE/255/63/512 | bc`&lt;br /&gt;
                echo CYLINDERS - $CYLINDERS&lt;br /&gt;
                {&lt;br /&gt;
                echo ,9,0x0C,*&lt;br /&gt;
                echo ,,,-&lt;br /&gt;
                } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE&lt;br /&gt;
                mkfs.vfat -F 32 -n &amp;quot;boot&amp;quot; ${DRIVE}1&lt;br /&gt;
                mke2fs -j -L &amp;quot;rootfs&amp;quot; ${DRIVE}2&lt;br /&gt;
        fi &lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the general steps from [[Funtoo on ARM#Installing Funtoo]].&lt;br /&gt;
&lt;br /&gt;
These steps include:&lt;br /&gt;
* Extract stage3 to the 2nd partition of the SD card&lt;br /&gt;
* Extract portage snapshot (required to emerge things and ntp(see below))&lt;br /&gt;
* Setup fstab&lt;br /&gt;
* Setup root password&lt;br /&gt;
* Configure hostname and networking (optional, but recommended)&lt;br /&gt;
* Enable SSH access (optional, but recommended)&lt;br /&gt;
* Enable serial console access (optional, but recommended)&lt;br /&gt;
* Correct RTC &amp;quot;bug&amp;quot; with swclock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling serial console access ===&lt;br /&gt;
These are instructions specific for Pandaboard.&lt;br /&gt;
 nano -w /mnt/SD_root/etc/inittab&lt;br /&gt;
 s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100&lt;br /&gt;
&lt;br /&gt;
=== Kernel and bootloader ===&lt;br /&gt;
Here you can find kernel and bootloader files for a quick start.&lt;br /&gt;
Put these on first partition of your SD card. Archive name boot.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
Of course you can build your own kernel and U-Boot files, but these are provided here so you don't have to go through the cross-compiling pains and can use your Pandaboard to do native compiling once running.&lt;br /&gt;
&lt;br /&gt;
=== Modules and firmware ===&lt;br /&gt;
Put these inside /lib folder on second partition. Archive name modules.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Pandaboard]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Mutt</id>
		<title>Mutt</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Mutt"/>
				<updated>2013-05-10T04:23:04Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Mutt postfix setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Mutt is a popular mail reader for Linux systems. This page is being created as a good place for people to place their mutt configurations to share with others. These configuration settings go in the user's &amp;lt;tt&amp;gt;~/.muttrc&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
== Essential Mutt ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set pager_stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This turns off the default behavior of mutt where hitting space to scroll will automatically move to the next message when the end of the current message is reached. This is very annoying when scrolling in long emails like cron jobs, and the line above sets this behavior to off.&lt;br /&gt;
&lt;br /&gt;
== angry_vincent's .muttrc ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# General config&lt;br /&gt;
# ---------------&lt;br /&gt;
&lt;br /&gt;
set folder=~/Mail		   # mail folder&lt;br /&gt;
set alias_file=~/.mail_aliases     # alises file&lt;br /&gt;
set arrow_cursor		   # cursor is '-&amp;gt;'&lt;br /&gt;
set attribution=&amp;quot;%d, %n wrote:&amp;quot;    # beginning of mail answer&lt;br /&gt;
set copy=yes			   # save mail copies&lt;br /&gt;
set edit_headers		   # edit mail header&lt;br /&gt;
set editor=&amp;quot;vim&amp;quot;		                              # editor&lt;br /&gt;
set folder_format=&amp;quot;%t%N %-30.30f %8s&amp;quot;                         # folder list look&lt;br /&gt;
set index_format=&amp;quot;%4C %Z %{%b %d} %-31.31F %N (%4c) %s&amp;quot;       # mail list look &lt;br /&gt;
set mailcap_path=&amp;quot;~/.mailcap&amp;quot;	                              # path to .mailcap&lt;br /&gt;
set menu_scroll			# scroll list by one line&lt;br /&gt;
set mail_check=5		# mail check interval&lt;br /&gt;
set pager_stop 			# at the end of mail do not move to next message &lt;br /&gt;
set postponed=+drafts		# postponed mails&lt;br /&gt;
set print=ask-yes		# ask before print&lt;br /&gt;
set print_command=lpr		# print command&lt;br /&gt;
set record=+sent		# where to save sent mails &lt;br /&gt;
set signature=&amp;quot;~/.signature&amp;quot;	# signature file&lt;br /&gt;
set visual=vim                  # editor caled by  ~v&lt;br /&gt;
&lt;br /&gt;
# mail sort&lt;br /&gt;
set sort=threads&lt;br /&gt;
set sort_aux=reverse-date-received&lt;br /&gt;
set sort_browser=reverse-date&lt;br /&gt;
ignore *     # ignore headers so the mail body is not overloaded&lt;br /&gt;
unignore        from: subject to cc mail-followup-to \&lt;br /&gt;
                date x-mailer x-url user-agent reply-to   # fieids i like to see in mail body&lt;br /&gt;
&lt;br /&gt;
# Colors&lt;br /&gt;
color index brightcyan black ~N&lt;br /&gt;
color index brightyellow black ~F&lt;br /&gt;
color index black green ~T&lt;br /&gt;
color index brightred black ~D&lt;br /&gt;
mono index bold ~N&lt;br /&gt;
mono index bold ~F&lt;br /&gt;
mono index bold ~T&lt;br /&gt;
mono index bold ~D&lt;br /&gt;
&lt;br /&gt;
# Highlights inside the body of a message.&lt;br /&gt;
&lt;br /&gt;
# URLs&lt;br /&gt;
color body brightgreen black &amp;quot;(http|ftp|news|telnet|finger)://[^ \&amp;quot;\t\r\n]*&amp;quot;&lt;br /&gt;
color body brightgreen black &amp;quot;mailto:[-a-z_0-9.]+@[-a-z_0-9.]+&amp;quot;&lt;br /&gt;
mono body bold &amp;quot;(http|ftp|news|telnet|finger)://[^ \&amp;quot;\t\r\n]*&amp;quot;&lt;br /&gt;
mono body bold &amp;quot;mailto:[-a-z_0-9.]+@[-a-z_0-9.]+&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# email addresses&lt;br /&gt;
color body brightgreen black &amp;quot;[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+&amp;quot;&lt;br /&gt;
mono body bold &amp;quot;[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# header&lt;br /&gt;
color header green black &amp;quot;^from:&amp;quot;&lt;br /&gt;
color header green black &amp;quot;^to:&amp;quot;&lt;br /&gt;
color header green black &amp;quot;^cc:&amp;quot;&lt;br /&gt;
color header green black &amp;quot;^date:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^newsgroups:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^reply-to:&amp;quot;&lt;br /&gt;
color header brightcyan black &amp;quot;^subject:&amp;quot;&lt;br /&gt;
color header red black &amp;quot;^x-spam-rule:&amp;quot;&lt;br /&gt;
color header green black &amp;quot;^x-mailer:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^message-id:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^Organization:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^Organisation:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^User-Agent:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^message-id: .*pine&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^X-Fnord:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^X-WebTV-Stationery:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^X-Message-Flag:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^X-Spam-Status:&amp;quot;&lt;br /&gt;
color header yellow black &amp;quot;^X-SpamProbe:&amp;quot;&lt;br /&gt;
color header red black &amp;quot;^X-SpamProbe: SPAM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Coloring quoted text - coloring the first 7 levels:&lt;br /&gt;
color quoted cyan black&lt;br /&gt;
color quoted1 yellow black&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Interesting Color Options ==&lt;br /&gt;
&lt;br /&gt;
http://github.com/altercation/mutt-colors-solarized&lt;br /&gt;
&lt;br /&gt;
== golodhrim's mutt config ==&lt;br /&gt;
&lt;br /&gt;
First I split up my muttconfig in several subfiles under &amp;lt;tt&amp;gt;~/.mutt&amp;lt;/tt&amp;gt;. The resulting files will be:&lt;br /&gt;
&lt;br /&gt;
* ~/.mutt/account_hooks&lt;br /&gt;
* ~/.mutt/colors&lt;br /&gt;
* ~/.mutt/folder_hooks&lt;br /&gt;
* ~/.mutt/gpg&lt;br /&gt;
* ~/.mutt/lists&lt;br /&gt;
* ~/.mutt/macros&lt;br /&gt;
* ~/.mutt/mutt-alias&lt;br /&gt;
* ~/.mutt/muttrc&lt;br /&gt;
* ~/.mutt/sidebar&lt;br /&gt;
* ~/.secret/.passwd.gpg&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/account_hooks ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#-------------------------------------------------------------------------      &lt;br /&gt;
#&lt;br /&gt;
# Account Hooks&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
account-hook . 'unset imap_user imap_pass'&lt;br /&gt;
account-hook 'imap://user@imaphost/' &amp;quot;set imap_user=user imap_pass=$my_pass1 &amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/colors ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#-------------------------------------------------------------------------      &lt;br /&gt;
# Set colors&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
color   attachment  brightmagenta       default&lt;br /&gt;
color   error       brightred           default&lt;br /&gt;
color   hdrdefault  red                 default&lt;br /&gt;
color   indicator   brightyellow        red&lt;br /&gt;
color   markers     brightcyan          default&lt;br /&gt;
color   message     brightcyan          default&lt;br /&gt;
color   normal      default             default&lt;br /&gt;
color   quoted      brightblue          default&lt;br /&gt;
color   search      default             green&lt;br /&gt;
color   signature   red                 default&lt;br /&gt;
color   status      yellow              blue&lt;br /&gt;
color   tilde       magenta             default&lt;br /&gt;
color   tree        magenta             default&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/folder_hooks ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#--------------------------------------------------------------------------     &lt;br /&gt;
#&lt;br /&gt;
# Folders, mailboxes and folder hooks&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
# Setup for imap-user in account_hooks&lt;br /&gt;
set folder=&amp;quot;imap://user@imaphost/&amp;quot;&lt;br /&gt;
mailboxes =INBOX =INBOX/Archives =INBOX/Drafts =INBOX/Sent =INBOX/Trash&lt;br /&gt;
folder-hook 'imap://user@imaphost/' &amp;quot; \&lt;br /&gt;
    set folder=imap://user@imaphost/ \&lt;br /&gt;
        postponed=+INBOX/Drafts \&lt;br /&gt;
        record=+INBOX/Sent \&lt;br /&gt;
        smtp_url=smtp://user@smtphost \&lt;br /&gt;
        smtp_pass=$my_pass1 \&lt;br /&gt;
        #signature=~/.sig/pr.txt \&lt;br /&gt;
        from='Name Familyname &amp;lt;name@host&amp;gt; ' \&lt;br /&gt;
        realname='Realname' \&lt;br /&gt;
        pgp_sign_as='PGP-signature' \&lt;br /&gt;
        spoolfile='imap://user@imaphost/' &amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/gpg ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vim:syn=muttrc                                                                &lt;br /&gt;
##&lt;br /&gt;
&lt;br /&gt;
set smime_decrypt_use_default_key=yes&lt;br /&gt;
&lt;br /&gt;
# Decode application/pgp attachments like so:&lt;br /&gt;
set pgp_decode_command=&amp;quot;/usr/bin/gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# And use this to verify pgp signatures:&lt;br /&gt;
set pgp_verify_command=&amp;quot;/usr/bin/gpg --no-verbose --batch --output - --verify %s %f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# How to decrypt pgp encrypted messages:&lt;br /&gt;
set pgp_decrypt_command=&amp;quot;/usr/bin/gpg --passphrase-fd 0 --no-verbose --batch --output - %f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# How to pgp sign a message:&lt;br /&gt;
set pgp_sign_command=&amp;quot;/usr/bin/gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# How to pgp clearsign a message:&lt;br /&gt;
set pgp_clearsign_command=&amp;quot;/usr/bin/gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Import a pgp key from a message into my public keyring as follows:&lt;br /&gt;
set pgp_import_command=&amp;quot;/usr/bin/gpg --no-verbose --import -v %f&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Use this to export a key from my public keyring:&lt;br /&gt;
set pgp_export_command=&amp;quot;/usr/bin/gpg --no-verbose --export --armor %r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Verify key information (from the key selection menu):&lt;br /&gt;
set pgp_verify_key_command=&amp;quot;/usr/bin/gpg --verbose --batch --fingerprint --check-sigs %r&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# List my public keyring like so:&lt;br /&gt;
set pgp_list_pubring_command=&amp;quot;/usr/bin/gpg --no-verbose --batch --with-colons --list-keys %r&amp;quot; &lt;br /&gt;
&lt;br /&gt;
# List my private keyring like so:&lt;br /&gt;
set pgp_list_secring_command=&amp;quot;/usr/bin/gpg --no-verbose --batch --with-colons --list-secret-keys %r&amp;quot; &lt;br /&gt;
&lt;br /&gt;
# Automatically sign outgoing messages&lt;br /&gt;
set pgp_autosign=yes&lt;br /&gt;
&lt;br /&gt;
# Timeout (in seconds) for cached passphrases:&lt;br /&gt;
set pgp_timeout=1800&lt;br /&gt;
&lt;br /&gt;
# Text to show before a good signature:&lt;br /&gt;
set pgp_good_sign=&amp;quot;^gpg: Good signature from&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/lists ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#-------------------------------------------------------------------------      &lt;br /&gt;
# Mailinglist Subscriptions&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
# Syntax:&lt;br /&gt;
# subscribe mailinglist@domain.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/macros ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Macros to toggle the sidebar visibility                                       &lt;br /&gt;
macro index b '&amp;lt;enter-command&amp;gt;toggle sidebar_visible&amp;lt;enter&amp;gt;&amp;lt;refresh&amp;gt;'&lt;br /&gt;
macro pager b '&amp;lt;enter-command&amp;gt;toggle sidebar_visible&amp;lt;enter&amp;gt;&amp;lt;redraw-screen&amp;gt;'&lt;br /&gt;
&lt;br /&gt;
# abook query&lt;br /&gt;
macro index,pager A &amp;quot;&amp;lt;pipe-message&amp;gt;abook --add-email-quiet&amp;lt;return&amp;gt;&amp;quot; &amp;quot;add the sender address to abook&amp;quot;&lt;br /&gt;
macro generic,index,pager \Cb &amp;quot;abook&amp;quot; &amp;quot;launch abook&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/alias ===&lt;br /&gt;
multiple lines like&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
alias nick Realname &amp;lt;email@host.tld&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/muttrc ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Some minimal Mutt settings, Gentoo-style.  These reflect the Gentoo&lt;br /&gt;
# predilection for maildir folders.&lt;br /&gt;
#&lt;br /&gt;
# Please don't add settings to this file to change other user&lt;br /&gt;
# preferences (such as colors), since those can be hard for a user to&lt;br /&gt;
# undo if their preference doesn't match yours!  For example, it is&lt;br /&gt;
# *impossible* currently in mutt to remove color settings from objects&lt;br /&gt;
# other than the index.&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
# Process the password file first&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
set my_tmp=`gpg -o ~/.secret/.tmp -d ~/.secret/.passwd.gpg`                     &lt;br /&gt;
set my_pass1=`awk '/user:/ {print $2}' ~/.secret/.tmp`&lt;br /&gt;
set my_del=`rm -f ~/.secret/.tmp`&lt;br /&gt;
 &lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
# Further customisations&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
set smart_wrap = yes&lt;br /&gt;
set sort = 'threads'&lt;br /&gt;
set sort_aux = 'last-date-received'&lt;br /&gt;
set imap_check_subscribed&lt;br /&gt;
&lt;br /&gt;
ignore &amp;quot;Authentication-Results:&amp;quot;&lt;br /&gt;
ignore &amp;quot;DoaminKey-Signature:&amp;quot;&lt;br /&gt;
ignore &amp;quot;DKIM-Signature:&amp;quot;&lt;br /&gt;
hdr_order Date From To Cc&lt;br /&gt;
&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
# Configuration variables&lt;br /&gt;
#-------------------------------------------------------------------------&lt;br /&gt;
set abort_nosubject=yes&lt;br /&gt;
set abort_unmodified=yes&lt;br /&gt;
set query_command=&amp;quot;abook --mutt-query '%s'&amp;quot;&lt;br /&gt;
set alias_file=&amp;quot;~/.mutt/mutt-alias&amp;quot;&lt;br /&gt;
set alias_format=&amp;quot;%4n %t %a %r&amp;quot;&lt;br /&gt;
source $alias_file&lt;br /&gt;
set assumed_charset=&amp;quot;utf-8&amp;quot;&lt;br /&gt;
set attach_charset=&amp;quot;utf-8&amp;quot;&lt;br /&gt;
set charset=&amp;quot;utf-8&amp;quot;&lt;br /&gt;
set date_format=&amp;quot;&amp;quot;&lt;br /&gt;
set edit_headers=yes&lt;br /&gt;
set editor='vim + -c &amp;quot;set textwidth=72&amp;quot; -c &amp;quot;set wrap&amp;quot; -c &amp;quot;set nocp&amp;quot; -c &amp;quot;?^$&amp;quot;        '&lt;br /&gt;
set folder=&amp;quot;~/.offlineimap&amp;quot;&lt;br /&gt;
set forward_quote=yes&lt;br /&gt;
set header_cache=~/.mutt/cache/headers&lt;br /&gt;
set message_cachedir=~/.mutt/cache/bodies&lt;br /&gt;
set certificate_file=~/.mutt/certificates&lt;br /&gt;
set help=yes&lt;br /&gt;
set imap_idle=yes&lt;br /&gt;
set imap_peek=yes&lt;br /&gt;
set imap_servernoise=no&lt;br /&gt;
set include=yes&lt;br /&gt;
set mail_check=60&lt;br /&gt;
set mbox_type=Maildir&lt;br /&gt;
set menu_move_off=no&lt;br /&gt;
set menu_scroll=no&lt;br /&gt;
set mime_forward=ask-no&lt;br /&gt;
set pager_context=2&lt;br /&gt;
set pager_stop=yes&lt;br /&gt;
set postponed=&amp;quot;~/.mutt/mail/postponed&amp;quot;&lt;br /&gt;
set realname=&amp;quot;Martin 'golodhrim' Scholz&amp;quot;&lt;br /&gt;
set record=&amp;quot;~/.mutt/mail/sent&amp;quot;&lt;br /&gt;
set reply_regexp=&amp;quot;^(re([\[0-9\]+])*|betr):[ \t]*&amp;quot;&lt;br /&gt;
#set reply_to=yes&lt;br /&gt;
set tilde=yes&lt;br /&gt;
&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
# muttprint for printing&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
set print_command=&amp;quot;muttprint&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
# Automatically process html mails&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
auto_view text/html&lt;br /&gt;
&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
# Other configuration files&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
source ~/.mutt/account_hooks&lt;br /&gt;
source ~/.mutt/folder_hooks&lt;br /&gt;
source ~/.mutt/colors&lt;br /&gt;
source ~/.mutt/sidebar&lt;br /&gt;
source ~/.mutt/gpg&lt;br /&gt;
source ~/.mutt/macros&lt;br /&gt;
source ~/.mutt/lists &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.mutt/sidebar ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#--------------------------------------------------------------------------     &lt;br /&gt;
# Sidebar configuration&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
set sidebar_width=30&lt;br /&gt;
set sidebar_visible=yes&lt;br /&gt;
set sidebar_delim='|'&lt;br /&gt;
color sidebar_new yellow default&lt;br /&gt;
&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
# Sidebar keys&lt;br /&gt;
#--------------------------------------------------------------------------&lt;br /&gt;
bind index \CP sidebar-prev&lt;br /&gt;
bind index \CN sidebar-next&lt;br /&gt;
bind index \CO sidebar-open&lt;br /&gt;
bind pager \CP sidebar-prev&lt;br /&gt;
bind pager \CN sidebar-next&lt;br /&gt;
bind pager \CO sidebar-open&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ~/.secret/.passwd.gpg ===&lt;br /&gt;
For this file follow the next steps:&lt;br /&gt;
* Step 1:&lt;br /&gt;
Create a folder &amp;lt;tt&amp;gt;~/.secret&amp;lt;/tt&amp;gt; and inside a file &amp;lt;tt&amp;gt;.passwd&amp;lt;/tt&amp;gt; and enter the following into it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user1:    passwd1&lt;br /&gt;
user2:    passwd2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where user1 and user2 are your identifiers for the accounts you added in account_hooks and folder_hooks and at the start of muttrc.&lt;br /&gt;
* Step 2:&lt;br /&gt;
Now encrypt the file with your gpg-key, if you don't have one execute &amp;lt;tt&amp;gt;gpg --gen-key&amp;lt;/tt&amp;gt; and create one first. After that don't forget to delete your unencrypted passwordstorage.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gpg -r 0x&amp;lt;Your-ID-fingerprint&amp;gt; -o .passwd.gpg --encrypt .passwd&lt;br /&gt;
$ rm -f .passwd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Mutt postfix setup ===&lt;br /&gt;
Postfix is another popular and powerful mail transfer agent which somehow easier to configure than sendmail. Let's start a quick postfix mail transfer setup that will work with mutt. Set &amp;lt;tt&amp;gt;sasl,berkdb&amp;lt;/tt&amp;gt; USE flags to &amp;lt;tt&amp;gt;mail-mta/potsfix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mail-client/mutt&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;mail-mta/postfix berkdb sasl&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use/mail&lt;br /&gt;
# ##i##echo &amp;quot;mail-client/mutt berkdb sasl&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use/mail&lt;br /&gt;
# ##i##emerge -uN1 mutt postfix&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
Edit &amp;lt;tt&amp;gt;/etc/postfix/main.cf&amp;lt;/tt&amp;gt; and add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
relayhost = smtp.gmail.com:587&lt;br /&gt;
smtp_use_tls = yes&lt;br /&gt;
smtp_sasl_auth_enable = yes&lt;br /&gt;
smtp_sasl_password_maps = hash:/etc/postfix/gmail_passwd&lt;br /&gt;
smtp_sasl_security_options = noanonymous&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Create and edit above mentioned authorization file &amp;lt;tt&amp;gt;gmail_passwd&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /etc/postfix/gmail_passwd&lt;br /&gt;
# ##i##echo &amp;quot;smtp.gmail.com:587 my.name@gmail.com:password&amp;quot; &amp;gt;&amp;gt; /etc/postfix/gmail_passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
Where &amp;lt;my.name&amp;gt; is gmail account and passwd is account password.&lt;br /&gt;
Convert &amp;lt;tt&amp;gt;gmail_passwd&amp;lt;/tt&amp;gt; into Berkeley DB format, secure the file and finaly restart the postfix daemon&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##postmap /etc/postfix/gmail_passwd&lt;br /&gt;
# ##i##chown root:postfix /etc/postfix/gmail_passwd*&lt;br /&gt;
# ##i##chmod 0640 /etc/postfix/gmail_passwd*&lt;br /&gt;
# ##i##/etc/init.d/postfix restart&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Featured]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial</id>
		<title>Metro Quick Start Tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial"/>
				<updated>2013-05-10T04:08:11Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Step 0: Optional Quick Copy of Portage Tree */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Metro]] is the build system for [[Funtoo Linux]] and [[Gentoo Linux]] stages. It automates the bootstrapping process.&lt;br /&gt;
&lt;br /&gt;
This tutorial will take you through installing, setting up and running [[Metro]].&lt;br /&gt;
&lt;br /&gt;
= Preface = &lt;br /&gt;
&lt;br /&gt;
== How Metro Works == &lt;br /&gt;
&lt;br /&gt;
You may be wondering how [[Metro]] creates its first stage tarball. As you may have guessed, [[Metro]] cannot create a stage tarball out of thin air. To build a new stage tarball, [[Metro]] must use an existing, older stage tarball called a &amp;amp;quot;seed&amp;amp;quot; stage. This &amp;amp;quot;seed&amp;amp;quot; stage typically is used as the ''build environment'' for creating the stage we want.&lt;br /&gt;
&lt;br /&gt;
[[Metro]] can use two kinds of seed stages. Traditionally, [[Metro]] has used a stage3 as a seed stage. This stage3 is then used to build a new stage1, which in turn is used to build a new stage2, and then a new stage3. This is generally the most reliable way to build [[Gentoo Linux]] or [[Funtoo Linux]], so it's the recommended approach.&lt;br /&gt;
{{fancyimportant|'''After switching metro builds to Funtoo profile, Gentoo stages are no longer provided'''!}}&lt;br /&gt;
&lt;br /&gt;
== Seeds and Build Isolation ==&lt;br /&gt;
&lt;br /&gt;
Another important concept to mention here is something called ''build isolation''. Because [[Metro]] creates an isolated build environment, and the build environment is explicitly defined using existing, tangible entities -- a seed stage and a portage snapshot -- you will get consistent, repeatable results. In other words, the same seed stage, portage snapshot and build instructions will generate an essentially identical result, even if you perform the build a month later on someone else's workstation.&lt;br /&gt;
&lt;br /&gt;
== Local Build == &lt;br /&gt;
&lt;br /&gt;
Say you wanted to build a new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. The recommended method of doing this would be to grab an existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball to use as your seed stage. [[Metro]] will be told to use this existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 to build a new stage1 for the same &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;. For this process, the generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 would provide the ''build environment'' for creating our new stage1. Then, the new stage1 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2. And the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3.&lt;br /&gt;
&lt;br /&gt;
In the [[Metro]] terminology this is called a '''local build''', which means a stage3 of a given architecture is used to seed a brand new build of the same architecture. Incidentally this will be the first exercise we are going to perform in this tutorial.&lt;br /&gt;
&lt;br /&gt;
A week later, you may want to build a brand new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. Rather than starting from the original &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 again, you'd probably configure [[Metro]] to use the most-recently-built &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as the seed. [[Metro]] has built-in functionality to make this easy, allowing it to easily find and track the most recent stage3 seed available.&lt;br /&gt;
&lt;br /&gt;
== Remote Build == &lt;br /&gt;
&lt;br /&gt;
[[Metro]] can also perform '''remote build''', where a stage3 of a different, but binary compatible, architecture is used as a seed to build a different architecture stage3. Consequentiality the second exercise we are going to perform in this tutorial will be to build a &amp;lt;tt&amp;gt;core2 32bit&amp;lt;/tt&amp;gt; stage3 tarball from the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball we have just built.&lt;br /&gt;
&lt;br /&gt;
TODO: add caveats about what archs can be seeded and what can be not (maybe a table?)&lt;br /&gt;
&lt;br /&gt;
== Tailored Build == &lt;br /&gt;
&lt;br /&gt;
Last, it's also worthy noting that both in &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;remote builds&amp;lt;/tt&amp;gt;, [[Metro]] can be configured to add and/or remove individual packages to the final tarball.&lt;br /&gt;
Let's say you can't live without &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, at the end of this tutorial, we will show how to have your tailored stage3 to include it.&lt;br /&gt;
&lt;br /&gt;
= Installing Metro =&lt;br /&gt;
&lt;br /&gt;
Today the '''recommended and supported method''' is to use the Git repository of [[Metro]].  First ensure you remove the &amp;lt;tt&amp;gt;dev-util/metro&amp;lt;/tt&amp;gt; package if you had installed it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge -aC dev-util/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then ensure that &amp;lt;tt&amp;gt;dev-vcs/git&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dev-python/boto&amp;lt;/tt&amp;gt; installed on your system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge dev-vcs/git&lt;br /&gt;
(~) # emerge dev-python/boto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, clone the master git repository as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d /root/git&lt;br /&gt;
(~) # cd /root/git&lt;br /&gt;
(~/git) # git clone git://github.com/funtoo/metro.git&lt;br /&gt;
(~/git) # ln -s /root/git/metro /usr/lib/metro&lt;br /&gt;
(~/git) # ln -s /root/git/metro/metro /usr/bin/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will now have a directory called &amp;lt;tt&amp;gt;/root/git/metro&amp;lt;/tt&amp;gt; that contains all the [[Metro]] source code.&lt;br /&gt;
Installation complete!&lt;br /&gt;
&lt;br /&gt;
= Configuring Metro =&lt;br /&gt;
&lt;br /&gt;
[[User:Drobbins|Daniel Robbins]] maintains [[Metro]], so it comes pre-configured to successfully build both [[Gentoo Linux]] and [[Funtoo Linux]] releases. Before reading farther, you might want to customize some basic settings like the number of concurrent jobs to fit your hardware's capabilities or the directory to use for produced stage archives. This is accomplished by editing &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt; which is the [[Metro]]'s master configuration file. The &amp;lt;tt&amp;gt;[path/mirror]&amp;lt;/tt&amp;gt; section defines where [[Metro]] will look for things it needs and also dump things it creates. As initially configured, [[Metro]] is set up to build [[Funtoo Linux]] and [[Gentoo Linux]] stage tarballs and place them in the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Mirror Paths - where to find required files and where to put created files&lt;br /&gt;
&lt;br /&gt;
[section path/mirror]&lt;br /&gt;
&lt;br /&gt;
: /home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the location of your mirror on disk, then edit the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; line (which defines the path/mirror variable) to point to another directory.&lt;br /&gt;
&lt;br /&gt;
For the purpose of the following steps, set an environment variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # export METRO_MIRROR=/home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Of course, set the environment variable to whatever location you used in the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Arch and Subarch ==&lt;br /&gt;
&lt;br /&gt;
In the following example we are creating a pentium4 stage 3 compiled for x86-32bit binary compatibility. Pentium4 is a subarch of the x86-32bit architecture. Once you have metro installed you may find a full list of each subarch in your &amp;lt;tt&amp;gt;/usr/lib/metro/subarch&amp;lt;/tt&amp;gt; directory each subarch will have the file extension .spec&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
# ls /usr/lib/metro/subarch/&lt;br /&gt;
amd64-k10.spec         athlon-tbird.spec  generic_32.spec       native_32.spec   pentium-mmx.spec&lt;br /&gt;
amd64-k8_32.spec       athlon-xp.spec     generic_64.spec       native_64.spec   pentium-m.spec&lt;br /&gt;
amd64-k8.spec          atom_32.spec       generic_sparcv9.spec  niagara2.spec    pentiumpro.spec&lt;br /&gt;
amd64-k8+sse3_32.spec  atom_64.spec       geode.spec            niagara.spec     pentium.spec&lt;br /&gt;
amd64-k8+sse3.spec     btver1_64.spec     i486.spec             nocona.spec      prescott.spec&lt;br /&gt;
armv7a.spec            btver1.spec        i686.spec             opteron_64.spec  ultrasparc3.spec&lt;br /&gt;
athlon-4.spec          core2_32.spec      k6-2.spec             pentium2.spec    ultrasparc.spec&lt;br /&gt;
athlon-mp.spec         core2_64.spec      k6-3.spec             pentium3.spec    xen-pentium4+sse3_64.spec&lt;br /&gt;
athlon.spec            corei7.spec        k6.spec               pentium4.spec    xen-pentium4+sse3.spec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example list of Architectures, take a look at the directory listing on the [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-Current Mirror].&lt;br /&gt;
&lt;br /&gt;
= First stages build (local build) =&lt;br /&gt;
&lt;br /&gt;
To get this all started, we need to bootstrap the process by downloading an initial seed stage3 to use for building and place it in is proper location in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, so that [[Metro]] can find it. We will also need to create some special &amp;amp;quot;control&amp;amp;quot; files in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, which will allow [[Metro]] to understand how it is supposed to proceed.&lt;br /&gt;
&lt;br /&gt;
== Step 0: Optional Quick Copy of Portage Tree ==&lt;br /&gt;
&lt;br /&gt;
There is a quick step you can perform to avoid having Metro re-clone the entire Portage tree. Perform this as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/portage; git checkout origin/master&lt;br /&gt;
# install -d /var/tmp/metro/cache/cloned-repositories&lt;br /&gt;
# cat /root/git/metro/etc/builds/funtoo-current/build.conf  | grep name&lt;br /&gt;
name: portage-mini-2011&lt;br /&gt;
# cp -a /usr/portage /var/tmp/metro/cache/cloned-repositories/ports-2012&lt;br /&gt;
# cd /usr/portage; git checkout funtoo.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up pentium4 repository (local build) ==&lt;br /&gt;
&lt;br /&gt;
Assuming we're following the basic steps outlined in the previous section, and building an unstable funtoo (&amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt;) build for the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;, using a generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as a seed stage, then here the first set of steps we'd perform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # cd 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # wget -c http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-32bit/pentium4/2011-12-13/stage3-pentium4-funtoo-current-2011-12-13.tar.xz&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # cd ..&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/version&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;2011-12-13&amp;amp;quot; &amp;amp;gt; .control/version/stage3&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OK, let's review the steps above. First, we create the directory &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt;, which is where Metro will expect to find unstable &amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt; pentium4 builds -- it is configured to look here by default. Then we create a specially-named directory to house our seed x86 stage3. Again, by default, Metro expects the directory to be named this way. We enter this directory, and download our seed x86 stage3 from funtoo.org. Note that the &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt; version stamp matches. Make sure that your directory name matches the stage3 name too. Everything has been set up to match Metro's default filesystem layout.&lt;br /&gt;
&lt;br /&gt;
Next, we go back to the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory, and inside it, we create a &amp;lt;tt&amp;gt;.control&amp;lt;/tt&amp;gt; directory. This directory and its subdirectories contain special files that Metro references to determine certain aspects of its behavior. The &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file is used by Metro to track the most recently-built stage3 for this particular build and subarch. Metro will automatically update this file with a new version stamp after it successfully builds a new stage3. But because Metro didn't actually ''build'' this stage3, we need to set up the &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file manually. This will allow Metro to find our downloaded stage3 when we set up our pentium4 build to use it as a seed. Also note that Metro will create a similar &amp;lt;tt&amp;gt;.control/version/stage1&amp;lt;/tt&amp;gt; file after it successfully builds an pentium4 funtoo-current stage1.&lt;br /&gt;
&lt;br /&gt;
We also set up &amp;lt;tt&amp;gt;.control/strategy/build&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.control/strategy/seed&amp;lt;/tt&amp;gt; files with values of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; respectively. These files define the building strategy Metro will use when we build pentium4 funtoo-current stages. With a build strategy of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt;, Metro will source its seed stage from funtoo-current pentium4, the current directory. And with a seed strategy of &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;, Metro will use a stage3 as a seed, and use this seed to build a new stage1, stage2 and stage3.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the pentium4 stages ==&lt;br /&gt;
&lt;br /&gt;
Incidentally, if all you wanted to do at this point was to build a new pentium4 funtoo-current stage1/2/3 (plus openvz and vserver templates). You would begin the process by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/git/metro&lt;br /&gt;
# scripts/ezbuild.sh funtoo-current pentium4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a slow machine, it could take several hours to be completed because several &amp;quot;heavy&amp;quot; components like gcc or glibc have to be recompiled in each stage. Once a stage has been successfully completed, it is placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/pentium4/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory, where &amp;lt;tt&amp;gt;YYYY-MM-DD&amp;lt;/tt&amp;gt; is today's date at the time the &amp;lt;tt&amp;gt;ezbuild.sh&amp;lt;/tt&amp;gt; script was started or the date you put on the ezscript.sh command line.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The next build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new pentium4 stage3. If you'd like, you can reconfigure Metro to use the most recently-built pentium4 stage3 as a seed for any pentium4 builds. To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/pentium4/.control/strategy/build&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, Metro will use the most recentpentium4 stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Building for another binary compatible architecture (remote build) =&lt;br /&gt;
&lt;br /&gt;
As written above, [[Metro]] is able to perform '''remote build''' building different architecture stage3 from a binary compatible seeding stage3 (e.g. using a pentium4 stage3 to seed a &amp;lt;tt&amp;gt;Intel Core2 32bits&amp;lt;/tt&amp;gt; stage3). &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''remote build''' (a stage 3 of a different, but binary compatible, architecture is used as a seed). &lt;br /&gt;
What's not compatible? You can't use a &amp;lt;tt&amp;gt;Sparc&amp;lt;/tt&amp;gt; architecture to generate an &amp;lt;tt&amp;gt;x86&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ARM&amp;lt;/tt&amp;gt; based stage and vice-versa. If you use a 32bit stage then you don't want to seed a 64bit build from it. Be sure that you are using a stage from the same architecture that you are trying to seed. Check [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-current FTP Mirror] for a stage that is from the same Architecture that you will be building.  &lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up Core_2 32bit repository ==&lt;br /&gt;
&lt;br /&gt;
In this example, we're going to use this pentium4 funtoo-current stage3 to seed a new Core_2 32bit funtoo-current build. To get that done, we need to set up the pentium4 build directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # install -d core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # cd core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;remote&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/remote&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;funtoo-current&amp;amp;quot; &amp;amp;gt; .control/remote/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;pentium4&amp;amp;quot; &amp;amp;gt; .control/remote/subarch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps we follow are similar to those we performed for a ''local build'' to set up our pentium4 directory for local build. However, note the differences. We didn't download a stage, because we are going to use the pentium4 stage to build a new Core_2 32bit stage. We also didn't create the &amp;lt;tt&amp;gt;.control/version/stage{1,3}&amp;lt;/tt&amp;gt; files because Metro will create them for us after it successfully builds a new stage1 and stage3. We are still using a &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; seed strategy, but we've set the build strategy to &amp;lt;tt&amp;gt;remote&amp;lt;/tt&amp;gt;, which means that we're going to use a seed stage that's not from this particular subdirectory. Where are we going to get it from? The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; directory contains this information, and lets Metro know that it should look for its seed stage3 in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/home/mirror/linux/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory. Which one will it grab? You guessed it -- the most recently built ''stage3'' (since our seed strategy was set to &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;) that has the version stamp of &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt;, as recorded in &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4/.control/version/stage3&amp;quot;&amp;lt;/tt&amp;gt;. Now you can see how all those control files come together to direct Metro to do the right thing.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the Core_2 32bit stages ==&lt;br /&gt;
&lt;br /&gt;
Now, you could start building your new Core_2 32bit stage1/2/3 (plus openvz and vserver templates) by typing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # /root/git/metro/scripts/ezbuild.sh funtoo-current core2_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that case, the produced stages are placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/core2_32/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The Next Build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new Core_2 32bit stage3. If you'd like, you can reconfigure Metro to use the most recently-built Core_2 32bit stage3 as a seed for any new Core_2 32bit builds. &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''local build''' (a stage 3 of a a given architecture is used to seed a brand new build of the same architecture). &lt;br /&gt;
&lt;br /&gt;
To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/core2_32/.control/strategy/build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Metro will use the most recent Core_2 32bit stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Build your own tailored stage3 =&lt;br /&gt;
&lt;br /&gt;
Metro can be easily configured for building custom stage3 by including additional packages. Notice that including packages with heavy dependencies such as gnome, kde, xorg-server is not recommended (not tested so far). Well tested packages are &amp;lt;tt&amp;gt;app-misc/mc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-process/htop&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-apps/dstat&amp;lt;/tt&amp;gt;. An example for funtoo-current stage. Edit the following configuration file &amp;lt;tt&amp;gt;/root/git/metro/etc/builds/funtoo-current/build.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[collect ../../fslayouts/funtoo/layout.conf]&lt;br /&gt;
&lt;br /&gt;
[section local]&lt;br /&gt;
&lt;br /&gt;
author: Daniel Robbins &amp;lt;drobbins@funtoo.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[section target]&lt;br /&gt;
&lt;br /&gt;
build: funtoo-current&lt;br /&gt;
compression: xz&lt;br /&gt;
&lt;br /&gt;
[section portage]&lt;br /&gt;
&lt;br /&gt;
stable: ~&lt;br /&gt;
MAKEOPTS: -j12&lt;br /&gt;
FEATURES: mini-manifest&lt;br /&gt;
SYNC: $[snapshot/source/remote]&lt;br /&gt;
USE:&lt;br /&gt;
profile: default/linux/$[target/arch:zap]/2008.0&lt;br /&gt;
&lt;br /&gt;
[section emerge]&lt;br /&gt;
&lt;br /&gt;
options: --jobs=4 --load-average=3 --keep-going=n&lt;br /&gt;
packages: [&lt;br /&gt;
	dev-vcs/git &lt;br /&gt;
	net-misc/dhcpcd&lt;br /&gt;
	sys-fs/reiserfsprogs&lt;br /&gt;
	net-misc/bridge-utils&lt;br /&gt;
	sys-devel/bc&lt;br /&gt;
	sys-apps/pciutils&lt;br /&gt;
	app-portage/gentoolkit&lt;br /&gt;
        app-misc/mc&lt;br /&gt;
        app-misc/screen&lt;br /&gt;
        sys-process/htop&lt;br /&gt;
        sys-apps/dstat &lt;br /&gt;
            &lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
[section snapshot]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see MAKEOPTS and emerge default options are additional strings to tweak, --keep-going=n is recommended, if something breaking during the stage building process, you can quickly diagnose the problem.&lt;br /&gt;
&lt;br /&gt;
Distfiles location can be specified in &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Main metro configuration file&lt;br /&gt;
# &lt;br /&gt;
# Path configuration:&lt;br /&gt;
&lt;br /&gt;
[collect ../targets/$[metro/target]/$[target:zap].spec]&lt;br /&gt;
[collect ./builds/$[metro/build]/build.conf]&lt;br /&gt;
[collect ../subarch/$[target/subarch:zap].spec]&lt;br /&gt;
&lt;br /&gt;
# General Paths&lt;br /&gt;
&lt;br /&gt;
[section path]&lt;br /&gt;
tmp: /var/tmp/metro&lt;br /&gt;
distfiles: /var/portage/distfiles&lt;br /&gt;
work: $[path/tmp]/work/$[metro/build]/$[target/name]&lt;br /&gt;
&lt;br /&gt;
[section path/cache]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Metro]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial</id>
		<title>Metro Quick Start Tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial"/>
				<updated>2013-05-10T04:06:59Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Installing Metro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Metro]] is the build system for [[Funtoo Linux]] and [[Gentoo Linux]] stages. It automates the bootstrapping process.&lt;br /&gt;
&lt;br /&gt;
This tutorial will take you through installing, setting up and running [[Metro]].&lt;br /&gt;
&lt;br /&gt;
= Preface = &lt;br /&gt;
&lt;br /&gt;
== How Metro Works == &lt;br /&gt;
&lt;br /&gt;
You may be wondering how [[Metro]] creates its first stage tarball. As you may have guessed, [[Metro]] cannot create a stage tarball out of thin air. To build a new stage tarball, [[Metro]] must use an existing, older stage tarball called a &amp;amp;quot;seed&amp;amp;quot; stage. This &amp;amp;quot;seed&amp;amp;quot; stage typically is used as the ''build environment'' for creating the stage we want.&lt;br /&gt;
&lt;br /&gt;
[[Metro]] can use two kinds of seed stages. Traditionally, [[Metro]] has used a stage3 as a seed stage. This stage3 is then used to build a new stage1, which in turn is used to build a new stage2, and then a new stage3. This is generally the most reliable way to build [[Gentoo Linux]] or [[Funtoo Linux]], so it's the recommended approach.&lt;br /&gt;
{{fancyimportant|'''After switching metro builds to Funtoo profile, Gentoo stages are no longer provided'''!}}&lt;br /&gt;
&lt;br /&gt;
== Seeds and Build Isolation ==&lt;br /&gt;
&lt;br /&gt;
Another important concept to mention here is something called ''build isolation''. Because [[Metro]] creates an isolated build environment, and the build environment is explicitly defined using existing, tangible entities -- a seed stage and a portage snapshot -- you will get consistent, repeatable results. In other words, the same seed stage, portage snapshot and build instructions will generate an essentially identical result, even if you perform the build a month later on someone else's workstation.&lt;br /&gt;
&lt;br /&gt;
== Local Build == &lt;br /&gt;
&lt;br /&gt;
Say you wanted to build a new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. The recommended method of doing this would be to grab an existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball to use as your seed stage. [[Metro]] will be told to use this existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 to build a new stage1 for the same &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;. For this process, the generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 would provide the ''build environment'' for creating our new stage1. Then, the new stage1 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2. And the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3.&lt;br /&gt;
&lt;br /&gt;
In the [[Metro]] terminology this is called a '''local build''', which means a stage3 of a given architecture is used to seed a brand new build of the same architecture. Incidentally this will be the first exercise we are going to perform in this tutorial.&lt;br /&gt;
&lt;br /&gt;
A week later, you may want to build a brand new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. Rather than starting from the original &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 again, you'd probably configure [[Metro]] to use the most-recently-built &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as the seed. [[Metro]] has built-in functionality to make this easy, allowing it to easily find and track the most recent stage3 seed available.&lt;br /&gt;
&lt;br /&gt;
== Remote Build == &lt;br /&gt;
&lt;br /&gt;
[[Metro]] can also perform '''remote build''', where a stage3 of a different, but binary compatible, architecture is used as a seed to build a different architecture stage3. Consequentiality the second exercise we are going to perform in this tutorial will be to build a &amp;lt;tt&amp;gt;core2 32bit&amp;lt;/tt&amp;gt; stage3 tarball from the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball we have just built.&lt;br /&gt;
&lt;br /&gt;
TODO: add caveats about what archs can be seeded and what can be not (maybe a table?)&lt;br /&gt;
&lt;br /&gt;
== Tailored Build == &lt;br /&gt;
&lt;br /&gt;
Last, it's also worthy noting that both in &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;remote builds&amp;lt;/tt&amp;gt;, [[Metro]] can be configured to add and/or remove individual packages to the final tarball.&lt;br /&gt;
Let's say you can't live without &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, at the end of this tutorial, we will show how to have your tailored stage3 to include it.&lt;br /&gt;
&lt;br /&gt;
= Installing Metro =&lt;br /&gt;
&lt;br /&gt;
Today the '''recommended and supported method''' is to use the Git repository of [[Metro]].  First ensure you remove the &amp;lt;tt&amp;gt;dev-util/metro&amp;lt;/tt&amp;gt; package if you had installed it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge -aC dev-util/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then ensure that &amp;lt;tt&amp;gt;dev-vcs/git&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dev-python/boto&amp;lt;/tt&amp;gt; installed on your system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge dev-vcs/git&lt;br /&gt;
(~) # emerge dev-python/boto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, clone the master git repository as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d /root/git&lt;br /&gt;
(~) # cd /root/git&lt;br /&gt;
(~/git) # git clone git://github.com/funtoo/metro.git&lt;br /&gt;
(~/git) # ln -s /root/git/metro /usr/lib/metro&lt;br /&gt;
(~/git) # ln -s /root/git/metro/metro /usr/bin/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will now have a directory called &amp;lt;tt&amp;gt;/root/git/metro&amp;lt;/tt&amp;gt; that contains all the [[Metro]] source code.&lt;br /&gt;
Installation complete!&lt;br /&gt;
&lt;br /&gt;
= Configuring Metro =&lt;br /&gt;
&lt;br /&gt;
[[User:Drobbins|Daniel Robbins]] maintains [[Metro]], so it comes pre-configured to successfully build both [[Gentoo Linux]] and [[Funtoo Linux]] releases. Before reading farther, you might want to customize some basic settings like the number of concurrent jobs to fit your hardware's capabilities or the directory to use for produced stage archives. This is accomplished by editing &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt; which is the [[Metro]]'s master configuration file. The &amp;lt;tt&amp;gt;[path/mirror]&amp;lt;/tt&amp;gt; section defines where [[Metro]] will look for things it needs and also dump things it creates. As initially configured, [[Metro]] is set up to build [[Funtoo Linux]] and [[Gentoo Linux]] stage tarballs and place them in the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Mirror Paths - where to find required files and where to put created files&lt;br /&gt;
&lt;br /&gt;
[section path/mirror]&lt;br /&gt;
&lt;br /&gt;
: /home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the location of your mirror on disk, then edit the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; line (which defines the path/mirror variable) to point to another directory.&lt;br /&gt;
&lt;br /&gt;
For the purpose of the following steps, set an environment variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # export METRO_MIRROR=/home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Of course, set the environment variable to whatever location you used in the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Arch and Subarch ==&lt;br /&gt;
&lt;br /&gt;
In the following example we are creating a pentium4 stage 3 compiled for x86-32bit binary compatibility. Pentium4 is a subarch of the x86-32bit architecture. Once you have metro installed you may find a full list of each subarch in your &amp;lt;tt&amp;gt;/usr/lib/metro/subarch&amp;lt;/tt&amp;gt; directory each subarch will have the file extension .spec&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
# ls /usr/lib/metro/subarch/&lt;br /&gt;
amd64-k10.spec         athlon-tbird.spec  generic_32.spec       native_32.spec   pentium-mmx.spec&lt;br /&gt;
amd64-k8_32.spec       athlon-xp.spec     generic_64.spec       native_64.spec   pentium-m.spec&lt;br /&gt;
amd64-k8.spec          atom_32.spec       generic_sparcv9.spec  niagara2.spec    pentiumpro.spec&lt;br /&gt;
amd64-k8+sse3_32.spec  atom_64.spec       geode.spec            niagara.spec     pentium.spec&lt;br /&gt;
amd64-k8+sse3.spec     btver1_64.spec     i486.spec             nocona.spec      prescott.spec&lt;br /&gt;
armv7a.spec            btver1.spec        i686.spec             opteron_64.spec  ultrasparc3.spec&lt;br /&gt;
athlon-4.spec          core2_32.spec      k6-2.spec             pentium2.spec    ultrasparc.spec&lt;br /&gt;
athlon-mp.spec         core2_64.spec      k6-3.spec             pentium3.spec    xen-pentium4+sse3_64.spec&lt;br /&gt;
athlon.spec            corei7.spec        k6.spec               pentium4.spec    xen-pentium4+sse3.spec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example list of Architectures, take a look at the directory listing on the [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-Current Mirror].&lt;br /&gt;
&lt;br /&gt;
= First stages build (local build) =&lt;br /&gt;
&lt;br /&gt;
To get this all started, we need to bootstrap the process by downloading an initial seed stage3 to use for building and place it in is proper location in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, so that [[Metro]] can find it. We will also need to create some special &amp;amp;quot;control&amp;amp;quot; files in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, which will allow [[Metro]] to understand how it is supposed to proceed.&lt;br /&gt;
&lt;br /&gt;
== Step 0: Optional Quick Copy of Portage Tree ==&lt;br /&gt;
&lt;br /&gt;
There is a quick step you can perform to avoid having Metro re-clone the entire Portage tree. Perform this as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/portage; git checkout origin/master&lt;br /&gt;
# install -d /var/tmp/metro/cache/cloned-repositories&lt;br /&gt;
# cat /root/git/metro/etc/builds/funtoo-current/build.conf  | grep name&lt;br /&gt;
name: portage-mini-2011&lt;br /&gt;
# cp -a /usr/portage /var/tmp/metro/cache/cloned-repositories/portage-mini-2011&lt;br /&gt;
# cd /usr/portage; git checkout funtoo.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up pentium4 repository (local build) ==&lt;br /&gt;
&lt;br /&gt;
Assuming we're following the basic steps outlined in the previous section, and building an unstable funtoo (&amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt;) build for the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;, using a generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as a seed stage, then here the first set of steps we'd perform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # cd 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # wget -c http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-32bit/pentium4/2011-12-13/stage3-pentium4-funtoo-current-2011-12-13.tar.xz&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # cd ..&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/version&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;2011-12-13&amp;amp;quot; &amp;amp;gt; .control/version/stage3&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OK, let's review the steps above. First, we create the directory &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt;, which is where Metro will expect to find unstable &amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt; pentium4 builds -- it is configured to look here by default. Then we create a specially-named directory to house our seed x86 stage3. Again, by default, Metro expects the directory to be named this way. We enter this directory, and download our seed x86 stage3 from funtoo.org. Note that the &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt; version stamp matches. Make sure that your directory name matches the stage3 name too. Everything has been set up to match Metro's default filesystem layout.&lt;br /&gt;
&lt;br /&gt;
Next, we go back to the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory, and inside it, we create a &amp;lt;tt&amp;gt;.control&amp;lt;/tt&amp;gt; directory. This directory and its subdirectories contain special files that Metro references to determine certain aspects of its behavior. The &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file is used by Metro to track the most recently-built stage3 for this particular build and subarch. Metro will automatically update this file with a new version stamp after it successfully builds a new stage3. But because Metro didn't actually ''build'' this stage3, we need to set up the &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file manually. This will allow Metro to find our downloaded stage3 when we set up our pentium4 build to use it as a seed. Also note that Metro will create a similar &amp;lt;tt&amp;gt;.control/version/stage1&amp;lt;/tt&amp;gt; file after it successfully builds an pentium4 funtoo-current stage1.&lt;br /&gt;
&lt;br /&gt;
We also set up &amp;lt;tt&amp;gt;.control/strategy/build&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.control/strategy/seed&amp;lt;/tt&amp;gt; files with values of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; respectively. These files define the building strategy Metro will use when we build pentium4 funtoo-current stages. With a build strategy of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt;, Metro will source its seed stage from funtoo-current pentium4, the current directory. And with a seed strategy of &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;, Metro will use a stage3 as a seed, and use this seed to build a new stage1, stage2 and stage3.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the pentium4 stages ==&lt;br /&gt;
&lt;br /&gt;
Incidentally, if all you wanted to do at this point was to build a new pentium4 funtoo-current stage1/2/3 (plus openvz and vserver templates). You would begin the process by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/git/metro&lt;br /&gt;
# scripts/ezbuild.sh funtoo-current pentium4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a slow machine, it could take several hours to be completed because several &amp;quot;heavy&amp;quot; components like gcc or glibc have to be recompiled in each stage. Once a stage has been successfully completed, it is placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/pentium4/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory, where &amp;lt;tt&amp;gt;YYYY-MM-DD&amp;lt;/tt&amp;gt; is today's date at the time the &amp;lt;tt&amp;gt;ezbuild.sh&amp;lt;/tt&amp;gt; script was started or the date you put on the ezscript.sh command line.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The next build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new pentium4 stage3. If you'd like, you can reconfigure Metro to use the most recently-built pentium4 stage3 as a seed for any pentium4 builds. To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/pentium4/.control/strategy/build&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, Metro will use the most recentpentium4 stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Building for another binary compatible architecture (remote build) =&lt;br /&gt;
&lt;br /&gt;
As written above, [[Metro]] is able to perform '''remote build''' building different architecture stage3 from a binary compatible seeding stage3 (e.g. using a pentium4 stage3 to seed a &amp;lt;tt&amp;gt;Intel Core2 32bits&amp;lt;/tt&amp;gt; stage3). &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''remote build''' (a stage 3 of a different, but binary compatible, architecture is used as a seed). &lt;br /&gt;
What's not compatible? You can't use a &amp;lt;tt&amp;gt;Sparc&amp;lt;/tt&amp;gt; architecture to generate an &amp;lt;tt&amp;gt;x86&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ARM&amp;lt;/tt&amp;gt; based stage and vice-versa. If you use a 32bit stage then you don't want to seed a 64bit build from it. Be sure that you are using a stage from the same architecture that you are trying to seed. Check [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-current FTP Mirror] for a stage that is from the same Architecture that you will be building.  &lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up Core_2 32bit repository ==&lt;br /&gt;
&lt;br /&gt;
In this example, we're going to use this pentium4 funtoo-current stage3 to seed a new Core_2 32bit funtoo-current build. To get that done, we need to set up the pentium4 build directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # install -d core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # cd core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;remote&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/remote&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;funtoo-current&amp;amp;quot; &amp;amp;gt; .control/remote/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;pentium4&amp;amp;quot; &amp;amp;gt; .control/remote/subarch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps we follow are similar to those we performed for a ''local build'' to set up our pentium4 directory for local build. However, note the differences. We didn't download a stage, because we are going to use the pentium4 stage to build a new Core_2 32bit stage. We also didn't create the &amp;lt;tt&amp;gt;.control/version/stage{1,3}&amp;lt;/tt&amp;gt; files because Metro will create them for us after it successfully builds a new stage1 and stage3. We are still using a &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; seed strategy, but we've set the build strategy to &amp;lt;tt&amp;gt;remote&amp;lt;/tt&amp;gt;, which means that we're going to use a seed stage that's not from this particular subdirectory. Where are we going to get it from? The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; directory contains this information, and lets Metro know that it should look for its seed stage3 in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/home/mirror/linux/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory. Which one will it grab? You guessed it -- the most recently built ''stage3'' (since our seed strategy was set to &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;) that has the version stamp of &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt;, as recorded in &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4/.control/version/stage3&amp;quot;&amp;lt;/tt&amp;gt;. Now you can see how all those control files come together to direct Metro to do the right thing.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the Core_2 32bit stages ==&lt;br /&gt;
&lt;br /&gt;
Now, you could start building your new Core_2 32bit stage1/2/3 (plus openvz and vserver templates) by typing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # /root/git/metro/scripts/ezbuild.sh funtoo-current core2_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that case, the produced stages are placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/core2_32/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The Next Build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new Core_2 32bit stage3. If you'd like, you can reconfigure Metro to use the most recently-built Core_2 32bit stage3 as a seed for any new Core_2 32bit builds. &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''local build''' (a stage 3 of a a given architecture is used to seed a brand new build of the same architecture). &lt;br /&gt;
&lt;br /&gt;
To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/core2_32/.control/strategy/build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Metro will use the most recent Core_2 32bit stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Build your own tailored stage3 =&lt;br /&gt;
&lt;br /&gt;
Metro can be easily configured for building custom stage3 by including additional packages. Notice that including packages with heavy dependencies such as gnome, kde, xorg-server is not recommended (not tested so far). Well tested packages are &amp;lt;tt&amp;gt;app-misc/mc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-process/htop&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-apps/dstat&amp;lt;/tt&amp;gt;. An example for funtoo-current stage. Edit the following configuration file &amp;lt;tt&amp;gt;/root/git/metro/etc/builds/funtoo-current/build.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[collect ../../fslayouts/funtoo/layout.conf]&lt;br /&gt;
&lt;br /&gt;
[section local]&lt;br /&gt;
&lt;br /&gt;
author: Daniel Robbins &amp;lt;drobbins@funtoo.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[section target]&lt;br /&gt;
&lt;br /&gt;
build: funtoo-current&lt;br /&gt;
compression: xz&lt;br /&gt;
&lt;br /&gt;
[section portage]&lt;br /&gt;
&lt;br /&gt;
stable: ~&lt;br /&gt;
MAKEOPTS: -j12&lt;br /&gt;
FEATURES: mini-manifest&lt;br /&gt;
SYNC: $[snapshot/source/remote]&lt;br /&gt;
USE:&lt;br /&gt;
profile: default/linux/$[target/arch:zap]/2008.0&lt;br /&gt;
&lt;br /&gt;
[section emerge]&lt;br /&gt;
&lt;br /&gt;
options: --jobs=4 --load-average=3 --keep-going=n&lt;br /&gt;
packages: [&lt;br /&gt;
	dev-vcs/git &lt;br /&gt;
	net-misc/dhcpcd&lt;br /&gt;
	sys-fs/reiserfsprogs&lt;br /&gt;
	net-misc/bridge-utils&lt;br /&gt;
	sys-devel/bc&lt;br /&gt;
	sys-apps/pciutils&lt;br /&gt;
	app-portage/gentoolkit&lt;br /&gt;
        app-misc/mc&lt;br /&gt;
        app-misc/screen&lt;br /&gt;
        sys-process/htop&lt;br /&gt;
        sys-apps/dstat &lt;br /&gt;
            &lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
[section snapshot]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see MAKEOPTS and emerge default options are additional strings to tweak, --keep-going=n is recommended, if something breaking during the stage building process, you can quickly diagnose the problem.&lt;br /&gt;
&lt;br /&gt;
Distfiles location can be specified in &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Main metro configuration file&lt;br /&gt;
# &lt;br /&gt;
# Path configuration:&lt;br /&gt;
&lt;br /&gt;
[collect ../targets/$[metro/target]/$[target:zap].spec]&lt;br /&gt;
[collect ./builds/$[metro/build]/build.conf]&lt;br /&gt;
[collect ../subarch/$[target/subarch:zap].spec]&lt;br /&gt;
&lt;br /&gt;
# General Paths&lt;br /&gt;
&lt;br /&gt;
[section path]&lt;br /&gt;
tmp: /var/tmp/metro&lt;br /&gt;
distfiles: /var/portage/distfiles&lt;br /&gt;
work: $[path/tmp]/work/$[metro/build]/$[target/name]&lt;br /&gt;
&lt;br /&gt;
[section path/cache]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Metro]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial</id>
		<title>Metro Quick Start Tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial"/>
				<updated>2013-05-10T04:06:08Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Installing Metro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Metro]] is the build system for [[Funtoo Linux]] and [[Gentoo Linux]] stages. It automates the bootstrapping process.&lt;br /&gt;
&lt;br /&gt;
This tutorial will take you through installing, setting up and running [[Metro]].&lt;br /&gt;
&lt;br /&gt;
= Preface = &lt;br /&gt;
&lt;br /&gt;
== How Metro Works == &lt;br /&gt;
&lt;br /&gt;
You may be wondering how [[Metro]] creates its first stage tarball. As you may have guessed, [[Metro]] cannot create a stage tarball out of thin air. To build a new stage tarball, [[Metro]] must use an existing, older stage tarball called a &amp;amp;quot;seed&amp;amp;quot; stage. This &amp;amp;quot;seed&amp;amp;quot; stage typically is used as the ''build environment'' for creating the stage we want.&lt;br /&gt;
&lt;br /&gt;
[[Metro]] can use two kinds of seed stages. Traditionally, [[Metro]] has used a stage3 as a seed stage. This stage3 is then used to build a new stage1, which in turn is used to build a new stage2, and then a new stage3. This is generally the most reliable way to build [[Gentoo Linux]] or [[Funtoo Linux]], so it's the recommended approach.&lt;br /&gt;
{{fancyimportant|'''After switching metro builds to Funtoo profile, Gentoo stages are no longer provided'''!}}&lt;br /&gt;
&lt;br /&gt;
== Seeds and Build Isolation ==&lt;br /&gt;
&lt;br /&gt;
Another important concept to mention here is something called ''build isolation''. Because [[Metro]] creates an isolated build environment, and the build environment is explicitly defined using existing, tangible entities -- a seed stage and a portage snapshot -- you will get consistent, repeatable results. In other words, the same seed stage, portage snapshot and build instructions will generate an essentially identical result, even if you perform the build a month later on someone else's workstation.&lt;br /&gt;
&lt;br /&gt;
== Local Build == &lt;br /&gt;
&lt;br /&gt;
Say you wanted to build a new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. The recommended method of doing this would be to grab an existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball to use as your seed stage. [[Metro]] will be told to use this existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 to build a new stage1 for the same &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;. For this process, the generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 would provide the ''build environment'' for creating our new stage1. Then, the new stage1 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2. And the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3.&lt;br /&gt;
&lt;br /&gt;
In the [[Metro]] terminology this is called a '''local build''', which means a stage3 of a given architecture is used to seed a brand new build of the same architecture. Incidentally this will be the first exercise we are going to perform in this tutorial.&lt;br /&gt;
&lt;br /&gt;
A week later, you may want to build a brand new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. Rather than starting from the original &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 again, you'd probably configure [[Metro]] to use the most-recently-built &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as the seed. [[Metro]] has built-in functionality to make this easy, allowing it to easily find and track the most recent stage3 seed available.&lt;br /&gt;
&lt;br /&gt;
== Remote Build == &lt;br /&gt;
&lt;br /&gt;
[[Metro]] can also perform '''remote build''', where a stage3 of a different, but binary compatible, architecture is used as a seed to build a different architecture stage3. Consequentiality the second exercise we are going to perform in this tutorial will be to build a &amp;lt;tt&amp;gt;core2 32bit&amp;lt;/tt&amp;gt; stage3 tarball from the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball we have just built.&lt;br /&gt;
&lt;br /&gt;
TODO: add caveats about what archs can be seeded and what can be not (maybe a table?)&lt;br /&gt;
&lt;br /&gt;
== Tailored Build == &lt;br /&gt;
&lt;br /&gt;
Last, it's also worthy noting that both in &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;remote builds&amp;lt;/tt&amp;gt;, [[Metro]] can be configured to add and/or remove individual packages to the final tarball.&lt;br /&gt;
Let's say you can't live without &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, at the end of this tutorial, we will show how to have your tailored stage3 to include it.&lt;br /&gt;
&lt;br /&gt;
= Installing Metro =&lt;br /&gt;
&lt;br /&gt;
Today the '''recommended and supported method''' is to use the Git repository of [[Metro]].  First ensure you remove the &amp;lt;tt&amp;gt;dev-util/metro&amp;lt;/tt&amp;gt; package if you had installed it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge -aC dev-util/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then ensure that &amp;lt;tt&amp;gt;dev-vcs/git&amp;lt;/tt&amp;gt; is installed on your system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge dev-vcs/git&lt;br /&gt;
(~) # emerge dev-python/boto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, clone the master git repository as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d /root/git&lt;br /&gt;
(~) # cd /root/git&lt;br /&gt;
(~/git) # git clone git://github.com/funtoo/metro.git&lt;br /&gt;
(~/git) # ln -s /root/git/metro /usr/lib/metro&lt;br /&gt;
(~/git) # ln -s /root/git/metro/metro /usr/bin/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will now have a directory called &amp;lt;tt&amp;gt;/root/git/metro&amp;lt;/tt&amp;gt; that contains all the [[Metro]] source code.&lt;br /&gt;
Installation complete!&lt;br /&gt;
&lt;br /&gt;
= Configuring Metro =&lt;br /&gt;
&lt;br /&gt;
[[User:Drobbins|Daniel Robbins]] maintains [[Metro]], so it comes pre-configured to successfully build both [[Gentoo Linux]] and [[Funtoo Linux]] releases. Before reading farther, you might want to customize some basic settings like the number of concurrent jobs to fit your hardware's capabilities or the directory to use for produced stage archives. This is accomplished by editing &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt; which is the [[Metro]]'s master configuration file. The &amp;lt;tt&amp;gt;[path/mirror]&amp;lt;/tt&amp;gt; section defines where [[Metro]] will look for things it needs and also dump things it creates. As initially configured, [[Metro]] is set up to build [[Funtoo Linux]] and [[Gentoo Linux]] stage tarballs and place them in the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Mirror Paths - where to find required files and where to put created files&lt;br /&gt;
&lt;br /&gt;
[section path/mirror]&lt;br /&gt;
&lt;br /&gt;
: /home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the location of your mirror on disk, then edit the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; line (which defines the path/mirror variable) to point to another directory.&lt;br /&gt;
&lt;br /&gt;
For the purpose of the following steps, set an environment variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # export METRO_MIRROR=/home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Of course, set the environment variable to whatever location you used in the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Arch and Subarch ==&lt;br /&gt;
&lt;br /&gt;
In the following example we are creating a pentium4 stage 3 compiled for x86-32bit binary compatibility. Pentium4 is a subarch of the x86-32bit architecture. Once you have metro installed you may find a full list of each subarch in your &amp;lt;tt&amp;gt;/usr/lib/metro/subarch&amp;lt;/tt&amp;gt; directory each subarch will have the file extension .spec&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
# ls /usr/lib/metro/subarch/&lt;br /&gt;
amd64-k10.spec         athlon-tbird.spec  generic_32.spec       native_32.spec   pentium-mmx.spec&lt;br /&gt;
amd64-k8_32.spec       athlon-xp.spec     generic_64.spec       native_64.spec   pentium-m.spec&lt;br /&gt;
amd64-k8.spec          atom_32.spec       generic_sparcv9.spec  niagara2.spec    pentiumpro.spec&lt;br /&gt;
amd64-k8+sse3_32.spec  atom_64.spec       geode.spec            niagara.spec     pentium.spec&lt;br /&gt;
amd64-k8+sse3.spec     btver1_64.spec     i486.spec             nocona.spec      prescott.spec&lt;br /&gt;
armv7a.spec            btver1.spec        i686.spec             opteron_64.spec  ultrasparc3.spec&lt;br /&gt;
athlon-4.spec          core2_32.spec      k6-2.spec             pentium2.spec    ultrasparc.spec&lt;br /&gt;
athlon-mp.spec         core2_64.spec      k6-3.spec             pentium3.spec    xen-pentium4+sse3_64.spec&lt;br /&gt;
athlon.spec            corei7.spec        k6.spec               pentium4.spec    xen-pentium4+sse3.spec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example list of Architectures, take a look at the directory listing on the [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-Current Mirror].&lt;br /&gt;
&lt;br /&gt;
= First stages build (local build) =&lt;br /&gt;
&lt;br /&gt;
To get this all started, we need to bootstrap the process by downloading an initial seed stage3 to use for building and place it in is proper location in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, so that [[Metro]] can find it. We will also need to create some special &amp;amp;quot;control&amp;amp;quot; files in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, which will allow [[Metro]] to understand how it is supposed to proceed.&lt;br /&gt;
&lt;br /&gt;
== Step 0: Optional Quick Copy of Portage Tree ==&lt;br /&gt;
&lt;br /&gt;
There is a quick step you can perform to avoid having Metro re-clone the entire Portage tree. Perform this as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/portage; git checkout origin/master&lt;br /&gt;
# install -d /var/tmp/metro/cache/cloned-repositories&lt;br /&gt;
# cat /root/git/metro/etc/builds/funtoo-current/build.conf  | grep name&lt;br /&gt;
name: portage-mini-2011&lt;br /&gt;
# cp -a /usr/portage /var/tmp/metro/cache/cloned-repositories/portage-mini-2011&lt;br /&gt;
# cd /usr/portage; git checkout funtoo.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up pentium4 repository (local build) ==&lt;br /&gt;
&lt;br /&gt;
Assuming we're following the basic steps outlined in the previous section, and building an unstable funtoo (&amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt;) build for the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;, using a generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as a seed stage, then here the first set of steps we'd perform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # cd 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # wget -c http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-32bit/pentium4/2011-12-13/stage3-pentium4-funtoo-current-2011-12-13.tar.xz&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # cd ..&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/version&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;2011-12-13&amp;amp;quot; &amp;amp;gt; .control/version/stage3&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OK, let's review the steps above. First, we create the directory &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt;, which is where Metro will expect to find unstable &amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt; pentium4 builds -- it is configured to look here by default. Then we create a specially-named directory to house our seed x86 stage3. Again, by default, Metro expects the directory to be named this way. We enter this directory, and download our seed x86 stage3 from funtoo.org. Note that the &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt; version stamp matches. Make sure that your directory name matches the stage3 name too. Everything has been set up to match Metro's default filesystem layout.&lt;br /&gt;
&lt;br /&gt;
Next, we go back to the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory, and inside it, we create a &amp;lt;tt&amp;gt;.control&amp;lt;/tt&amp;gt; directory. This directory and its subdirectories contain special files that Metro references to determine certain aspects of its behavior. The &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file is used by Metro to track the most recently-built stage3 for this particular build and subarch. Metro will automatically update this file with a new version stamp after it successfully builds a new stage3. But because Metro didn't actually ''build'' this stage3, we need to set up the &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file manually. This will allow Metro to find our downloaded stage3 when we set up our pentium4 build to use it as a seed. Also note that Metro will create a similar &amp;lt;tt&amp;gt;.control/version/stage1&amp;lt;/tt&amp;gt; file after it successfully builds an pentium4 funtoo-current stage1.&lt;br /&gt;
&lt;br /&gt;
We also set up &amp;lt;tt&amp;gt;.control/strategy/build&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.control/strategy/seed&amp;lt;/tt&amp;gt; files with values of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; respectively. These files define the building strategy Metro will use when we build pentium4 funtoo-current stages. With a build strategy of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt;, Metro will source its seed stage from funtoo-current pentium4, the current directory. And with a seed strategy of &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;, Metro will use a stage3 as a seed, and use this seed to build a new stage1, stage2 and stage3.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the pentium4 stages ==&lt;br /&gt;
&lt;br /&gt;
Incidentally, if all you wanted to do at this point was to build a new pentium4 funtoo-current stage1/2/3 (plus openvz and vserver templates). You would begin the process by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/git/metro&lt;br /&gt;
# scripts/ezbuild.sh funtoo-current pentium4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a slow machine, it could take several hours to be completed because several &amp;quot;heavy&amp;quot; components like gcc or glibc have to be recompiled in each stage. Once a stage has been successfully completed, it is placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/pentium4/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory, where &amp;lt;tt&amp;gt;YYYY-MM-DD&amp;lt;/tt&amp;gt; is today's date at the time the &amp;lt;tt&amp;gt;ezbuild.sh&amp;lt;/tt&amp;gt; script was started or the date you put on the ezscript.sh command line.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The next build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new pentium4 stage3. If you'd like, you can reconfigure Metro to use the most recently-built pentium4 stage3 as a seed for any pentium4 builds. To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/pentium4/.control/strategy/build&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, Metro will use the most recentpentium4 stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Building for another binary compatible architecture (remote build) =&lt;br /&gt;
&lt;br /&gt;
As written above, [[Metro]] is able to perform '''remote build''' building different architecture stage3 from a binary compatible seeding stage3 (e.g. using a pentium4 stage3 to seed a &amp;lt;tt&amp;gt;Intel Core2 32bits&amp;lt;/tt&amp;gt; stage3). &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''remote build''' (a stage 3 of a different, but binary compatible, architecture is used as a seed). &lt;br /&gt;
What's not compatible? You can't use a &amp;lt;tt&amp;gt;Sparc&amp;lt;/tt&amp;gt; architecture to generate an &amp;lt;tt&amp;gt;x86&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ARM&amp;lt;/tt&amp;gt; based stage and vice-versa. If you use a 32bit stage then you don't want to seed a 64bit build from it. Be sure that you are using a stage from the same architecture that you are trying to seed. Check [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-current FTP Mirror] for a stage that is from the same Architecture that you will be building.  &lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up Core_2 32bit repository ==&lt;br /&gt;
&lt;br /&gt;
In this example, we're going to use this pentium4 funtoo-current stage3 to seed a new Core_2 32bit funtoo-current build. To get that done, we need to set up the pentium4 build directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # install -d core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # cd core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;remote&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/remote&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;funtoo-current&amp;amp;quot; &amp;amp;gt; .control/remote/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;pentium4&amp;amp;quot; &amp;amp;gt; .control/remote/subarch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps we follow are similar to those we performed for a ''local build'' to set up our pentium4 directory for local build. However, note the differences. We didn't download a stage, because we are going to use the pentium4 stage to build a new Core_2 32bit stage. We also didn't create the &amp;lt;tt&amp;gt;.control/version/stage{1,3}&amp;lt;/tt&amp;gt; files because Metro will create them for us after it successfully builds a new stage1 and stage3. We are still using a &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; seed strategy, but we've set the build strategy to &amp;lt;tt&amp;gt;remote&amp;lt;/tt&amp;gt;, which means that we're going to use a seed stage that's not from this particular subdirectory. Where are we going to get it from? The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; directory contains this information, and lets Metro know that it should look for its seed stage3 in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/home/mirror/linux/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory. Which one will it grab? You guessed it -- the most recently built ''stage3'' (since our seed strategy was set to &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;) that has the version stamp of &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt;, as recorded in &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4/.control/version/stage3&amp;quot;&amp;lt;/tt&amp;gt;. Now you can see how all those control files come together to direct Metro to do the right thing.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the Core_2 32bit stages ==&lt;br /&gt;
&lt;br /&gt;
Now, you could start building your new Core_2 32bit stage1/2/3 (plus openvz and vserver templates) by typing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # /root/git/metro/scripts/ezbuild.sh funtoo-current core2_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that case, the produced stages are placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/core2_32/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The Next Build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new Core_2 32bit stage3. If you'd like, you can reconfigure Metro to use the most recently-built Core_2 32bit stage3 as a seed for any new Core_2 32bit builds. &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''local build''' (a stage 3 of a a given architecture is used to seed a brand new build of the same architecture). &lt;br /&gt;
&lt;br /&gt;
To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/core2_32/.control/strategy/build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Metro will use the most recent Core_2 32bit stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Build your own tailored stage3 =&lt;br /&gt;
&lt;br /&gt;
Metro can be easily configured for building custom stage3 by including additional packages. Notice that including packages with heavy dependencies such as gnome, kde, xorg-server is not recommended (not tested so far). Well tested packages are &amp;lt;tt&amp;gt;app-misc/mc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-process/htop&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-apps/dstat&amp;lt;/tt&amp;gt;. An example for funtoo-current stage. Edit the following configuration file &amp;lt;tt&amp;gt;/root/git/metro/etc/builds/funtoo-current/build.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[collect ../../fslayouts/funtoo/layout.conf]&lt;br /&gt;
&lt;br /&gt;
[section local]&lt;br /&gt;
&lt;br /&gt;
author: Daniel Robbins &amp;lt;drobbins@funtoo.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[section target]&lt;br /&gt;
&lt;br /&gt;
build: funtoo-current&lt;br /&gt;
compression: xz&lt;br /&gt;
&lt;br /&gt;
[section portage]&lt;br /&gt;
&lt;br /&gt;
stable: ~&lt;br /&gt;
MAKEOPTS: -j12&lt;br /&gt;
FEATURES: mini-manifest&lt;br /&gt;
SYNC: $[snapshot/source/remote]&lt;br /&gt;
USE:&lt;br /&gt;
profile: default/linux/$[target/arch:zap]/2008.0&lt;br /&gt;
&lt;br /&gt;
[section emerge]&lt;br /&gt;
&lt;br /&gt;
options: --jobs=4 --load-average=3 --keep-going=n&lt;br /&gt;
packages: [&lt;br /&gt;
	dev-vcs/git &lt;br /&gt;
	net-misc/dhcpcd&lt;br /&gt;
	sys-fs/reiserfsprogs&lt;br /&gt;
	net-misc/bridge-utils&lt;br /&gt;
	sys-devel/bc&lt;br /&gt;
	sys-apps/pciutils&lt;br /&gt;
	app-portage/gentoolkit&lt;br /&gt;
        app-misc/mc&lt;br /&gt;
        app-misc/screen&lt;br /&gt;
        sys-process/htop&lt;br /&gt;
        sys-apps/dstat &lt;br /&gt;
            &lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
[section snapshot]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see MAKEOPTS and emerge default options are additional strings to tweak, --keep-going=n is recommended, if something breaking during the stage building process, you can quickly diagnose the problem.&lt;br /&gt;
&lt;br /&gt;
Distfiles location can be specified in &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Main metro configuration file&lt;br /&gt;
# &lt;br /&gt;
# Path configuration:&lt;br /&gt;
&lt;br /&gt;
[collect ../targets/$[metro/target]/$[target:zap].spec]&lt;br /&gt;
[collect ./builds/$[metro/build]/build.conf]&lt;br /&gt;
[collect ../subarch/$[target/subarch:zap].spec]&lt;br /&gt;
&lt;br /&gt;
# General Paths&lt;br /&gt;
&lt;br /&gt;
[section path]&lt;br /&gt;
tmp: /var/tmp/metro&lt;br /&gt;
distfiles: /var/portage/distfiles&lt;br /&gt;
work: $[path/tmp]/work/$[metro/build]/$[target/name]&lt;br /&gt;
&lt;br /&gt;
[section path/cache]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Metro]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/MATE_Desktop</id>
		<title>MATE Desktop</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/MATE_Desktop"/>
				<updated>2013-05-04T04:10:30Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Created page with &amp;quot;WIP&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WIP&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-05-01T05:51:46Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 36.248.101.52 (talk) to last revision by Oleg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PandaBoard''' is a low-power, low-cost single-board computer development platform based on the Texas Instruments OMAP4430 system on a chip (SoC). The board has been available to the public since 27 October 2010. It is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
The '''PandaBoard ES''' is a newer version based on the OMAP4460 SoC, with the CPU and GPU running at higher clock rates. The board has been available to the public since 16 November 2011. Like its predecessor, it is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
The OMAP4430 SoC on the PandaBoard features a dual-core 1&amp;amp;nbsp;GHz ARM Cortex-A9 MPCore CPU, a 304&amp;amp;nbsp;MHz PowerVR SGX540 graphics processing unit (GPU), a Texas Instruments TMS320C6400 digital signal processor (DSP), and 1&amp;amp;nbsp;GiB of DDR2 SDRAM. &lt;br /&gt;
&lt;br /&gt;
The PandaBoard ES uses a newer SoC, with a dual-core 1.2&amp;amp;nbsp;GHz CPU and 384&amp;amp;nbsp;MHz GPU. Primary persistent storage is via an Secure Digital (SD) Card slot allowing SDHC cards up to 32&amp;amp;nbsp;GB to be used. The board includes wired 10/100 Ethernet as well as wireless Ethernet and bluetooth connectivity. The board can output video signals via Digital Visual Interface (DVI) and HDMI interfaces. It also has 3.5&amp;amp;nbsp;mm audio connectors. It has two Universal Serial Bus (USB) host ports and one USB On-The-Go port, supporting USB 2.0.&lt;br /&gt;
&lt;br /&gt;
=== CPUinfo ===&lt;br /&gt;
* Pandaboard&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Processor       : ARMv7 Processor rev 2 (v7l)&lt;br /&gt;
processor       : 0&lt;br /&gt;
BogoMIPS        : 599.22&lt;br /&gt;
&lt;br /&gt;
processor       : 1&lt;br /&gt;
BogoMIPS        : 582.68&lt;br /&gt;
&lt;br /&gt;
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls&lt;br /&gt;
CPU implementer : 0x41&lt;br /&gt;
CPU architecture: 7&lt;br /&gt;
CPU variant     : 0x1&lt;br /&gt;
CPU part        : 0xc09&lt;br /&gt;
CPU revision    : 2&lt;br /&gt;
&lt;br /&gt;
Hardware        : OMAP4 Panda board&lt;br /&gt;
Revision        : 0020&lt;br /&gt;
Serial          : 0000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Funtoo Linux Instalation ==&lt;br /&gt;
First of all you have to prepare/format your SD card (ALL DATA WILL BE LOST!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sdcardsetup.sh &lt;br /&gt;
# sdcardsetup.sh script&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ ! &amp;quot;$1&amp;quot; = &amp;quot;/dev/sda&amp;quot; ] ; then&lt;br /&gt;
        DRIVE=$1&lt;br /&gt;
        if [ -b &amp;quot;$DRIVE&amp;quot; ] ; then&lt;br /&gt;
                dd if=/dev/zero of=$DRIVE bs=1024 count=1024&lt;br /&gt;
                SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`&lt;br /&gt;
                echo DISK SIZE - $SIZE bytes&lt;br /&gt;
                CYLINDERS=`echo $SIZE/255/63/512 | bc`&lt;br /&gt;
                echo CYLINDERS - $CYLINDERS&lt;br /&gt;
                {&lt;br /&gt;
                echo ,9,0x0C,*&lt;br /&gt;
                echo ,,,-&lt;br /&gt;
                } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE&lt;br /&gt;
                mkfs.vfat -F 32 -n &amp;quot;boot&amp;quot; ${DRIVE}1&lt;br /&gt;
                mke2fs -j -L &amp;quot;rootfs&amp;quot; ${DRIVE}2&lt;br /&gt;
        fi &lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the general steps from [[Funtoo on ARM#Installing Funtoo]].&lt;br /&gt;
&lt;br /&gt;
These steps include:&lt;br /&gt;
* Extract stage3 to the 2nd partition of the SD card&lt;br /&gt;
* Extract portage snapshot (required to emerge things and ntp(see below))&lt;br /&gt;
* Setup fstab&lt;br /&gt;
* Setup root password&lt;br /&gt;
* Configure hostname and networking (optional, but recommended)&lt;br /&gt;
* Enable SSH access (optional, but recommended)&lt;br /&gt;
* Enable serial console access (optional, but recommended)&lt;br /&gt;
* Correct RTC &amp;quot;bug&amp;quot; with swclock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling serial console access ===&lt;br /&gt;
These are instructions specific for Pandaboard.&lt;br /&gt;
 nano -w /mnt/SD_root/etc/inittab&lt;br /&gt;
 s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100&lt;br /&gt;
&lt;br /&gt;
=== Kernel and bootloader ===&lt;br /&gt;
Here you can find kernel and bootloader files for a quick start.&lt;br /&gt;
Put these on first partition of your SD card. Archive name boot.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
Of course you can build your own kernel and U-Boot files, but these are provided here so you don't have to go through the cross-compiling pains and can use your Pandaboard to do native compiling once running.&lt;br /&gt;
&lt;br /&gt;
=== Modules and firmware ===&lt;br /&gt;
Put these inside /lib folder on second partition. Archive name modules.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Pandaboard]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Pandaboard</id>
		<title>Pandaboard</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Pandaboard"/>
				<updated>2013-04-27T04:40:46Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 175.42.10.246 (talk) to last revision by 217.195.169.249&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''PandaBoard''' is a low-power, low-cost single-board computer development platform based on the Texas Instruments OMAP4430 system on a chip (SoC). The board has been available to the public since 27 October 2010. It is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
The '''PandaBoard ES''' is a newer version based on the OMAP4460 SoC, with the CPU and GPU running at higher clock rates. The board has been available to the public since 16 November 2011. Like its predecessor, it is a community supported development platform.&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
The OMAP4430 SoC on the PandaBoard features a dual-core 1&amp;amp;nbsp;GHz ARM Cortex-A9 MPCore CPU, a 304&amp;amp;nbsp;MHz PowerVR SGX540 graphics processing unit (GPU), a Texas Instruments TMS320C6400 digital signal processor (DSP), and 1&amp;amp;nbsp;GiB of DDR2 SDRAM. &lt;br /&gt;
&lt;br /&gt;
The PandaBoard ES uses a newer SoC, with a dual-core 1.2&amp;amp;nbsp;GHz CPU and 384&amp;amp;nbsp;MHz GPU. Primary persistent storage is via an Secure Digital (SD) Card slot allowing SDHC cards up to 32&amp;amp;nbsp;GB to be used. The board includes wired 10/100 Ethernet as well as wireless Ethernet and bluetooth connectivity. The board can output video signals via Digital Visual Interface (DVI) and HDMI interfaces. It also has 3.5&amp;amp;nbsp;mm audio connectors. It has two Universal Serial Bus (USB) host ports and one USB On-The-Go port, supporting USB 2.0.&lt;br /&gt;
&lt;br /&gt;
=== CPUinfo ===&lt;br /&gt;
* Pandaboard&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Processor       : ARMv7 Processor rev 2 (v7l)&lt;br /&gt;
processor       : 0&lt;br /&gt;
BogoMIPS        : 599.22&lt;br /&gt;
&lt;br /&gt;
processor       : 1&lt;br /&gt;
BogoMIPS        : 582.68&lt;br /&gt;
&lt;br /&gt;
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls&lt;br /&gt;
CPU implementer : 0x41&lt;br /&gt;
CPU architecture: 7&lt;br /&gt;
CPU variant     : 0x1&lt;br /&gt;
CPU part        : 0xc09&lt;br /&gt;
CPU revision    : 2&lt;br /&gt;
&lt;br /&gt;
Hardware        : OMAP4 Panda board&lt;br /&gt;
Revision        : 0020&lt;br /&gt;
Serial          : 0000000000000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Funtoo Linux Instalation ==&lt;br /&gt;
First of all you have to prepare/format your SD card (ALL DATA WILL BE LOST!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sdcardsetup.sh &lt;br /&gt;
# sdcardsetup.sh script&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
if [ ! &amp;quot;$1&amp;quot; = &amp;quot;/dev/sda&amp;quot; ] ; then&lt;br /&gt;
        DRIVE=$1&lt;br /&gt;
        if [ -b &amp;quot;$DRIVE&amp;quot; ] ; then&lt;br /&gt;
                dd if=/dev/zero of=$DRIVE bs=1024 count=1024&lt;br /&gt;
                SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`&lt;br /&gt;
                echo DISK SIZE - $SIZE bytes&lt;br /&gt;
                CYLINDERS=`echo $SIZE/255/63/512 | bc`&lt;br /&gt;
                echo CYLINDERS - $CYLINDERS&lt;br /&gt;
                {&lt;br /&gt;
                echo ,9,0x0C,*&lt;br /&gt;
                echo ,,,-&lt;br /&gt;
                } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE&lt;br /&gt;
                mkfs.vfat -F 32 -n &amp;quot;boot&amp;quot; ${DRIVE}1&lt;br /&gt;
                mke2fs -j -L &amp;quot;rootfs&amp;quot; ${DRIVE}2&lt;br /&gt;
        fi &lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Follow the general steps from [[Funtoo on ARM#Installing Funtoo]].&lt;br /&gt;
&lt;br /&gt;
These steps include:&lt;br /&gt;
* Extract stage3 to the 2nd partition of the SD card&lt;br /&gt;
* Extract portage snapshot (required to emerge things and ntp(see below))&lt;br /&gt;
* Setup fstab&lt;br /&gt;
* Setup root password&lt;br /&gt;
* Configure hostname and networking (optional, but recommended)&lt;br /&gt;
* Enable SSH access (optional, but recommended)&lt;br /&gt;
* Enable serial console access (optional, but recommended)&lt;br /&gt;
* Correct RTC &amp;quot;bug&amp;quot; with swclock&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Enabling serial console access ===&lt;br /&gt;
These are instructions specific for Pandaboard.&lt;br /&gt;
 nano -w /mnt/SD_root/etc/inittab&lt;br /&gt;
 s0:12345:respawn:/sbin/agetty 115200 ttyO2 vt100&lt;br /&gt;
&lt;br /&gt;
=== Kernel and bootloader ===&lt;br /&gt;
Here you can find kernel and bootloader files for a quick start.&lt;br /&gt;
Put these on first partition of your SD card. Archive name boot.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
Of course you can build your own kernel and U-Boot files, but these are provided here so you don't have to go through the cross-compiling pains and can use your Pandaboard to do native compiling once running.&lt;br /&gt;
&lt;br /&gt;
=== Modules and firmware ===&lt;br /&gt;
Put these inside /lib folder on second partition. Archive name modules.tar.xz&lt;br /&gt;
&lt;br /&gt;
* http://www.mediafire.com/?h5m1mnqqdrnyb&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Pandaboard]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Building_a_Kernel_from_Source</id>
		<title>Building a Kernel from Source</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Building_a_Kernel_from_Source"/>
				<updated>2013-04-20T11:19:06Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 90.227.134.5 (talk) to last revision by Drobbins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Setting up a proper kernel yourself - lean, mean and tailored to your hardware,  is the challenge by which a linux user can graduate to becoming a Funtoo knight ;-)&lt;br /&gt;
&lt;br /&gt;
Even though many of us are using enterprise-ready kernels in datacenters, there is almost nobody who hasn't at least considered building a kernel for his laptop / PC.&lt;br /&gt;
We are showing here how an intermediate Linux user can use an alternative to the standard beginners &amp;quot;genkernel&amp;quot; approach,  to compile a custom kernel,  in a relatively still speedy and easy set up.&lt;br /&gt;
&lt;br /&gt;
'''minimum requirements'''&lt;br /&gt;
You should understand the way how things work in a terminal and how to use an editor and tweak config files. This is crucial.&lt;br /&gt;
You don't need much knowledge about the linux kernel and it's internals. Nevertheless, you have to know at least where the files are located, how they are used and what is the file logic behind the overall structure. Otherwise you should consider using a non source based linux distribution.&lt;br /&gt;
If you are scared now, don't worry - we are going to build a kernel the Funtoo way and you will pick up everthing necessary to accomplish this challenge, step by step, so the next time you do it yourself and become a real Funtoo knight!&lt;br /&gt;
&lt;br /&gt;
'''assumptions'''&lt;br /&gt;
You start from an installed Funtoo system on the disk, or at least, you are on stage3 in a chrooted environment from a live cd, following somehow the Funto [[Installation (Tutorial)|Installation Tutorial]].&lt;br /&gt;
&lt;br /&gt;
In this case we are building a kernel that is booting root in LVM over encrypted LUKS container.&lt;br /&gt;
If you don't have this setup, don't worry, you just don't need all the modules, but everything else is similar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Getting everything in order to start =&lt;br /&gt;
&lt;br /&gt;
First there is the decision which linux kernel sources we need.&lt;br /&gt;
There are plenty of them in the repositories around, often it is not easy to distinguish between them.&lt;br /&gt;
&lt;br /&gt;
I would always trust my distribution of choice and take what is has to offer - and funtoo has a lot to offer!&lt;br /&gt;
&lt;br /&gt;
I really do recommend (especially if it is your first time) to build a debian-sourced genkernel like described in chapter 5 &amp;quot;Using Debian-Sources with Genkernel&amp;quot; in the [[Funtoo_Linux_Kernels| Funtoo Kernels Tutorial]].&lt;br /&gt;
&lt;br /&gt;
From there you should have a running system booting nicely from your own build (just little bit bloated) kernel. This is more than you can expect from any other ready to go distribution.&lt;br /&gt;
&lt;br /&gt;
'''Attention'''&lt;br /&gt;
We are using RedHat's dracut in order to build a nice initramfs (containing all the necessary tools and extra drivers our kernel might need to start the system).&lt;br /&gt;
&lt;br /&gt;
Although dracut is the way to go, more sophisticated and not as buggy as gentoo's genkernel approach, more and more funtoo geeks start using slashbeast's better-initramfs, which we will cover at the end of this howto!&lt;br /&gt;
&lt;br /&gt;
So after having set up a genkernel from debian or gentoo sources we are going to build a kernel with either (or both) dracut or/and better-initramfs.&lt;br /&gt;
So gentoo sources with genkernel is always my backup if anything is not working correctly on my system. For the slightly more geeky approach with my own initram I am using pf-sources, ck-sources or any other more or less heavily patched sources.&lt;br /&gt;
&lt;br /&gt;
Let's go!&lt;br /&gt;
&lt;br /&gt;
== kernel sources ==&lt;br /&gt;
We are going to use the kernel sources from the funtoo git repository.&lt;br /&gt;
&lt;br /&gt;
Which sources you like to use is up to you, and your needs.&lt;br /&gt;
For my laptop or desktop system I am recommending any one of:&lt;br /&gt;
&lt;br /&gt;
   sys-kernel/pf-sources&lt;br /&gt;
   sys-kernel/ck-sources&lt;br /&gt;
   sys-kernel/gentoo-sources&lt;br /&gt;
   sys-kernel/git-sources&lt;br /&gt;
   sys-kernel/sysrescue-std-sources&lt;br /&gt;
   sys-kernel/debian-sources&lt;br /&gt;
&lt;br /&gt;
Please, have a look in the ebuild description, look onto their homepage and take the one that suits you best!&lt;br /&gt;
If you are unsure for now, use sys-kernel/gentoo-sources. That's always a safe bet for a general system.&lt;br /&gt;
&lt;br /&gt;
It is not a problem to have various kernels installed parallel, so go on with any one of them.&lt;br /&gt;
&lt;br /&gt;
I am going to use the sys-kernel/pf-sources now, as I already had the gentoo-sources installed.&lt;br /&gt;
&lt;br /&gt;
== prerequisites ==&lt;br /&gt;
&lt;br /&gt;
I don't know which tools you have already installed, so some information here might be redundant.&lt;br /&gt;
It doesn't harm to just copy and paste and do some steps again.&lt;br /&gt;
&lt;br /&gt;
First, we look into our /etc/make.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#These compiler flags are just tweaking (optimazation) and NOT necessary:&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -pipe -march=native -ftracer -fforce-addr&amp;quot;&lt;br /&gt;
CXXFLAGS=&amp;quot;${CFLAGS} -fpermissive -fomit-frame-pointer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
KDIR=/usr/src/linux&lt;br /&gt;
&lt;br /&gt;
KERNEL=&amp;quot;symlink build&amp;quot;&lt;br /&gt;
USE=&amp;quot;$KERNEL ....here are your use flags....&amp;quot;&lt;br /&gt;
## These modules are available:&lt;br /&gt;
## DRACUT_MODULES=&amp;quot;dracut_modules_biosdevname dracut_modules_btrfs dracut_modules_caps dracut_modules_crypt dracut_modules_crypt-gpg dracut_modules_dmraid dracut_modules_dmsquash-live dracut_modules_gensplash dracut_modules_iscsi dracut_modules_livenet dracut_modules_lvm dracut_modules_mdraid dracut_modules_multipath dracut_modules_nbd dracut_modules_nfs dracut_modules_plymouth dracut_modules_ssh-client dracut_modules_syslog&amp;quot;&lt;br /&gt;
## We are using this ones for LVM / LUKS&lt;br /&gt;
DRACUT_MODULES=&amp;quot;crypt lvm plymouth biosdevname dmraid crypt-gpg dmsquash-live ssh-client syslog&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we are setting the package keywords:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/portage/package.use/dracut:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
sys-kernel/dracut dm net device-mapper crypt lvm&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you don't have lvm over encrypted LUKS you probably just add the &amp;quot;net&amp;quot; keyword here, or &amp;quot;selinux&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After that we are going to build our packages:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av app-portage/gentoolkit sys-kernel/pf-sources sys-kernel/dracut sys-boot/plymouth sys-boot/plymouth-openrc-plugin&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finished? Well, then let's go on and&lt;br /&gt;
&lt;br /&gt;
== preparing the kernel ==&lt;br /&gt;
&lt;br /&gt;
We go now to the sources directory and enter the following commands to update the kernel's  .config  file:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /usr/src/linux/&lt;br /&gt;
# ##i##make clean&lt;br /&gt;
  CLEAN   .&lt;br /&gt;
  CLEAN   arch/x86/kernel/acpi/realmode&lt;br /&gt;
  CLEAN   arch/x86/kernel/cpu&lt;br /&gt;
  CLEAN   arch/x86/kernel&lt;br /&gt;
  CLEAN   arch/x86/vdso&lt;br /&gt;
  CLEAN   arch/x86/lib&lt;br /&gt;
  CLEAN   drivers/gpu/drm/radeon&lt;br /&gt;
  CLEAN   drivers/net/wan&lt;br /&gt;
  CLEAN   drivers/scsi/aic7xxx&lt;br /&gt;
  CLEAN   drivers/tty/vt&lt;br /&gt;
  CLEAN   drivers/video/logo&lt;br /&gt;
  CLEAN   firmware&lt;br /&gt;
  CLEAN   kernel&lt;br /&gt;
  CLEAN   lib/raid6&lt;br /&gt;
  CLEAN   lib&lt;br /&gt;
  CLEAN   security/apparmor&lt;br /&gt;
  CLEAN   security/selinux&lt;br /&gt;
  CLEAN   usr&lt;br /&gt;
  CLEAN   arch/x86/boot/compressed&lt;br /&gt;
  CLEAN   arch/x86/boot&lt;br /&gt;
  CLEAN   .tmp_versions&lt;br /&gt;
  CLEAN   vmlinux System.map .tmp_kallsyms2.S .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms1.S .tmp_vmlinux1 .tmp_vmlinux2 .tmp_System.map&lt;br /&gt;
# ##i##zcat /proc/config.gz &amp;gt; /usr/src/linux/.config&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make localmodconfig&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will get some questions which you can answer mostly with either M (compiled as a module) or Y (compiled directly into the kernel).&lt;br /&gt;
&lt;br /&gt;
Enable different security models (SECURITY) [Y/n/?] y&lt;br /&gt;
Enable the securityfs filesystem (SECURITYFS) [Y/?] y&lt;br /&gt;
Socket and Networking Security Hooks (SECURITY_NETWORK) [Y/?] y&lt;br /&gt;
Security hooks for pathname based access control (SECURITY_PATH) [Y/?] y&lt;br /&gt;
Low address space for LSM to protect from user allocation (LSM_MMAP_MIN_ADDR) [65536] 65536&lt;br /&gt;
NSA SELinux Support (SECURITY_SELINUX) [Y/n/?] y&lt;br /&gt;
  NSA SELinux boot parameter (SECURITY_SELINUX_BOOTPARAM) [N/y/?] n&lt;br /&gt;
  NSA SELinux runtime disable (SECURITY_SELINUX_DISABLE) [N/y/?] n&lt;br /&gt;
  NSA SELinux Development Support (SECURITY_SELINUX_DEVELOP) [Y/n/?] y&lt;br /&gt;
  NSA SELinux AVC Statistics (SECURITY_SELINUX_AVC_STATS) [Y/n/?] y&lt;br /&gt;
  NSA SELinux checkreqprot default value (SECURITY_SELINUX_CHECKREQPROT_VALUE) [1] 1&lt;br /&gt;
  NSA SELinux maximum supported policy format version (SECURITY_SELINUX_POLICYDB_VERSION_MAX) [Y/n/?] y&lt;br /&gt;
    NSA SELinux maximum supported policy format version value (SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE) [19] 19&lt;br /&gt;
TOMOYO Linux Support (SECURITY_TOMOYO) [Y/n/?] y&lt;br /&gt;
  Default maximal count for learning mode (SECURITY_TOMOYO_MAX_ACCEPT_ENTRY) [2048] 2048&lt;br /&gt;
  Default maximal count for audit log (SECURITY_TOMOYO_MAX_AUDIT_LOG) [1024] 1024&lt;br /&gt;
  Activate without calling userspace policy loader. (SECURITY_TOMOYO_OMIT_USERSPACE_LOADER) [Y/n/?] y&lt;br /&gt;
AppArmor support (SECURITY_APPARMOR) [Y/n/?] y&lt;br /&gt;
  AppArmor boot parameter default value (SECURITY_APPARMOR_BOOTPARAM_VALUE) [1] 1&lt;br /&gt;
Integrity Measurement Architecture(IMA) (IMA) [Y/n/?] y&lt;br /&gt;
EVM support (EVM) [N/y/?] (NEW)&lt;br /&gt;
Default security module&lt;br /&gt;
  1. SELinux (DEFAULT_SECURITY_SELINUX)&lt;br /&gt;
  2. TOMOYO (DEFAULT_SECURITY_TOMOYO)&lt;br /&gt;
  3. AppArmor (DEFAULT_SECURITY_APPARMOR)&lt;br /&gt;
&amp;gt; 4. Unix Discretionary Access Controls (DEFAULT_SECURITY_DAC)&lt;br /&gt;
choice[1-4?]: 4&lt;br /&gt;
warning: (ACPI_HOTPLUG_CPU) selects ACPI_CONTAINER which has unmet direct dependencies (ACPI &amp;amp;&amp;amp; EXPERIMENTAL)&lt;br /&gt;
warning: (MEDIA_TUNER) selects MEDIA_TUNER_TEA5761 which has unmet direct dependencies (MEDIA_SUPPORT &amp;amp;&amp;amp; VIDEO_MEDIA &amp;amp;&amp;amp; I2C &amp;amp;&amp;amp; EXPERIMENTAL)&lt;br /&gt;
#&lt;br /&gt;
# configuration written to .config&lt;br /&gt;
#&lt;br /&gt;
warning: (GFS2_FS) selects DLM which has unmet direct dependencies (EXPERIMENTAL &amp;amp;&amp;amp; INET &amp;amp;&amp;amp; SYSFS &amp;amp;&amp;amp; CONFIGFS_FS &amp;amp;&amp;amp; (IPV6 || IPV6=n))&lt;br /&gt;
warning: (IMA) selects TCG_TPM which has unmet direct dependencies (HAS_IOMEM &amp;amp;&amp;amp; EXPERIMENTAL)&lt;br /&gt;
warning: (MEDIA_TUNER) selects MEDIA_TUNER_TEA5761 which has unmet direct dependencies (MEDIA_SUPPORT &amp;amp;&amp;amp; VIDEO_MEDIA &amp;amp;&amp;amp; I2C &amp;amp;&amp;amp; EXPERIMENTAL)&lt;br /&gt;
warning: (ACPI_HOTPLUG_CPU) selects ACPI_CONTAINER which has unmet direct dependencies (ACPI &amp;amp;&amp;amp; EXPERIMENTAL)&lt;br /&gt;
root@[~src/linux] #&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now comes the most adventurous part!&lt;br /&gt;
&lt;br /&gt;
= Building the Kernel =&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make -j8  bzImage&lt;br /&gt;
# ##i##make -j8 modules&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
# ##i##make install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Building an initramfs or not?'''&lt;br /&gt;
&lt;br /&gt;
The reason to build a kernel with an initramfs is mostly for interoperability (e.g. live-cd's) and special features like an included busybox, ssh, etc.  But mostly, and that's why we are doing this here now, to have a proper kernel up and running quick'n dirty in a reasonable time without fighting hours and days until a more or less exotic hardware is perfectly run by the kernel. &lt;br /&gt;
After having a proper basic kernel running with the help of an initramfs, I really recommend you to go a step further and build a true kernel with all features includes without an initramfs. But this could be pain in the ass and very time consuming - so we do it the funtoo way here - at least in the second example when we stick to better-initramfs instead of Red-Hat's ''dracut''.&lt;br /&gt;
&lt;br /&gt;
= Option one: Initrd with dracut =&lt;br /&gt;
&lt;br /&gt;
To build the initrd we just execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##dracut -f --fstab --xz /boot/initramfs-3.2.6-pf.img  3.2.6-pf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Generally, this really should be enough!&lt;br /&gt;
If you experience booting problems like missing modules / drivers then just boot from the genkernel section and fix the initrd building. You can look into the man page to tweak the command a bit (e.g. --add-drivers &amp;quot;xz dm_crypt&amp;quot; etc...).&lt;br /&gt;
&lt;br /&gt;
Ok let's go on and finish the taks, we are going to tell now grub how to boot off correctly!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@[~src/linux] # nano /etc/boot.conf&lt;br /&gt;
&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux dracut&amp;quot;&lt;br /&gt;
        timeout 3&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel-genkernel[-v]&lt;br /&gt;
        initrd initramfs-genkernel[-v]&lt;br /&gt;
        params = quiet rootfstype=ext4&lt;br /&gt;
        params += luks enc_root=/dev/sda3&lt;br /&gt;
        params += lvm root=/dev/mapper/vg-root&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux dracut&amp;quot; {&lt;br /&gt;
        kernel vmlinuz[-v]&lt;br /&gt;
## this is the better-initramfs generated initrd&lt;br /&gt;
        initrd initramfs[-v].img&lt;br /&gt;
        params  = quiet rootfstype=ext4&lt;br /&gt;
        params += luks enc_root=/dev/sda3&lt;br /&gt;
        params += lvm root=/dev/mapper/vg-root&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it almost!&lt;br /&gt;
&lt;br /&gt;
Now write to the grub.cfg with the new handy boot-update script from funtoo:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
root@[~src/linux] # boot-update -v&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@[~src/linux] # sudo boot-update -v&lt;br /&gt;
&lt;br /&gt;
 boot-update 1.5.2 / Copyright 2009-2011 Funtoo Technologies&lt;br /&gt;
&lt;br /&gt;
 [use option &amp;quot;-l&amp;quot; for license info, &amp;quot;-h&amp;quot; for help]&lt;br /&gt;
&lt;br /&gt;
 * Generating config for grub...&lt;br /&gt;
&lt;br /&gt;
 DEFAULT &amp;gt; Funtoo Linux - vmlinuz-3.2.6-pf&lt;br /&gt;
           Funtoo Linux genkernel - kernel-genkernel-x86_64-3.2.6-pf&lt;br /&gt;
&lt;br /&gt;
 * Completed successfully.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Okay,... here you go..! :)&lt;br /&gt;
&lt;br /&gt;
Reboot and see how it works!&lt;br /&gt;
&lt;br /&gt;
= Option two: using better-initramfs =&lt;br /&gt;
&lt;br /&gt;
Piotr's better-initramfs is another approach that is tiny, nice and shiny and seems to become more and more a favourite among funtoo'ers. The biggest plus is that, once built it is kernel version independant.&lt;br /&gt;
&lt;br /&gt;
For using this you just do the following steps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. download sources&lt;br /&gt;
2. build kernel with &amp;quot;make bzImage&amp;quot;&lt;br /&gt;
3. download better-initramfs&lt;br /&gt;
4. run better-initramfs&lt;br /&gt;
5. adjust /etc/boot.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is how in detail:&lt;br /&gt;
&lt;br /&gt;
Assuming you did install already a genkernel backup or at least you have a working bzImage + modules installed, we rush forward to step 3:&lt;br /&gt;
&lt;br /&gt;
=== download better-initramfs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
➜ # cd /usr/src/;&lt;br /&gt;
➜ # git clone https://github.com/slashbeast/better-initramfs.git&lt;br /&gt;
&lt;br /&gt;
➜ # /src #  cd better-initramfs&lt;br /&gt;
➜ # better-initramfs git:(master) ls&lt;br /&gt;
AUTHORS    LICENSE   README.rst  bootstrap  output   sourceroot&lt;br /&gt;
ChangeLog  Makefile  TODO        examples   scripts&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== build the better-initramfs ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
➜ # better-initramfs git:(master) sudo bootstrap/bootstrap-all&lt;br /&gt;
Passwort: xxx &lt;br /&gt;
# from here go and grab a coffee&lt;br /&gt;
➜ # sudo make prepare&lt;br /&gt;
➜ # sudo make image&lt;br /&gt;
➜ # sudo mv output/initramfs.cpio.gz /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== adjust grub ===&lt;br /&gt;
&lt;br /&gt;
Taking the above setup we edit the /etc/boot.conf&lt;br /&gt;
as I installed genkernel first, and dracut after - you see this setup:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux&amp;quot;&lt;br /&gt;
        timeout 3&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Rootfs over lvm over luks&lt;br /&gt;
# /dev/sda3 - encrypted lvm's pv&lt;br /&gt;
# /dev/mapper/vg-root - rootfs's lv&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
## this is the better-initramfs generated initrd&lt;br /&gt;
        initrd initramfs.cpio.gz&lt;br /&gt;
        params  = quiet rootfstype=ext4&lt;br /&gt;
        params += luks enc_root=/dev/sda3&lt;br /&gt;
        params += lvm root=/dev/mapper/vg-root&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux dracut&amp;quot; {&lt;br /&gt;
        kernel vmlinuz[-v]&lt;br /&gt;
## this is the dracut generated initrd&lt;br /&gt;
        initrd initramfs[-v].img&lt;br /&gt;
        params  = quiet rootfstype=ext4&lt;br /&gt;
        params += luks enc_root=/dev/sda3&lt;br /&gt;
        params += lvm root=/dev/mapper/vg-root&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel-genkernel[-v]&lt;br /&gt;
        initrd initramfs-genkernel[-v]&lt;br /&gt;
        params = quiet rootfstype=ext4&lt;br /&gt;
        params += luks enc_root=/dev/sda3&lt;br /&gt;
        params += lvm root=/dev/mapper/vg-root&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Okay,... here you go..! :)&lt;br /&gt;
&lt;br /&gt;
update the grub.cfg, then reboot and see how it works!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
root@[~src/linux-3.2.6-pf] # boot-update -v     &lt;br /&gt;
&lt;br /&gt;
 boot-update 1.5.2 / Copyright 2009-2011 Funtoo Technologies&lt;br /&gt;
&lt;br /&gt;
 [use option &amp;quot;-l&amp;quot; for license info, &amp;quot;-h&amp;quot; for help]&lt;br /&gt;
&lt;br /&gt;
 * Generating config for grub...&lt;br /&gt;
&lt;br /&gt;
 DEFAULT &amp;gt; Funtoo Linux better-initramfs - vmlinuz-3.2.6-pf&lt;br /&gt;
           Funtoo Linux dracut - vmlinuz-3.2.6-pf&lt;br /&gt;
           Funtoo Linux genkernel - kernel-genkernel-x86_64-3.2.6-ck&lt;br /&gt;
&lt;br /&gt;
 * Completed successfully.&lt;br /&gt;
&lt;br /&gt;
root@[~src/linux-3.2.6-pf] #&lt;br /&gt;
&lt;br /&gt;
root@[~src/linux-3.2.6-pf] # reboot&lt;br /&gt;
&lt;br /&gt;
System going down for reboot!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Featured]]&lt;br /&gt;
[[Category:Kernel]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Welcome</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Welcome"/>
				<updated>2013-04-13T12:17:05Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by Rommersick101 (talk) to last revision by Palica&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; width: 35%&amp;quot;&amp;gt;&lt;br /&gt;
{{#widget:Donate|blurb=Your support helps Funtoo grow! Donate Today.}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
== Get on the UserMap! ==&lt;br /&gt;
{{#compound_query:[[Category:People]] [[Role type::Staff]];?Geoloc;icon=Purplemarker.png&lt;br /&gt;
    |[[Category:People]][[Role type::Contributor]];?Geoloc;icon=Orangemarker.png&lt;br /&gt;
    |[[Category:People]][[Role type::User]];?Geoloc;icon=Greenmarker.png&lt;br /&gt;
    |format=googlemaps3|height=275|zoom=1|type=hybrid|markercluster=yes}}&lt;br /&gt;
See our full-size [[Usermap]] and find out how to become part of the Funtoo Universe!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{Litecoin|blurb=Check it out: Mine litecoins for Funtoo!}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
=== Latest Commits: ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed entries=7 url=&amp;quot;https://github.com/funtoo/funtoo-overlay/commits/master.atom&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
=== Featured Resources: ===&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
category = Featured&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy2&amp;quot;&amp;gt;&lt;br /&gt;
=== [[image:Feed-icon-28x28.png|link=http://forums.funtoo.org/extern.php?action=feed&amp;amp;type=atom]] Latest Forum Posts ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed entries=6 url=&amp;quot;http://forums.funtoo.org/extern.php?action=feed&amp;amp;type=atom&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy2&amp;quot;&amp;gt;&lt;br /&gt;
=== [[image:Feed-icon-28x28.png|link=http://feeds.feedburner.com/planet_larry]] Planet Larry ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed type=&amp;quot;planet&amp;quot; entries=6 url=&amp;quot;http://feeds.feedburner.com/planet_larry&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Welcome to the Funtoo Wiki! =&lt;br /&gt;
&lt;br /&gt;
[[Funtoo Linux]] is a Linux-based operating system created by [[user:Drobbins|Daniel Robbins]], the creator and former Chief Architect of Gentoo Linux. &lt;br /&gt;
&lt;br /&gt;
Funtoo Linux is a Free software, or &amp;quot;Open Source&amp;quot; operating system. All distribution source code is freely available, and it can be used and distributed free of charge.&lt;br /&gt;
&lt;br /&gt;
== Featured Video ==&lt;br /&gt;
&lt;br /&gt;
In this video, Jonathan Vasquez ([[User:Fearedbliss|fearedbliss]]) of the Funtoo Linux Core Team walks you through the process of installing Funtoo Linux with ZFS. See the [[ZFS Install Guide]] for detailed instructions.&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=MXyBamArues|width=640|height=360}}&lt;br /&gt;
&lt;br /&gt;
== Meta-Distribution, Optimized ==&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux is also a ''meta''-distribution, which means that it is built automatically from source code and is customized with the functionality that ''you'' want it to have, and ''without'' the unnecessary features and &amp;quot;bloat&amp;quot; that you want to avoid. &lt;br /&gt;
&lt;br /&gt;
In addition, a Funtoo Linux system is [[Download|optimized for your CPU]], and we offer optimized versions for ''Intel Core i7'', ''Intel Atom'', ''AMD Opteron'', and other processors and architectures. &lt;br /&gt;
&lt;br /&gt;
These combination of factors work together to create an extremely high-performance and flexible computing platform -- a platform where ''you'' are in control, and your system performs optimally. We believe that Funtoo Linux is the most ideal expression of how operating system technology &amp;quot;should&amp;quot; work, and we continually strive to make it better.&lt;br /&gt;
&lt;br /&gt;
== The Gentoo Ecosystem ==&lt;br /&gt;
&lt;br /&gt;
Our [[Core Team]] is focused on advancing the state-of-the-art in Linux distributions by developing our own improvements to Gentoo Linux, while remaining compatible with the upstream changes from the Gentoo Linux project. &lt;br /&gt;
&lt;br /&gt;
We are committed to maintaining high-levels of compatibility and collaboration with the Gentoo Linux project, and challenge ourselves to innovate while providing new approaches that can be easily leveraged by the Gentoo Community. We appreciate the support we receive from members of the Gentoo Community and strive to contribute back to the larger [[Gentoo Ecosystem]].&lt;br /&gt;
&lt;br /&gt;
== Ultimate Flexibility for Developers ==&lt;br /&gt;
&lt;br /&gt;
Does your Linux distribution allow multiple versions of &amp;lt;tt&amp;gt;php&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[python]]&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ruby&amp;lt;/tt&amp;gt; installed happily alongside each other? Funtoo Linux does. Are you tired of hand-building key packages from source to configure them exactly the way you want? Funtoo Linux allows you to tweak the build-time features of packages using handy things called USE variables. Other distributions are forced to either leave stuff out that you want, or include stuff you don't want.&lt;br /&gt;
&lt;br /&gt;
== Virtualization ==&lt;br /&gt;
&lt;br /&gt;
We support the [[OpenVZ]] project and build up-to-date Funtoo Linux OpenVZ containers that you can [[Download|download]]. Also see [[VagrantUp]] for a nice way to deploy VirtualBox-based Funtoo Linux systems. [[Metro]], our automated distro build tool, is capable of building OpenVZ, Linux VServer and [[Linux Containers]] (LXC) images. Funtoo Linux also makes an excellent virtualization host system for [[Xen]].&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo Linux]] features native [[wikipedia:UTF-8|UTF-8]] support enabled by default, a [[wikipedia:Git (software)|git]]-based, [[Portage Tree|distributed Portage Tree]] and funtoo overlay, an enhanced [[Portage]] with more compact mini-manifest tree, automated imports of new [http://www.gentoo.org Gentoo] changes every 12 hours, [[GUID Booting Guide|GPT/GUID boot support]] and [[Boot-Update|streamlined boot configuration]], [[Funtoo Linux Networking|enhanced network configuration]], up-to-date [http://ftp.osuosl.org/pub/funtoo/funtoo-stable/ stable] and [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ current] Funtoo [[Stage Tarball|stages]], all built using Funtoo's [[Metro]] build tool. We also offer Ubuntu Server, Debian, RHEL and Fedora-based [[Funtoo Linux Kernels|kernels]].&lt;br /&gt;
&lt;br /&gt;
Funtoo is currently supported on the following processor families :&lt;br /&gt;
* PC-compatible, both 32 and 64-bit (''x86-32bit'', ''x86-64bit'')&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* Learn more about [[Funtoo Linux]].&lt;br /&gt;
* Why you should [[Choose Funtoo]]: ...and how its different than other distros.&lt;br /&gt;
* Visit [[:Category:Projects|Funtoo Linux Projects]] and also look at the stuff online for [[Metro]].&lt;br /&gt;
* Learn [[:Category:Linux Core Concepts| Core Linux concepts]] from articles originally written by Daniel Robbins.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOTITLE__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
&lt;br /&gt;
[[Category:Funtoo|*]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2013-03-24T04:58:46Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* /etc/make.conf */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources === &lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download SystemRescueCD from:&lt;br /&gt;
&lt;br /&gt;
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.4.2.iso The Oregon State University Open Source Lab]&lt;br /&gt;
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.4.2.iso HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of SystemRescueCd, '''be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system'''. By default, SystemRescueCd used to boot in 32-bit mode though the latest version attempts to automatically detect 64-bit processors.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
* '''NEW!''' '''[[ZFS Install Guide]]'''&lt;br /&gt;
* '''NEW!''' '''[[ZFS rootfs over encrypted container]]'''&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##tar xJpf stage3-latest.tar.xz&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you receive the error with initial &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; due to git protocol restrictions, change &amp;lt;tt&amp;gt;SYNC&amp;lt;/tt&amp;gt; variable in &amp;lt;tt&amp;gt;/etc/portage/make.conf&amp;lt;/tt&amp;gt;}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SYNC=&amp;quot;https://github.com/funtoo/ports-2012.git&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;/etc/portage/make.conf&amp;amp;nbsp;(new&amp;amp;nbsp;location)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;profiles&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Some useful portage settings that may help speed up intial configuration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noatime  	         1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file is the symlink to /etc/portage/make.conf, new default location, edit /etc/portage/make.conf.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
==== Profiles ====&lt;br /&gt;
&lt;br /&gt;
[[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]]:&lt;br /&gt;
&lt;br /&gt;
;arch: typically &amp;lt;tt&amp;gt;x86-32bit&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;x86-64bit&amp;lt;/tt&amp;gt;, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.&lt;br /&gt;
;build: defines whether your system is a &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;experimental&amp;lt;/tt&amp;gt; build. &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt; systems will have newer packages unmasked than &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; systems.&lt;br /&gt;
;flavor: defines the general type of system, such as &amp;lt;tt&amp;gt;server&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt;, and will set default USE flags appropriate for your needs.&lt;br /&gt;
;mix-ins: define various optional settings that you may be interested in enabling.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Remember that profiles can often be inherited. For example, the &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt; flavor inherits the &amp;lt;tt&amp;gt;workstation&amp;lt;/tt&amp;gt; flavor settings, which in turn inherits the &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;audio&amp;lt;/tt&amp;gt; mix-ins. You can view this by inspecting the &amp;lt;tt&amp;gt;parent&amp;lt;/tt&amp;gt; files defined in each profile, which can be found in &amp;lt;tt&amp;gt;/usr/portage/profiles/funtoo/1.0/linux-gnu&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##cd /usr/portage/profiles/funtoo/1.0/linux-gnu/&lt;br /&gt;
(chroot) # ##i##ls&lt;br /&gt;
arch/             eapi              make.defaults     package.use/      packages.build    use.force&lt;br /&gt;
build/            flavor/           mix-ins/          package.use.mask/ parent            &lt;br /&gt;
(chroot) # ##i##cat flavor/desktop/parent &lt;br /&gt;
../workstation&lt;br /&gt;
../../mix-ins/print&lt;br /&gt;
(chroot) # ##i##cat flavor/workstation/parent &lt;br /&gt;
../core&lt;br /&gt;
../../mix-ins/X&lt;br /&gt;
../../mix-ins/audio&lt;br /&gt;
../../mix-ins/dvd&lt;br /&gt;
../../mix-ins/media&lt;br /&gt;
../../mix-ins/console-extras&lt;br /&gt;
(chroot) # &lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view installed profiles:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the profile flavor:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile set-flavor 7&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a mix-in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile add 10&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember if you add by string; add a 'gentoo:' to the beginning of the profile name ie:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i## eselect profile add gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
Click [http://wiki.debian.org/DebianKernel here] for a list of all architectures the Debian kernel supports. &lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Wi-Fi ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge linux-firmware&lt;br /&gt;
# ##i##emerge networkmanager&lt;br /&gt;
# ##i##rc-update add NetworkManager default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel so it will start when Funtoo Linux boots.&lt;br /&gt;
&lt;br /&gt;
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;addwifi&amp;lt;/tt&amp;gt; command is used to configure and connect to a WPA/WPA2 Wi-Fi network named &amp;lt;tt&amp;gt;mywifinetwork&amp;lt;/tt&amp;gt; with the password &amp;lt;tt&amp;gt;wifipassword&amp;lt;/tt&amp;gt;. This network configuration entry is stored in &amp;lt;tt&amp;gt;/etc/NetworkManager/system-connections&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==== Desktop (Wired Ethernet) ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.&lt;br /&gt;
&lt;br /&gt;
==== Server (Static IP) ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2013-03-23T04:38:11Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by Ipodsoft (talk) to last revision by Fearedbliss&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources === &lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download SystemRescueCD from:&lt;br /&gt;
&lt;br /&gt;
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.4.2.iso The Oregon State University Open Source Lab]&lt;br /&gt;
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.4.2.iso HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of SystemRescueCd, '''be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system'''. By default, SystemRescueCd used to boot in 32-bit mode though the latest version attempts to automatically detect 64-bit processors.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
* '''NEW!''' '''[[ZFS Install Guide]]'''&lt;br /&gt;
* '''NEW!''' '''[[ZFS rootfs over encrypted container]]'''&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget -O - http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz | tar xfvJp -&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you receive the error with initial &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; due to git protocol restrictions, change &amp;lt;tt&amp;gt;SYNC&amp;lt;/tt&amp;gt; variable in &amp;lt;tt&amp;gt;/etc/portage/make.conf&amp;lt;/tt&amp;gt;}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SYNC=&amp;quot;https://github.com/funtoo/ports-2012.git&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;/etc/portage/make.conf&amp;amp;nbsp;(new&amp;amp;nbsp;location)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;profiles&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Some useful portage settings that may help speed up intial configuration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noatime  	         1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/portage/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file may also be found at /etc/make.conf. /etc/portage/make.conf is the new location.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
==== Profiles ====&lt;br /&gt;
&lt;br /&gt;
[[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]]:&lt;br /&gt;
&lt;br /&gt;
;arch: typically &amp;lt;tt&amp;gt;x86-32bit&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;x86-64bit&amp;lt;/tt&amp;gt;, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.&lt;br /&gt;
;build: defines whether your system is a &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;experimental&amp;lt;/tt&amp;gt; build. &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt; systems will have newer packages unmasked than &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; systems.&lt;br /&gt;
;flavor: defines the general type of system, such as &amp;lt;tt&amp;gt;server&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt;, and will set default USE flags appropriate for your needs.&lt;br /&gt;
;mix-ins: define various optional settings that you may be interested in enabling.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Remember that profiles can often be inherited. For example, the &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt; flavor inherits the &amp;lt;tt&amp;gt;workstation&amp;lt;/tt&amp;gt; flavor settings, which in turn inherits the &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;audio&amp;lt;/tt&amp;gt; mix-ins. You can view this by inspecting the &amp;lt;tt&amp;gt;parent&amp;lt;/tt&amp;gt; files defined in each profile, which can be found in &amp;lt;tt&amp;gt;/usr/portage/profiles/funtoo/1.0/linux-gnu&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##cd /usr/portage/profiles/funtoo/1.0/linux-gnu/&lt;br /&gt;
(chroot) # ##i##ls&lt;br /&gt;
arch/             eapi              make.defaults     package.use/      packages.build    use.force&lt;br /&gt;
build/            flavor/           mix-ins/          package.use.mask/ parent            &lt;br /&gt;
(chroot) # ##i##cat flavor/desktop/parent &lt;br /&gt;
../workstation&lt;br /&gt;
../../mix-ins/print&lt;br /&gt;
(chroot) # ##i##cat flavor/workstation/parent &lt;br /&gt;
../core&lt;br /&gt;
../../mix-ins/X&lt;br /&gt;
../../mix-ins/audio&lt;br /&gt;
../../mix-ins/dvd&lt;br /&gt;
../../mix-ins/media&lt;br /&gt;
../../mix-ins/console-extras&lt;br /&gt;
(chroot) # &lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view installed profiles:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the profile flavor:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile set-flavor 7&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a mix-in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile add 10&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember if you add by string; add a 'gentoo:' to the beginning of the profile name ie:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i## eselect profile add gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
Click [http://wiki.debian.org/DebianKernel here] for a list of all architectures the Debian kernel supports. &lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Wi-Fi ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge linux-firmware&lt;br /&gt;
# ##i##emerge networkmanager&lt;br /&gt;
# ##i##rc-update add NetworkManager default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel so it will start when Funtoo Linux boots.&lt;br /&gt;
&lt;br /&gt;
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;addwifi&amp;lt;/tt&amp;gt; command is used to configure and connect to a WPA/WPA2 Wi-Fi network named &amp;lt;tt&amp;gt;mywifinetwork&amp;lt;/tt&amp;gt; with the password &amp;lt;tt&amp;gt;wifipassword&amp;lt;/tt&amp;gt;. This network configuration entry is stored in &amp;lt;tt&amp;gt;/etc/NetworkManager/system-connections&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==== Desktop (Wired Ethernet) ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.&lt;br /&gt;
&lt;br /&gt;
==== Server (Static IP) ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2013-03-20T07:03:23Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by Fearedbliss (talk) to last revision by 178.36.91.35&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources === &lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download SystemRescueCD from:&lt;br /&gt;
&lt;br /&gt;
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.3.0.iso The Oregon State University Open Source Lab]&lt;br /&gt;
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.3.0.iso HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using an older version of SystemRescueCd, '''be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system'''. By default, SystemRescueCd used to boot in 32-bit mode though the latest version attempts to automatically detect 64-bit processors.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
* '''NEW!''' '''[[ZFS Install Guide]]'''&lt;br /&gt;
* '''NEW!''' '''[[ZFS rootfs over encrypted container]]'''&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget -O - http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz | tar xfvJp -&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you receive the error with initial &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; due to git protocol restrictions, change &amp;lt;tt&amp;gt;SYNC&amp;lt;/tt&amp;gt; variable in &amp;lt;tt&amp;gt;/etc/portage/make.conf&amp;lt;/tt&amp;gt;}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SYNC=&amp;quot;https://github.com/funtoo/ports-2012.git&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;/etc/portage/make.conf&amp;amp;nbsp;(new&amp;amp;nbsp;location)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;profiles&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Some useful portage settings that may help speed up intial configuration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noatime  	         1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/portage/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file may also be found at /etc/make.conf. /etc/portage/make.conf is the new location.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
==== Profiles ====&lt;br /&gt;
&lt;br /&gt;
[[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]]:&lt;br /&gt;
&lt;br /&gt;
;arch: typically &amp;lt;tt&amp;gt;x86-32bit&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;x86-64bit&amp;lt;/tt&amp;gt;, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.&lt;br /&gt;
;build: defines whether your system is a &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;experimental&amp;lt;/tt&amp;gt; build. &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt; systems will have newer packages unmasked than &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; systems.&lt;br /&gt;
;flavor: defines the general type of system, such as &amp;lt;tt&amp;gt;server&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt;, and will set default USE flags appropriate for your needs.&lt;br /&gt;
;mix-ins: define various optional settings that you may be interested in enabling.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Remember that profiles can often be inherited. For example, the &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt; flavor inherits the &amp;lt;tt&amp;gt;workstation&amp;lt;/tt&amp;gt; flavor settings, which in turn inherits the &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;audio&amp;lt;/tt&amp;gt; mix-ins. You can view this by inspecting the &amp;lt;tt&amp;gt;parent&amp;lt;/tt&amp;gt; files defined in each profile, which can be found in &amp;lt;tt&amp;gt;/usr/portage/profiles/funtoo/1.0/linux-gnu&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##cd /usr/portage/profiles/funtoo/1.0/linux-gnu/&lt;br /&gt;
(chroot) # ##i##ls&lt;br /&gt;
arch/             eapi              make.defaults     package.use/      packages.build    use.force&lt;br /&gt;
build/            flavor/           mix-ins/          package.use.mask/ parent            &lt;br /&gt;
(chroot) # ##i##cat flavor/desktop/parent &lt;br /&gt;
../workstation&lt;br /&gt;
../../mix-ins/print&lt;br /&gt;
(chroot) # ##i##cat flavor/workstation/parent &lt;br /&gt;
../core&lt;br /&gt;
../../mix-ins/X&lt;br /&gt;
../../mix-ins/audio&lt;br /&gt;
../../mix-ins/dvd&lt;br /&gt;
../../mix-ins/media&lt;br /&gt;
../../mix-ins/console-extras&lt;br /&gt;
(chroot) # &lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view installed profiles:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the profile flavor:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile set-flavor 7&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a mix-in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile add 10&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember if you add by string; add a 'gentoo:' to the beginning of the profile name ie:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i## eselect profile add gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
Click [http://wiki.debian.org/DebianKernel here] for a list of all architectures the Debian kernel supports. &lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Wi-Fi ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge linux-firmware&lt;br /&gt;
# ##i##emerge networkmanager&lt;br /&gt;
# ##i##rc-update add NetworkManager default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel so it will start when Funtoo Linux boots.&lt;br /&gt;
&lt;br /&gt;
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;addwifi&amp;lt;/tt&amp;gt; command is used to configure and connect to a WPA/WPA2 Wi-Fi network named &amp;lt;tt&amp;gt;mywifinetwork&amp;lt;/tt&amp;gt; with the password &amp;lt;tt&amp;gt;wifipassword&amp;lt;/tt&amp;gt;. This network configuration entry is stored in &amp;lt;tt&amp;gt;/etc/NetworkManager/system-connections&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==== Desktop (Wired Ethernet) ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.&lt;br /&gt;
&lt;br /&gt;
==== Server (Static IP) ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2013-02-23T16:06:24Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources === &lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download SystemRescueCD from:&lt;br /&gt;
&lt;br /&gt;
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.3.0.iso The Oregon State University Open Source Lab]&lt;br /&gt;
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.3.0.iso HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using SystemRescueCd, '''be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system'''. By default, SystemRescueCd boots in 32-bit mode.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
* '''NEW!''' '''[[ZFS Install Guide]]'''&lt;br /&gt;
* '''NEW!''' '''[[ZFS rootfs over encrypted container]]'''&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget -O - http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz | tar xfvJp -&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you receive the error with initial &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; due to git protocol restrictions, change &amp;lt;tt&amp;gt;SYNC&amp;lt;/tt&amp;gt; variable in &amp;lt;tt&amp;gt;/etc/portage/make.conf&amp;lt;/tt&amp;gt;}}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SYNC=&amp;quot;https://github.com/funtoo/ports-2012.git&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;/etc/portage/make.conf&amp;amp;nbsp;(new&amp;amp;nbsp;location)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;profiles&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Some useful portage settings that may help speed up intial configuration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noatime  	         1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/portage/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file may also be found at /etc/make.conf. /etc/portage/make.conf is the new location.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
==== Profiles ====&lt;br /&gt;
&lt;br /&gt;
[[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]]:&lt;br /&gt;
&lt;br /&gt;
;arch: typically &amp;lt;tt&amp;gt;x86-32bit&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;x86-64bit&amp;lt;/tt&amp;gt;, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.&lt;br /&gt;
;build: defines whether your system is a &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;experimental&amp;lt;/tt&amp;gt; build. &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt; systems will have newer packages unmasked than &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; systems.&lt;br /&gt;
;flavor: defines the general type of system, such as &amp;lt;tt&amp;gt;server&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt;, and will set default USE flags appropriate for your needs.&lt;br /&gt;
;mix-ins: define various optional settings that you may be interested in enabling.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Remember that profiles can often be inherited. For example, the &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt; flavor inherits the &amp;lt;tt&amp;gt;workstation&amp;lt;/tt&amp;gt; flavor settings, which in turn inherits the &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;audio&amp;lt;/tt&amp;gt; mix-ins. You can view this by inspecting the &amp;lt;tt&amp;gt;parent&amp;lt;/tt&amp;gt; files defined in each profile, which can be found in &amp;lt;tt&amp;gt;/usr/portage/profiles/funtoo/1.0/linux-gnu&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##cd /usr/portage/profiles/funtoo/1.0/linux-gnu/&lt;br /&gt;
(chroot) # ##i##ls&lt;br /&gt;
arch/             eapi              make.defaults     package.use/      packages.build    use.force&lt;br /&gt;
build/            flavor/           mix-ins/          package.use.mask/ parent            &lt;br /&gt;
(chroot) # ##i##cat flavor/desktop/parent &lt;br /&gt;
../workstation&lt;br /&gt;
../../mix-ins/print&lt;br /&gt;
(chroot) # ##i##cat flavor/workstation/parent &lt;br /&gt;
../core&lt;br /&gt;
../../mix-ins/X&lt;br /&gt;
../../mix-ins/audio&lt;br /&gt;
../../mix-ins/dvd&lt;br /&gt;
../../mix-ins/media&lt;br /&gt;
../../mix-ins/console-extras&lt;br /&gt;
(chroot) # &lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view installed profiles:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the profile flavor:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile set-flavor 7&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a mix-in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile add 10&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember if you add by string; add a 'gentoo:' to the beginning of the profile name ie:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i## eselect profile add gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
Click [http://wiki.debian.org/DebianKernel here] for a list of all architectures the Debian kernel supports. &lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Wi-Fi ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge linux-firmware&lt;br /&gt;
# ##i##emerge networkmanager&lt;br /&gt;
# ##i##rc-update add NetworkManager default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel so it will start when Funtoo Linux boots.&lt;br /&gt;
&lt;br /&gt;
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;addwifi&amp;lt;/tt&amp;gt; command is used to configure and connect to a WPA/WPA2 Wi-Fi network named &amp;lt;tt&amp;gt;mywifinetwork&amp;lt;/tt&amp;gt; with the password &amp;lt;tt&amp;gt;wifipassword&amp;lt;/tt&amp;gt;. This network configuration entry is stored in &amp;lt;tt&amp;gt;/etc/NetworkManager/system-connections&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==== Desktop (Wired Ethernet) ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.&lt;br /&gt;
&lt;br /&gt;
==== Server (Static IP) ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial</id>
		<title>Metro Quick Start Tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial"/>
				<updated>2013-02-01T10:24:48Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* How Metro Works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Metro]] is the build system for [[Funtoo Linux]] and [[Gentoo Linux]] stages. It automates the bootstrapping process.&lt;br /&gt;
&lt;br /&gt;
This tutorial will take you through installing, setting up and running [[Metro]].&lt;br /&gt;
&lt;br /&gt;
= Preface = &lt;br /&gt;
&lt;br /&gt;
== How Metro Works == &lt;br /&gt;
&lt;br /&gt;
You may be wondering how [[Metro]] creates its first stage tarball. As you may have guessed, [[Metro]] cannot create a stage tarball out of thin air. To build a new stage tarball, [[Metro]] must use an existing, older stage tarball called a &amp;amp;quot;seed&amp;amp;quot; stage. This &amp;amp;quot;seed&amp;amp;quot; stage typically is used as the ''build environment'' for creating the stage we want.&lt;br /&gt;
&lt;br /&gt;
[[Metro]] can use two kinds of seed stages. Traditionally, [[Metro]] has used a stage3 as a seed stage. This stage3 is then used to build a new stage1, which in turn is used to build a new stage2, and then a new stage3. This is generally the most reliable way to build [[Gentoo Linux]] or [[Funtoo Linux]], so it's the recommended approach.&lt;br /&gt;
{{fancyimportant|'''After switching metro builds to Funtoo profile, Gentoo stages are no longer provided'''!}}&lt;br /&gt;
&lt;br /&gt;
== Seeds and Build Isolation ==&lt;br /&gt;
&lt;br /&gt;
Another important concept to mention here is something called ''build isolation''. Because [[Metro]] creates an isolated build environment, and the build environment is explicitly defined using existing, tangible entities -- a seed stage and a portage snapshot -- you will get consistent, repeatable results. In other words, the same seed stage, portage snapshot and build instructions will generate an essentially identical result, even if you perform the build a month later on someone else's workstation.&lt;br /&gt;
&lt;br /&gt;
== Local Build == &lt;br /&gt;
&lt;br /&gt;
Say you wanted to build a new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. The recommended method of doing this would be to grab an existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball to use as your seed stage. [[Metro]] will be told to use this existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 to build a new stage1 for the same &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;. For this process, the generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 would provide the ''build environment'' for creating our new stage1. Then, the new stage1 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2. And the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3.&lt;br /&gt;
&lt;br /&gt;
In the [[Metro]] terminology this is called a '''local build''', which means a stage3 of a given architecture is used to seed a brand new build of the same architecture. Incidentally this will be the first exercise we are going to perform in this tutorial.&lt;br /&gt;
&lt;br /&gt;
A week later, you may want to build a brand new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. Rather than starting from the original &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 again, you'd probably configure [[Metro]] to use the most-recently-built &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as the seed. [[Metro]] has built-in functionality to make this easy, allowing it to easily find and track the most recent stage3 seed available.&lt;br /&gt;
&lt;br /&gt;
== Remote Build == &lt;br /&gt;
&lt;br /&gt;
[[Metro]] can also perform '''remote build''', where a stage3 of a different, but binary compatible, architecture is used as a seed to build a different architecture stage3. Consequentiality the second exercise we are going to perform in this tutorial will be to build a &amp;lt;tt&amp;gt;core2 32bit&amp;lt;/tt&amp;gt; stage3 tarball from the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball we have just built.&lt;br /&gt;
&lt;br /&gt;
TODO: add caveats about what archs can be seeded and what can be not (maybe a table?)&lt;br /&gt;
&lt;br /&gt;
== Tailored Build == &lt;br /&gt;
&lt;br /&gt;
Last, it's also worthy noting that both in &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;remote builds&amp;lt;/tt&amp;gt;, [[Metro]] can be configured to add and/or remove individual packages to the final tarball.&lt;br /&gt;
Let's say you can't live without &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, at the end of this tutorial, we will show how to have your tailored stage3 to include it.&lt;br /&gt;
&lt;br /&gt;
= Installing Metro =&lt;br /&gt;
&lt;br /&gt;
Today the '''recommended and supported method''' is to use the Git repository of [[Metro]].  First ensure you remove the &amp;lt;tt&amp;gt;dev-util/metro&amp;lt;/tt&amp;gt; package if you had installed it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge -aC dev-util/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then ensure that &amp;lt;tt&amp;gt;dev-vcs/git&amp;lt;/tt&amp;gt; is installed on your system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge dev-vcs/git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, clone the master git repository as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d /root/git&lt;br /&gt;
(~) # cd /root/git&lt;br /&gt;
(~/git) # git clone git://github.com/funtoo/metro.git&lt;br /&gt;
(~/git) # ln -s /root/git/metro /usr/lib/metro&lt;br /&gt;
(~/git) # ln -s /root/git/metro/metro /usr/bin/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will now have a directory called &amp;lt;tt&amp;gt;/root/git/metro&amp;lt;/tt&amp;gt; that contains all the [[Metro]] source code.&lt;br /&gt;
Installation complete!&lt;br /&gt;
&lt;br /&gt;
= Configuring Metro =&lt;br /&gt;
&lt;br /&gt;
[[User:Drobbins|Daniel Robbins]] maintains [[Metro]], so it comes pre-configured to successfully build both [[Gentoo Linux]] and [[Funtoo Linux]] releases. Before reading farther, you might want to customize some basic settings like the number of concurrent jobs to fit your hardware's capabilities or the directory to use for produced stage archives. This is accomplished by editing &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt; which is the [[Metro]]'s master configuration file. The &amp;lt;tt&amp;gt;[path/mirror]&amp;lt;/tt&amp;gt; section defines where [[Metro]] will look for things it needs and also dump things it creates. As initially configured, [[Metro]] is set up to build [[Funtoo Linux]] and [[Gentoo Linux]] stage tarballs and place them in the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Mirror Paths - where to find required files and where to put created files&lt;br /&gt;
&lt;br /&gt;
[section path/mirror]&lt;br /&gt;
&lt;br /&gt;
: /home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the location of your mirror on disk, then edit the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; line (which defines the path/mirror variable) to point to another directory.&lt;br /&gt;
&lt;br /&gt;
For the purpose of the following steps, set an environment variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # export METRO_MIRROR=/home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Of course, set the environment variable to whatever location you used in the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Arch and Subarch ==&lt;br /&gt;
&lt;br /&gt;
In the following example we are creating a pentium4 stage 3 compiled for x86-32bit binary compatibility. Pentium4 is a subarch of the x86-32bit architecture. Once you have metro installed you may find a full list of each subarch in your &amp;lt;tt&amp;gt;/usr/lib/metro/subarch&amp;lt;/tt&amp;gt; directory each subarch will have the file extension .spec&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
# ls /usr/lib/metro/subarch/&lt;br /&gt;
amd64-k10.spec         athlon-tbird.spec  generic_32.spec       native_32.spec   pentium-mmx.spec&lt;br /&gt;
amd64-k8_32.spec       athlon-xp.spec     generic_64.spec       native_64.spec   pentium-m.spec&lt;br /&gt;
amd64-k8.spec          atom_32.spec       generic_sparcv9.spec  niagara2.spec    pentiumpro.spec&lt;br /&gt;
amd64-k8+sse3_32.spec  atom_64.spec       geode.spec            niagara.spec     pentium.spec&lt;br /&gt;
amd64-k8+sse3.spec     btver1_64.spec     i486.spec             nocona.spec      prescott.spec&lt;br /&gt;
armv7a.spec            btver1.spec        i686.spec             opteron_64.spec  ultrasparc3.spec&lt;br /&gt;
athlon-4.spec          core2_32.spec      k6-2.spec             pentium2.spec    ultrasparc.spec&lt;br /&gt;
athlon-mp.spec         core2_64.spec      k6-3.spec             pentium3.spec    xen-pentium4+sse3_64.spec&lt;br /&gt;
athlon.spec            corei7.spec        k6.spec               pentium4.spec    xen-pentium4+sse3.spec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example list of Architectures, take a look at the directory listing on the [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-Current Mirror].&lt;br /&gt;
&lt;br /&gt;
= First stages build (local build) =&lt;br /&gt;
&lt;br /&gt;
To get this all started, we need to bootstrap the process by downloading an initial seed stage3 to use for building and place it in is proper location in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, so that [[Metro]] can find it. We will also need to create some special &amp;amp;quot;control&amp;amp;quot; files in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, which will allow [[Metro]] to understand how it is supposed to proceed.&lt;br /&gt;
&lt;br /&gt;
== Step 0: Optional Quick Copy of Portage Tree ==&lt;br /&gt;
&lt;br /&gt;
There is a quick step you can perform to avoid having Metro re-clone the entire Portage tree. Perform this as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/portage; git checkout origin/master&lt;br /&gt;
# install -d /var/tmp/metro/cache/cloned-repositories&lt;br /&gt;
# cat /root/git/metro/etc/builds/funtoo-current/build.conf  | grep name&lt;br /&gt;
name: portage-mini-2011&lt;br /&gt;
# cp -a /usr/portage /var/tmp/metro/cache/cloned-repositories/portage-mini-2011&lt;br /&gt;
# cd /usr/portage; git checkout funtoo.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up pentium4 repository (local build) ==&lt;br /&gt;
&lt;br /&gt;
Assuming we're following the basic steps outlined in the previous section, and building an unstable funtoo (&amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt;) build for the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;, using a generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as a seed stage, then here the first set of steps we'd perform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # cd 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # wget -c http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-32bit/pentium4/2011-12-13/stage3-pentium4-funtoo-current-2011-12-13.tar.xz&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # cd ..&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/version&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;2011-12-13&amp;amp;quot; &amp;amp;gt; .control/version/stage3&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OK, let's review the steps above. First, we create the directory &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt;, which is where Metro will expect to find unstable &amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt; pentium4 builds -- it is configured to look here by default. Then we create a specially-named directory to house our seed x86 stage3. Again, by default, Metro expects the directory to be named this way. We enter this directory, and download our seed x86 stage3 from funtoo.org. Note that the &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt; version stamp matches. Make sure that your directory name matches the stage3 name too. Everything has been set up to match Metro's default filesystem layout.&lt;br /&gt;
&lt;br /&gt;
Next, we go back to the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory, and inside it, we create a &amp;lt;tt&amp;gt;.control&amp;lt;/tt&amp;gt; directory. This directory and its subdirectories contain special files that Metro references to determine certain aspects of its behavior. The &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file is used by Metro to track the most recently-built stage3 for this particular build and subarch. Metro will automatically update this file with a new version stamp after it successfully builds a new stage3. But because Metro didn't actually ''build'' this stage3, we need to set up the &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file manually. This will allow Metro to find our downloaded stage3 when we set up our pentium4 build to use it as a seed. Also note that Metro will create a similar &amp;lt;tt&amp;gt;.control/version/stage1&amp;lt;/tt&amp;gt; file after it successfully builds an pentium4 funtoo-current stage1.&lt;br /&gt;
&lt;br /&gt;
We also set up &amp;lt;tt&amp;gt;.control/strategy/build&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.control/strategy/seed&amp;lt;/tt&amp;gt; files with values of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; respectively. These files define the building strategy Metro will use when we build pentium4 funtoo-current stages. With a build strategy of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt;, Metro will source its seed stage from funtoo-current pentium4, the current directory. And with a seed strategy of &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;, Metro will use a stage3 as a seed, and use this seed to build a new stage1, stage2 and stage3.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the pentium4 stages ==&lt;br /&gt;
&lt;br /&gt;
Incidentally, if all you wanted to do at this point was to build a new pentium4 funtoo-current stage1/2/3 (plus openvz and vserver templates). You would begin the process by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/git/metro&lt;br /&gt;
# scripts/ezbuild.sh funtoo-current pentium4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a slow machine, it could take several hours to be completed because several &amp;quot;heavy&amp;quot; components like gcc or glibc have to be recompiled in each stage. Once a stage has been successfully completed, it is placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/pentium4/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory, where &amp;lt;tt&amp;gt;YYYY-MM-DD&amp;lt;/tt&amp;gt; is today's date at the time the &amp;lt;tt&amp;gt;ezbuild.sh&amp;lt;/tt&amp;gt; script was started or the date you put on the ezscript.sh command line.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The next build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new pentium4 stage3. If you'd like, you can reconfigure Metro to use the most recently-built pentium4 stage3 as a seed for any pentium4 builds. To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/pentium4/.control/strategy/build&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, Metro will use the most recentpentium4 stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Building for another binary compatible architecture (remote build) =&lt;br /&gt;
&lt;br /&gt;
As written above, [[Metro]] is able to perform '''remote build''' building different architecture stage3 from a binary compatible seeding stage3 (e.g. using a pentium4 stage3 to seed a &amp;lt;tt&amp;gt;Intel Core2 32bits&amp;lt;/tt&amp;gt; stage3). &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''remote build''' (a stage 3 of a different, but binary compatible, architecture is used as a seed). &lt;br /&gt;
What's not compatible? You can't use a &amp;lt;tt&amp;gt;Sparc&amp;lt;/tt&amp;gt; architecture to generate an &amp;lt;tt&amp;gt;x86&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ARM&amp;lt;/tt&amp;gt; based stage and vice-versa. If you use a 32bit stage then you don't want to seed a 64bit build from it. Be sure that you are using a stage from the same architecture that you are trying to seed. Check [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-current FTP Mirror] for a stage that is from the same Architecture that you will be building.  &lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up Core_2 32bit repository ==&lt;br /&gt;
&lt;br /&gt;
In this example, we're going to use this pentium4 funtoo-current stage3 to seed a new Core_2 32bit funtoo-current build. To get that done, we need to set up the pentium4 build directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # install -d core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # cd core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;remote&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/remote&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;funtoo-current&amp;amp;quot; &amp;amp;gt; .control/remote/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;pentium4&amp;amp;quot; &amp;amp;gt; .control/remote/subarch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps we follow are similar to those we performed for a ''local build'' to set up our pentium4 directory for local build. However, note the differences. We didn't download a stage, because we are going to use the pentium4 stage to build a new Core_2 32bit stage. We also didn't create the &amp;lt;tt&amp;gt;.control/version/stage{1,3}&amp;lt;/tt&amp;gt; files because Metro will create them for us after it successfully builds a new stage1 and stage3. We are still using a &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; seed strategy, but we've set the build strategy to &amp;lt;tt&amp;gt;remote&amp;lt;/tt&amp;gt;, which means that we're going to use a seed stage that's not from this particular subdirectory. Where are we going to get it from? The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; directory contains this information, and lets Metro know that it should look for its seed stage3 in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/home/mirror/linux/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory. Which one will it grab? You guessed it -- the most recently built ''stage3'' (since our seed strategy was set to &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;) that has the version stamp of &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt;, as recorded in &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4/.control/version/stage3&amp;quot;&amp;lt;/tt&amp;gt;. Now you can see how all those control files come together to direct Metro to do the right thing.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the Core_2 32bit stages ==&lt;br /&gt;
&lt;br /&gt;
Now, you could start building your new Core_2 32bit stage1/2/3 (plus openvz and vserver templates) by typing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # /root/git/metro/scripts/ezbuild.sh funtoo-current core2_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that case, the produced stages are placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/core2_32/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The Next Build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new Core_2 32bit stage3. If you'd like, you can reconfigure Metro to use the most recently-built Core_2 32bit stage3 as a seed for any new Core_2 32bit builds. &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''local build''' (a stage 3 of a a given architecture is used to seed a brand new build of the same architecture). &lt;br /&gt;
&lt;br /&gt;
To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/core2_32/.control/strategy/build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Metro will use the most recent Core_2 32bit stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Build your own tailored stage3 =&lt;br /&gt;
&lt;br /&gt;
Metro can be easily configured for building custom stage3 by including additional packages. Notice that including packages with heavy dependencies such as gnome, kde, xorg-server is not recommended (not tested so far). Well tested packages are &amp;lt;tt&amp;gt;app-misc/mc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-process/htop&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-apps/dstat&amp;lt;/tt&amp;gt;. An example for funtoo-current stage. Edit the following configuration file &amp;lt;tt&amp;gt;/root/git/metro/etc/builds/funtoo-current/build.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[collect ../../fslayouts/funtoo/layout.conf]&lt;br /&gt;
&lt;br /&gt;
[section local]&lt;br /&gt;
&lt;br /&gt;
author: Daniel Robbins &amp;lt;drobbins@funtoo.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[section target]&lt;br /&gt;
&lt;br /&gt;
build: funtoo-current&lt;br /&gt;
compression: xz&lt;br /&gt;
&lt;br /&gt;
[section portage]&lt;br /&gt;
&lt;br /&gt;
stable: ~&lt;br /&gt;
MAKEOPTS: -j12&lt;br /&gt;
FEATURES: mini-manifest&lt;br /&gt;
SYNC: $[snapshot/source/remote]&lt;br /&gt;
USE:&lt;br /&gt;
profile: default/linux/$[target/arch:zap]/2008.0&lt;br /&gt;
&lt;br /&gt;
[section emerge]&lt;br /&gt;
&lt;br /&gt;
options: --jobs=4 --load-average=3 --keep-going=n&lt;br /&gt;
packages: [&lt;br /&gt;
	dev-vcs/git &lt;br /&gt;
	net-misc/dhcpcd&lt;br /&gt;
	sys-fs/reiserfsprogs&lt;br /&gt;
	net-misc/bridge-utils&lt;br /&gt;
	sys-devel/bc&lt;br /&gt;
	sys-apps/pciutils&lt;br /&gt;
	app-portage/gentoolkit&lt;br /&gt;
        app-misc/mc&lt;br /&gt;
        app-misc/screen&lt;br /&gt;
        sys-process/htop&lt;br /&gt;
        sys-apps/dstat &lt;br /&gt;
            &lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
[section snapshot]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see MAKEOPTS and emerge default options are additional strings to tweak, --keep-going=n is recommended, if something breaking during the stage building process, you can quickly diagnose the problem.&lt;br /&gt;
&lt;br /&gt;
Distfiles location can be specified in &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Main metro configuration file&lt;br /&gt;
# &lt;br /&gt;
# Path configuration:&lt;br /&gt;
&lt;br /&gt;
[collect ../targets/$[metro/target]/$[target:zap].spec]&lt;br /&gt;
[collect ./builds/$[metro/build]/build.conf]&lt;br /&gt;
[collect ../subarch/$[target/subarch:zap].spec]&lt;br /&gt;
&lt;br /&gt;
# General Paths&lt;br /&gt;
&lt;br /&gt;
[section path]&lt;br /&gt;
tmp: /var/tmp/metro&lt;br /&gt;
distfiles: /var/portage/distfiles&lt;br /&gt;
work: $[path/tmp]/work/$[metro/build]/$[target/name]&lt;br /&gt;
&lt;br /&gt;
[section path/cache]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Metro]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2013-01-29T14:10:53Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Live CD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources === &lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download SystemRescueCD from:&lt;br /&gt;
&lt;br /&gt;
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.3.0.iso The Oregon State University Open Source Lab]&lt;br /&gt;
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.3.0.iso HEAnet] or use your preferred live media. Insert it into your disc drive, and boot from it. If using SystemRescueCd, '''be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system'''. By default, SystemRescueCd boots in 32-bit mode.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
* '''NEW!''' '''[[ZFS Install Guide]]'''&lt;br /&gt;
* '''NEW!''' '''[[ZFS rootfs over encrypted container]]'''&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget -O - http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz | tar xfvJp -&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;/etc/portage/make.conf&amp;amp;nbsp;(new&amp;amp;nbsp;location)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;profiles&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Some useful portage settings that may help speed up intial configuration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noatime  	         1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/portage/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file may also be found at /etc/make.conf. /etc/portage/make.conf is the new location.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
==== Profiles ====&lt;br /&gt;
&lt;br /&gt;
[[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]]:&lt;br /&gt;
&lt;br /&gt;
;arch: typically &amp;lt;tt&amp;gt;x86-32bit&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;x86-64bit&amp;lt;/tt&amp;gt;, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.&lt;br /&gt;
;build: defines whether your system is a &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;experimental&amp;lt;/tt&amp;gt; build. &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt; systems will have newer packages unmasked than &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; systems.&lt;br /&gt;
;flavor: defines the general type of system, such as &amp;lt;tt&amp;gt;server&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt;, and will set default USE flags appropriate for your needs.&lt;br /&gt;
;mix-ins: define various optional settings that you may be interested in enabling.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Remember that profiles can often be inherited. For example, the &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt; flavor inherits the &amp;lt;tt&amp;gt;workstation&amp;lt;/tt&amp;gt; flavor settings, which in turn inherits the &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;audio&amp;lt;/tt&amp;gt; mix-ins. You can view this by inspecting the &amp;lt;tt&amp;gt;parent&amp;lt;/tt&amp;gt; files defined in each profile, which can be found in &amp;lt;tt&amp;gt;/usr/portage/profiles/funtoo/1.0/linux-gnu&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##cd /usr/portage/profiles/funtoo/1.0/linux-gnu/&lt;br /&gt;
(chroot) # ##i##ls&lt;br /&gt;
arch/             eapi              make.defaults     package.use/      packages.build    use.force&lt;br /&gt;
build/            flavor/           mix-ins/          package.use.mask/ parent            &lt;br /&gt;
(chroot) # ##i##cat flavor/desktop/parent &lt;br /&gt;
../workstation&lt;br /&gt;
../../mix-ins/print&lt;br /&gt;
(chroot) # ##i##cat flavor/workstation/parent &lt;br /&gt;
../core&lt;br /&gt;
../../mix-ins/X&lt;br /&gt;
../../mix-ins/audio&lt;br /&gt;
../../mix-ins/dvd&lt;br /&gt;
../../mix-ins/media&lt;br /&gt;
../../mix-ins/console-extras&lt;br /&gt;
(chroot) # &lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view installed profiles:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the profile flavor:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile set-flavor 7&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a mix-in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile add 10&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember if you add by string; add a 'gentoo:' to the beginning of the profile name ie:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i## eselect profile add gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Wi-Fi ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge linux-firmware&lt;br /&gt;
# ##i##emerge networkmanager&lt;br /&gt;
# ##i##rc-update add NetworkManager default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel so it will start when Funtoo Linux boots.&lt;br /&gt;
&lt;br /&gt;
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;addwifi&amp;lt;/tt&amp;gt; command is used to configure and connect to a WPA/WPA2 Wi-Fi network named &amp;lt;tt&amp;gt;mywifinetwork&amp;lt;/tt&amp;gt; with the password &amp;lt;tt&amp;gt;wifipassword&amp;lt;/tt&amp;gt;. This network configuration entry is stored in &amp;lt;tt&amp;gt;/etc/NetworkManager/system-connections&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==== Desktop (Wired Ethernet) ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.&lt;br /&gt;
&lt;br /&gt;
==== Server (Static IP) ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2013-01-29T06:37:11Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources === &lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download and burn [http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/systemrescuecd-x86-3.3.0.iso SystemRescueCD] or your preferred live media. Insert it into your disc drive, and boot from it. If using SystemRescueCd, '''be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system'''. By default, SystemRescueCd boots in 32-bit mode.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
* '''NEW!''' '''[[ZFS Install Guide]]'''&lt;br /&gt;
* '''NEW!''' '''[[ZFS rootfs over encrypted container]]'''&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget -O - http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz | tar xfvJp -&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;/etc/portage/make.conf&amp;amp;nbsp;(new&amp;amp;nbsp;location)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;profiles&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Some useful portage settings that may help speed up intial configuration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noatime  	         1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/portage/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file may also be found at /etc/make.conf. /etc/portage/make.conf is the new location.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
==== Profiles ====&lt;br /&gt;
&lt;br /&gt;
[[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]]:&lt;br /&gt;
&lt;br /&gt;
;arch: typically &amp;lt;tt&amp;gt;x86-32bit&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;x86-64bit&amp;lt;/tt&amp;gt;, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.&lt;br /&gt;
;build: defines whether your system is a &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;experimental&amp;lt;/tt&amp;gt; build. &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt; systems will have newer packages unmasked than &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; systems.&lt;br /&gt;
;flavor: defines the general type of system, such as &amp;lt;tt&amp;gt;server&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt;, and will set default USE flags appropriate for your needs.&lt;br /&gt;
;mix-ins: define various optional settings that you may be interested in enabling.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Remember that profiles can often be inherited. For example, the &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt; flavor inherits the &amp;lt;tt&amp;gt;workstation&amp;lt;/tt&amp;gt; flavor settings, which in turn inherits the &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;audio&amp;lt;/tt&amp;gt; mix-ins. You can view this by inspecting the &amp;lt;tt&amp;gt;parent&amp;lt;/tt&amp;gt; files defined in each profile, which can be found in &amp;lt;tt&amp;gt;/usr/portage/profiles/funtoo/1.0/linux-gnu&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##cd /usr/portage/profiles/funtoo/1.0/linux-gnu/&lt;br /&gt;
(chroot) # ##i##ls&lt;br /&gt;
arch/             eapi              make.defaults     package.use/      packages.build    use.force&lt;br /&gt;
build/            flavor/           mix-ins/          package.use.mask/ parent            &lt;br /&gt;
(chroot) # ##i##cat flavor/desktop/parent &lt;br /&gt;
../workstation&lt;br /&gt;
../../mix-ins/print&lt;br /&gt;
(chroot) # ##i##cat flavor/workstation/parent &lt;br /&gt;
../core&lt;br /&gt;
../../mix-ins/X&lt;br /&gt;
../../mix-ins/audio&lt;br /&gt;
../../mix-ins/dvd&lt;br /&gt;
../../mix-ins/media&lt;br /&gt;
../../mix-ins/console-extras&lt;br /&gt;
(chroot) # &lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view installed profiles:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the profile flavor:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile set-flavor 7&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add a mix-in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile add 10&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember if you add by string; add a 'gentoo:' to the beginning of the profile name ie:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i## eselect profile add gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Wi-Fi ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge linux-firmware&lt;br /&gt;
# ##i##emerge networkmanager&lt;br /&gt;
# ##i##rc-update add NetworkManager default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel so it will start when Funtoo Linux boots.&lt;br /&gt;
&lt;br /&gt;
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;addwifi&amp;lt;/tt&amp;gt; command is used to configure and connect to a WPA/WPA2 Wi-Fi network named &amp;lt;tt&amp;gt;mywifinetwork&amp;lt;/tt&amp;gt; with the password &amp;lt;tt&amp;gt;wifipassword&amp;lt;/tt&amp;gt;. This network configuration entry is stored in &amp;lt;tt&amp;gt;/etc/NetworkManager/system-connections&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==== Desktop (Wired Ethernet) ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.&lt;br /&gt;
&lt;br /&gt;
==== Server (Static IP) ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2013-01-20T18:20:14Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS (rootfs).&lt;br /&gt;
&lt;br /&gt;
This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8. This guide is a Work in Progress, expect some quirks :)&lt;br /&gt;
&lt;br /&gt;
{{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'''!}}&lt;br /&gt;
&lt;br /&gt;
== Setting up your environment ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS tools. We will be downloading two things: System Rescue CD, &amp;lt;br /&amp;gt;&lt;br /&gt;
and the ZFS System Rescue Module (SRM). This is just a file that when combined with System Rescue CD, gives you those tools.&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/3.2.0/systemrescuecd-x86-3.2.0.iso/download Download System Rescue CD 3.2.0]&lt;br /&gt;
&lt;br /&gt;
[http://jonathanvasquez.com/files/sysresccd/ Download the ZFS System Rescue Module]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: SystemRescueCd-x86-3.2.0 (353 MiB)&lt;br /&gt;
Release Date: 2013-01-07&lt;br /&gt;
&lt;br /&gt;
md5sum 90528f0c4b861363992fd9cbcc52d00a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Creating_System_Rescue_CD_Modules|Follow the instructions here to download and place the srm into your flash drive]].&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
&lt;br /&gt;
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. Using your entire disk drive is recommended since ZFS turns on/off a few settings. For one, if you use your whole-disk, ZFS will set the I/O elevator for the drive automatically. On Solaris machines, ZFS also enables the disk's write cache.&lt;br /&gt;
&lt;br /&gt;
If you partition it manually, you should set your I/O scheduler to no-op so it doesn't conflict with the ZFS scheduler. Partitioning manually also gives you the advantage of putting your /boot outside the ZFS pool so that you can use a bootloader that doesn't support booting from ZFS.&lt;br /&gt;
&lt;br /&gt;
We will be creating two partitions, /boot, and the remaining disk space will be for ZFS.&lt;br /&gt;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
=== Whole Disk ===&lt;br /&gt;
&lt;br /&gt;
This is the easiest method and the recommended method. First lets make sure that the disk is completely wiped from any previous disk labels and partitions.&lt;br /&gt;
&lt;br /&gt;
We will also assume that /dev/sda is the target drive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##gdisk /dev/sda&lt;br /&gt;
&lt;br /&gt;
Command: ##i##x ↵&lt;br /&gt;
Expert command: ##i##z ↵&lt;br /&gt;
About to wipe out GPT on /dev/sda. Proceed?: ##i##y ↵&lt;br /&gt;
GPT data structures destroyed! You may now partition the disk using fdisk or other utilities.&lt;br /&gt;
Blank out MBR?: ##i##y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This is a destructive operation. Make sure you really don't want anything on this disk.}}&lt;br /&gt;
&lt;br /&gt;
Now that we have a clean drive, we will create the new pool in it while letting zfs automatically partition it.&lt;br /&gt;
&lt;br /&gt;
Create the pool as normal&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Doing this will let ZFS create a GPT style disk with two partitions. We will also slightly modify this to add a BIOS Boot Partition so that grub can be installed successfully. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First lets export the pool so that the kernel can use the new partition table without rebooting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool export rpool&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And now lets create a new BIOS Boot Partition at partition 2 from sectors '''48''' to '''2047''':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##gdisk /dev/sda&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GPT fdisk (gdisk) version 0.8.5&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Partition table scan:&lt;br /&gt;
  MBR: protective&lt;br /&gt;
  BSD: not present&lt;br /&gt;
  APM: not present&lt;br /&gt;
  GPT: present&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Found valid GPT with protective MBR; using GPT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command (? for help): ##i##p ↵&lt;br /&gt;
Disk /dev/sda: 16777216 sectors, 8.0 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): 09DA0F98-A486-424F-A87D-B3B409381428&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 16777182&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 4029 sectors (2.0 MiB)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048        16758783   8.0 GiB     BF01  zfs&lt;br /&gt;
   9        16758784        16775167   8.0 MiB     BF07 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command (? for help): ##i##n ↵&lt;br /&gt;
Partition number (2-128, default 2): ##i##↵&lt;br /&gt;
First sector (34-16777182, default = 16775168) or {+-}size{KMGTP}: ##i##48 ↵&lt;br /&gt;
Last sector (48-2047, default = 2047) or {+-}size{KMGTP}: ##i## ↵&lt;br /&gt;
Current type is 'Linux filesystem'&lt;br /&gt;
Hex code or GUID (L to show codes, Enter = 8300): ##i##EF02 ↵&lt;br /&gt;
Changed type of partition to 'BIOS boot partition'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Command (? for help): ##i##w ↵&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING&lt;br /&gt;
PARTITIONS!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##y&lt;br /&gt;
OK; writing new GUID partition table (GPT) to /dev/sda.&lt;br /&gt;
The operation has completed successfully.&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you were to check gdisk /dev/sda again, you would see these 3 partitions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048        16758783   8.0 GiB     BF01  zfs&lt;br /&gt;
   2              48            2047   1000.0 KiB  EF02  BIOS boot partition&lt;br /&gt;
   9        16758784        16775167   8.0 MiB     BF07&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's import the pool again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool import -f -o cachefile= -R /mnt/funtoo rpool&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[ZFS_Install_Guide#Create_the_zfs_datasets|Now continue with creating your datasets.]]&lt;br /&gt;
&lt;br /&gt;
=== Manual partitioning ===&lt;br /&gt;
==== fdisk (MBR Style) ====&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code (type L to list codes): ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x3e954df7&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== gdisk (GPT Style) ====&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary. The below instructions continue as if you did not create this partition and assumes you are using extlinux as the bootloader.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf01 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
Disk /dev/sda: 1953525168 sectors, 931.5 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): C0C1E56A-B24F-492F-95DB-2E227676F228&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 1953525134&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048      1953525134   931.3 GiB   BF01  Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you followed the GPT partitioning instructions, you should change /dev/sda2 to /dev/sda3.}}&lt;br /&gt;
&lt;br /&gt;
{{fancynote|If you have a previous pool that you would like to import, you can do a: '''zpool import -R /mnt/funtoo -f &amp;lt;pool_name&amp;gt;'''}}&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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: /home, /var, /usr/src, and /usr/portage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional, but recommended datasets: /home, /root &lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&lt;br /&gt;
Optional datasets: /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating a separate portage dataset (optional) ====&lt;br /&gt;
&lt;br /&gt;
Creating a separate portage dataset could be useful if you would like to keep your portage tree, distfiles (source code files), and packages (your compiled binaries if you have FEATURES=&amp;quot;buildpkg&amp;quot; enabled) in a safe place (or if you want to back up this directory up easily).&lt;br /&gt;
&lt;br /&gt;
This requires a few extra steps because we can't just do a regular emerge --sync when we initially chroot. We will need to download a portage snapshot tarball and extract it into the directory.&lt;br /&gt;
&lt;br /&gt;
The required steps for getting and extracting the snapshot will be shown later on in the guide once you chroot into the environment. For now just create the datasets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap zvol ===&lt;br /&gt;
&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of RAM (This is kinda big though).'''&lt;br /&gt;
Be warned - zfs is memory hungry. Specially when used with compression=on. A machine with just 4GB can come in troubles while compiling big packages and/or a graphical desktop running. You definitly should have swap running.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap zvol ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. &lt;br /&gt;
&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /mnt/funtoo/etc/mtab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo_Linux_Installation|Download and install the Funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&lt;br /&gt;
Mount your boot drive ** You don't need to do this if you're using whole-disk zfs **&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&lt;br /&gt;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syncing your portage tree ===&lt;br /&gt;
&lt;br /&gt;
==== If you didn't create a separate portage dataset, then just sync your portage tree as normal. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== If you did create a separate portage dataset, let's now get the portage snapshot set up. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Change into your /usr directory&lt;br /&gt;
# ##i##cd /usr&lt;br /&gt;
&lt;br /&gt;
Download and extract the portage snapshot&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/portage-latest.tar.xz&lt;br /&gt;
# ##i##tar xf portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Change into your portage directory and checkout the funtoo branch&lt;br /&gt;
# ##i##cd portage&lt;br /&gt;
# ##i##git checkout funtoo.org&lt;br /&gt;
&lt;br /&gt;
Now sync your portage tree&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
&lt;br /&gt;
{{fancynote|The below configurations are the requirements for &amp;quot;Bliss Initramfs Creator&amp;quot;. Some of these might not be needed for genkernel.}}&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 2.6.32, 3.2.34, 3.6.9, 3.7.[1-3].&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn&lt;br /&gt;
on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its&lt;br /&gt;
own scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&lt;br /&gt;
Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Enable the block layer ---&amp;gt;&lt;br /&gt;
IO Schedulers ---&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; Deadline I/O scheduler&lt;br /&gt;
&amp;lt; &amp;gt; CFQ I/O scheduler&lt;br /&gt;
Default I/O scheduler (No-op)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
&amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
&amp;gt;&amp;gt; [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&lt;br /&gt;
Cryptographic API ---&amp;gt;&lt;br /&gt;
&amp;lt;*&amp;gt; Deflate compression algorithm&lt;br /&gt;
&amp;lt;*&amp;gt; Zlib compression algorithm&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my bliss initramfs creator. I will&lt;br /&gt;
show you both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.3-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.7.3-ALL&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
grub.cfg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.7.3&amp;quot; {&lt;br /&gt;
  insmod zfs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  linux /ROOT/funtoo/@/boot/vmlinuz-3.7.3-ALL root=rpool/ROOT/funtoo real_root=ZFS=rpool/ROOt/funtoo dozfs=force&lt;br /&gt;
  initrd /ROOT/funtoo/@/boot/initramfs-genkernel-x86_64-3.7.3-ALL&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.3-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.3-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.7.3-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
&lt;br /&gt;
Clone my creator which is located at: git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into this new directory, run the script as root, and place it into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file.&lt;br /&gt;
&lt;br /&gt;
Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Kernel name is: vmlinuz-3.7.3-ALL&lt;br /&gt;
initramfs name is: initrd-3.7.3-ALL.img&lt;br /&gt;
Pool root is: rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
grub.cfg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
set timeout=3&lt;br /&gt;
set default=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Funtoo&lt;br /&gt;
menuentry &amp;quot;Funtoo - 3.7.3&amp;quot; {&lt;br /&gt;
  insmod zfs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  linux /ROOT/funtoo/@/boot/vmlinuz-3.7.3-ALL root=rpool/ROOT/funtoo quiet&lt;br /&gt;
  initrd /ROOT/funtoo/@/boot/initrd-3.7.3-ALL.img&lt;br /&gt;
}&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
  APPEND pool_root=rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add zfs boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Do not add the /boot line below if you are using whole-disk zfs&lt;br /&gt;
/dev/sda1               /boot           ext4            defaults        1 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to clean up, '''set our root password''', and unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Delete the stage3/portage tarballs you downloaded earlier so they don't take up space.&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##rm stage3-latest.tar.xz&lt;br /&gt;
# ##i##rm /usr/portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Set your root password&lt;br /&gt;
# ##i##passwd&lt;br /&gt;
&amp;gt;&amp;gt; Enter your password, you won't see what you are writing (for security reasons), but it is there!&lt;br /&gt;
&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{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.'''}}&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs snapshot rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs list -t snapshot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs rollback rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recovery Environment ===&lt;br /&gt;
On ZFS it is extremely easy to create a recovery environment using an already working snapshot. So that's what we will be doing. &lt;br /&gt;
&lt;br /&gt;
Create a clone of the @install snapshot which you will use for recovery purposes. If something happens to your main install, you can boot into this clone and fix the main one. One of the differences (maybe the only difference) between a clone and a snapshot is that a clone is rewritable while a snapshot is only read-only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs clone rpool/ROOT/funtoo@install rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Add the clone to your extlinux.conf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo-recovery&lt;br /&gt;
    MENU LABEL Funtoo Recovery&lt;br /&gt;
    KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
    INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
    APPEND pool_root=rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Things to watch out for ====&lt;br /&gt;
&lt;br /&gt;
Since your recovery clone will tend to get old as you use your main system, and since &lt;br /&gt;
your recovery and other stuff are on the same pool, we don't want the new pool stuff&lt;br /&gt;
to be mounted when we launch recovery. We also don't want video drivers to be&lt;br /&gt;
conflicting.&lt;br /&gt;
&lt;br /&gt;
1. Make sure that nvidia/nouveau stuff are blacklisted.&lt;br /&gt;
2. Make sure that your /boot and /lib/modules for the kernel in your 'recovery' are&lt;br /&gt;
matching.&lt;br /&gt;
3. Disable the zfs openrc script so that nothing else gets automatically mounted.&lt;br /&gt;
Only your rootfs.&lt;br /&gt;
&lt;br /&gt;
You can do the above stuff by mounting your copy and chrooting into it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Mount the recovery clone&lt;br /&gt;
# ##i##mkdir /mnt/recovery&lt;br /&gt;
# ##i##mount -t zfs -o zfsutil rpool/ROOT/recovery /mnt/recovery&lt;br /&gt;
# ##i##cd /mnt/recovery&lt;br /&gt;
&lt;br /&gt;
Mount the kernel devices&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy zpool.cache&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache etc/zfs&lt;br /&gt;
&lt;br /&gt;
Chroot into the new environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash --login&lt;br /&gt;
&lt;br /&gt;
Disable zfs/zfs-shutdown openrc scripts&lt;br /&gt;
# ##i##rc-config delete zfs boot&lt;br /&gt;
&lt;br /&gt;
Blacklist nouveau/nvidia drivers&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nouveau&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nvidia&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting into the recovery ====&lt;br /&gt;
Just start your machine and pick the '''Funtoo Recovery''' option from the Boot Menu.&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Filesystems]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Featured]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2013-01-06T15:57:26Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Things to watch out for */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS (rootfs).&lt;br /&gt;
&lt;br /&gt;
This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
{{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'''!}}&lt;br /&gt;
&lt;br /&gt;
== Setting up your environment ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS userspace tools. We will be downloading two things, System Rescue CD 3.1.2, and the ZFS SRM (System Rescue Module). This is just a file that when combined with System Rescue CD, gives you ZFS functionality.&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/3.1.2/systemrescuecd-x86-3.1.2.iso/download Download System Rescue CD 3.1.2]&lt;br /&gt;
&lt;br /&gt;
[http://jonathanvasquez.com/files/sysresccd/ Download the ZFS System Rescue Module]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: SystemRescueCd-x86-3.1.2 (350 MiB)&lt;br /&gt;
Release Date: 2012-12-05&lt;br /&gt;
&lt;br /&gt;
md5sum 3c1ddfe5f26bb2f979a2ed9dfb504ee3&lt;br /&gt;
sha1sum 217cf7a81380d894b2433c59451787c16bc0af2f&lt;br /&gt;
sha256sum ec0a995875e64ff9816a043737e5cbbb689b7f596b48679116f0a779f3dce673&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you place the ISO on your USB flash drive, extract the modules from the tarball, and place the .srm and .md5 at the root of your USB filesystem. Further instructions can be found [[Creating_System_Rescue_CD_Modules#Using_the_prebuilt_srm|here]]. &lt;br /&gt;
&lt;br /&gt;
We will now start to partition the system. Open up a terminal, and type in the following (We will assume it's a fresh drive for simplicity).&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
&lt;br /&gt;
We will be creating two partitions, /boot, and the remaining disk space will be for ZFS.&lt;br /&gt;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
=== fdisk (MBR Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code (type L to list codes): ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x3e954df7&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== gdisk (GPT Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary. The below instructions continue as if you did not create this partition and assumes you are using extlinux as the bootloader.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf01 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
Disk /dev/sda: 1953525168 sectors, 931.5 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): C0C1E56A-B24F-492F-95DB-2E227676F228&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 1953525134&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048      1953525134   931.3 GiB   BF01  Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you followed the GPT partitioning instructions, you should change /dev/sda2 to /dev/sda3.}}&lt;br /&gt;
&lt;br /&gt;
{{fancynote|If you have a previous pool that you would like to import, you can do a: '''zpool import -R /mnt/funtoo &amp;lt;pool_name&amp;gt;'''}}&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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: /home, /var, /usr/src, and /usr/portage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional, but recommended datasets: /home, /root &lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&lt;br /&gt;
Optional datasets: /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating a separate portage dataset (optional) ====&lt;br /&gt;
&lt;br /&gt;
Creating a separate portage dataset could be useful if you would like to keep your portage tree, distfiles (source code files), and packages (your compiled binaries if you have FEATURES=&amp;quot;buildpkg&amp;quot; enabled) in a safe place (or if you want to back up this directory up easily).&lt;br /&gt;
&lt;br /&gt;
This requires a few extra steps because we can't just do a regular emerge --sync when we initially chroot. We will need to download a portage snapshot tarball and extract it into the directory.&lt;br /&gt;
&lt;br /&gt;
The required steps for getting and extracting the snapshot will be shown later on in the guide once you chroot into the environment. For now just create the datasets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap zvol ===&lt;br /&gt;
&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of RAM (This is kinda big though).'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap zvol ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. &lt;br /&gt;
&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /mnt/funtoo/etc/mtab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo_Linux_Installation|Download and install the Funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&lt;br /&gt;
Mount your boot drive&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&lt;br /&gt;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syncing your portage tree ===&lt;br /&gt;
&lt;br /&gt;
==== If you didn't create a separate portage dataset, then just sync your portage tree as normal. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== If you did create a separate portage dataset, let's now get the portage snapshot set up. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Change into your /usr directory&lt;br /&gt;
# ##i##cd /usr&lt;br /&gt;
&lt;br /&gt;
Download and extract the portage snapshot&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/portage-latest.tar.xz&lt;br /&gt;
# ##i##tar xf portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Change into your portage directory and checkout the funtoo branch&lt;br /&gt;
# ##i##cd portage&lt;br /&gt;
# ##i##git checkout funtoo.org&lt;br /&gt;
&lt;br /&gt;
Now sync your portage tree&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 2.6.32, 3.2.34, 3.6.9, 3.7.1.&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn&lt;br /&gt;
on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its&lt;br /&gt;
own scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&lt;br /&gt;
Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Enable the block layer ---&amp;gt;&lt;br /&gt;
IO Schedulers ---&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; Deadline I/O scheduler&lt;br /&gt;
&amp;lt; &amp;gt; CFQ I/O scheduler&lt;br /&gt;
Default I/O scheduler (No-op)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
&amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
&amp;gt;&amp;gt; [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my bliss initramfs creator. I will&lt;br /&gt;
show you both.&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
&lt;br /&gt;
Make sure you compile sys-apps/busybox with the static flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-apps/busybox static&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge -av sys-apps/busybox&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone my creator which is located at: git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into this new directory, run the script as root, and place it into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file.&lt;br /&gt;
&lt;br /&gt;
Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initrd-3.7.1-ALL.img&lt;br /&gt;
Pool root is: rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
  APPEND pool_root=rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add zfs boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1               /boot           ext4            defaults        1 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to clean up, '''set our root password''', and unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Delete the stage3/portage tarballs you downloaded earlier so they don't take up space.&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##rm stage3-latest.tar.xz&lt;br /&gt;
# ##i##rm /usr/portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Set your root password&lt;br /&gt;
# ##i##passwd&lt;br /&gt;
&amp;gt;&amp;gt; Enter your password, you won't see what you are writing (for security reasons), but it is there!&lt;br /&gt;
&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{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.'''}}&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs snapshot rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs list -t snapshot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs rollback rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recovery Environment ===&lt;br /&gt;
On ZFS it is extremely easy to create a recovery environment using an already working snapshot. So that's what we will be doing. &lt;br /&gt;
&lt;br /&gt;
Create a clone of the @install snapshot which you will use for recovery purposes. If something happens to your main install, you can boot into this clone and fix the main one. One of the differences (maybe the only difference) between a clone and a snapshot is that a clone is rewritable while a snapshot is only read-only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs clone rpool/ROOT/funtoo@install rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Add the clone to your extlinux.conf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo-recovery&lt;br /&gt;
    MENU LABEL Funtoo Recovery&lt;br /&gt;
    KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
    INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
    APPEND pool_root=rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Things to watch out for ====&lt;br /&gt;
&lt;br /&gt;
Since your recovery clone will tend to get old as you use your main system, and since &lt;br /&gt;
your recovery and other stuff are on the same pool, we don't want the new pool stuff&lt;br /&gt;
to be mounted when we launch recovery. We also don't want video drivers to be&lt;br /&gt;
conflicting.&lt;br /&gt;
&lt;br /&gt;
1. Make sure that nvidia/nouveau stuff are blacklisted.&lt;br /&gt;
2. Make sure that your /boot and /lib/modules for the kernel in your 'recovery' are&lt;br /&gt;
matching.&lt;br /&gt;
3. Disable the zfs openrc script so that nothing else gets automatically mounted.&lt;br /&gt;
Only your rootfs.&lt;br /&gt;
&lt;br /&gt;
You can do the above stuff by mounting your copy and chrooting into it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Mount the recovery clone&lt;br /&gt;
# ##i##mkdir /mnt/recovery&lt;br /&gt;
# ##i##mount -t zfs -o zfsutil rpool/ROOT/recovery /mnt/recovery&lt;br /&gt;
# ##i##cd /mnt/recovery&lt;br /&gt;
&lt;br /&gt;
Mount the kernel devices&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy zpool.cache&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache etc/zfs&lt;br /&gt;
&lt;br /&gt;
Chroot into the new environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash --login&lt;br /&gt;
&lt;br /&gt;
Disable zfs/zfs-shutdown openrc scripts&lt;br /&gt;
# ##i##rc-config delete zfs boot&lt;br /&gt;
&lt;br /&gt;
Blacklist nouveau/nvidia drivers&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nouveau&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nvidia&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting into the recovery ====&lt;br /&gt;
Just start your machine and pick the '''Funtoo Recovery''' option from the Boot Menu.&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Filesystems]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2013-01-06T15:56:08Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: shutdown is not working properly and shouldn't be used (by Ryao)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS (rootfs).&lt;br /&gt;
&lt;br /&gt;
This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
{{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'''!}}&lt;br /&gt;
&lt;br /&gt;
== Setting up your environment ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS userspace tools. We will be downloading two things, System Rescue CD 3.1.2, and the ZFS SRM (System Rescue Module). This is just a file that when combined with System Rescue CD, gives you ZFS functionality.&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/3.1.2/systemrescuecd-x86-3.1.2.iso/download Download System Rescue CD 3.1.2]&lt;br /&gt;
&lt;br /&gt;
[http://jonathanvasquez.com/files/sysresccd/ Download the ZFS System Rescue Module]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: SystemRescueCd-x86-3.1.2 (350 MiB)&lt;br /&gt;
Release Date: 2012-12-05&lt;br /&gt;
&lt;br /&gt;
md5sum 3c1ddfe5f26bb2f979a2ed9dfb504ee3&lt;br /&gt;
sha1sum 217cf7a81380d894b2433c59451787c16bc0af2f&lt;br /&gt;
sha256sum ec0a995875e64ff9816a043737e5cbbb689b7f596b48679116f0a779f3dce673&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you place the ISO on your USB flash drive, extract the modules from the tarball, and place the .srm and .md5 at the root of your USB filesystem. Further instructions can be found [[Creating_System_Rescue_CD_Modules#Using_the_prebuilt_srm|here]]. &lt;br /&gt;
&lt;br /&gt;
We will now start to partition the system. Open up a terminal, and type in the following (We will assume it's a fresh drive for simplicity).&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
&lt;br /&gt;
We will be creating two partitions, /boot, and the remaining disk space will be for ZFS.&lt;br /&gt;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
=== fdisk (MBR Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code (type L to list codes): ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x3e954df7&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== gdisk (GPT Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary. The below instructions continue as if you did not create this partition and assumes you are using extlinux as the bootloader.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf01 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
Disk /dev/sda: 1953525168 sectors, 931.5 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): C0C1E56A-B24F-492F-95DB-2E227676F228&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 1953525134&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048      1953525134   931.3 GiB   BF01  Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you followed the GPT partitioning instructions, you should change /dev/sda2 to /dev/sda3.}}&lt;br /&gt;
&lt;br /&gt;
{{fancynote|If you have a previous pool that you would like to import, you can do a: '''zpool import -R /mnt/funtoo &amp;lt;pool_name&amp;gt;'''}}&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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: /home, /var, /usr/src, and /usr/portage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional, but recommended datasets: /home, /root &lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&lt;br /&gt;
Optional datasets: /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating a separate portage dataset (optional) ====&lt;br /&gt;
&lt;br /&gt;
Creating a separate portage dataset could be useful if you would like to keep your portage tree, distfiles (source code files), and packages (your compiled binaries if you have FEATURES=&amp;quot;buildpkg&amp;quot; enabled) in a safe place (or if you want to back up this directory up easily).&lt;br /&gt;
&lt;br /&gt;
This requires a few extra steps because we can't just do a regular emerge --sync when we initially chroot. We will need to download a portage snapshot tarball and extract it into the directory.&lt;br /&gt;
&lt;br /&gt;
The required steps for getting and extracting the snapshot will be shown later on in the guide once you chroot into the environment. For now just create the datasets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap zvol ===&lt;br /&gt;
&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of RAM (This is kinda big though).'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap zvol ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. &lt;br /&gt;
&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /mnt/funtoo/etc/mtab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo_Linux_Installation|Download and install the Funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&lt;br /&gt;
Mount your boot drive&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&lt;br /&gt;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syncing your portage tree ===&lt;br /&gt;
&lt;br /&gt;
==== If you didn't create a separate portage dataset, then just sync your portage tree as normal. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== If you did create a separate portage dataset, let's now get the portage snapshot set up. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Change into your /usr directory&lt;br /&gt;
# ##i##cd /usr&lt;br /&gt;
&lt;br /&gt;
Download and extract the portage snapshot&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/portage-latest.tar.xz&lt;br /&gt;
# ##i##tar xf portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Change into your portage directory and checkout the funtoo branch&lt;br /&gt;
# ##i##cd portage&lt;br /&gt;
# ##i##git checkout funtoo.org&lt;br /&gt;
&lt;br /&gt;
Now sync your portage tree&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 2.6.32, 3.2.34, 3.6.9, 3.7.1.&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn&lt;br /&gt;
on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its&lt;br /&gt;
own scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&lt;br /&gt;
Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Enable the block layer ---&amp;gt;&lt;br /&gt;
IO Schedulers ---&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; Deadline I/O scheduler&lt;br /&gt;
&amp;lt; &amp;gt; CFQ I/O scheduler&lt;br /&gt;
Default I/O scheduler (No-op)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
&amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
&amp;gt;&amp;gt; [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my bliss initramfs creator. I will&lt;br /&gt;
show you both.&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
&lt;br /&gt;
Make sure you compile sys-apps/busybox with the static flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-apps/busybox static&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge -av sys-apps/busybox&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone my creator which is located at: git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into this new directory, run the script as root, and place it into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file.&lt;br /&gt;
&lt;br /&gt;
Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initrd-3.7.1-ALL.img&lt;br /&gt;
Pool root is: rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
  APPEND pool_root=rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add zfs boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1               /boot           ext4            defaults        1 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to clean up, '''set our root password''', and unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Delete the stage3/portage tarballs you downloaded earlier so they don't take up space.&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##rm stage3-latest.tar.xz&lt;br /&gt;
# ##i##rm /usr/portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Set your root password&lt;br /&gt;
# ##i##passwd&lt;br /&gt;
&amp;gt;&amp;gt; Enter your password, you won't see what you are writing (for security reasons), but it is there!&lt;br /&gt;
&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{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.'''}}&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs snapshot rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs list -t snapshot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs rollback rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recovery Environment ===&lt;br /&gt;
On ZFS it is extremely easy to create a recovery environment using an already working snapshot. So that's what we will be doing. &lt;br /&gt;
&lt;br /&gt;
Create a clone of the @install snapshot which you will use for recovery purposes. If something happens to your main install, you can boot into this clone and fix the main one. One of the differences (maybe the only difference) between a clone and a snapshot is that a clone is rewritable while a snapshot is only read-only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs clone rpool/ROOT/funtoo@install rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Add the clone to your extlinux.conf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo-recovery&lt;br /&gt;
    MENU LABEL Funtoo Recovery&lt;br /&gt;
    KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
    INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
    APPEND pool_root=rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Things to watch out for ====&lt;br /&gt;
&lt;br /&gt;
Since your recovery clone will tend to get old as you use your main system, and since &lt;br /&gt;
your recovery and other stuff are on the same pool, we don't want the new pool stuff&lt;br /&gt;
to be mounted when we launch recovery. We also don't want video drivers to be&lt;br /&gt;
conflicting.&lt;br /&gt;
&lt;br /&gt;
1. Make sure that nvidia/nouveau stuff are blacklisted.&lt;br /&gt;
2. Make sure that your /boot and /lib/modules for the kernel in your 'recovery' are&lt;br /&gt;
matching.&lt;br /&gt;
3. Disable the zfs openrc script so that nothing else gets automatically mounted.&lt;br /&gt;
Only your rootfs.&lt;br /&gt;
&lt;br /&gt;
You can do the above stuff by mounting your copy and chrooting into it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Mount the recovery clone&lt;br /&gt;
# ##i##mkdir /mnt/recovery&lt;br /&gt;
# ##i##mount -t zfs -o zfsutil rpool/ROOT/recovery /mnt/recovery&lt;br /&gt;
# ##i##cd /mnt/recovery&lt;br /&gt;
&lt;br /&gt;
Mount the kernel devices&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy zpool.cache&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache etc/zfs&lt;br /&gt;
&lt;br /&gt;
Chroot into the new environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash --login&lt;br /&gt;
&lt;br /&gt;
Disable zfs/zfs-shutdown openrc scripts&lt;br /&gt;
# ##i##rc-config delete zfs boot&lt;br /&gt;
# ##i##rc-config delete zfs-shutdown shutdown&lt;br /&gt;
&lt;br /&gt;
Blacklist nouveau/nvidia drivers&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nouveau&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nvidia&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting into the recovery ====&lt;br /&gt;
Just start your machine and pick the '''Funtoo Recovery''' option from the Boot Menu.&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Filesystems]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2013-01-05T05:06:47Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS (rootfs).&lt;br /&gt;
&lt;br /&gt;
This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
{{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'''!}}&lt;br /&gt;
&lt;br /&gt;
== Setting up your environment ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS userspace tools. We will be downloading two things, System Rescue CD 3.1.2, and the ZFS SRM (System Rescue Module). This is just a file that when combined with System Rescue CD, gives you ZFS functionality.&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/3.1.2/systemrescuecd-x86-3.1.2.iso/download Download System Rescue CD 3.1.2]&lt;br /&gt;
&lt;br /&gt;
[http://jonathanvasquez.com/files/sysresccd/ Download the ZFS System Rescue Module]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: SystemRescueCd-x86-3.1.2 (350 MiB)&lt;br /&gt;
Release Date: 2012-12-05&lt;br /&gt;
&lt;br /&gt;
md5sum 3c1ddfe5f26bb2f979a2ed9dfb504ee3&lt;br /&gt;
sha1sum 217cf7a81380d894b2433c59451787c16bc0af2f&lt;br /&gt;
sha256sum ec0a995875e64ff9816a043737e5cbbb689b7f596b48679116f0a779f3dce673&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you place the ISO on your USB flash drive, extract the modules from the tarball, and place the .srm and .md5 at the root of your USB filesystem. Further instructions can be found [[Creating_System_Rescue_CD_Modules#Using_the_prebuilt_srm|here]]. &lt;br /&gt;
&lt;br /&gt;
We will now start to partition the system. Open up a terminal, and type in the following (We will assume it's a fresh drive for simplicity).&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
&lt;br /&gt;
We will be creating two partitions, /boot, and the remaining disk space will be for ZFS.&lt;br /&gt;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
=== fdisk (MBR Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code (type L to list codes): ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x3e954df7&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== gdisk (GPT Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary. The below instructions continue as if you did not create this partition and assumes you are using extlinux as the bootloader.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf01 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
Disk /dev/sda: 1953525168 sectors, 931.5 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): C0C1E56A-B24F-492F-95DB-2E227676F228&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 1953525134&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048      1953525134   931.3 GiB   BF01  Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|If you have a previous pool that you would like to import, you can do a: '''zpool import -R /mnt/funtoo &amp;lt;pool_name&amp;gt;'''}}&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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: /home, /var, /usr/src, and /usr/portage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional, but recommended datasets: /home, /root &lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&lt;br /&gt;
Optional datasets: /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating a separate portage dataset (optional) ====&lt;br /&gt;
&lt;br /&gt;
Creating a separate portage dataset could be useful if you would like to keep your portage tree, distfiles (source code files), and packages (your compiled binaries if you have FEATURES=&amp;quot;buildpkg&amp;quot; enabled) in a safe place (or if you want to back up this directory up easily).&lt;br /&gt;
&lt;br /&gt;
This requires a few extra steps because we can't just do a regular emerge --sync when we initially chroot. We will need to download a portage snapshot tarball and extract it into the directory.&lt;br /&gt;
&lt;br /&gt;
The required steps for getting and extracting the snapshot will be shown later on in the guide once you chroot into the environment. For now just create the datasets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap dataset ===&lt;br /&gt;
&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of RAM (This is kinda big though).'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap dataset ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. &lt;br /&gt;
&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /mnt/funtoo/etc/mtab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo_Linux_Installation|Download and install the Funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&lt;br /&gt;
Mount your boot drive&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&lt;br /&gt;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syncing your portage tree ===&lt;br /&gt;
&lt;br /&gt;
==== If you didn't create a separate portage dataset, then just sync your portage tree as normal. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== If you did create a separate portage dataset, let's now get the portage snapshot set up. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Change into your /usr directory&lt;br /&gt;
# ##i##cd /usr&lt;br /&gt;
&lt;br /&gt;
Download and extract the portage snapshot&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/portage-latest.tar.xz&lt;br /&gt;
# ##i##tar xf portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Change into your portage directory and checkout the funtoo branch&lt;br /&gt;
# ##i##cd portage&lt;br /&gt;
# ##i##git checkout funtoo.org&lt;br /&gt;
&lt;br /&gt;
Now sync your portage tree&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 2.6.32, 3.2.34, 3.6.9, 3.7.1.&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn&lt;br /&gt;
on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its&lt;br /&gt;
own scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&lt;br /&gt;
Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Enable the block layer ---&amp;gt;&lt;br /&gt;
IO Schedulers ---&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; Deadline I/O scheduler&lt;br /&gt;
&amp;lt; &amp;gt; CFQ I/O scheduler&lt;br /&gt;
Default I/O scheduler (No-op)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
&amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
&amp;gt;&amp;gt; [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my bliss initramfs creator. I will&lt;br /&gt;
show you both.&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
&lt;br /&gt;
Make sure you compile sys-apps/busybox with the static flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-apps/busybox static&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge -av sys-apps/busybox&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone my creator which is located at: git://github.com/fearedbliss/Bliss-Initramfs-Creator.github&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into this new directory, run the script as root, and place it into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file.&lt;br /&gt;
&lt;br /&gt;
Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initrd-3.7.1-ALL.img&lt;br /&gt;
Pool root is: rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
  APPEND pool_root=rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add zfs boot&lt;br /&gt;
# ##i##rc-update add zfs-shutdown shutdown&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1               /boot           ext4            defaults        1 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to clean up, '''set our root password''', and unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Delete the stage3/portage tarballs you downloaded earlier so they don't take up space.&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##rm stage3-latest.tar.xz&lt;br /&gt;
# ##i##rm /usr/portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Set your root password&lt;br /&gt;
# ##i##passwd&lt;br /&gt;
&amp;gt;&amp;gt; Enter your password, you won't see what you are writing (for security reasons), but it is there!&lt;br /&gt;
&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{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.'''}}&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs snapshot rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs list -t snapshot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs rollback rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Recovery Environment ===&lt;br /&gt;
On ZFS it is extremely easy to create a recovery environment using an already working snapshot. So that's what we will be doing. &lt;br /&gt;
&lt;br /&gt;
Create a clone of the @install snapshot which you will use for recovery purposes. If something happens to your main install, you can boot into this clone and fix the main one. One of the differences (maybe the only difference) between a clone and a snapshot is that a clone is rewritable while a snapshot is only read-only.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs clone rpool/ROOT/funtoo@install rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Add the clone to your extlinux.conf ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo-recovery&lt;br /&gt;
    MENU LABEL Funtoo Recovery&lt;br /&gt;
    KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
    INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
    APPEND pool_root=rpool/ROOT/recovery&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Things to watch out for ====&lt;br /&gt;
&lt;br /&gt;
Since your recovery clone will tend to get old as you use your main system, and since &lt;br /&gt;
your recovery and other stuff are on the same pool, we don't want the new pool stuff&lt;br /&gt;
to be mounted when we launch recovery. We also don't want video drivers to be&lt;br /&gt;
conflicting.&lt;br /&gt;
&lt;br /&gt;
1. Make sure that nvidia/nouveau stuff are blacklisted.&lt;br /&gt;
2. Make sure that your /boot and /lib/modules for the kernel in your 'recovery' are&lt;br /&gt;
matching.&lt;br /&gt;
3. Disable the zfs openrc script so that nothing else gets automatically mounted.&lt;br /&gt;
Only your rootfs.&lt;br /&gt;
&lt;br /&gt;
You can do the above stuff by mounting your copy and chrooting into it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Mount the recovery clone&lt;br /&gt;
# ##i##mkdir /mnt/recovery&lt;br /&gt;
# ##i##mount -t zfs -o zfsutil rpool/ROOT/recovery /mnt/recovery&lt;br /&gt;
# ##i##cd /mnt/recovery&lt;br /&gt;
&lt;br /&gt;
Mount the kernel devices&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy zpool.cache&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache etc/zfs&lt;br /&gt;
&lt;br /&gt;
Chroot into the new environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash --login&lt;br /&gt;
&lt;br /&gt;
Disable zfs/zfs-shutdown openrc scripts&lt;br /&gt;
# ##i##rc-config delete zfs boot&lt;br /&gt;
# ##i##rc-config delete zfs-shutdown shutdown&lt;br /&gt;
&lt;br /&gt;
Blacklist nouveau/nvidia drivers&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nouveau&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
# ##i##echo &amp;quot;blacklist nvidia&amp;quot; &amp;gt;&amp;gt; /etc/modprobe.d/blacklist.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Getting into the recovery ====&lt;br /&gt;
Just start your machine and pick the '''Funtoo Recovery''' option from the Boot Menu.&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Localpatch</id>
		<title>Localpatch</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Localpatch"/>
				<updated>2013-01-03T00:43:45Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Fancynote|This is just workprint. Feel free to contribute.}}&lt;br /&gt;
{{fancyimportant|'''Localpatch feature is severely outdated and removed from portage, use foobashrc ebuild'''!}}&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
localpatch is no longer part of portage. You need to install foobashrc: &lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge app-portage/foobashrc&amp;lt;/console&amp;gt;&lt;br /&gt;
This will install the script foobashrc.bashrc at /etc/portage/. It is intended to be used in the emerge process through /etc/portage/bashrc (see [http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&amp;amp;chap=6#doc_chap3 Hooking In the Emerge Process (Gentoo Manual)]). If you do not have your own bashrc yet, you can just link it to foobashrc.bashrc:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##ln -s /etc/portage/foobashrc.bashrc /etc/portage/bashrc&amp;lt;/console&amp;gt;&lt;br /&gt;
To complete the installation you need to add &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foobashrc_modules = &amp;quot;localpatch&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to your make.conf. By un-/commenting this line you can easily activate/deactivate localepatch.&lt;br /&gt;
== How it works ==&lt;br /&gt;
&lt;br /&gt;
By default, localpatch will look into /etc/portage/localpatches in order to search for patches. This can be changed by setting LOCALPATCH_OVERLAY variable within make.conf.&lt;br /&gt;
&lt;br /&gt;
The actual patches for a package are placed in subdirectories with one of the following naming shemata:&lt;br /&gt;
# ${CATEGORY}/${PN}-${PV}-${PR} - example 'app-foo/bar-1.0-r1'&lt;br /&gt;
# ${CATEGORY}/${PN}-${PV} - example 'app-foo/bar-1.0'&lt;br /&gt;
# ${CATEGORY}/${PN} - example 'app-foo/bar'&lt;br /&gt;
Only the patches within the first matching shema are used and are applied within numerical order.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Localpatch_(Tutorial)]]&amp;lt;br /&amp;gt;&lt;br /&gt;
http://forums.funtoo.org/viewtopic.php?id=193&lt;br /&gt;
&lt;br /&gt;
[[Category:Projects]]&lt;br /&gt;
[[Category:Portage]]&lt;br /&gt;
[[Category:Labs]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Talk:Welcome</id>
		<title>Talk:Welcome</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Talk:Welcome"/>
				<updated>2013-01-02T16:03:56Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by Engly22 (talk) to last revision by 120.85.194.203&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello. And Bye.&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2013-01-01T13:23:08Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Kernel Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS (rootfs).&lt;br /&gt;
&lt;br /&gt;
This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
{{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'''!}}&lt;br /&gt;
&lt;br /&gt;
== Setting up your environment ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS userspace tools. We will be downloading two things, System Rescue CD 3.1.2, and the zfs srm (System Rescue Module). This is just a file that when combined with System Rescue CD, gives you ZFS functionality.&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/3.1.2/systemrescuecd-x86-3.1.2.iso/download Download System Rescue CD 3.1.2]&lt;br /&gt;
&lt;br /&gt;
[http://jonathanvasquez.com/files/sysresccd/ Download the ZFS System Rescue Module]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: SystemRescueCd-x86-3.1.2 (350 MiB)&lt;br /&gt;
Release Date: 2012-12-05&lt;br /&gt;
&lt;br /&gt;
md5sum 3c1ddfe5f26bb2f979a2ed9dfb504ee3&lt;br /&gt;
sha1sum 217cf7a81380d894b2433c59451787c16bc0af2f&lt;br /&gt;
sha256sum ec0a995875e64ff9816a043737e5cbbb689b7f596b48679116f0a779f3dce673&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you place the iso on your usb flash drive, extract the modules from the tarball, and place the .srm and .md5 at the root of your usb. Further instructions can be found [[Creating_System_Rescue_CD_Modules#Using_the_prebuilt_srm|here]]. &lt;br /&gt;
&lt;br /&gt;
We will now start to partition the system. Open up a terminal, and type in the following (We will assume it's a fresh drive for simplicity).&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
&lt;br /&gt;
We will be creating two partitions, /boot, and the remaining disk space will be for ZFS.&lt;br /&gt;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
=== fdisk (MBR Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code (type L to list codes): ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x3e954df7&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== gdisk (GPT Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary. The below instructions continue as if you did not create this partition and assumes you are using extlinux as the bootloader.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf01 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
Disk /dev/sda: 1953525168 sectors, 931.5 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): C0C1E56A-B24F-492F-95DB-2E227676F228&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 1953525134&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048      1953525134   931.3 GiB   BF01  Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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: /home, /var, /usr/src, and /usr/portage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional, but recommended datasets: /home, /root &lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&lt;br /&gt;
Optional datasets: /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Creating a separate portage dataset (optional) ====&lt;br /&gt;
&lt;br /&gt;
Creating a separate portage dataset could be useful if you would like to keep your portage tree, distfiles (source code files), and packages (your compiled binaries if you have FEATURES=&amp;quot;buildpkg&amp;quot; enabled) in a safe place (or if you want to back up this directory up easily).&lt;br /&gt;
&lt;br /&gt;
This requires a few extra steps because we can't just do a regular emerge --sync when we initially chroot. We will need to download a portage snapshot tarball and extract it into the directory.&lt;br /&gt;
&lt;br /&gt;
The required steps for getting and extracting the snapshot will be shown later on in the guide once you chroot into the environment. For now just create the datasets:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap dataset ===&lt;br /&gt;
&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of RAM (This is kinda big though).'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap dataset ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. &lt;br /&gt;
&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /mnt/funtoo/etc/mtab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo_Linux_Installation|Download and install the Funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&lt;br /&gt;
Mount your boot drive&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&lt;br /&gt;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syncing your portage tree ===&lt;br /&gt;
&lt;br /&gt;
==== If you didn't create a separate portage dataset, then just sync your portage tree as normal. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== If you did create a separate portage dataset, let's now get the portage snapshot set up. ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Change into your /usr directory&lt;br /&gt;
# ##i##cd /usr&lt;br /&gt;
&lt;br /&gt;
Download and extract the portage snapshot&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/portage-latest.tar.xz&lt;br /&gt;
# ##i##tar xf portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Change into your portage directory and checkout the funtoo branch&lt;br /&gt;
# ##i##cd portage&lt;br /&gt;
# ##i##git checkout funtoo.org&lt;br /&gt;
&lt;br /&gt;
Now sync your portage tree&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 2.6.32, 3.2.34, 3.6.9, 3.7.1.&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn&lt;br /&gt;
on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its&lt;br /&gt;
own scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&lt;br /&gt;
Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Enable the block layer ---&amp;gt;&lt;br /&gt;
IO Schedulers ---&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; Deadline I/O scheduler&lt;br /&gt;
&amp;lt; &amp;gt; CFQ I/O scheduler&lt;br /&gt;
Default I/O scheduler (No-op)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
&amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
&amp;gt;&amp;gt; [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av spl zfs zfs-kmod&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be&lt;br /&gt;
displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my zfs initramfs creator. I will&lt;br /&gt;
show you both.&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
&lt;br /&gt;
Make sure you compile sys-apps/busybox with the static flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-apps/busybox static&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge -av sys-apps/busybox&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone my creator which is located at: git://github.com/fearedbliss/Bliss-Initramfs-Creator.github&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into this new directory, run the script as root, and place it into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file.&lt;br /&gt;
&lt;br /&gt;
Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initrd-3.7.1-ALL.img&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
  APPEND pool_name=rpool&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add zfs boot&lt;br /&gt;
# ##i##rc-update add zfs-shutdown shutdown&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1               /boot           ext4            defaults        1 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to clean up and unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Delete the stage3/portage tarballs you downloaded earlier so they don't take up space.&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##rm stage3-latest.tar.xz&lt;br /&gt;
# ##i##rm /usr/portage-latest.tar.xz&lt;br /&gt;
&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs snapshot rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs list -t snapshot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs rollback rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2012-12-30T08:35:55Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Create the zfs datasets */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS (rootfs).&lt;br /&gt;
&lt;br /&gt;
This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
== Setting up your environment ==&lt;br /&gt;
In order for us to install Funtoo on ZFS, you will need an environment that provides the ZFS userspace tools. We will be downloading two things, System Rescue CD 3.1.2, and the zfs srm (System Rescue Module). This is just a file that when combined with System Rescue CD, gives you ZFS functionality.&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/projects/systemrescuecd/files/sysresccd-x86/3.1.2/systemrescuecd-x86-3.1.2.iso/download Download System Rescue CD 3.1.2]&lt;br /&gt;
&lt;br /&gt;
[http://jonathanvasquez.com/files/sysresccd/3.1.2/zfs-3.2.34-std312-amd64.tar.bz2 Download the ZFS System Rescue Module]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: SystemRescueCd-x86-3.1.2 (350 MiB)&lt;br /&gt;
Release Date: 2012-12-05&lt;br /&gt;
&lt;br /&gt;
md5sum 3c1ddfe5f26bb2f979a2ed9dfb504ee3&lt;br /&gt;
sha1sum 217cf7a81380d894b2433c59451787c16bc0af2f&lt;br /&gt;
sha256sum ec0a995875e64ff9816a043737e5cbbb689b7f596b48679116f0a779f3dce673&lt;br /&gt;
&lt;br /&gt;
Name: zfs-3.2.34-std312-amd64.tar.bz2&lt;br /&gt;
md5sum 448d3eb40eb0c253962baa423a072103&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you place the iso on your usb flash drive, extract the modules from the tarball, and place the .srm and .md5 at the root of your usb. Further instructions can be found [[Creating_System_Rescue_CD_Modules#Using_the_prebuilt_srm|here]]. &lt;br /&gt;
&lt;br /&gt;
We will now start to partition the system. Open up a terminal, and type in the following (We will assume it's a fresh drive for simplicity).&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
&lt;br /&gt;
We will be creating two partitions, /boot, and the remaining disk space will be for ZFS.&lt;br /&gt;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
=== fdisk (MBR Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##t ↵&lt;br /&gt;
Partition number: ##i##2 ↵&lt;br /&gt;
Hex code (type L to list codes): ##i##bf ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x3e954df7&lt;br /&gt;
&lt;br /&gt;
   Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048  1953525167   976505560   bf  Solaris&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== gdisk (GPT Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|Only make the above BIOS Boot Partition if you are using GRUB 2 on GPT. If you are using the extlinux bootloader, this partition is not necessary. The below instructions continue as if you did not create this partition and assumes you are using extlinux as the bootloader.}}&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf01 ↵&lt;br /&gt;
&lt;br /&gt;
Command: ##i##p ↵&lt;br /&gt;
Disk /dev/sda: 1953525168 sectors, 931.5 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): C0C1E56A-B24F-492F-95DB-2E227676F228&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 1953525134&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048      1953525134   931.3 GiB   BF01  Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -O compression=on -m none -R /mnt/funtoo rpool /dev/sda2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
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 (/), /home, /var, /usr/portage, /usr/src, and your swap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Create some empty containers for organization purposes, and make the dataset that will hold /&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&lt;br /&gt;
Optional datasets. /usr/portage, /usr/src, /var&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/FUNTOO&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage -o compression=off rpool/FUNTOO/portage&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/portage/distfiles -o compression=off rpool/FUNTOO/distfiles&lt;br /&gt;
# ##i##zfs create -o mountpoint=/usr/src rpool/FUNTOO/src&lt;br /&gt;
# ##i##zfs create -o mountpoint=/var rpool/FUNTOO/var&lt;br /&gt;
&lt;br /&gt;
Optional but recommended dataset for /home&lt;br /&gt;
# ##i##zfs create -o mountpoint=/home rpool/HOME&lt;br /&gt;
# ##i##zfs create -o mountpoint=/root rpool/HOME/root&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create your swap dataset ===&lt;br /&gt;
&lt;br /&gt;
'''Make your swap +1G greater than your RAM. An 8G machine would have 9G of RAM (This is kinda big though).'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o sync=always -o primarycache=metadata -o secondarycache=none -V 9G rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap dataset ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/zvol/rpool/swap&lt;br /&gt;
# ##i##swapon /dev/zvol/rpool/swap&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. &lt;br /&gt;
&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /mnt/funtoo/etc/mtab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
&lt;br /&gt;
Make a directory for your boot partition and mount it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything is currently mounted in /mnt/funtoo. &lt;br /&gt;
[[Funtoo_Linux_Installation|So download and install the funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally sync your portage tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 3.2.34, 3.7.1.&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn&lt;br /&gt;
on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its&lt;br /&gt;
own scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&lt;br /&gt;
Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ZLIB_INFLATE/DEFLATE must be compiled into the kernel (not as a module).&lt;br /&gt;
&amp;gt; ZLIB_INFLATE [=y], ZLIB_DEFLATE [=y]&lt;br /&gt;
&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
&amp;gt; [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&amp;gt; () Initramfs source file(s)&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Enable the block layer ---&amp;gt;&lt;br /&gt;
IO Schedulers ---&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; Deadline I/O scheduler&lt;br /&gt;
&amp;lt; &amp;gt; CFQ I/O scheduler&lt;br /&gt;
Default I/O scheduler (No-op)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
&amp;gt; Generic Driver Options ---&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; [*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
&amp;gt;&amp;gt; [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&lt;br /&gt;
* All other drivers required to see your PATA/SATA drives must be compiled in.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av =sys-kernel/spl =sys-fs/zfs =sys-fs/zfs-kmod&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be&lt;br /&gt;
displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my zfs initramfs creator. I will&lt;br /&gt;
show you both.&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
&lt;br /&gt;
Make sure that you have cpio installed (Funtoo has this by default)&lt;br /&gt;
Make sure you compile sys-apps/busybox with the static flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-apps/busybox static&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge -av sys-apps/busybox&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone my creator which is located at: git://github.com/fearedbliss/Bliss-Initramfs-Creator.github&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into this new directory, run the script as root, and place it into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-&amp;lt;kernel_name&amp;gt;.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;kernel_name&amp;gt;''' is the name of what you selected in the initramfs creator, and the name of the outputted file.&lt;br /&gt;
&lt;br /&gt;
Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initrd-3.7.1-ALL.img&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initrd-3.7.1-ALL.img&lt;br /&gt;
  APPEND pool_name=rpool&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add zfs boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1               /boot           ext4            defaults        1 2&lt;br /&gt;
/dev/zvol/rpool/swap    none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean up and reboot ===&lt;br /&gt;
We are almost done, we are just going to unmount whatever we mounted and get out.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Get out of the chroot environment&lt;br /&gt;
# ##i##exit&lt;br /&gt;
&lt;br /&gt;
Unmount all the kernel filesystem stuff and boot&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##umount proc dev sys boot&lt;br /&gt;
&lt;br /&gt;
Turn off the swap&lt;br /&gt;
# ##i##swapoff /dev/zvol/rpool/swap&lt;br /&gt;
&lt;br /&gt;
Export the zpool&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##zpool export -f rpool&lt;br /&gt;
&lt;br /&gt;
Reboot&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and that should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs snapshot rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs list -t snapshot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs rollback rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2012-12-27T15:28:01Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS. In order for us to install Funtoo on ZFS,&lt;br /&gt;
you will need an environment that provides the ZFS userspace tools. System Rescue CD 2.5.1 had the ZFS&lt;br /&gt;
tools but they were removed. Thus we will be using the Gentoo Live DVD 12/12/2012 - End of the World Edition.&lt;br /&gt;
This Live DVD does not have `gptfdisk`. So if you need that application to create GPT partitions, you will&lt;br /&gt;
need to emerge it.&lt;br /&gt;
&lt;br /&gt;
This tutorial is meant to be an &amp;quot;overlay&amp;quot; over the [[Funtoo_Linux_Installation|Regular Funtoo Installation]]. Follow the normal installation and only use this guide for steps 2, 3, and 8.&lt;br /&gt;
&lt;br /&gt;
[http://ftp.snt.utwente.nl/pub/os/linux/gentoo/releases/amd64/20121221/ Download the Gentoo LiveDVD]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# MD5 HASH&lt;br /&gt;
e86da868be423283ec167725390faefc  livedvd-amd64-multilib-20121221.iso&lt;br /&gt;
afbbcfc4c440ef5857a9144ab1e18251  livedvd-amd64-multilib-20121221.iso.CONTENTS&lt;br /&gt;
26cde567e977ef1f4645f2f33dbad39b  livedvd-amd64-multilib-20121221.iso.CONTENTS-squashfs.gz&lt;br /&gt;
38f0954203934175f751fe15ab80891c  livedvd-amd64-multilib-20121221.iso.CREDITS&lt;br /&gt;
8becbfcecaa8423eaa196b544be9fa5a  livedvd-amd64-multilib-20121221.iso.PACKAGES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you burn the DVD and boot it, we will start to partition the system. Open up a terminal, and type&lt;br /&gt;
in the following (We will assume it's a fresh drive for simplicity).&lt;br /&gt;
&lt;br /&gt;
== Creating partitions ==&lt;br /&gt;
&lt;br /&gt;
We will be creating two partitions, /boot, and the remaining disk space will be for ZFS.&lt;br /&gt;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
=== fdisk (MBR Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command (m for help): ##i##n&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (swap):&lt;br /&gt;
&lt;br /&gt;
Make this partition twice the amount of RAM you have.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command (m for help): ##i##n&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G&lt;br /&gt;
&lt;br /&gt;
Command (m for help): ##i##t&lt;br /&gt;
Partition number (1-4): ##i##2&lt;br /&gt;
Hex code (type L to list codes): ##i##82&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command (m for help): ##i##n&lt;br /&gt;
Partition type: ##i##↵&lt;br /&gt;
Partition number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
&lt;br /&gt;
Command (m for help): ##i##t&lt;br /&gt;
Partition number (1-4): ##i##3&lt;br /&gt;
Hex code (type L to list codes): ##i##bf&lt;br /&gt;
&lt;br /&gt;
Command (m for help): ##i##p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes&lt;br /&gt;
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x390225b5&lt;br /&gt;
&lt;br /&gt;
Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
&lt;br /&gt;
/dev/sda1            2048      514047      256000   83  Linux&lt;br /&gt;
/dev/sda2          514048     8902655     4194304   82  Linux swap / Solaris&lt;br /&gt;
/dev/sda3         8902656  1953525167   972311256   bf  Solaris&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== gdisk (GPT Style) ===&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+250M&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G&lt;br /&gt;
Hex Code: ##i##8200&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (ZFS):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n&lt;br /&gt;
Partition Number: ##i##↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵&lt;br /&gt;
Hex Code: ##i##bf01&lt;br /&gt;
&lt;br /&gt;
Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 1953525168 sectors, 931.5 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): 5A4D6576-FEF4-4693-B48B-C390FF3B1077&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 1953525134&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          514047   250.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          514048         8902655   4.0 GiB     8200  Linux swap&lt;br /&gt;
   3         8902656      1953525134   927.3 GiB   BF01  Solaris /usr &amp;amp; Mac ZFS&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Format your swap partition ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkswap -f /dev/sda2&lt;br /&gt;
# ##i##swapon /dev/sda2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zpool ===&lt;br /&gt;
We will first create the pool. The pool will be named `rpool` and the disk will be aligned to 4096 (using ashift=12)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool create -f -o ashift=12 -o cachefile= -m none -R /mnt/funtoo rpool /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create the zfs datasets ===&lt;br /&gt;
We will now create some datasets. For this installation, it will just be a basic dataset that has only /. You can create more datasets depending on your needs as you become familiar with ZFS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs create -o mountpoint=none rpool/ROOT&lt;br /&gt;
# ##i##zfs create -o mountpoint=/ rpool/ROOT/funtoo&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. &lt;br /&gt;
&lt;br /&gt;
Check to make sure everything appears fine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir -p /mnt/funtoo/etc/zfs&lt;br /&gt;
# ##i##cp /etc/zfs/zpool.cache /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##touch /mnt/funtoo/etc/mtab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will continue to install funtoo.&lt;br /&gt;
&lt;br /&gt;
== Installing Funtoo ==&lt;br /&gt;
&lt;br /&gt;
Make a directory for your boot partition and mount it&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Everything is currently mounted in /mnt/funtoo. &lt;br /&gt;
[[Funtoo_Linux_Installation|So download and install the funtoo stage3 and continue installation as normal.]]&lt;br /&gt;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc ./proc&lt;br /&gt;
# ##i##mount --bind /dev ./dev&lt;br /&gt;
# ##i##mount --bind /sys ./sys&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and finally sync your portage tree&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
&lt;br /&gt;
Tested with kernel 3.7.1.&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turn&lt;br /&gt;
on No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has its&lt;br /&gt;
own scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&lt;br /&gt;
Go to your kernel config, and make sure you have the following: (there should be a /usr/src/linux symlink as well)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
General setup ---&amp;gt;&lt;br /&gt;
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support&lt;br /&gt;
&lt;br /&gt;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloading&lt;br /&gt;
&lt;br /&gt;
Enable the block layer ---&amp;gt;&lt;br /&gt;
IO Schedulers ---&amp;gt;&lt;br /&gt;
&amp;lt; &amp;gt; Deadline I/O scheduler&lt;br /&gt;
&amp;lt; &amp;gt; CFQ I/O scheduler&lt;br /&gt;
Default I/O scheduler (No-op)&lt;br /&gt;
&lt;br /&gt;
Device Drivers ---&amp;gt;&lt;br /&gt;
Generic Driver Options ---&amp;gt;&lt;br /&gt;
[*] Maintain a devtmpfs filesystem to mount at /dev&lt;br /&gt;
[*] Automount devtmpfs at /dev, after the kernel mounted the rootfs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Very important, make sure that ZLIB_DEFLATE is compiled as a module.'''&lt;br /&gt;
&lt;br /&gt;
'''ZLIB_INFLATE [=y], ZLIB_DEFLATE [=m]'''&lt;br /&gt;
&lt;br /&gt;
'''Anything required to see your hard drives should be compiled into the kernel'''&lt;br /&gt;
'''This includes all filesystem drivers etc'''&lt;br /&gt;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage modules&lt;br /&gt;
# ##i##make install&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the ZFS userspace tools ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av =sys-kernel/spl =sys-fs/zfs =sys-fs/zfs-kmod&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check to make sure that the zfs tools are working, the zpool.cache file that you copied before should be&lt;br /&gt;
displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zpool status&lt;br /&gt;
# ##i##zfs list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything worked, continue.&lt;br /&gt;
&lt;br /&gt;
== Create the initramfs ==&lt;br /&gt;
&lt;br /&gt;
There are two ways to do this, you can use genkernel, or you can use my zfs initramfs creator. I will&lt;br /&gt;
show you both.&lt;br /&gt;
&lt;br /&gt;
=== Bliss Initramfs Creator ===&lt;br /&gt;
&lt;br /&gt;
Make sure that you have cpio installed (Funtoo has this by default)&lt;br /&gt;
Make sure you compile sys-apps/busybox with the static flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##echo &amp;quot;sys-apps/busybox static&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# ##i##emerge -av sys-apps/busybox&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone my creator which is located at: git://github.com/fearedbliss/Bliss-Initramfs-Creator.github&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then go into this new directory, run the script as root, and place it into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
# ##i##mv initrd-zfs.img /boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you do this just go to your bootloader config, and add it in there.&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initrd-zfs.img&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initrd-zfs.img&lt;br /&gt;
  APPEND pool_name=rpool&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
=== genkernel ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -av sys-kernel/genkernel&lt;br /&gt;
# ##i##genkernel --zfs initramfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
kernel name is: vmlinuz-3.7.1-ALL&lt;br /&gt;
initramfs name is: initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
pool name is: rpool&lt;br /&gt;
&lt;br /&gt;
extlinux.conf:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
LABEL funtoo&lt;br /&gt;
  MENU LABEL Funtoo 3.7.1-ALL&lt;br /&gt;
  KERNEL /boot/vmlinuz-3.7.1-ALL&lt;br /&gt;
  INITRD /boot/initramfs-genkernel-x86_64-3.7.1-ALL&lt;br /&gt;
  APPEND real_root=ZFS=rpool/ROOT/funtoo dozfs=force&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Final configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Add the zfs tools to openrc ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add zfs boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Add filesystems to /etc/fstab ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;fs&amp;gt;                  &amp;lt;mountpoint&amp;gt;    &amp;lt;type&amp;gt;          &amp;lt;opts&amp;gt;          &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1               /boot           ext4            defaults        1 2&lt;br /&gt;
/dev/sda2               none            swap            sw              0 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That should be enough to get your system to boot on ZFS.&lt;br /&gt;
&lt;br /&gt;
== Extra: After reboot ==&lt;br /&gt;
&lt;br /&gt;
After you restart your machine and your inside your desktop, 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. To take the snapshot of your rootfs, type the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs snapshot rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see if your snapshot was taken, type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs list -t snapshot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine ever fails and you need to get back to this state, just type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##zfs rollback rpool/ROOT/funtoo@install&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy your new install on ZFS :)&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2012-12-24T23:45:36Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Chroot into Funtoo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources === &lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
An experimental Funtoo Linux build exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]] for notable differences regarding SPARC support.&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download and burn [http://www.sysresccd.org/ SystemRescueCd] or your preferred live media. Insert it into your disc drive, and boot from it. If using SystemRescueCd, '''be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system'''. By default, SystemRescueCd boots in 32-bit mode.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Dual-boot with Windows for BIOS systems (Windows handle GPT only on true EFI systems, whatever version it is)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
{{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.}}&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##tar xJpf stage3-latest.tar.xz&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;/etc/portage/make.conf&amp;amp;nbsp;(new&amp;amp;nbsp;location)&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;profiles&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Some useful portage settings that may help speed up intial configuration.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noatime  	         1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/portage/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file may also be found at /etc/make.conf. /etc/portage/make.conf is the new location.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
==== Profiles ====&lt;br /&gt;
&lt;br /&gt;
[[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]]:&lt;br /&gt;
&lt;br /&gt;
;arch: typically &amp;lt;tt&amp;gt;x86-32bit&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;x86-64bit&amp;lt;/tt&amp;gt;, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.&lt;br /&gt;
;build: defines whether your system is a &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;experimental&amp;lt;/tt&amp;gt; build. &amp;lt;tt&amp;gt;current&amp;lt;/tt&amp;gt; systems will have newer packages unmasked than &amp;lt;tt&amp;gt;stable&amp;lt;/tt&amp;gt; systems.&lt;br /&gt;
;flavor: defines the general type of system, such as &amp;lt;tt&amp;gt;server&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt;, and will set default USE flags appropriate for your needs.&lt;br /&gt;
;mix-ins: define various optional settings that you may be interested in enabling.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Remember that profiles can often be inherited. For example, the &amp;lt;tt&amp;gt;desktop&amp;lt;/tt&amp;gt; flavor inherits the &amp;lt;tt&amp;gt;workstation&amp;lt;/tt&amp;gt; flavor settings, which in turn inherits the &amp;lt;tt&amp;gt;X&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;audio&amp;lt;/tt&amp;gt; mix-ins. You can view this by inspecting the &amp;lt;tt&amp;gt;parent&amp;lt;/tt&amp;gt; files defined in each profile, which can be found in &amp;lt;tt&amp;gt;/usr/portage/profiles/funtoo/1.0/linux-gnu&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##cd /usr/portage/profiles/funtoo/1.0/linux-gnu/&lt;br /&gt;
(chroot) # ##i##ls&lt;br /&gt;
arch/             eapi              make.defaults     package.use/      packages.build    use.force&lt;br /&gt;
build/            flavor/           mix-ins/          package.use.mask/ parent            &lt;br /&gt;
(chroot) # ##i##cat flavor/desktop/parent &lt;br /&gt;
../workstation&lt;br /&gt;
../../mix-ins/print&lt;br /&gt;
(chroot) # ##i##cat flavor/workstation/parent &lt;br /&gt;
../core&lt;br /&gt;
../../mix-ins/X&lt;br /&gt;
../../mix-ins/audio&lt;br /&gt;
../../mix-ins/dvd&lt;br /&gt;
../../mix-ins/media&lt;br /&gt;
../../mix-ins/console-extras&lt;br /&gt;
(chroot) # &lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To view installed profiles:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding a profile is simple:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##eselect profile add 7&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
remember if you add by string; add a 'gentoo:' to the beginning of the profile name ie:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i## eselect profile add gentoo:funtoo/1.0/linux-gnu/mix-ins/console-extras&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Wi-Fi ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge linux-firmware&lt;br /&gt;
# ##i##emerge networkmanager&lt;br /&gt;
# ##i##rc-update add NetworkManager default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel so it will start when Funtoo Linux boots.&lt;br /&gt;
&lt;br /&gt;
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;addwifi&amp;lt;/tt&amp;gt; command is used to configure and connect to a WPA/WPA2 Wi-Fi network named &amp;lt;tt&amp;gt;mywifinetwork&amp;lt;/tt&amp;gt; with the password &amp;lt;tt&amp;gt;wifipassword&amp;lt;/tt&amp;gt;. This network configuration entry is stored in &amp;lt;tt&amp;gt;/etc/NetworkManager/system-connections&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
==== Desktop (Wired Ethernet) ====&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the default runlevel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you reboot, &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.&lt;br /&gt;
&lt;br /&gt;
==== Server (Static IP) ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_Install_Guide</id>
		<title>ZFS Install Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_Install_Guide"/>
				<updated>2012-12-24T23:44:25Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Created page with &amp;quot;WIP&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WIP&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Welcome</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Welcome"/>
				<updated>2012-12-04T11:24:10Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by MikeGreen (talk) to last revision by 65.204.229.11&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; width: 40%&amp;quot;&amp;gt;&lt;br /&gt;
{{#widget:Donate|blurb=Your support helps Funtoo grow! Donate Today!}}&lt;br /&gt;
{{Litecoin|blurb=Check it out: Mine litecoins for Funtoo!}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
=== Latest Commits: ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed entries=7 url=&amp;quot;https://github.com/funtoo/funtoo-overlay/commits/master.atom&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy&amp;quot;&amp;gt;&lt;br /&gt;
=== Featured Resources: ===&lt;br /&gt;
&amp;lt;DynamicPageList&amp;gt;&lt;br /&gt;
category = Featured&lt;br /&gt;
&amp;lt;/DynamicPageList&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy2&amp;quot;&amp;gt;&lt;br /&gt;
=== [[image:Feed-icon-28x28.png|link=http://forums.funtoo.org/extern.php?action=feed&amp;amp;type=atom]] Latest Forum Posts ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed entries=6 url=&amp;quot;http://forums.funtoo.org/extern.php?action=feed&amp;amp;type=atom&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boxy2&amp;quot;&amp;gt;&lt;br /&gt;
=== [[image:Feed-icon-28x28.png|link=http://feeds.feedburner.com/planet_larry]] Planet Larry ===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed type=&amp;quot;planet&amp;quot; entries=6 url=&amp;quot;http://feeds.feedburner.com/planet_larry&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
= Welcome to the Funtoo Wiki! =&lt;br /&gt;
&lt;br /&gt;
[[Funtoo Linux]] is a Linux-based operating system created by [[user:Drobbins|Daniel Robbins]], the creator and former Chief Architect of Gentoo Linux. &lt;br /&gt;
&lt;br /&gt;
Funtoo Linux is a Free software, or &amp;quot;Open Source&amp;quot; operating system. All distribution source code is freely available, and it can be used and distributed free of charge.&lt;br /&gt;
&lt;br /&gt;
== Meta-Distribution, Optimized ==&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux is also a ''meta''-distribution, which means that it is built automatically from source code and is customized with the functionality that ''you'' want it to have, and ''without'' the unnecessary features and &amp;quot;bloat&amp;quot; that you want to avoid. &lt;br /&gt;
&lt;br /&gt;
In addition, a Funtoo Linux system is [[Download|optimized for your CPU]], and we offer optimized versions for ''Intel Core i7'', ''Intel Atom'', ''AMD Opteron'', and other processors and architectures. &lt;br /&gt;
&lt;br /&gt;
These combination of factors work together to create an extremely high-performance and flexible computing platform -- a platform where ''you'' are in control, and your system performs optimally. We believe that Funtoo Linux is the most ideal expression of how operating system technology &amp;quot;should&amp;quot; work, and we continually strive to make it better.&lt;br /&gt;
&lt;br /&gt;
== The Gentoo Ecosystem ==&lt;br /&gt;
&lt;br /&gt;
Our [[Core Team]] is focused on advancing the state-of-the-art in Linux distributions by developing our own improvements to Gentoo Linux, while remaining compatible with the upstream changes from the Gentoo Linux project. &lt;br /&gt;
&lt;br /&gt;
We are committed to maintaining high-levels of compatibility and collaboration with the Gentoo Linux project, and challenge ourselves to innovate while providing new approaches that can be easily leveraged by the Gentoo Community. We appreciate the support we receive from members of the Gentoo Community and strive to contribute back to the larger [[Gentoo Ecosystem]].&lt;br /&gt;
&lt;br /&gt;
== Ultimate Flexibility for Developers ==&lt;br /&gt;
&lt;br /&gt;
Does your Linux distribution allow multiple versions of &amp;lt;tt&amp;gt;php&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[[python]]&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ruby&amp;lt;/tt&amp;gt; installed happily alongside each other? Funtoo Linux does. Are you tired of hand-building key packages from source to configure them exactly the way you want? Funtoo Linux allows you to tweak the build-time features of packages using handy things called USE variables. Other distributions are forced to either leave stuff out that you want, or include stuff you don't want.&lt;br /&gt;
&lt;br /&gt;
== Virtualization ==&lt;br /&gt;
&lt;br /&gt;
We support the [[OpenVZ]] project and build up-to-date Funtoo Linux OpenVZ containers that you can [[Download|download]]. Also see [[VagrantUp]] for a nice way to deploy VirtualBox-based Funtoo Linux systems. [[Metro]], our automated distro build tool, is capable of building OpenVZ, Linux VServer and [[Linux Containers]] (LXC) images. Funtoo Linux also makes an excellent virtualization host system for [[Xen]].&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
[[Funtoo Linux]] features native [[wikipedia:UTF-8|UTF-8]] support enabled by default, a [[wikipedia:Git (software)|git]]-based, [[Portage Tree|distributed Portage Tree]] and funtoo overlay, an enhanced [[Portage]] with more compact mini-manifest tree, automated imports of new [http://www.gentoo.org Gentoo] changes every 12 hours, [[GUID Booting Guide|GPT/GUID boot support]] and [[Boot-Update|streamlined boot configuration]], [[Funtoo Linux Networking|enhanced network configuration]], up-to-date [http://ftp.osuosl.org/pub/funtoo/funtoo-stable/ stable] and [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ current] Funtoo [[Stage Tarball|stages]], all built using Funtoo's [[Metro]] build tool. We also offer Ubuntu Server, Debian, RHEL and Fedora-based [[Funtoo Linux Kernels|kernels]].&lt;br /&gt;
&lt;br /&gt;
Funtoo is currently supported on the following processor families :&lt;br /&gt;
* PC-compatible, both 32 and 64-bit (''x86-32bit'', ''x86-64bit'')&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* Learn more about [[Funtoo Linux]].&lt;br /&gt;
* Why you should [[Choose Funtoo]]: ...and how its different than other distros.&lt;br /&gt;
* Visit [[:Category:Projects|Funtoo Linux Projects]] and also look at the stuff online for [[Metro]].&lt;br /&gt;
* Learn [[:Category:Linux Core Concepts| Core Linux concepts]] from articles originally written by Daniel Robbins.&lt;br /&gt;
&lt;br /&gt;
=== Latest Funtoo News from Twitter ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tweets&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;feed entries=8 url=&amp;quot;http://search.twitter.com/search.atom?q=from%3Afuntoo&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[{PERMALINK} &amp;lt;nowiki&amp;gt;{TITLE}&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&amp;lt;/feed&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
__NOTITLE__&lt;br /&gt;
&lt;br /&gt;
[[Category:Funtoo|*]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Feed-icon-28x28.png|link=http://bit.ly/UXJ87l|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/iWCDzp|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/UA0cBZ|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/XM0rQe|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/S0Ziyi|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/T4wd38|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/U2XEM4|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/QfQd68|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/QAPH4g|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/TkhyVx|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/WIlTnG|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/TluoBY|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/TlunxP|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/TluqK8|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/10JK6Jm|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/XM0NGl|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/WIm7Ls|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/T4wCTh|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/10JKl7t|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/TluvgP|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/TUqlJ0|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/Tb7Dhq|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/TkhKUN|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/V2Vcdb|2px]] [[image:Feed-icon-28x28.png|link=http://bit.ly/WImjua|2px]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Linux_Fundamentals,_Part_2</id>
		<title>Linux Fundamentals, Part 2</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Linux_Fundamentals,_Part_2"/>
				<updated>2012-12-04T05:33:28Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 117.240.182.23 (talk) to last revision by Big Fun&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Before You Start ==&lt;br /&gt;
&lt;br /&gt;
=== About this tutorial ===&lt;br /&gt;
Welcome to &amp;quot;Basic administration,&amp;quot; the second of four tutorials designed to prepare you for the Linux Professional Institute's 101 exam. In this tutorial, we'll show you how to use regular expressions to search files for text patterns. Next, we'll introduce you to the Filesystem Hierarchy Standard (FHS), and then show you how to locate files on your system. Then, we'll show you how to take full control of Linux processes by running them in the background, listing processes, detaching processes from the terminal, and more. Next, we'll give you a whirlwind introduction to shell pipelines, redirection, and text processing commands. Finally, we'll introduce you to Linux kernel modules.&lt;br /&gt;
&lt;br /&gt;
This particular tutorial (Part 2) is ideal for those who have a good basic knowledge of bash and want to receive a solid introduction to basic Linux administration tasks. If you are new to Linux, we recommend that you complete [[Linux Fundamentals, Part 1|Part 1]] of this tutorial series first before continuing. For some, much of this material will be new, but more experienced Linux users may find this tutorial to be a great way of &amp;quot;rounding out&amp;quot; their basic Linux administration skills.&lt;br /&gt;
&lt;br /&gt;
For those who have taken the release 1 version of this tutorial for reasons other than LPI exam preparation, you probably don't need to take this one. However, if you do plan to take the exams, you should strongly consider reading this revised tutorial.&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions ==&lt;br /&gt;
&lt;br /&gt;
=== What is a regular expression? ===&lt;br /&gt;
A regular expression (also called a &amp;quot;regex&amp;quot; or &amp;quot;regexp&amp;quot;) is a special syntax used to describe text patterns. On Linux systems, regular expressions are commonly used to find patterns of text, as well as to perform search-and-replace operations on text streams.&lt;br /&gt;
&lt;br /&gt;
=== Glob comparison ===&lt;br /&gt;
As we take a look at regular expressions, you may find that regular expression syntax looks similar to the filename &amp;quot;globbing&amp;quot; syntax that we looked at in Part 1. However, don't let this fool you; their similarity is only skin deep. Both regular expressions and filename globbing patterns, while they may look similar, are fundamentally different beasts.&lt;br /&gt;
&lt;br /&gt;
=== The simple substring ===&lt;br /&gt;
With that caution, let's take a look at the most basic of regular expressions, the simple substring. To do this, we're going to use &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;grep&amp;lt;/span&amp;gt;, a command that scans the contents of a file for a particular regular expression. &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;grep&amp;lt;/span&amp;gt; prints every line that matches the regular expression, and ignores every line that doesn't:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep bash /etc/passwd&lt;br /&gt;
operator:x:11:0:operator:/root:/bin/bash&lt;br /&gt;
root:x:0:0::/root:/bin/bash&lt;br /&gt;
ftp:x:40:1::/home/ftp:/bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Above, the first parameter to &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;grep&amp;lt;/span&amp;gt; is a regex; the second is a filename. &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;grep&amp;lt;/span&amp;gt; read each line in /etc/passwd and applied the simple substring regex bash to it, looking for a match. If a match was found, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;grep&amp;lt;/span&amp;gt; printed out the entire line; otherwise, the line was ignored.&lt;br /&gt;
&lt;br /&gt;
=== Understanding the simple substring ===&lt;br /&gt;
In general, if you are searching for a substring, you can just specify the text verbatim without supplying any &amp;quot;special&amp;quot; characters. The only time you'd need to do anything special would be if your substring contained a +, ., *, [, ], or \, in which case these characters would need to be enclosed in quotes and preceded by a backslash. Here are a few more examples of simple substring regular expressions:&lt;br /&gt;
&lt;br /&gt;
* /tmp (scans for the literal string /tmp)&lt;br /&gt;
* &amp;quot;\[box\]&amp;quot; (scans for the literal string [box])&lt;br /&gt;
* &amp;quot;\*funny\*&amp;quot; (scans for the literal string *funny*)&lt;br /&gt;
* &amp;quot;ld\.so&amp;quot; (scans for the literal string ld.so)&lt;br /&gt;
&lt;br /&gt;
=== Metacharacters ===&lt;br /&gt;
With regular expressions, you can perform much more complex searches than the examples we've looked at so far by taking advantage of metacharacters. One of these metacharacters is the . (a period), which matches any single character:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep dev.sda /etc/fstab&lt;br /&gt;
/dev/sda3       /               reiserfs        noatime,ro 1 1&lt;br /&gt;
/dev/sda1       /boot           reiserfs        noauto,noatime,notail 1 2&lt;br /&gt;
/dev/sda2       swap            swap            sw 0 0&lt;br /&gt;
#/dev/sda4      /mnt/extra      reiserfs        noatime,rw 1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, the literal text dev.sda didn't appear on any of the lines in /etc/fstab. However, grep wasn't scanning them for the literal dev.sda string, but for the dev.sda pattern. Remember that the . will match any single character. As you can see, the . metacharacter is functionally equivalent to how the ? metacharacter works in &amp;quot;glob&amp;quot; expansions.&lt;br /&gt;
&lt;br /&gt;
=== Using [] ===&lt;br /&gt;
If we wanted to match a character a bit more specifically than ., we could use [ and ] (square brackets) to specify a subset of characters that should be matched:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep dev.sda[12] /etc/fstab&lt;br /&gt;
/dev/sda1       /boot           reiserfs        noauto,noatime,notail 1 2&lt;br /&gt;
/dev/sda2       swap            swap            sw 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see, this particular syntactical feature works identically to the [] in &amp;quot;glob&amp;quot; filename expansions. Again, this is one of the tricky things about learning regular expressions -- the syntax is similar but not identical to &amp;quot;glob&amp;quot; filename expansion syntax, which often makes regexes a bit confusing to learn.&lt;br /&gt;
&lt;br /&gt;
=== Using [^] ===&lt;br /&gt;
You can reverse the meaning of the square brackets by putting a ^ immediately after the [. In this case, the brackets will match any character that is not listed inside the brackets. Again, note that we use [^] with regular expressions, but [!] with globs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep dev.sda[^12] /etc/fstab&lt;br /&gt;
/dev/sda3       /               reiserfs        noatime,ro 1 1&lt;br /&gt;
#/dev/sda4      /mnt/extra      reiserfs        noatime,rw 1 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Differing syntax ===&lt;br /&gt;
It's important to note that the syntax inside square brackets is fundamentally different from that in other parts of the regular expression. For example, if you put a . inside square brackets, it allows the square brackets to match a literal ., just like the 1 and 2 in the examples above. In comparison, a literal . outside the square brackets is interpreted as a metacharacter unless prefixed by a \. We can take advantage of this fact to print a list of all lines in '''/etc/fstab''' that contain the literal string dev.sda by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep dev[.]sda /etc/fstab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternately, we could also type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep &amp;quot;dev\.sda&amp;quot; /etc/fstab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Neither regular expression is likely to match any lines in your '''/etc/fstab''' file.&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;*&amp;quot; metacharacter ===&lt;br /&gt;
Some metacharacters don't match anything in themselves, but instead modify the meaning of a previous character. One such metacharacter is * (asterisk), which is used to match zero or more repeated occurrences of the previous character. Note that this means that the * has a different meaning in a regex than it does with globs. Here are some examples, and play close attention to instances where these regex matches differ from globs:&lt;br /&gt;
&lt;br /&gt;
* ab*c matches abbbbc but not abqc (if a glob, it would match both strings -- can you figure out why?)&lt;br /&gt;
* ab*c matches abc but not abbqbbc (again, if a glob, it would match both strings)&lt;br /&gt;
* ab*c matches ac but not cba (if a glob, ac would not be matched, nor would cba)&lt;br /&gt;
* b[cq]*e matches bqe and be (if a glob, it would match bqe but not be)&lt;br /&gt;
* b[cq]*e matches bccqqe but not bccc (if a glob, it would match the first but not the second as well)&lt;br /&gt;
* b[cq]*e matches bqqcce but not cqe (if a glob, it would match the first but not the second as well)&lt;br /&gt;
* b[cq]*e matches bbbeee (this would not be the case with a glob)&lt;br /&gt;
* .* will match any string. (if a glob, it would match any string starting with .)&lt;br /&gt;
* foo.* will match any string that begins with foo (if a glob, it would match any string starting with the four literal characters foo..)&lt;br /&gt;
&lt;br /&gt;
Now, for a quick brain-twisting review: the line ac matches the regex ab*c because the asterisk also allows the preceding expression (b) to appear zero times. Again, it's critical to note that the * regex metacharacter is interpreted in a fundamentally different way than the * glob character.&lt;br /&gt;
&lt;br /&gt;
=== Beginning and end of line ===&lt;br /&gt;
The last metacharacters we will cover in detail here are the ^ and $ metacharacters, used to match the beginning and end of line, respectively. By using a ^ at the beginning of your regex, you can cause your pattern to be &amp;quot;anchored&amp;quot; to the start of the line. In the following example, we use the ^# regex to match any line beginning with the # character:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep ^# /etc/fstab&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Full-line regexes ===&lt;br /&gt;
^ and $ can be combined to match an entire line. For example, the following regex will match a line that starts with the # character and ends with the . character, with any number of other characters in between:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ grep '^#.*\.$' /etc/fstab&lt;br /&gt;
# /etc/fstab: static file system information.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above example, we surrounded our regular expression with single quotes to prevent $ from being interpreted by the shell. Without the single quotes, the $ will disappear from our regex before grep even has a chance to take a look at it.&lt;br /&gt;
&lt;br /&gt;
== FHS and finding files ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystem Hierarchy Standard ===&lt;br /&gt;
The Filesystem Hierarchy Standard is a document that specifies the layout of directories on a Linux system. The FHS was devised to provide a common layout to simplify distribution-independent software development -- so that stuff is in generally the same place across Linux distributions. The FHS specifies the following directory tree (taken directly from the FHS specification):&lt;br /&gt;
&lt;br /&gt;
* / (the root directory)&lt;br /&gt;
* /boot (static files of the boot loader)&lt;br /&gt;
* /dev (device files)&lt;br /&gt;
* /etc (host-specific system configuration)&lt;br /&gt;
* /lib (essential shared libraries and kernel modules)&lt;br /&gt;
* /mnt (mount point for mounting a filesystem temporarily)&lt;br /&gt;
* /opt (add-on application software packages)&lt;br /&gt;
* /sbin (essential system binaries)&lt;br /&gt;
* /tmp (temporary files)&lt;br /&gt;
* /usr (secondary hierarchy)&lt;br /&gt;
* /var (variable data)&lt;br /&gt;
&lt;br /&gt;
=== The two independent FHS categories ===&lt;br /&gt;
The FHS bases its layout specification on the idea that there are two independent categories of files: shareable vs. unshareable, and variable vs. static. Shareable data can be shared between hosts; unshareable data is specific to a given host (such as configuration files). Variable data can be modified; static data is not modified (except at system installation and maintenance).&lt;br /&gt;
&lt;br /&gt;
The following grid summarizes the four possible combinations, with examples of directories that would fall into those categories. Again, this table is straight from the FHS specification:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+---------+-----------------+-------------+&lt;br /&gt;
|         | shareable       | unshareable |&lt;br /&gt;
+---------+-----------------+-------------+&lt;br /&gt;
|static   | /usr            | /etc        |&lt;br /&gt;
|         | /opt            | /boot       |&lt;br /&gt;
+---------+-----------------+-------------+&lt;br /&gt;
|variable | /var/mail       | /var/run    |&lt;br /&gt;
|         | /var/spool/news | /var/lock   |&lt;br /&gt;
+---------+-----------------+-------------+&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Secondary hierarchy at /usr ===&lt;br /&gt;
Under '''/usr''' you'll find a secondary hierarchy that looks a lot like the root filesystem. It isn't critical for '''/usr''' to exist when the machine powers up, so it can be shared on a network (shareable), or mounted from a CD-ROM (static). Most Linux setups don't make use of sharing '''/usr''', but it's valuable to understand the usefulness of distinguishing between the primary hierarchy at the root directory and the secondary hierarchy at '''/usr'''.&lt;br /&gt;
&lt;br /&gt;
This is all we'll say about the Filesystem Hierarchy Standard. The document itself is quite readable, so you should go take a look at it. You'll understand a lot more about the Linux filesystem if you read it. Find it at http://www.pathname.com/fhs/.&lt;br /&gt;
&lt;br /&gt;
=== Finding files ===&lt;br /&gt;
Linux systems often contain hundreds of thousands of files. Perhaps you are savvy enough to never lose track of any of them, but it's more likely that you will occasionally need help finding one. There are a few different tools on Linux for finding files. This introduction will help you choose the right tool for the job.&lt;br /&gt;
&lt;br /&gt;
=== The PATH ===&lt;br /&gt;
When you run a program at the command line, bash actually searches through a list of directories to find the program you requested. For example, when you type ls, bash doesn't intrinsically know that the ls program lives in '''/usr/bin'''. Instead, bash refers to an environment variable called PATH, which is a colon-separated list of directories. We can examine the value of PATH:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ echo $PATH&lt;br /&gt;
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Given this value of PATH (yours may differ,) bash would first check '''/usr/local/bin''', then '''/usr/bin''' for the ls program. Most likely, ls is kept in /usr/bin, so bash would stop at that point.&lt;br /&gt;
&lt;br /&gt;
=== Modifying PATH ===&lt;br /&gt;
You can augment your PATH by assigning to it on the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ PATH=$PATH:~/bin&lt;br /&gt;
$ echo $PATH&lt;br /&gt;
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/home/agriffis/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can also remove elements from PATH, although it isn't as easy since you can't refer to the existing $PATH. Your best bet is to simply type out the new PATH you want:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:~/bin&lt;br /&gt;
$ echo $PATH&lt;br /&gt;
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/agriffis/bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To make your PATH changes available to any future processes you start from this shell, export your changes using the export command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ export PATH&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== All about &amp;quot;which&amp;quot; ===&lt;br /&gt;
You can check to see if there's a given program in your PATH by using &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;which&amp;lt;/span&amp;gt;. For example, here we find out that our Linux system has no (common) sense:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ which sense&lt;br /&gt;
which: no sense in (/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, we successfully locate &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;ls&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ which ls&lt;br /&gt;
/usr/bin/ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;which -a&amp;quot; ===&lt;br /&gt;
Finally, you should be aware of the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-a&amp;lt;/span&amp;gt; flag, which causes &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;which&amp;lt;/span&amp;gt; to show you all of the instances of a given program in your PATH:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ which -a ls&lt;br /&gt;
/usr/bin/ls&lt;br /&gt;
/bin/ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== whereis ===&lt;br /&gt;
If you're interested in finding more information than purely the location of a program, you might try the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;whereis&amp;lt;/span&amp;gt; program:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ whereis ls&lt;br /&gt;
ls: /bin/ls /usr/bin/ls /usr/share/man/man1/ls.1.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here we see that &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;ls&amp;lt;/span&amp;gt; occurs in two common binary locations, '''/bin''' and '''/usr/bin'''. Additionally, we are informed that there is a manual page located in '''/usr/share/man'''. This is the man-page you would see if you were to type &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;man ls&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;whereis&amp;lt;/span&amp;gt; program also has the ability to search for sources, to specify alternate search paths, and to search for unusual entries. Refer to the whereis man-page for further information.&lt;br /&gt;
&lt;br /&gt;
=== find ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;find&amp;lt;/span&amp;gt; command is another handy tool for your toolbox. With find you aren't restricted to programs; you can search for any file you want, using a variety of search criteria. For example, to search for a file by the name of README, starting in '''/usr/share/doc''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /usr/share/doc -name README&lt;br /&gt;
/usr/share/doc/ion-20010523/README&lt;br /&gt;
/usr/share/doc/bind-9.1.3-r6/dhcp-dynamic-dns-examples/README&lt;br /&gt;
/usr/share/doc/sane-1.0.5/README&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== find and wildcards ===&lt;br /&gt;
You can use &amp;quot;glob&amp;quot; wildcards in the argument to -name, provided that you quote them or backslash-escape them (so they get passed to find intact rather than being expanded by bash). For example, we might want to search for README files with extensions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /usr/share/doc -name README\*&lt;br /&gt;
/usr/share/doc/iproute2-2.4.7/README.gz&lt;br /&gt;
/usr/share/doc/iproute2-2.4.7/README.iproute2+tc.gz&lt;br /&gt;
/usr/share/doc/iproute2-2.4.7/README.decnet.gz&lt;br /&gt;
/usr/share/doc/iproute2-2.4.7/examples/diffserv/README.gz&lt;br /&gt;
/usr/share/doc/pilot-link-0.9.6-r2/README.gz&lt;br /&gt;
/usr/share/doc/gnome-pilot-conduits-0.8/README.gz&lt;br /&gt;
/usr/share/doc/gimp-1.2.2/README.i18n.gz&lt;br /&gt;
/usr/share/doc/gimp-1.2.2/README.win32.gz&lt;br /&gt;
/usr/share/doc/gimp-1.2.2/README.gz&lt;br /&gt;
/usr/share/doc/gimp-1.2.2/README.perl.gz&lt;br /&gt;
[578 additional lines snipped]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ignoring case with find ===&lt;br /&gt;
Of course, you might want to ignore case in your search:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /usr/share/doc -name '[Rr][Ee][Aa][Dd][Mm][Ee]*'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or, more simply:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /usr/share/doc -iname readme\*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see, you can use &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-iname&amp;lt;/span&amp;gt; to do case-insensitive searching.&lt;br /&gt;
&lt;br /&gt;
=== find and regular expressions ===&lt;br /&gt;
If you're familiar with regular expressions, you can use the -regex option to limit the output to filenames that match a pattern. And similar to the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-iname&amp;lt;/span&amp;gt; option, there is a corresponding &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-iregex&amp;lt;/span&amp;gt; option that ignores case in the pattern. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /etc -iregex '.*xt.*'&lt;br /&gt;
/etc/X11/xkb/types/extra&lt;br /&gt;
/etc/X11/xkb/semantics/xtest&lt;br /&gt;
/etc/X11/xkb/compat/xtest&lt;br /&gt;
/etc/X11/app-defaults/XTerm&lt;br /&gt;
/etc/X11/app-defaults/XTerm-color&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that unlike many programs, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;find&amp;lt;/span&amp;gt; requires that the regex specified matches the entire path, not just a part of it. For that reason, specifying the leading and trailing .* is necessary; purely using xt as the regex would not be sufficient.&lt;br /&gt;
&lt;br /&gt;
=== find and types ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-type&amp;lt;/span&amp;gt; option allows you to find filesystem objects of a certain type. The possible arguments to -type are b (block device), c (character device), d (directory), p (named pipe), f (regular file), l (symbolic link), and s (socket). For example, to search for symbolic links in '''/usr/bin''' that contain the string vim:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /usr/bin -name '*vim*' -type l&lt;br /&gt;
/usr/bin/rvim&lt;br /&gt;
/usr/bin/vimdiff&lt;br /&gt;
/usr/bin/gvimdiff&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== find and mtimes ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-mtime&amp;lt;/span&amp;gt; option allows you to select files based on their last modification time. The argument to mtime is in terms of 24-hour periods, and is most useful when entered with either a plus sign (meaning &amp;quot;after&amp;quot;) or a minus sign (meaning &amp;quot;before&amp;quot;). For example, consider the following scenario:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -l ?&lt;br /&gt;
-rw-------    1 root     root            0 Jan  7 18:00 a&lt;br /&gt;
-rw-------    1 root     root            0 Jan  6 18:00 b&lt;br /&gt;
-rw-------    1 root     root            0 Jan  5 18:00 c&lt;br /&gt;
-rw-------    1 root     root            0 Jan  4 18:00 d&lt;br /&gt;
$ date&lt;br /&gt;
Mon Jan  7 18:14:52 EST 2003&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You could search for files that were created in the past 24 hours:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find . -name \? -mtime -1&lt;br /&gt;
./a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Or you could search for files that were created prior to the current 24-hour period:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find . -name \? -mtime +0&lt;br /&gt;
./b&lt;br /&gt;
./c&lt;br /&gt;
./d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The -daystart option ===&lt;br /&gt;
If you additionally specify the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-daystart&amp;lt;/span&amp;gt; option, then the periods of time start at the beginning of today rather than 24 hours ago. For example, here is a set of files created yesterday and the day before:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find . -name \? -daystart -mtime +0 -mtime -3&lt;br /&gt;
./b&lt;br /&gt;
./c&lt;br /&gt;
$ ls -l b c&lt;br /&gt;
-rw-------    1 root     root            0 Jan  6 18:00 b&lt;br /&gt;
-rw-------    1 root     root            0 Jan  5 18:00 c&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The -size option ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-size&amp;lt;/span&amp;gt; option allows you to find files based on their size. By default, the argument to &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-size&amp;lt;/span&amp;gt; is 512-byte blocks, but adding a suffix can make things easier. The available suffixes are b (512-byte blocks), c (bytes), k (kilobytes), and w (2-byte words). Additionally, you can prepend a plus sign (&amp;quot;larger than&amp;quot;) or minus sign (&amp;quot;smaller than&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
For example, to find regular files in '''/usr/bin''' that are smaller than 50 bytes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /usr/bin -type f -size -50c&lt;br /&gt;
/usr/bin/krdb&lt;br /&gt;
/usr/bin/run-nautilus&lt;br /&gt;
/usr/bin/sgmlwhich&lt;br /&gt;
/usr/bin/muttbug&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Processing found files ===&lt;br /&gt;
You may be wondering what you can do with all these files that you find! Well, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;find&amp;lt;/span&amp;gt; has the ability to act on the files that it finds by using the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-exec&amp;lt;/span&amp;gt; option. This option accepts a command line to execute as its argument, terminated with ;, and it replaces any occurrences of {} with the filename. This is best understood with an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ find /usr/bin -type f -size -50c -exec ls -l '{}' ';'&lt;br /&gt;
-rwxr-xr-x    1 root     root           27 Oct 28 07:13 /usr/bin/krdb&lt;br /&gt;
-rwxr-xr-x    1 root     root           35 Nov 28 18:26 /usr/bin/run-nautilus&lt;br /&gt;
-rwxr-xr-x    1 root     root           25 Oct 21 17:51 /usr/bin/sgmlwhich&lt;br /&gt;
-rwxr-xr-x    1 root     root           26 Sep 26 08:00 /usr/bin/muttbug&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;find&amp;lt;/span&amp;gt; is a very powerful command. It has grown through the years of UNIX and Linux development. There are many other useful options to find. You can learn about them in the find manual page.&lt;br /&gt;
&lt;br /&gt;
=== locate ===&lt;br /&gt;
We have covered &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;which&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;whereis&amp;lt;/span&amp;gt;, and &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;find&amp;lt;/span&amp;gt;. You might have noticed that find can take a while to execute, since it needs to read each directory that it's searching. It turns out that the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;locate&amp;lt;/span&amp;gt; command can speed things up by relying on an external database generated by &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;updatedb&amp;lt;/span&amp;gt; (which we'll cover in the next panel.)&lt;br /&gt;
&lt;br /&gt;
The locate command matches against any part of a pathname, not just the file itself. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ locate bin/ls&lt;br /&gt;
/var/ftp/bin/ls&lt;br /&gt;
/bin/ls&lt;br /&gt;
/sbin/lsmod&lt;br /&gt;
/sbin/lspci&lt;br /&gt;
/usr/bin/lsattr&lt;br /&gt;
/usr/bin/lspgpot&lt;br /&gt;
/usr/sbin/lsof&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using updatedb ===&lt;br /&gt;
Most Linux systems have a &amp;quot;cron job&amp;quot; to update the database periodically. If your &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;locate&amp;lt;/span&amp;gt; returned an error such as the following, then you will need to run &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;updatedb&amp;lt;/span&amp;gt; as root to generate the search database:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ locate bin/ls&lt;br /&gt;
locate: /var/spool/locate/locatedb: No such file or directory&lt;br /&gt;
$ su -&lt;br /&gt;
Password:&lt;br /&gt;
# updatedb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;updatedb&amp;lt;/span&amp;gt; command may take a long time to run. If you have a noisy hard disk, you will hear a lot of racket as the entire filesystem is indexed. :)&lt;br /&gt;
&lt;br /&gt;
=== slocate ===&lt;br /&gt;
On many Linux distributions, the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;locate&amp;lt;/span&amp;gt; command has been replaced by &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;slocate&amp;lt;/span&amp;gt;. There is typically a symbolic link to &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;locate&amp;lt;/span&amp;gt;, so that you don't need to remember which you have. &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;slocate&amp;lt;/span&amp;gt; stands for &amp;quot;secure locate.&amp;quot; It stores permissions information in the database so that normal users can't pry into directories they would otherwise be unable to read. The usage information for &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;slocate&amp;lt;/span&amp;gt; is essentially the same as for &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;locate&amp;lt;/span&amp;gt;, although the output might be different depending on the user running the command.&lt;br /&gt;
&lt;br /&gt;
== Process Control ==&lt;br /&gt;
&lt;br /&gt;
=== Staring xeyes ===&lt;br /&gt;
{{fancynote|You may need to install xeyes on your system first. Consult your distro's documentation for instructions on installing}}&lt;br /&gt;
&lt;br /&gt;
To learn about process control, we first need to start a process. Make sure that you have X running and execute the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xeyes -center red&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will notice that an xeyes window pops up, and the red eyeballs follow your mouse around the screen. You may also notice that you don't have a new prompt in your terminal.&lt;br /&gt;
&lt;br /&gt;
=== Stopping a process ===&lt;br /&gt;
To get a prompt back, you could type Control-C (often written as Ctrl-C or ^C):&lt;br /&gt;
&lt;br /&gt;
You get a new bash prompt, but the xeyes window disappeared. In fact, the entire process has been killed. Instead of killing it with Control-C, we could have just stopped it with Control-Z:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xeyes -center red&lt;br /&gt;
Control-Z&lt;br /&gt;
[1]+  Stopped                 xeyes -center red&lt;br /&gt;
$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This time you get a new bash prompt, and the xeyes windows stays up. If you play with it a bit, however, you will notice that the eyeballs are frozen in place. If the xeyes window gets covered by another window and then uncovered again, you will see that it doesn't even redraw the eyes at all. The process isn't doing anything. It is, in fact, &amp;quot;Stopped.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== fg and bg ===&lt;br /&gt;
To get the process &amp;quot;un-stopped&amp;quot; and running again, we can bring it to the foreground with the bash built-in &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;fg&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ fg&lt;br /&gt;
(test it out, then stop the process again)&lt;br /&gt;
Control-Z&lt;br /&gt;
[1]+  Stopped                 xeyes -center red&lt;br /&gt;
$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now continue it in the background with the bash built-in &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;bg&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bg&lt;br /&gt;
[1]+ xeyes -center red &amp;amp;&lt;br /&gt;
$&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Great! The xeyes process is now running in the background, and we have a new, working bash prompt.&lt;br /&gt;
&lt;br /&gt;
=== Using &amp;quot;&amp;amp;&amp;quot; ===&lt;br /&gt;
If we wanted to start xeyes in the background from the beginning (instead of using Control-Z and bg), we could have just added an &amp;quot;&amp;amp;&amp;quot; (ampersand) to the end of xeyes command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ xeyes -center blue &amp;amp;&lt;br /&gt;
[2] 16224&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Multiple background processes ===&lt;br /&gt;
Now we have both a red and a blue xeyes running in the background. We can list these jobs with the bash built-in &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;jobs&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ jobs -l&lt;br /&gt;
[1]- 16217 Running                 xeyes -center red &amp;amp;&lt;br /&gt;
[2]+ 16224 Running                 xeyes -center blue &amp;amp;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The numbers in the left column are the job numbers bash assigned when they were started. Job 2 has a + (plus) to indicate that it's the &amp;quot;current job,&amp;quot; which means that typing &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;fg&amp;lt;/span&amp;gt; will bring it to the foreground. You could also foreground a specific job by specifying its number; for example, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;fg 1&amp;lt;/span&amp;gt; would make the red xeyes the foreground task. The next column is the process id or pid, included in the listing courtesy of the -l option to jobs. Finally, both jobs are currently &amp;quot;Running,&amp;quot; and their command lines are listed to the right.&lt;br /&gt;
&lt;br /&gt;
=== Introducing signals ===&lt;br /&gt;
To kill, stop, or continue processes, Linux uses a special form of communication called &amp;quot;signals.&amp;quot; By sending a certain signal to a process, you can get it to terminate, stop, or do other things. This is what you're actually doing when you type Control-C, Control-Z, or use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;bg&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;fg&amp;lt;/span&amp;gt; built-ins -- you're using bash to send a particular signal to the process. These signals can also be sent using the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;kill&amp;lt;/span&amp;gt; command and specifying the pid (process id) on the command line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ kill -s SIGSTOP 16224&lt;br /&gt;
$ jobs -l&lt;br /&gt;
[1]- 16217 Running                 xeyes -center red &amp;amp;&lt;br /&gt;
[2]+ 16224 Stopped (signal)        xeyes -center blue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see, kill doesn't necessarily &amp;quot;kill&amp;quot; a process, although it can. Using the &amp;quot;-s&amp;quot; option, kill can send any signal to a process. Linux kills, stops or continues processes when they are sent the SIGINT, SIGSTOP, or SIGCONT signals respectively. There are also other signals that you can send to a process; some of these signals may be interpreted in an application-dependent way. You can learn what signals a particular process recognizes by looking at its man-page and searching for a SIGNALS section.&lt;br /&gt;
&lt;br /&gt;
=== SIGTERM and SIGINT ===&lt;br /&gt;
If you want to kill a process, you have several options. By default, kill sends SIGTERM, which is not identical to SIGINT of Control-C fame, but usually has the same results:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ kill 16217&lt;br /&gt;
$ jobs -l&lt;br /&gt;
[1]- 16217 Terminated              xeyes -center red&lt;br /&gt;
[2]+ 16224 Stopped (signal)        xeyes -center blue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The big kill ===&lt;br /&gt;
Processes can ignore both SIGTERM and SIGINT, either by choice or because they are stopped or somehow &amp;quot;stuck.&amp;quot; In these cases it may be necessary to use the big hammer, the SIGKILL signal. A process cannot ignore SIGKILL:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ kill 16224&lt;br /&gt;
$ jobs -l&lt;br /&gt;
[2]+ 16224 Stopped (signal)        xeyes -center blue&lt;br /&gt;
$ kill -s SIGKILL&lt;br /&gt;
$ jobs -l&lt;br /&gt;
[2]+ 16224 Interrupt               xeyes -center blue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== nohup ===&lt;br /&gt;
The terminal where you start a job is called the job's controlling terminal. Some shells (not bash by default), will deliver a SIGHUP signal to backgrounded jobs when you logout, causing them to quit. To protect processes from this behavior, use the nohup when you start the process:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nohup make &amp;amp;&lt;br /&gt;
[1] 15632&lt;br /&gt;
$ exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using ps to list processes ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;jobs&amp;lt;/span&amp;gt; command we were using earlier only lists processes that were started from your bash session. To see all the processes on your system, use &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;ps&amp;lt;/span&amp;gt; with the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;a&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt; options together:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ps ax&lt;br /&gt;
  PID TTY      STAT   TIME COMMAND&lt;br /&gt;
    1 ?        S      0:04 init [3]&lt;br /&gt;
    2 ?        SW     0:11 [keventd]&lt;br /&gt;
    3 ?        SWN    0:13 [ksoftirqd_CPU0]&lt;br /&gt;
    4 ?        SW     2:33 [kswapd]&lt;br /&gt;
    5 ?        SW     0:00 [bdflush]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I've only listed the first few because it is usually a very long list. This gives you a snapshot of what the whole machine is doing, but is a lot of information to sift through. If you were to leave off the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;ax&amp;lt;/span&amp;gt;, you would see only processes that are owned by you, and that have a controlling terminal. The command &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;ps x&amp;lt;/span&amp;gt; would show you all your processes, even those without a controlling terminal. If you were to use &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;ps a&amp;lt;/span&amp;gt;, you would get the list of everybody's processes that are attached to a terminal.&lt;br /&gt;
&lt;br /&gt;
=== Seeing the forest and the trees ===&lt;br /&gt;
You can also list different information about each process. The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;--forest&amp;lt;/span&amp;gt; option makes it easy to see the process hierarchy, which will give you an indication of how the various processes on your system interrelate. When a process starts a new process, that new process is called a &amp;quot;child&amp;quot; process. In a &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;--forest&amp;lt;/span&amp;gt; listing, parents appear on the left, and children appear as branches to the right:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ps x --forest&lt;br /&gt;
  PID TTY      STAT   TIME COMMAND&lt;br /&gt;
  927 pts/1    S      0:00 bash&lt;br /&gt;
 6690 pts/1    S      0:00  \_ bash&lt;br /&gt;
26909 pts/1    R      0:00      \_ ps x --forest&lt;br /&gt;
19930 pts/4    S      0:01 bash&lt;br /&gt;
25740 pts/4    S      0:04  \_ vi processes.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;u&amp;quot; and &amp;quot;l&amp;quot; ps options ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;u&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;l&amp;lt;/span&amp;gt; options can also be added to any combination of &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;a&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt; in order to include more information about each process:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ps au&lt;br /&gt;
USER       PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND&lt;br /&gt;
agriffis   403  0.0  0.0  2484   72 tty1     S     2001   0:00 -bash&lt;br /&gt;
chouser    404  0.0  0.0  2508   92 tty2     S     2001   0:00 -bash&lt;br /&gt;
root       408  0.0  0.0  1308  248 tty6     S     2001   0:00 /sbin/agetty 3&lt;br /&gt;
agriffis   434  0.0  0.0  1008    4 tty1     S     2001   0:00 /bin/sh /usr/X&lt;br /&gt;
chouser    927  0.0  0.0  2540   96 pts/1    S     2001   0:00 bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ps al&lt;br /&gt;
  F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND&lt;br /&gt;
100  1001   403     1   9   0  2484   72 wait4  S    tty1       0:00 -bash&lt;br /&gt;
100  1000   404     1   9   0  2508   92 wait4  S    tty2       0:00 -bash&lt;br /&gt;
000     0   408     1   9   0  1308  248 read_c S    tty6       0:00 /sbin/ag&lt;br /&gt;
000  1001   434   403   9   0  1008    4 wait4  S    tty1       0:00 /bin/sh&lt;br /&gt;
000  1000   927   652   9   0  2540   96 wait4  S    pts/1      0:00 bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using top ===&lt;br /&gt;
If you find yourself running ps several times in a row, trying to watch things change, what you probably want is &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;top&amp;lt;/span&amp;gt;. &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;top&amp;lt;/span&amp;gt; displays a continuously updated process listing, along with some useful summary information:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ top&lt;br /&gt;
 10:02pm  up 19 days,  6:24,  8 users,  load average: 0.04, 0.05, 0.00&lt;br /&gt;
75 processes: 74 sleeping, 1 running, 0 zombie, 0 stopped&lt;br /&gt;
CPU states:  1.3% user,  2.5% system,  0.0% nice, 96.0% idle&lt;br /&gt;
Mem:   256020K av,  226580K used,   29440K free,       0K shrd,    3804K buff&lt;br /&gt;
Swap:  136544K av,   80256K used,   56288K free                  101760K cached&lt;br /&gt;
&lt;br /&gt;
  PID USER     PRI  NI  SIZE  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND&lt;br /&gt;
  628 root      16   0  213M  31M  2304 S       0  1.9 12.5  91:43 X&lt;br /&gt;
26934 chouser   17   0  1272 1272  1076 R       0  1.1  0.4   0:00 top&lt;br /&gt;
  652 chouser   11   0 12016 8840  1604 S       0  0.5  3.4   3:52 gnome-termin&lt;br /&gt;
  641 chouser    9   0  2936 2808  1416 S       0  0.1  1.0   2:13 sawfish&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== nice ===&lt;br /&gt;
Each processes has a priority setting that Linux uses to determine how CPU timeslices are shared. You can set the priority of a process by starting it with the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;nice&amp;lt;/span&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nice -n 10 oggenc /tmp/song.wav&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Since the priority setting is called &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;nice&amp;lt;/span&amp;gt;, it should be easy to remember that a higher value will be nice to other processes, allowing them to get priority access to the CPU. By default, processes are started with a setting of 0, so the setting of 10 above means oggenc will readily give up the CPU to other processes. Generally, this means that oggenc will allow other processes to run at their normal speed, regardless of how CPU-hungry oggenc happens to be. You can see these niceness levels under the NI column in the ps and top listings above.&lt;br /&gt;
&lt;br /&gt;
=== renice ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;nice&amp;lt;/span&amp;gt; command can only change the priority of a process when you start it. If you want to change the niceness setting of a running process, use &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;renice&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ps l 641&lt;br /&gt;
  F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND&lt;br /&gt;
000  1000   641     1   9   0  5876 2808 do_sel S    ?          2:14 sawfish&lt;br /&gt;
$ renice 10 641&lt;br /&gt;
641: old priority 0, new priority 10&lt;br /&gt;
$ ps l 641&lt;br /&gt;
  F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND&lt;br /&gt;
000  1000   641     1   9  10  5876 2808 do_sel S    ?          2:14 sawfish&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Text processing ==&lt;br /&gt;
&lt;br /&gt;
=== Redirection revisited ===&lt;br /&gt;
Earlier in this tutorial series, we saw an example of how to use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; operator to redirect the output of a command to a file, as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ echo &amp;quot;firstfile&amp;quot; &amp;gt; copyme&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In addition to redirecting output to a file, we can also take advantage of a powerful shell feature called pipes. Using pipes, we can pass the output of one command to the input of another command. Consider the following example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ echo &amp;quot;hi there&amp;quot; | wc&lt;br /&gt;
      1       2       9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; character is used to connect the output of the command on the left to the input of the command on the right. In the example above, the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;echo&amp;lt;/span&amp;gt; command prints out the string &amp;quot;hi there&amp;quot; followed by a linefeed. That output would normally appear on the terminal, but the pipe redirects it into the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;wc&amp;lt;/span&amp;gt; command, which displays the number of lines, words, and characters in its input.&lt;br /&gt;
&lt;br /&gt;
=== A pipe example ===&lt;br /&gt;
Here is another simple example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls -s | sort -n&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this case, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;ls -s&amp;lt;/span&amp;gt; would normally print a listing of the current directory on the terminal, preceding each file with its size. But instead we've piped the output into &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;sort -n&amp;lt;/span&amp;gt;, which sorts the output numerically. This is a really useful way to find large files in your home directory!&lt;br /&gt;
&lt;br /&gt;
The following examples are more complex, but they demonstrate the power that can be harnessed using pipes. We're going to throw out some commands we haven't covered yet, but don't let that slow you down. Concentrate instead on understanding how pipes work so you can employ them in your daily Linux tasks.&lt;br /&gt;
&lt;br /&gt;
=== The decompression pipeline ===&lt;br /&gt;
Normally to decompress and untar a file, you might do the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bzip2 -d linux-2.4.16.tar.bz2&lt;br /&gt;
$ tar xvf linux-2.4.16.tar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The downside of this method is that it requires the creation of an intermediate, uncompressed file on your disk. Since &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;tar&amp;lt;/span&amp;gt; has the ability to read directly from its input (instead of specifying a file), we could produce the same end-result using a pipeline:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ bzip2 -dc linux-2.4.16.tar.bz2 | tar xvf -&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Woo hoo! Our compressed tarball has been extracted and we didn't need an intermediate file.&lt;br /&gt;
&lt;br /&gt;
=== A longer pipeline ===&lt;br /&gt;
Here's another pipeline example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cat myfile.txt | sort | uniq | wc -l&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We use &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;cat&amp;lt;/span&amp;gt; to feed the contents of '''myfile.txt''' to the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;sort&amp;lt;/span&amp;gt; command. When the sort command receives the input, it sorts all input lines so that they are in alphabetical order, and then sends the output to &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uniq&amp;lt;/span&amp;gt;. &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uniq&amp;lt;/span&amp;gt; removes any duplicate lines (and requires its input to be sorted, by the way,) sending the scrubbed output to &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;wc -l&amp;lt;/span&amp;gt;. We've seen the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;wc&amp;lt;/span&amp;gt; command earlier, but without command-line options. When given the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-l&amp;lt;/span&amp;gt; option, it only prints the number of lines in its input, instead of also including words and characters. You'll see that this pipeline will print out the number of unique (non-identical) lines in a text file.&lt;br /&gt;
&lt;br /&gt;
Try creating a couple of test files with your favorite text editor and use this pipeline to see what results you get.&lt;br /&gt;
&lt;br /&gt;
=== The text processing whirlwind begins ===&lt;br /&gt;
Now we embark on a whirlwind tour of the standard Linux text processing commands. Because we're covering a lot of material in this tutorial, we don't have the space to provide examples for every command. Instead, we encourage you to read each command's man page (by typing &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;man echo&amp;lt;/span&amp;gt;, for example) and learn how each command and it's options work by spending some time playing with each one. As a rule, these commands print the results of any text processing to the terminal rather than modifying any specified files. After we take our whirlwind tour of the standard Linux text processing commands, we'll take a closer look at output and input redirection. So yes, there is light at the end of the tunnel :)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;echo&amp;lt;/span&amp;gt; prints its arguments to the terminal. Use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-e&amp;lt;/span&amp;gt; option if you want to embed backslash escape sequences; for example &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;echo -e &amp;quot;foo\nfoo&amp;quot;&amp;lt;/span&amp;gt; will print foo, then a newline, and then foo again. Use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-n&amp;lt;/span&amp;gt; option to tell echo to omit the trailing newline that is appended to the output by default.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;cat&amp;lt;/span&amp;gt; will print the contents of the files specified as arguments to the terminal. Handy as the first command of a pipeline, for example, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;cat foo.txt | blah&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;sort&amp;lt;/span&amp;gt; will print the contents of the file specified on the command line in alphabetical order. Of course, &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;sort&amp;lt;/span&amp;gt; also accepts piped input. Type &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;man sort&amp;lt;/span&amp;gt; to familiarize yourself with its various options that control sorting behavior.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uniq&amp;lt;/span&amp;gt; takes an already-sorted file or stream of data (via a pipeline) and removes duplicate lines.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;wc&amp;lt;/span&amp;gt; prints out the number of lines, words, and bytes in the specified file or in the input stream (from a pipeline). Type &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;man wc&amp;lt;/span&amp;gt; to learn how to fine-tune what counts are displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;head&amp;lt;/span&amp;gt; prints out the first ten lines of a file or stream. Use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-n&amp;lt;/span&amp;gt; option to specify how many lines should be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;tail&amp;lt;/span&amp;gt; prints out the last ten lines of a file or stream. Use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-n&amp;lt;/span&amp;gt; option to specify how many lines should be displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;tac&amp;lt;/span&amp;gt; is like &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;cat&amp;lt;/span&amp;gt;, but prints all lines in reverse order; in other words, the last line is printed first.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;expand&amp;lt;/span&amp;gt; converts input tabs to spaces. Use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-t&amp;lt;/span&amp;gt; option to specify the tabstop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;unexpand&amp;lt;/span&amp;gt; converts input spaces to tabs. Use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;-t&amp;lt;/span&amp;gt; option to specify the tabstop.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;cut&amp;lt;/span&amp;gt; is used to extract character-delimited fields from each line of an input file or stream.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;nl&amp;lt;/span&amp;gt; command adds a line number to every line of input. Useful for printouts.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;pr&amp;lt;/span&amp;gt; is used to break files into multiple pages of output; typically used for printing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;tr&amp;lt;/span&amp;gt; is a character translation tool; it's used to map certain characters in the input stream to certain other characters in the output stream.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;sed&amp;lt;/span&amp;gt; is a powerful stream-oriented text editor. You can learn more about sed in the following Funtoo articles:&lt;br /&gt;
&lt;br /&gt;
* [[Sed by Example, Part 1]]&lt;br /&gt;
* [[Sed by Example, Part 2]]&lt;br /&gt;
* [[Sed by Example, Part 3]]&lt;br /&gt;
&lt;br /&gt;
If you're planning to take the LPI exam, be sure to read the first two articles of this series.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;awk&amp;lt;/span&amp;gt; is a handy line-oriented text-processing language. To learn more about awk, read the following Funtoo articles:&lt;br /&gt;
&lt;br /&gt;
* [[Awk by Example, Part 1]]&lt;br /&gt;
* [[Awk by Example, Part 2]]&lt;br /&gt;
* [[Awk by Example, Part 3]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;od&amp;lt;/span&amp;gt; is designed to transform the input stream into a octal or hex &amp;quot;dump&amp;quot; format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;split&amp;lt;/span&amp;gt; is a command used to split a larger file into many smaller-sized, more manageable chunks.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;fmt&amp;lt;/span&amp;gt; will reformat paragraphs so that wrapping is done at the margin. These days it's less useful since this ability is built into most text editors, but it's still a good one to know.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;paste&amp;lt;/span&amp;gt; takes two or more files as input, concatenates each sequential line from the input files, and outputs the resulting lines. It can be useful to create tables or columns of text.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;join&amp;lt;/span&amp;gt; is similar to paste, but it uses a field (by default the first) in each input line to match up what should be combined on a single line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;tee&amp;lt;/span&amp;gt; prints its input both to a file and to the screen. This is useful when you want to create a log of something, but you also want to see it on the screen.&lt;br /&gt;
&lt;br /&gt;
=== Whirlwind over! Redirection ===&lt;br /&gt;
Similar to using &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; on the bash command line, you can also use &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;&amp;amp;lt;&amp;lt;/span&amp;gt; to redirect a file into a command. For many commands, you can simply specify the filename on the command line, however some commands only work from standard input.&lt;br /&gt;
&lt;br /&gt;
Bash and other shells support the concept of a &amp;quot;herefile.&amp;quot; This allows you to specify the input to a command in the lines following the command invocation, terminating it with a sentinal value. This is easiest shown through an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sort &amp;lt;&amp;lt;END&lt;br /&gt;
apple&lt;br /&gt;
cranberry&lt;br /&gt;
banana&lt;br /&gt;
END&lt;br /&gt;
apple&lt;br /&gt;
banana&lt;br /&gt;
cranberry&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the example above, we typed the words apple, cranberry and banana, followed by &amp;quot;END&amp;quot; to signify the end of the input. The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;sort&amp;lt;/span&amp;gt; program then returned our words in alphabetical order.&lt;br /&gt;
&lt;br /&gt;
=== Using &amp;gt;&amp;gt; ===&lt;br /&gt;
You would expect &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; to be somehow analogous to &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/span&amp;gt;, but it isn't really. It simply means to append the output to a file, rather than overwrite as &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt; would. For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ echo Hi &amp;gt; myfile&lt;br /&gt;
$ echo there. &amp;gt; myfile&lt;br /&gt;
$ cat myfile&lt;br /&gt;
there.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Oops! We lost the &amp;quot;Hi&amp;quot; portion! What we meant was this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ echo Hi &amp;gt; myfile&lt;br /&gt;
$ echo there. &amp;gt;&amp;gt; myfile&lt;br /&gt;
$ cat myfile&lt;br /&gt;
Hi&lt;br /&gt;
there.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Much better!&lt;br /&gt;
&lt;br /&gt;
== Kernel Modules ==&lt;br /&gt;
&lt;br /&gt;
=== Meet &amp;quot;uname&amp;quot; ===&lt;br /&gt;
The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uname&amp;lt;/span&amp;gt; command provides a variety of interesting information about your system. Here's what is displayed on my development workstation when I type &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uname -a&amp;lt;/span&amp;gt; which tells the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uname&amp;lt;/span&amp;gt; command to print out all of its information in one swoop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ uname -a&lt;br /&gt;
Linux inventor 2.4.20-gaming-r1 #1 Fri Apr 11 18:33:35 MDT 2003 i686 AMD Athlon(tm) XP 2100+ AuthenticAMD GNU/Linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== More uname madness ===&lt;br /&gt;
Now, let's look at the information that &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uname&amp;lt;/span&amp;gt; provides&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
info. option                    arg     example&lt;br /&gt;
kernel name                     -s      &amp;quot;Linux&amp;quot;&lt;br /&gt;
hostname                        -n      &amp;quot;inventor&amp;quot;&lt;br /&gt;
kernel release                  -r      &amp;quot;2.4.20-gaming-r1&amp;quot;&lt;br /&gt;
kernel version                  -v      &amp;quot;#1 Fri Apr 11 18:33:35 MDT 2003&amp;quot;&lt;br /&gt;
machine                         -m      &amp;quot;i686&amp;quot;&lt;br /&gt;
processor                       -p      &amp;quot;AMD Athlon(tm) XP 2100+&amp;quot;&lt;br /&gt;
hardware platform               -i      &amp;quot;AuthenticAMD&amp;quot;&lt;br /&gt;
operating system                -o      &amp;quot;GNU/Linux&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Intriguing! What does your &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uname -a&amp;lt;/span&amp;gt; command print out?&lt;br /&gt;
&lt;br /&gt;
=== The kernel release ===&lt;br /&gt;
Here's a magic trick. First, type &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;uname -r&amp;lt;/span&amp;gt; to have the uname command print out the release of the Linux kernel that's currently running.&lt;br /&gt;
&lt;br /&gt;
Now, look in the '''/lib/modules''' directory and --presto!-- I bet you'll find a directory with that exact name! OK, not quite magic, but now may be a good time to talk about the significance of the directories in '''/lib/modules''' and explain what kernel modules are.&lt;br /&gt;
&lt;br /&gt;
=== The kernel ===&lt;br /&gt;
The Linux kernel is the heart of what is commonly referred to as &amp;quot;Linux&amp;quot; -- it's the piece of code that accesses your hardware directly and provides abstractions so that regular old programs can run. Thanks to the kernel, your text editor doesn't need to worry about whether it is writing to a SCSI or IDE disk -- or even a RAM disk. It just writes to a filesystem, and the kernel takes care of the rest.&lt;br /&gt;
&lt;br /&gt;
=== Introducing kernel modules ===&lt;br /&gt;
So, what are kernel modules? Well, they're parts of the kernel that have been stored in a special format on disk. At your command, they can be loaded into the running kernel and provide additional functionality.&lt;br /&gt;
&lt;br /&gt;
Because the kernel modules are loaded on demand, you can have your kernel support a lot of additional functionality that you may not ordinarily want to be enabled. But once in a blue moon, those kernel modules are likely to come in quite handy and can be loaded -- often automatically -- to support that odd filesystem or hardware device that you rarely use.&lt;br /&gt;
&lt;br /&gt;
=== Kernel modules in a nutshell ===&lt;br /&gt;
In sum, kernel modules allow for the running kernel to enable capabilities on an on-demand basis. Without kernel modules, you'd have to compile a completely new kernel and reboot in order for it to support something new.&lt;br /&gt;
&lt;br /&gt;
=== lsmod ===&lt;br /&gt;
To see what modules are currently loaded on your system, use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;lsmod&amp;lt;/span&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# lsmod&lt;br /&gt;
Module                  Size  Used by    Tainted: PF&lt;br /&gt;
vmnet                  20520   5&lt;br /&gt;
vmmon                  22484  11&lt;br /&gt;
nvidia               1547648  10&lt;br /&gt;
mousedev                3860   2&lt;br /&gt;
hid                    16772   0  (unused)&lt;br /&gt;
usbmouse                1848   0  (unused)&lt;br /&gt;
input                   3136   0  [mousedev hid usbmouse]&lt;br /&gt;
usb-ohci               15976   0  (unused)&lt;br /&gt;
ehci-hcd               13288   0  (unused)&lt;br /&gt;
emu10k1                64264   2&lt;br /&gt;
ac97_codec              9000   0  [emu10k1]&lt;br /&gt;
sound                  51508   0  [emu10k1]&lt;br /&gt;
usbcore                55168   1  [hid usbmouse usb-ohci ehci-hcd]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Modules listing ===&lt;br /&gt;
As you can see, my system has quite a few modules loaded. the vmnet and vmmon modules provide necessary functionality for [http://www.vmware.com/ VMWare Workstation], which allows me to run a virtual PC in a window on my desktop. The &amp;quot;nvidia&amp;quot; module comes from [http://www.nvidia.com/ NVIDIA] corporation and allows me to use my high-performance 3D-accelerated graphics card under Linux whilst taking advantage of its many neat features.&lt;br /&gt;
&lt;br /&gt;
Then I have a bunch of modules that are used to provide support for my USB-based input devices -- namely &amp;quot;mousedev,&amp;quot; &amp;quot;hid,&amp;quot; &amp;quot;usbmouse,&amp;quot; &amp;quot;input,&amp;quot; &amp;quot;usb-ohci,&amp;quot; &amp;quot;ehci-hcd&amp;quot; and &amp;quot;usbcore.&amp;quot; It often makes sense to configure your kernel to provide USB support as modules. Why? Because USB devices are &amp;quot;plug and play,&amp;quot; and when you have your USB support in modules, then you can go out and buy a new USB device, plug it in to your system, and have the system automatically load the appropriate modules to enable that device. It's a handy way to do things.&lt;br /&gt;
&lt;br /&gt;
=== Third-party modules ===&lt;br /&gt;
Rounding out my list of modules are &amp;quot;emu10k1,&amp;quot; &amp;quot;ac97_codec,&amp;quot; and &amp;quot;sound,&amp;quot; which together provide support for my SoundBlaster Audigy sound card.&lt;br /&gt;
&lt;br /&gt;
It should be noted that some of my kernel modules come from the kernel sources themselves. For example, all the USB-related modules are compiled from the standard Linux kernel sources. However, the nvidia, emu10k1 and VMWare-related modules come from other sources. This highlights another major benefit of kernel modules -- allowing third parties to provide much-needed kernel functionality and allowing this functionality to &amp;quot;plug in&amp;quot; to a running Linux kernel. No reboot necessary.&lt;br /&gt;
&lt;br /&gt;
=== depmod and friends ===&lt;br /&gt;
In my '''/lib/modules/2.4.20-gaming-r1/''' directory, I have a number of files that start with the string &amp;quot;modules.&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ls /lib/modules/2.4.20-gaming-r1/modules.*&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.dep&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.generic_string&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.ieee1394map&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.isapnpmap&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.parportmap&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.pcimap&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.pnpbiosmap&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/modules.usbmap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
These files contain some lots of dependency information. For one, they record *dependency* information for modules -- some modules require other modules to be loaded first before they will run. This information is recorded in these files.&lt;br /&gt;
&lt;br /&gt;
=== How you get modules ===&lt;br /&gt;
Some kernel modules are designed to work with specific hardware devices, like my &amp;quot;emu10k1&amp;quot; module which is for my SoundBlaster Audigy card. For these types of modules, these files also record the PCI IDs and similar identifying marks of the hardware devices that they support. This information can be used by things like the &amp;quot;hotplug&amp;quot; scripts (which we'll take a look at in later tutorials) to auto-detect hardware and load the appropriate module to support said hardware automatically.&lt;br /&gt;
&lt;br /&gt;
=== Using depmod ===&lt;br /&gt;
If you ever install a new module, this dependency information may become out of date. To make it fresh again, simply type &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;depmod -a.&amp;lt;/span&amp;gt; The &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;depmod&amp;lt;/span&amp;gt; program will then scan all the modules in your directories in '''/lib/modules''' and freshen the dependency information. It does this by scanning the module files in '''/lib/modules''' and looking at what are called &amp;quot;symbols&amp;quot; inside the modules.&lt;br /&gt;
&lt;br /&gt;
=== Locating kernel modules ===&lt;br /&gt;
So, what do kernel modules look like? For 2.4 kernels, they're typically any file in the '''/lib/modules''' tree that ends in &amp;quot;.o&amp;quot;. To see all the modules in '''/lib/modules''', type the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# find /lib/modules -name '*.o'&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/misc/vmmon.o&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/misc/vmnet.o&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/video/nvidia.o&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/kernel/fs/vfat/vfat.o&lt;br /&gt;
/lib/modules/2.4.20-gaming-r1/kernel/fs/minix/minix.o&lt;br /&gt;
[listing &amp;quot;snipped&amp;quot; for brevity]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== insmod vs. modprobe ===&lt;br /&gt;
So, how does one load a module into a running kernel? One way is to use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;insmod&amp;lt;/span&amp;gt; command and specifying the full path to the module that you wish to load:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# insmod /lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o&lt;br /&gt;
# lsmod | grep fat&lt;br /&gt;
fat                    29272   0  (unused)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, one normally loads modules by using the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;modprobe&amp;lt;/span&amp;gt; command. One of the nice things about the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;modprobe&amp;lt;/span&amp;gt; command is that it automatically takes care of loading any dependent modules. Also, one doesn't need to specify the path to the module you wish to load, nor does one specify the trailing &amp;quot;.o&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== rmmod and modprobe in action ===&lt;br /&gt;
Let's unload our &amp;quot;fat.o&amp;quot; module and load it using &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;modprobe&amp;lt;/span&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rmmod fat&lt;br /&gt;
# lsmod | grep fat&lt;br /&gt;
# modprobe fat&lt;br /&gt;
# lsmod | grep fat&lt;br /&gt;
fat                    29272   0  (unused)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see, the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;rmmod&amp;lt;/span&amp;gt; command works similarly to &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;modprobe&amp;lt;/span&amp;gt;, but has the opposite effect -- it unloads the module you specify.&lt;br /&gt;
&lt;br /&gt;
=== Your friend modinfo and modules.conf ===&lt;br /&gt;
You can use the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;modinfo&amp;lt;/span&amp;gt; command to learn interesting things about your favorite modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# modinfo fat&lt;br /&gt;
filename:    /lib/modules/2.4.20-gaming-r1/kernel/fs/fat/fat.o&lt;br /&gt;
description: &amp;lt;none&amp;gt;&lt;br /&gt;
author:      &amp;lt;none&amp;gt;&lt;br /&gt;
license:     &amp;quot;GPL&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And make special note of the '''/etc/modules.conf''' file. This file contains configuration information for modprobe. It allows you to tweak the functionality of modprobe by telling it to load modules before/after loading others, run scripts before/after modules load, and more.&lt;br /&gt;
&lt;br /&gt;
=== modules.conf gotchas ===&lt;br /&gt;
The syntax and functionality of '''modules.conf''' is quite complicated, and we won't go into its syntax now (type &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;man modules.conf&amp;lt;/span&amp;gt; for all the gory details), but here are some things that you *should* know about this file.&lt;br /&gt;
&lt;br /&gt;
For one, many distributions generate this file automatically from a bunch of files in another directory, like '''/etc/modules.d/'''. For example, Gentoo Linux has an '''/etc/modules.d/''' directory, and running the &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;update-modules&amp;lt;/span&amp;gt; command will take every file in '''/etc/modules.d/''' and concatenate them to produce a new '''/etc/modules.conf'''. Therefore, make your changes to the files in '''/etc/modules.d/''' and run &amp;lt;span style=&amp;quot;color:green&amp;quot;&amp;gt;update-modules&amp;lt;/span&amp;gt; if you are using Gentoo. If you are using Debian, the procedure is similar except that the directory is called '''/etc/modutils/'''.&lt;br /&gt;
&lt;br /&gt;
== Summary and Resources ==&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
Congratulations; you've reached the end of this tutorial on basic Linux administration! We hope that it has helped you to firm up your foundational Linux knowledge. Please join us in our next tutorial covering intermediate administration, where we will build on the foundation laid here, covering topics like the Linux permissions and ownership model, user account management, filesystem creation and mounting, and more. And remember, by continuing in this tutorial series, you'll soon be ready to attain your LPIC Level 1 Certification from the Linux Professional Institute.&lt;br /&gt;
&lt;br /&gt;
=== Resources ===&lt;br /&gt;
Speaking of LPIC certification, if this is something you're interested in, then we recommend that you study the following resources, which have been carefully selected to augment the material covered in this tutorial:&lt;br /&gt;
&lt;br /&gt;
There are a number of good regular expression resources on the 'net. Here are a couple that we've found:&lt;br /&gt;
&lt;br /&gt;
* [http://www.zvon.org/other/reReference/Output/ Regular Expressions Reference]&lt;br /&gt;
* [http://zez.org/article/articleview/11/ Regular Expressions Explained]&lt;br /&gt;
&lt;br /&gt;
Be sure to read up on the Filesystem Hierarchy Standard at http://www.pathname.com/fhs/.&lt;br /&gt;
&lt;br /&gt;
Check out the other articles in this series:&lt;br /&gt;
*[[Linux Fundamentals, Part 1]]&lt;br /&gt;
*[[Linux Fundamentals, Part 3]]&lt;br /&gt;
*[[Linux Fundamentals, Part 4]]&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;Bash by Example&amp;quot; article series, Daniel shows you how to use bash programming constructs to write your own bash scripts. This series (particularly Parts 1 and 2) will be good preparation for the LPIC Level 1 exam:&lt;br /&gt;
*[[Bash by Example, Part 1]]: Fundamental programming in the Bourne-again shell&lt;br /&gt;
*[[Bash by Example, Part 2]]: More bash programming fundamentals&lt;br /&gt;
*[[Bash by Example, Part 3]]: Exploring the ebuild system&lt;br /&gt;
&lt;br /&gt;
You can learn more about sed in the Sed by Example article series. If you're planning to take the LPI exam, be sure to read the first two articles of this series.&lt;br /&gt;
*[[Sed by Example, Part 1]]&lt;br /&gt;
*[[Sed by Example, Part 2]]&lt;br /&gt;
*[[Sed by Example, Part 3]]&lt;br /&gt;
&lt;br /&gt;
To learn more about awk, read the Awk by Example article series.&lt;br /&gt;
*[[Awk by Example, Part 1]]&lt;br /&gt;
*[[Awk by Example, Part 2]]&lt;br /&gt;
*[[Awk by Example, Part 3]]&lt;br /&gt;
&lt;br /&gt;
If you're not too familiar with the vi editor, I strongly recommend that you check out my [http://www-106.ibm.com/developerworks/edu/l-dw-linuxvi-i.html Vi -- the cheat sheet method] tutorial. This tutorial will give you a gentle yet fast-paced introduction to this powerful text editor. Consider this must-read material if you don't know how to use vi.&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
[[Category:Linux Core Concepts]]&lt;br /&gt;
[[Category:Articles]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/User:Oleg</id>
		<title>User:Oleg</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/User:Oleg"/>
				<updated>2012-11-30T18:01:14Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Person&lt;br /&gt;
|Full name=Oleg Vinichenko&lt;br /&gt;
|Nick=angry_vincent&lt;br /&gt;
|Geoloc=48.379433, 31.16558&lt;br /&gt;
|Location name=Ukraine&lt;br /&gt;
|Roles={{Role&lt;br /&gt;
|Role type=Staff&lt;br /&gt;
|Role desc=Team lead&lt;br /&gt;
|Start date=2009/01/01&lt;br /&gt;
}}&lt;br /&gt;
|Maintains=sys-apps/portage, sys-fs/mdev-bb, toolchain (gcc, glibc, binutils, linux-headers), sys-kernel/*, base-system, media-sound/oss, sys-apps/man-db&lt;br /&gt;
|Blogs=&lt;br /&gt;
}}&lt;br /&gt;
== angry_vincent ==&lt;br /&gt;
&lt;br /&gt;
[[File:angry_vincent.jpg|top|left|400x3000pxpx]]&lt;br /&gt;
&lt;br /&gt;
birthdate=11 September, 1981&lt;br /&gt;
&lt;br /&gt;
== Linux history ==&lt;br /&gt;
&lt;br /&gt;
First *nix experience was Sun computer with Solaris OS in scientific laboratory. Then I played a lot with Windows XP x64 early betas for fun, then switched to FreeBSD, thx to our university network admin. Next step was Gentoo Linux, since 2006 and then Funtoo,since late 2009&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
ask angry_vincent for details #funtoo, irc.freenode.net.&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/User:Oleg</id>
		<title>User:Oleg</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/User:Oleg"/>
				<updated>2012-11-30T04:59:55Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Person&lt;br /&gt;
|Full name=Oleg Vinichenko&lt;br /&gt;
|Nick=angry_vincent&lt;br /&gt;
|Geoloc=48.379433, 31.16558&lt;br /&gt;
|Location name=Ukraine&lt;br /&gt;
|Roles={{Role&lt;br /&gt;
|Role type=Staff&lt;br /&gt;
|Role desc=Team lead&lt;br /&gt;
|Start date=2009/01/01&lt;br /&gt;
}}&lt;br /&gt;
|Maintains=sys-apps/portage, sys-fs/mdev-bb, toolchain (gcc, glibc, binutils, linux-headers), sys-kernel/*, media-sound/oss, sys-apps/man-db&lt;br /&gt;
|Blogs=&lt;br /&gt;
}}&lt;br /&gt;
== angry_vincent ==&lt;br /&gt;
&lt;br /&gt;
[[File:angry_vincent.jpg|top|left|400x3000pxpx]]&lt;br /&gt;
&lt;br /&gt;
birthdate=11 September, 1981&lt;br /&gt;
&lt;br /&gt;
== Linux history ==&lt;br /&gt;
&lt;br /&gt;
First *nix experience was Sun computer with Solaris OS in scientific laboratory. Then I played a lot with Windows XP x64 early betas for fun, then switched to FreeBSD, thx to our university network admin. Next step was Gentoo Linux, since 2006 and then Funtoo,since late 2009&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
ask angry_vincent for details #funtoo, irc.freenode.net.&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Talk:Download</id>
		<title>Talk:Download</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Talk:Download"/>
				<updated>2012-11-05T11:46:28Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: Reverted edits by 103.22.193.154 (talk) to last revision by Whitewolf Fox&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTITLE__&lt;br /&gt;
= Download Funtoo Linux =&lt;br /&gt;
&lt;br /&gt;
Here are the steps you should follow to download Funtoo Linux stage3 tarball. If you need an install CD, please see [[Funtoo Linux Installation]] for Live Media recommendations. Funtoo Linux currently doesn't have its own LiveCD, but there are many that you can use for installation.&lt;br /&gt;
&lt;br /&gt;
== First, Pick a Mirror... ==&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux can be downloaded at the following locations:&lt;br /&gt;
&lt;br /&gt;
* Main US mirror: [http://ftp.osuosl.org/pub/funtoo/ The Oregon State University Open Source Lab]&lt;br /&gt;
* Main EU mirror: [http://ftp.heanet.ie/mirrors/funtoo/ HEAnet]&lt;br /&gt;
&lt;br /&gt;
== Now... pick a build ==&lt;br /&gt;
&lt;br /&gt;
'''Now you'll first need to pick a ''build'' of Funtoo Linux to install.''' Builds are like different versions of Funtoo Linux. Our '''funtoo-current''' build is the most up-to-date and recommended build. We also offer '''funtoo-stable'''. Both current and stable share the use the same Portage tree (package repository), but newer packages are unmasked (made available for install) in '''funtoo-current'''.&lt;br /&gt;
&lt;br /&gt;
There is also a '''funtoo-experimental''', which contains our experimental development work. As you might guess, funtoo-experimental is for developers and testers only, and it has its own experimental Portage tree that is separate from the others.&lt;br /&gt;
&lt;br /&gt;
If you don't know which one to choose, pick '''funtoo-current'''.&lt;br /&gt;
&lt;br /&gt;
Picked one? Great! Open a mirror in a new window, and select the appropriate build directory from the list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
funtoo-current -&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Next... pick an arch ==&lt;br /&gt;
&lt;br /&gt;
'''Next, it's time to pick an ''architecture'''''. If you have a modern 64-bit PC-compatible desktop or server, you generally want '''x86-64bit'''.  If you have an older 32-bit PC-compatible desktop or server, you'll want to use '''x86-32bit'''. Also an option for 64-bit x86 systems.&lt;br /&gt;
&lt;br /&gt;
We also bundle virtualization directories alongside the architecture directories, so if you want to install an [[OpenVZ]] container of Funtoo Linux, select '''openvz''', then pick the correct ''architecture'' within. Likewise, if you're looking for a [[VagrantUp|Vagrant]] run image of Funtoo Linux, look in the '''vagrant''' directory.&lt;br /&gt;
&lt;br /&gt;
If you are installing Funtoo Linux on a Sparc64 system, choose '''sparc-64bit'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
funtoo-current -&amp;gt; x86-64bit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Now... select a sub-arch ==&lt;br /&gt;
&lt;br /&gt;
Now, you'll need to pick a ''sub-architecture'' of Funtoo Linux that suits your needs. A sub-architecture is a build of Funtoo Linux that is optimized for your particular CPU. &lt;br /&gt;
&lt;br /&gt;
If you are building a Linux-based appliance or grabbing an image for mass-deployment, you might want to choose a generic sub-architecture that will be compatible with a wide range of processors. Otherwise, choose the most optimized sub-architecture that your processor supports.&lt;br /&gt;
&lt;br /&gt;
Note that we offer the greatest number of choices for '''funtoo-current'''. Other builds will have a more limited number of sub-arches available.&lt;br /&gt;
&lt;br /&gt;
=== x86-64bit ===&lt;br /&gt;
&lt;br /&gt;
* '''corei7''': Intel Core i3, Core i5 and Core i7 desktop processors or higher. Xeon 5500, 5600 and 7500 series server processors or higher. (Nehalem, Sandy Bridge) &lt;br /&gt;
* '''core2_64''': Intel Core 2 series or higher, which include the Core 2 Solo, Duo, Quad and Extreme. Also suitable for Nehalem.&lt;br /&gt;
* '''atom_64''': Intel Atom optimized. Compatible with Core 2 series.&lt;br /&gt;
* '''amd64-k8''': AMD Opteron or Athlon 64 processors, or higher&lt;br /&gt;
* '''amd64-k10''': AMD Phenom, Phenom II and compatible, or higher&lt;br /&gt;
* '''generic_64''' : Generic 64-bit Intel/AMD processor&lt;br /&gt;
&lt;br /&gt;
=== x86-32bit ===&lt;br /&gt;
&lt;br /&gt;
*'''core2_32''': Intel Core 2 series or compatible, which include the Core 2 Solo, Duo, Quad and Extreme. Also suitable for Nehalem.&lt;br /&gt;
*'''atom_32''': Intel Atom optimized. Compatible with Core 2 series.&lt;br /&gt;
*'''amd64-k8_32: AMD Opteron or Athlon 64 processors, or higher.&lt;br /&gt;
*'''athlon-xp''': Athlon XP or Opteron/Athlon 64.&lt;br /&gt;
*'''i686''': Generic P6-class system&lt;br /&gt;
*'''i486''': Intel 80486+ system&lt;br /&gt;
&lt;br /&gt;
You should now grab the most recent stage3 for the sub-architecture that you've chosen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
funtoo-current -&amp;gt; x86-64bit -&amp;gt; corei7 -&amp;gt; stage3-latest.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Installation</id>
		<title>Funtoo Linux Installation</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Installation"/>
				<updated>2012-10-18T04:57:17Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Configuring and installing the Linux kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document briefly explains all of the steps required to set up a typical Funtoo Linux installation on a &amp;quot;PC compatible&amp;quot; computer system. 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.&lt;br /&gt;
&lt;br /&gt;
=== Additional Resources ===&lt;br /&gt;
&lt;br /&gt;
This document was written to help you install Funtoo Linux as efficiently as possible, with a minimum number of distracting options regarding system configuration. &lt;br /&gt;
&lt;br /&gt;
Those who prefer a longer, more thorough tutorial-style installation may want to check out our beta [[Installation (Tutorial)|Installation Tutorial]] instead. It explores more installation possibilities and options such as encrypted filesystems, and includes screenshots.&lt;br /&gt;
&lt;br /&gt;
An experimental Funtoo Linux build exists for [[Funtoo Linux Installation on SPARC|SPARC]] platforms. See [[Funtoo Linux Installation on SPARC]] for notable differences regarding SPARC support.&lt;br /&gt;
&lt;br /&gt;
== Installation Overview ==&lt;br /&gt;
&lt;br /&gt;
This is a basic overview of the Funtoo installation process:&lt;br /&gt;
&lt;br /&gt;
# [[#Live CD|Download and boot the live CD of your choice]].&lt;br /&gt;
# [[#Prepare Hard Disk|Prepare your disk]].&lt;br /&gt;
# [[#Creating filesystems|Create]] and [[#Mounting filesystems|mount]] filesystems.&lt;br /&gt;
# [[#Installing the Stage 3 tarball|Install the Funtoo stage tarball]] of your choice.&lt;br /&gt;
# [[#Chroot into Funtoo|Chroot into your new system]].&lt;br /&gt;
# [[#Downloading the Portage tree|Download the Portage tree]].&lt;br /&gt;
# [[#Configuring your system|Configure your system]] and [[#Configuring your network|network]].&lt;br /&gt;
# [[#Configuring and installing the Linux kernel|Install a kernel]].&lt;br /&gt;
# [[#Installing a Bootloader|Install a bootloader]].&lt;br /&gt;
# [[#Finishing Steps|Complete final steps]].&lt;br /&gt;
# [[#Restart your system|Reboot and enjoy]].&lt;br /&gt;
&lt;br /&gt;
=== Live CD ===&lt;br /&gt;
Funtoo doesn't provide an &amp;quot;official&amp;quot; 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/ SystemRescueCd] as it contains lots of tools and utilities and supports both 32-bit and 64-bit systems.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To begin a Funtoo Linux installation, download and burn [http://www.sysresccd.org/ SystemRescueCd] or your preferred live media. Insert it into your disc drive, and boot from it. If using SystemRescueCd, be sure to select the &amp;lt;tt&amp;gt;rescue64&amp;lt;/tt&amp;gt; kernel at the boot menu if you are installing a 64-bit system. By default, SystemRescueCd boots in 32-bit mode.&lt;br /&gt;
&lt;br /&gt;
=== Prepare Hard Disk ===&lt;br /&gt;
==== Partitions ====&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
===== GPT Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Newer, preferred format for Linux systems&lt;br /&gt;
* Supports 2 TB+ hard drives for booting&lt;br /&gt;
* Supports hundreds of partitions per disk of any size&lt;br /&gt;
* Requires legacy BIOS boot partition (~32 MB) to be created if system does not use EFI&lt;br /&gt;
* Requires bootloader with support for GPT such as GRUB 2, EXTLINUX, or a patched version of GRUB Legacy&lt;br /&gt;
&lt;br /&gt;
===== MBR Partitions =====&lt;br /&gt;
&lt;br /&gt;
* Legacy, DOS partitioning scheme&lt;br /&gt;
* Only 4 primary partitions per disk; after that, you must use &amp;quot;logical&amp;quot; partitions&lt;br /&gt;
* Does not support 2 TB+ disks for booting&lt;br /&gt;
* Compatible with certain problematic systems (such as the HP ProBook 4520)&lt;br /&gt;
* Multiple boot loader options, e.g. GRUB 2, GRUB Legacy, lilo&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you plan to use partitions of 2 TB or greater, you ''must'' partition using the GPT/GUID format.}}&lt;br /&gt;
&lt;br /&gt;
==== Partitioning Using gdisk ====&lt;br /&gt;
&lt;br /&gt;
===== Notes Before We Begin =====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
If you are going to create a legacy MBR partition table instead of GUID/GPT, you will use the &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; command instead of &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, and you will not need to create the GRUB boot loader partition. See the table under [[#Partitioning Recommendations|Partitioning Recommendations]], in particular the &lt;br /&gt;
'''MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)''' and '''MBR Code''' columns. &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt; works just like &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, but creates legacy MBR partition tables instead of the newer GPT/GUID partition tables.&lt;br /&gt;
&lt;br /&gt;
Advanced users may be interested in the following topics:&lt;br /&gt;
&lt;br /&gt;
* [[GUID Booting Guide]]&lt;br /&gt;
* [[Rootfs over encrypted lvm]]&lt;br /&gt;
* [[Rootfs over encrypted lvm over raid-1 on GPT]]&lt;br /&gt;
&lt;br /&gt;
===== Using gdisk =====&lt;br /&gt;
&lt;br /&gt;
The first step after booting SystemRescueCd is to use &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; to create GPT (also known as GUID) partitions, specifying the disk you want to use, which is typically &amp;lt;tt&amp;gt;/dev/sda&amp;lt;/tt&amp;gt;, the first disk in the system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##gdisk /dev/sda&amp;lt;/console&amp;gt;&lt;br /&gt;
You should find &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; very similar to &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Here is the partition table we want to end up with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;Command (? for help): ##i##p&lt;br /&gt;
Disk /dev/sda: 234441648 sectors, 111.8 GiB&lt;br /&gt;
Logical sector size: 512 bytes&lt;br /&gt;
Disk identifier (GUID): A4E5208A-CED3-4263-BB25-7147DC426931&lt;br /&gt;
Partition table holds up to 128 entries&lt;br /&gt;
First usable sector is 34, last usable sector is 234441614&lt;br /&gt;
Partitions will be aligned on 2048-sector boundaries&lt;br /&gt;
Total free space is 2014 sectors (1007.0 KiB)&lt;br /&gt;
&lt;br /&gt;
Number  Start (sector)    End (sector)  Size       Code  Name&lt;br /&gt;
   1            2048          206847   500.0 MiB   8300  Linux filesystem&lt;br /&gt;
   2          206848          272383   32.0 MiB    EF02  BIOS boot partition&lt;br /&gt;
   3          272384         8660991   4.0 GiB     8200  Linux swap&lt;br /&gt;
   4         8660992       234441614   107.7 GiB   8300  Linux filesystem&lt;br /&gt;
&lt;br /&gt;
Command (? for help): &amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Above, you'll see that we have a 500 MiB boot partition, a 32 MiB &amp;quot;BIOS boot partition&amp;quot; (also known as the GRUB boot loader partition), 4 GiB of swap, and the remaining disk used by a 107.7 GiB root partition.&lt;br /&gt;
&lt;br /&gt;
===== For new &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; users =====&lt;br /&gt;
&lt;br /&gt;
These partitions were created using the &amp;quot;&amp;lt;tt&amp;gt;n&amp;lt;/tt&amp;gt;&amp;quot; command from within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
Within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;, follow these steps:&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##1 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+500M ↵&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 2''' (GRUB):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##2 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+32M ↵&lt;br /&gt;
Hex Code: ##i##EF02 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 3''' (swap):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##3 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##+4G ↵&lt;br /&gt;
Hex Code: ##i##8200 ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Create Partition 4''' (root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##n ↵&lt;br /&gt;
Partition Number: ##i##4 ↵&lt;br /&gt;
First sector: ##i##↵&lt;br /&gt;
Last sector: ##i##↵##!i## (for rest of disk)&lt;br /&gt;
Hex Code: ##i##↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Along the way, you can type &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; and hit Enter to view your current partition table. If you make a mistake, you can type &amp;quot;&amp;lt;tt&amp;gt;d&amp;lt;/tt&amp;gt;&amp;quot; to delete an existing partition that you created. When you are satisfied with your partition setup, type &amp;quot;&amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt;&amp;quot; to write your configuration to disk:&lt;br /&gt;
&lt;br /&gt;
'''Write Partition Table To Disk''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Command: ##i##w ↵&lt;br /&gt;
Do you want to proceed? (Y/N): ##i##Y ↵&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The partition table will now be written to disk and &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; will close.&lt;br /&gt;
&lt;br /&gt;
Now, your GPT/GUID partitions have been created, and will show up as the following ''block devices'' under Linux:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;, which will be used to hold the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;, which will be used directly by the new GRUB,&lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;, which will be used for swap space, and &lt;br /&gt;
* &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;, which will hold your root filesystem.&lt;br /&gt;
&lt;br /&gt;
===== For Previous fdisk users =====&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;BIOS boot partition&amp;quot; within &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. 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 &amp;lt;tt&amp;gt;stage1_5&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage2&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;EF02&amp;lt;/tt&amp;gt; is required to hold the guts of the boot loader.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;0700&amp;lt;/tt&amp;gt;, and a Linux swap partition with code &amp;lt;tt&amp;gt;8200&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===== Partitioning Recommendations =====&lt;br /&gt;
&lt;br /&gt;
Below are our partitioning recommendations in table form. For GPT-based partitions, use the GPT Block Device and GPT Code columns with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;. For legacy MBR-based partitions, use the MBR Block Device and MBR code columns with &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Partition&lt;br /&gt;
!Size&lt;br /&gt;
!MBR Block Device (&amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!GPT Block Device (&amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt;)&lt;br /&gt;
!Filesystem&lt;br /&gt;
!MBR Code&lt;br /&gt;
!GPT Code&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
|500 MB&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt;&lt;br /&gt;
|ext2&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|GRUB boot loader partition&lt;br /&gt;
|32 MB&lt;br /&gt;
| ''not required for MBR''&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|For GPT/GUID only, skip for MBR - no filesystem.&lt;br /&gt;
|''N/A''&lt;br /&gt;
|EF02&lt;br /&gt;
|-&lt;br /&gt;
|swap&lt;br /&gt;
|2x RAM for low-memory systems and production servers; otherwise 2GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|swap (default)&lt;br /&gt;
|82&lt;br /&gt;
|8200&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root)&lt;br /&gt;
|Rest of the disk, minimum of 10GB.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt;&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt;&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; (optional)	&lt;br /&gt;
|User storage and media. Typically most of the disk.&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|&amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (if created)&lt;br /&gt;
|XFS recommended, alternatively ext4&lt;br /&gt;
|83&lt;br /&gt;
|8300&lt;br /&gt;
|-&lt;br /&gt;
| LVM (optional)&lt;br /&gt;
| If you want to create an LVM volume.&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| &amp;lt;tt&amp;gt;/dev/sda5&amp;lt;/tt&amp;gt; (PV, if created)&lt;br /&gt;
| LVM PV&lt;br /&gt;
| 8E&lt;br /&gt;
| 8E00&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Creating filesystems ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
You will not create a filesystem on your swap partition, but will initialize it using the &amp;lt;tt&amp;gt;mkswap&amp;lt;/tt&amp;gt; command so that it can be used as disk-based virtual memory. Then we'll run the &amp;lt;tt&amp;gt;swapon&amp;lt;/tt&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; instead and you will need to adjust the target block devices. If you are following our recommendations, then simply do this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mke2fs -t ext2 /dev/sda1 &lt;br /&gt;
# ##i##mkfs.xfs /dev/sda4&lt;br /&gt;
# ##i##mkswap /dev/sda3&lt;br /&gt;
# ##i##swapon /dev/sda3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mounting filesystems ====&lt;br /&gt;
&lt;br /&gt;
Mount the newly-created filesystems as follows, creating &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; as the installation mount point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo&lt;br /&gt;
# ##i##mount /dev/sda4 /mnt/funtoo&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/boot&lt;br /&gt;
# ##i##mount /dev/sda1 /mnt/funtoo/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally, if you have a separate filesystem for &amp;lt;tt&amp;gt;/home&amp;lt;/tt&amp;gt; or anything else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir /mnt/funtoo/home&lt;br /&gt;
# ##i##mount /dev/sda5 /mnt/funtoo/home&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;/var/tmp&amp;lt;/tt&amp;gt; on a separate filesystem, be sure to change the permissions of the mount point to be globally-writeable after mounting, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod 1777 /mnt/funtoo/tmp&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing the Stage 3 tarball ===&lt;br /&gt;
==== Stage 3 tarball ====&lt;br /&gt;
&lt;br /&gt;
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. Visit the [[Download]] page and copy the URL to the Stage 3 tarball you want to use. We will download it soon.&lt;br /&gt;
&lt;br /&gt;
Now is a good time to verify the date and time are correctly set to UTC. Use the &amp;lt;tt&amp;gt;date&amp;lt;/tt&amp;gt; command to verify the date and time:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date&lt;br /&gt;
Fri Jul 15 19:47:18 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the date and/or time need to be corrected, do so using &amp;lt;tt&amp;gt;date MMDDhhmmYYYY&amp;lt;/tt&amp;gt;, keeping in mind &amp;lt;tt&amp;gt;hhmm&amp;lt;/tt&amp;gt; are in 24-hour format. The example below changes the date and time to &amp;quot;July 16th, 2011 @ 8:00PM&amp;quot; UTC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##date 071620002011&lt;br /&gt;
Fri Jul 16 20:00:00 UTC 2011&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you are in your Funtoo Linux root filesystem, use &amp;lt;tt&amp;gt;wget&amp;lt;/tt&amp;gt; to download the Stage 3 tarball you have chosen from the [[Download]] page to use as the basis for your new Funtoo Linux system. It should be saved to the &amp;lt;tt&amp;gt;/mnt/funtoo&amp;lt;/tt&amp;gt; directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-64bit/generic_64/stage3-latest.tar.xz&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;generic_64&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;generic_32&amp;lt;/tt&amp;gt; stage. Consult the [[Download]] page for more information.&lt;br /&gt;
&lt;br /&gt;
Once the stage is downloaded, extract the contents with the following command, substituting in the actual name of your stage 3 tarball:&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##tar xJpf stage3-latest.tar.xz&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|It is very important to use &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt;'s &amp;quot;&amp;lt;tt&amp;gt;p&amp;lt;/tt&amp;gt;&amp;quot; option when extracting the Stage 3 tarball - it tells &amp;lt;tt&amp;gt;tar&amp;lt;/tt&amp;gt; to ''preserve'' any permissions and ownership that exist within the archive. Without this option, your Funtoo Linux filesystem permissions will be incorrect.}}&lt;br /&gt;
&lt;br /&gt;
=== Chroot into Funtoo ===&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
# ##i##mount --bind /proc proc&lt;br /&gt;
# ##i##mount --bind /dev dev&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You'll also want to copy over &amp;lt;tt&amp;gt;resolv.conf&amp;lt;/tt&amp;gt; in order to have proper DNS name resolution from inside the chroot:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can chroot into your new system. Use &amp;lt;tt&amp;gt;env&amp;lt;/tt&amp;gt; before &amp;lt;tt&amp;gt;chroot&amp;lt;/tt&amp;gt; to ensure that no environment variables from the installation media are used by your new system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|Users of live CDs with 64-bit kernels: Some software may use &amp;lt;tt&amp;gt;uname -r&amp;lt;/tt&amp;gt; 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.}}&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If you receive the error &amp;quot;&amp;lt;tt&amp;gt;chroot: failed to run command `/bin/bash': Exec format error&amp;lt;/tt&amp;gt;&amp;quot;, 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.}}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##export PS1=&amp;quot;(chroot) $PS1&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the Portage tree ===&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; from within the chroot. This will automatically clone the portage tree from [http://github.com/ GitHub]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge --sync&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancynote|For an alternative way to do this, see [[Installing Portage From Snapshot]].}}&lt;br /&gt;
&lt;br /&gt;
=== Configuring your system ===&lt;br /&gt;
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 &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;. The others are optional. Here are a list of files that you should consider editing:&lt;br /&gt;
&lt;br /&gt;
{| {{table}}&lt;br /&gt;
!File&lt;br /&gt;
!Do I need to change it?&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''YES - required'''&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|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) &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/make.conf&amp;lt;br/&amp;gt;&lt;br /&gt;
/etc/portage/make.conf&amp;lt;/tt&amp;gt; (new location)&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Parameters used by gcc (compiler), portage, and make. It's a good idea to set MAKEOPTS. This is covered later in this document.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hostname&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Maybe - recommended''&lt;br /&gt;
|Used to set system hostname. Set to the fully-qualified (with dots) name. Defaults to &amp;lt;tt&amp;gt;localhost&amp;lt;/tt&amp;gt; if not set.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/hosts&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''No''&lt;br /&gt;
| You no longer need to manually set the hostname in this file. This file is automatically generated by &amp;lt;tt&amp;gt;/etc/init.d/hostname&amp;lt;/tt&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/keymaps&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Keyboard mapping configuration file (for console pseudo-terminals). Set if you have a non-US keyboard. See [[Funtoo Linux Localization]].&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/hwclock&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;/etc/conf.d/modules&amp;lt;/tt&amp;gt;&lt;br /&gt;
|Optional&lt;br /&gt;
|Kernel modules to load automatically at system startup. Typically not required. See [[Additional Kernel Resources]] for more info.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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]])&lt;br /&gt;
&lt;br /&gt;
Let's go ahead and see what we have to do. Use &amp;lt;tt&amp;gt;nano -w &amp;lt;name_of_file&amp;gt;&amp;lt;/tt&amp;gt; to edit files -- the &amp;quot;&amp;lt;tt&amp;gt;-w&amp;lt;/tt&amp;gt;&amp;quot; disables word-wrapping, which is handy when editing configuration files. You can copy and paste from the examples.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|It's important to edit your &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; file before you reboot! You will need to modify both the &amp;quot;fs&amp;quot; and &amp;quot;type&amp;quot; columns to match the settings for your partitions and filesystems that you created with &amp;lt;tt&amp;gt;gdisk&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;fdisk&amp;lt;/tt&amp;gt;. Skipping this step may prevent Funtoo Linux from booting successfully.}}&lt;br /&gt;
&lt;br /&gt;
==== /etc/fstab ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; is used by the &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; command which is ran when your system boots. Statements of this file inform &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt; about partitions to be mounted and how they are mounted. In order for the system to boot properly, you must edit &amp;lt;tt&amp;gt;/etc/fstab&amp;lt;/tt&amp;gt; and ensure that it reflects the partition configuration you used earlier:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/fstab&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use arrow keys to move around and hit Control-X to exit. If you want to save your changes, type &amp;quot;&amp;lt;tt&amp;gt;Y&amp;lt;/tt&amp;gt;&amp;quot; when asked if you want to save the modified buffer, or hit Control-O before closing &amp;lt;tt&amp;gt;nano&amp;lt;/tt&amp;gt;. Otherwise your changes will be discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# The root filesystem should have a pass number of either 0 or 1.&lt;br /&gt;
# All other filesystems should have a pass number of 0 or greater than 1.&lt;br /&gt;
#&lt;br /&gt;
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.&lt;br /&gt;
#&lt;br /&gt;
# See the manpage fstab(5) for more information.&lt;br /&gt;
#&lt;br /&gt;
# &amp;lt;fs&amp;gt;			&amp;lt;mountpoint&amp;gt;	&amp;lt;type&amp;gt;		&amp;lt;opts&amp;gt;		         &amp;lt;dump/pass&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/dev/sda1		/boot		ext2		noauto,noatime  	 1 2&lt;br /&gt;
/dev/sda3		none		swap		sw		         0 0&lt;br /&gt;
/dev/sda4		/		xfs		noatime		         0 1&lt;br /&gt;
#/dev/cdrom		/mnt/cdrom	auto		noauto,ro	         0 0&lt;br /&gt;
none                    /dev/shm        tmpfs           nodev,nosuid,noexec      0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/localtime ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/localtime&amp;lt;/tt&amp;gt; with a symbolic link to the timezone that you wish to use. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(chroot) # ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above sets the timezone to Eastern Time Canada. Go to &amp;lt;tt&amp;gt;/usr/share/zoneinfo&amp;lt;/tt&amp;gt; to see which values to use.&lt;br /&gt;
&lt;br /&gt;
==== /etc/portage/make.conf ====&lt;br /&gt;
&lt;br /&gt;
{{fancynote|This file may also be found at /etc/make.conf. /etc/portage/make.conf is the new location.}}&lt;br /&gt;
&lt;br /&gt;
This file contains something similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ACCEPT_KEYWORDS=&amp;quot;~amd64&amp;quot;&lt;br /&gt;
CHOST=&amp;quot;x86_64-pc-linux-gnu&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;ACCEPT_KEYWORDS&amp;lt;/tt&amp;gt; defines what branch of the package tree to be used. If you are using funtoo-current, it will be prefixed with a tilde ('&amp;lt;tt&amp;gt;~&amp;lt;/tt&amp;gt;'). This will make more recent ebuilds visible to Portage. You should typically not change this value, and you should also not change &amp;lt;tt&amp;gt;CHOST&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j3&amp;quot; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are unsure about how many processors/threads you have then use /proc/cpuinfo to help you.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grep &amp;quot;processor&amp;quot; /proc/cpuinfo | wc -l&lt;br /&gt;
16&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set MAKEOPTS to this number plus one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MAKEOPTS=&amp;quot;-j17&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 (&amp;quot;&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;&amp;quot;) 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&amp;amp;chap=2 Gentoo Handbook].&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LINGUAS=&amp;quot;fr&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== /etc/conf.d/hwclock ====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##nano -w /etc/conf.d/hwclock&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Localization ====&lt;br /&gt;
&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
=== Configuring your network ===&lt;br /&gt;
&lt;br /&gt;
If you plan on using DHCP for network configuration, it is not necessary to emerge a DHCP client. In fact, it would not even be necessary to perform any manual network configuration at all. Simply add &amp;lt;tt&amp;gt;dhcpcd&amp;lt;/tt&amp;gt; to the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; runlevel, and your network will be configured automatically at boot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##rc-update add dhcpcd default&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it! If you require more advanced configuration, see [[Funtoo Linux Networking]] for information on how to use Funtoo Linux's template-based network configuration system.&lt;br /&gt;
&lt;br /&gt;
=== Configuring and installing the Linux kernel ===&lt;br /&gt;
&lt;br /&gt;
Now it's time to build and install a Linux kernel, which is the heart of any Funtoo Linux system. In the past, the process of creating a kernel that actually booted your system could be time-consuming and require a great deal of trial and error. Fortunately, Funtoo Linux offers an option to automatically build a kernel for you that will boot nearly all systems.&lt;br /&gt;
&lt;br /&gt;
If you are unfamiliar with how to manually configure your own kernel, or you simply want to get your system up and running quickly, you can emerge &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag set, which will automatically build the kernel and an initrd that will boot nearly all Funtoo Linux systems. This kernel is based on a linux-3.2 LTS official debian kernel package and is an easy way to get your system up and running relatively quickly.&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|&amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag requires at least 12GB in /var/tmp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##echo &amp;quot;sys-kernel/debian-sources binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
(chroot) # ##i##emerge debian-sources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
All done!&lt;br /&gt;
&lt;br /&gt;
{{fancynote|NVIDIA card users: the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; 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 &amp;lt;tt&amp;gt;/etc/modprobe.d/&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
For an overview of other kernel options for Funtoo Linux, see [[Funtoo Linux Kernels]]. Also be sure to see [[:Category:Hardware Compatibility|hardware compatibility]] information. We have compiled a very good reference for [[Dell PowerEdge 11G Servers]] that includes kernel compatibility information as well.&lt;br /&gt;
&lt;br /&gt;
The next step is to configure your boot loader so that your new kernel loads when the system boots.&lt;br /&gt;
&lt;br /&gt;
=== Installing a Bootloader ===&lt;br /&gt;
&lt;br /&gt;
==== Installing Grub ====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
To use this recommended boot method, first emerge &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;. This will also cause &amp;lt;tt&amp;gt;grub-2&amp;lt;/tt&amp;gt; to be merged, since it is a dependency of &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##emerge boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; and specify &amp;quot;&amp;lt;tt&amp;gt;Funtoo Linux genkernel&amp;lt;/tt&amp;gt;&amp;quot; as the &amp;lt;tt&amp;gt;default&amp;lt;/tt&amp;gt; setting at the top of the file, replacing &amp;lt;tt&amp;gt;&amp;quot;Funtoo Linux&amp;quot;&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; should now look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
boot {&lt;br /&gt;
        generate grub&lt;br /&gt;
        default &amp;quot;Funtoo Linux genkernel&amp;quot;&lt;br /&gt;
        timeout 3 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux&amp;quot; {&lt;br /&gt;
        kernel bzImage[-v]&lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Funtoo Linux genkernel&amp;quot; {&lt;br /&gt;
        kernel kernel[-v]&lt;br /&gt;
        initrd initramfs[-v]&lt;br /&gt;
        params += real_root=auto &lt;br /&gt;
        # params += nomodeset&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Please read &amp;lt;tt&amp;gt;man boot.conf&amp;lt;/tt&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
===== Running grub-install and boot-update =====&lt;br /&gt;
&lt;br /&gt;
Finally, we will need to actually install the GRUB boot loader to your disk, and also run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; which will generate your boot loader configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##grub-install --no-floppy /dev/sda&lt;br /&gt;
(chroot) # ##i##boot-update&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only need to run &amp;lt;tt&amp;gt;grub-install&amp;lt;/tt&amp;gt; when you first install Funtoo Linux, but you need to re-run &amp;lt;tt&amp;gt;boot-update&amp;lt;/tt&amp;gt; every time you modify your &amp;lt;tt&amp;gt;/etc/boot.conf&amp;lt;/tt&amp;gt; file, so your changes are applied on next boot.&lt;br /&gt;
&lt;br /&gt;
OK - your system should be ready to boot! Well, there are a few more loose ends...&lt;br /&gt;
&lt;br /&gt;
==== Installing Syslinux/Extlinux ====&lt;br /&gt;
&lt;br /&gt;
An alternate Bootloader is Extlinux, for installing it see the [[Extlinux|extlinux Guide]].&lt;br /&gt;
&lt;br /&gt;
=== Finishing Steps ===&lt;br /&gt;
&lt;br /&gt;
==== Set your root password ====&lt;br /&gt;
It's imperative that you set your root password before rebooting so that you can log in.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # ##i##passwd&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Restart your system ===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Leave the chroot, change directory to /, unmount your Funtoo partitions, and reboot.&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
(chroot) # exit&lt;br /&gt;
# ##i##cd /&lt;br /&gt;
# ##i##umount /mnt/funtoo/boot /mnt/funtoo/dev /mnt/funtoo/proc /mnt/funtoo&lt;br /&gt;
# ##i##reboot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 &amp;lt;tt&amp;gt;login:&amp;lt;/tt&amp;gt; prompt. Funtoo Linux has been successfully installed!&lt;br /&gt;
&lt;br /&gt;
===Next Steps===&lt;br /&gt;
&lt;br /&gt;
To learn how to customize and start using Funtoo Linux, see [[Funtoo Linux First Steps]].&lt;br /&gt;
&lt;br /&gt;
If your system did not boot correctly, see [[Installation Troubleshooting]] for steps you can take to resolve the problem.&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Install]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Linux_Kernels</id>
		<title>Funtoo Linux Kernels</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Linux_Kernels"/>
				<updated>2012-10-18T04:56:22Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Using Debian-Sources with Genkernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This Section will give you an overview of kernels used in funtoo.&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux provides a number of new kernels for your use. This is the official page for all Funtoo Linux kernel information. &lt;br /&gt;
&lt;br /&gt;
Some points of interest:&lt;br /&gt;
&lt;br /&gt;
* Most Funtoo Linux kernels support the handy &amp;lt;tt&amp;gt;[[#Binary USE|binary]]&amp;lt;/tt&amp;gt; USE flag, described below.&lt;br /&gt;
* Funtoo Linux offers quality kernels from other Linux Distributions, like &amp;lt;tt&amp;gt;ubuntu-server&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* A detailed [[#Kernel Features and Stability|Kernel Features and Stability]] table can be found below.&lt;br /&gt;
* Advanced users may want to take a look at [[Additional Kernel Resources]].&lt;br /&gt;
* There is a quick'n dirty howto to compile your own [[kernel]] with initramfs the funtoo way.&lt;br /&gt;
&lt;br /&gt;
== Overview of Kernels ==&lt;br /&gt;
&lt;br /&gt;
=== sysrescue-std-sources ===&lt;br /&gt;
&lt;br /&gt;
This kernel is from the [http://www.sysresccd.org SystemRescueCD project], and is based on Fedora 14/15, plus some other patches related to booting from a live CD. It is a quality kernel, and is generally pretty stable. It is not suitable for production servers but is a good choice for Funtoo Linux desktops. The [[Funtoo Linux Installation]] Guide recommends this kernel for general users. Note however,  that by design all audio functions are removed from SystemRescue,  ie no sound when using this kernel.&lt;br /&gt;
&lt;br /&gt;
=== vanilla-sources ===&lt;br /&gt;
&lt;br /&gt;
This will install the &amp;quot;vanilla&amp;quot; (unmodified) Linux kernel sources. Current recommended version is 3.x. Funtoo Linux fully supports Linux 3.x. The advantages of this kernel include recent improvements to [[Linux Containers]], a very modern networking stack with lots of bug fixes, and high reliability for desktops and servers. The downside is that this kernel must be manually configured by the user and does not have built-in &amp;lt;tt&amp;gt;genkernel&amp;lt;/tt&amp;gt; support via the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag at this time.&lt;br /&gt;
&lt;br /&gt;
=== openvz-rhel6-stable ===&lt;br /&gt;
&lt;br /&gt;
This is a RHEL6-based kernel with OpenVZ support. This kernel is now the preferred kernel for production OpenVZ deployments. It requires gcc-4.4.5 to build, which it will use automatically without the user needing to use &amp;lt;tt&amp;gt;gcc-config&amp;lt;/tt&amp;gt;. We use this version of gcc since this is the version of gcc used by Red Hat to build this kernel.&lt;br /&gt;
&lt;br /&gt;
=== openvz-rhel5-stable ===&lt;br /&gt;
&lt;br /&gt;
This kernel is based on the latest Red Hat Enterprise Linux 5.6 kernel, and contains additional OpenVZ (virtual containers) patches from the [[OpenVZ on Funtoo Linux|OpenVZ]] project. It is a very stable and reliable kernel, and is recommended for use in production environments. The only major downside to this kernel is that it is based on Linux 2.6.18 -- some parts of the kernel are out-of-date, and it is not compatible with modern versions of udev. However, it is pretty trivial to downgrade udev to an earlier version on Funtoo Linux and this kernel has a track-record of being rock-solid. When stability is paramount, you put up with the udev downgrade, use this kernel, and can enjoy hundreds of days of uptime. For more information on how to use this kernel with Funtoo Linux, see the [[RHEL5 Kernel HOWTO]].&lt;br /&gt;
&lt;br /&gt;
=== ubuntu-server ===&lt;br /&gt;
&lt;br /&gt;
This is the kernel from Ubuntu Server. Version &amp;lt;tt&amp;gt;2.6.32.32.62&amp;lt;/tt&amp;gt; is the same version used in Ubuntu Server 10.04 LTS, and version &amp;lt;tt&amp;gt;2.6.35.28.50&amp;lt;/tt&amp;gt; is the one used in Ubuntu Server 10.10 (currently masked). In our testing of &amp;lt;tt&amp;gt;2.6.32.32.62&amp;lt;/tt&amp;gt;, it has been very reliable and offers very good performance. One exception, which is common among 2.6.32-based kernels, is that it's recommended that you emerge &amp;lt;tt&amp;gt;broadcom-netxtreme2&amp;lt;/tt&amp;gt; if you have any Broadcom-based NICs, as the in-kernel drivers have compatibility issues with certain models. This kernel is a very good option if you want a relatively modern server kernel and do not need [[OpenVZ]] support. We use gcc-4.4.5 to build this kernel. It will use gcc-4.4.5 automatically, without requiring the user to use &amp;lt;tt&amp;gt;gcc-config&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== debian-sources ===&lt;br /&gt;
&lt;br /&gt;
This is the Debian kernel. '''These ebuilds now support the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag.''' Daniel has added a special &amp;lt;tt&amp;gt;config-extract&amp;lt;/tt&amp;gt; command which can be used to list all available official Debian kernel configurations, and generate them from the Debian files included with the kernel. This kernel has optional [[OpenVZ]] support, but it is much better to use &amp;lt;tt&amp;gt;openvz-rhel6-stable&amp;lt;/tt&amp;gt; if you want a production-quality OpenVZ installation. For more information about how to use &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;config-extract&amp;lt;/tt&amp;gt;, see [[#Using debian-sources with Genkernel|Using debian-sources with Genkernel]] below. &lt;br /&gt;
&lt;br /&gt;
=== debian-sources-lts ===&lt;br /&gt;
&lt;br /&gt;
This is the Debian long-term stable kernel. '''These ebuilds now support the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag.''' Daniel has added a special &amp;lt;tt&amp;gt;config-extract&amp;lt;/tt&amp;gt; command which can be used to list all available official Debian kernel configurations, and generate them from the Debian files included with the kernel.&lt;br /&gt;
&lt;br /&gt;
== Binary USE ==&lt;br /&gt;
&lt;br /&gt;
Many of the kernel ebuilds in Funtoo Linux support the very useful &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag. By enabling this USE flag and emerging the kernel, the ebuild will automatically build a binary kernel image, initramfs and kernel modules and install them to &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;. The binary kernel image and initramfs can be used to boot your Funtoo Linux system without requiring any additional configuration. This is a great way to get a Funtoo Linux system up and running quickly. Here's how to do it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;sys-kernel/openvz-rhel5-stable binary&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
# emerge openvz-rhel5-stable&lt;br /&gt;
# nano -w /etc/boot.conf&lt;br /&gt;
# boot-update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information can be found in the [[Funtoo Linux Installation]] Guide.&lt;br /&gt;
&lt;br /&gt;
== Funtoo Linux Genkernel ==&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux contains a forked/enhanced version of genkernel with the following new capabilities:&lt;br /&gt;
&lt;br /&gt;
* genkernel can use a build directory that is separate from the kernel source directory. This is enabled using the new &amp;lt;tt&amp;gt;--build-dst&amp;lt;/tt&amp;gt; option.&lt;br /&gt;
* &amp;lt;tt&amp;gt;--build-src&amp;lt;/tt&amp;gt; is a new option that is equivalent to the &amp;lt;tt&amp;gt;--kerneldir&amp;lt;/tt&amp;gt; option.&lt;br /&gt;
* &amp;lt;tt&amp;gt;--fullname&amp;lt;/tt&amp;gt; can be used to specify the entire name of the kernel and initramfs images -- everything after &amp;lt;tt&amp;gt;kernel-&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;initramfs-&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;--firmware-src&amp;lt;/tt&amp;gt; - a new option that works identically to &amp;lt;tt&amp;gt;--firmware-dir&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;--firmware-dst&amp;lt;/tt&amp;gt; - a new capability - you can now define where genkernel installs firmware.&lt;br /&gt;
* Genkernel uses Funtoo Linux &amp;lt;tt&amp;gt;lvm2&amp;lt;/tt&amp;gt; rather than building its own.&lt;br /&gt;
* Some compile fixes.&lt;br /&gt;
&lt;br /&gt;
== Kernel Features and Stability ==&lt;br /&gt;
&lt;br /&gt;
This page provides an overview of kernel features and stability information:&lt;br /&gt;
&lt;br /&gt;
{| {{table}} &lt;br /&gt;
!Kernel Name&lt;br /&gt;
!Version&lt;br /&gt;
!USE flags&lt;br /&gt;
!Stability&lt;br /&gt;
!Extra Features&lt;br /&gt;
!Req'd udev&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;[[#vanilla-sources|vanilla-sources]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
|3.1.5&lt;br /&gt;
|N/A&lt;br /&gt;
|'''Excellent''' - recommended for desktops and servers.&lt;br /&gt;
|N/A&lt;br /&gt;
|Any&lt;br /&gt;
|Recommended for modern networking stack, hardware and [[Linux Containers]] support. This kernel must be manually configured by the user.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;[[#sysrescue-std-sources|sysrescue-std-sources]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
|2.6.35.210&lt;br /&gt;
|&amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Good'' - recommended for desktops&lt;br /&gt;
|N/A&lt;br /&gt;
|Any&lt;br /&gt;
|Nvidia card users: binary use flag installs nouveau drivers. Not compatible with nvidia-drivers.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;[[#openvz-rhel6-stable|openvz-rhel6-stable]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
|2.6.32.042.044.11&lt;br /&gt;
|&amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''Excellent''' - recommended for production servers&lt;br /&gt;
|N/A&lt;br /&gt;
|Any&lt;br /&gt;
|This kernel is built with gcc-4.4.5. &amp;lt;tt&amp;gt;emerge broadcom-netxtreme2&amp;lt;/tt&amp;gt; for reliable BCM5709+ support (integrated NIC)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;[[#openvz-rhel5-stable|openvz-rhel5-stable]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
|2.6.18.028.095.1&lt;br /&gt;
|&amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''Excellent''' - recommended for production servers&lt;br /&gt;
|OpenVZ&lt;br /&gt;
|=sys-fs/udev-146*&lt;br /&gt;
|Broadcom &amp;lt;tt&amp;gt;bnx2&amp;lt;/tt&amp;gt; driver module bundled with kernel appears to be OK. This kernel is built with gcc-4.1.2. Enabling the &amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt; USE flag will cause gcc-4.1.2 to be emerged and used for building the kernel.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;[[#ubuntu-server|ubuntu-server]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
|2.6.32.32.62&lt;br /&gt;
|&amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt;&lt;br /&gt;
|'''Excellent''' - recommended for production servers (still in extended testing)&lt;br /&gt;
| N/A&lt;br /&gt;
|Any&lt;br /&gt;
|This kernel is built with gcc-4.4.5. &amp;lt;tt&amp;gt;emerge broadcom-netxtreme2&amp;lt;/tt&amp;gt; for reliable BCM5709+ support (integrated NIC)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;[[#ubuntu-server|ubuntu-server]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
|2.6.35.28.50&lt;br /&gt;
|&amp;lt;tt&amp;gt;binary&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''not yet tested''&lt;br /&gt;
| N/A&lt;br /&gt;
|Any&lt;br /&gt;
|This kernel is built with gcc-4.4.5. &amp;lt;tt&amp;gt;emerge broadcom-netxtreme2&amp;lt;/tt&amp;gt; for reliable BCM5709+ support (integrated NIC)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;tt&amp;gt;[[#debian-sources|debian-sources]]&amp;lt;/tt&amp;gt;&lt;br /&gt;
|2.6.32.30&lt;br /&gt;
|&amp;lt;tt&amp;gt;openvz&amp;lt;/tt&amp;gt;&lt;br /&gt;
|''Good'' - still being evaluated by Funtoo&lt;br /&gt;
|OpenVZ (optional)&lt;br /&gt;
|Any&lt;br /&gt;
|See [[#Using debian-sources with Genkernel]], below.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Using Debian-Sources with Genkernel ==&lt;br /&gt;
&lt;br /&gt;
{{ fancyimportant|Debian-sources is now fully compatible with ''binary'' USE flag and recommended for desktop users. The below example is valid for manual installation. At least 12G of /var/tmp required to build &lt;br /&gt;
}}&lt;br /&gt;
This section describes how to build a binary kernel with &amp;lt;tt&amp;gt;debian-sources&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;genkernel&amp;lt;/tt&amp;gt;, and it also explains how to use Funtoo Linux's &amp;lt;tt&amp;gt;config-extract&amp;lt;/tt&amp;gt; tool to list and create official Debian kernel configurations.&lt;br /&gt;
&lt;br /&gt;
=== First step: emerging the required packages ===&lt;br /&gt;
&lt;br /&gt;
The first step is to emerge:&lt;br /&gt;
&lt;br /&gt;
# The Debian sources&lt;br /&gt;
# Genkernel itself&lt;br /&gt;
&lt;br /&gt;
This is achieved with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# emerge sys-kernel/debian-sources sys-kernel/genkernel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the Debian kernel sources are deployed, you should find a directory named '''linux-debian-''version''''' (e.g. linux-debian-2.6.32.30) under '''/usr/src'''. Update your the '''linux''' symlink to point on this directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/src&lt;br /&gt;
# rm linux&lt;br /&gt;
# ln -s linux-debian-2.6.32.30 linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, emerge the debian-sources with USE=&amp;quot;symlink&amp;quot;&lt;br /&gt;
=== Second step: Grabbing a configuration file ===&lt;br /&gt;
&lt;br /&gt;
If is now time to download the kernel configuration file. For this tutorial we will use a configuration file for AMD64 (several others architectures like MIPS or SPARC64 are available.)  To view a complete list of available kernel configurations, type &amp;lt;tt&amp;gt;./config-extract -l&amp;lt;/tt&amp;gt; in the Debian kernel source directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ninja1 linux-debian-2.6.32.30 # ./config-extract -l&lt;br /&gt;
&lt;br /&gt;
====== standard featureset ======&lt;br /&gt;
&lt;br /&gt;
       alpha: alpha-generic, alpha-legacy, alpha-smp&lt;br /&gt;
       amd64&lt;br /&gt;
       armel: iop32x, ixp4xx, kirkwood, orion5x, versatile&lt;br /&gt;
        hppa: parisc, parisc-smp, parisc64, parisc64-smp&lt;br /&gt;
        i386: 486, 686, 686-bigmem, amd64&lt;br /&gt;
        ia64: itanium, mckinley&lt;br /&gt;
        m68k: amiga, atari, bvme6000, mac, mvme147, mvme16x&lt;br /&gt;
        mips: 4kc-malta, 5kc-malta, r4k-ip22, r5k-ip32, sb1-bcm91250a, sb1a-bcm91480b&lt;br /&gt;
      mipsel: 4kc-malta, 5kc-malta, r5k-cobalt, sb1-bcm91250a, sb1a-bcm91480b&lt;br /&gt;
     powerpc: powerpc, powerpc-smp, powerpc64&lt;br /&gt;
        s390: s390x, s390x-tape&lt;br /&gt;
         sh4: sh7751r, sh7785lcr&lt;br /&gt;
       sparc: sparc64, sparc64-smp&lt;br /&gt;
     sparc64: sparc64, sparc64-smp&lt;br /&gt;
&lt;br /&gt;
====== vserver featureset ======&lt;br /&gt;
&lt;br /&gt;
       amd64&lt;br /&gt;
        i386: 686, 686-bigmem&lt;br /&gt;
        ia64: itanium, mckinley&lt;br /&gt;
     powerpc: powerpc, powerpc64&lt;br /&gt;
        s390&lt;br /&gt;
       sparc&lt;br /&gt;
     sparc64&lt;br /&gt;
&lt;br /&gt;
====== xen featureset ======&lt;br /&gt;
&lt;br /&gt;
       amd64&lt;br /&gt;
        i386&lt;br /&gt;
&lt;br /&gt;
====== openvz featureset ======&lt;br /&gt;
&lt;br /&gt;
       amd64&lt;br /&gt;
        i386&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type &amp;lt;tt&amp;gt;config-extract -h&amp;lt;/tt&amp;gt; for extended usage information:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ninja1 linux-debian-2.6.32.30 # ./config-extract -h&lt;br /&gt;
This work is free software.&lt;br /&gt;
&lt;br /&gt;
Copyright 2011 Funtoo Technologies. You can redistribute and/or modify it under&lt;br /&gt;
the terms of the GNU General Public License version 3 as published by the Free&lt;br /&gt;
Software Foundation. Alternatively you may (at your option) use any other&lt;br /&gt;
license that has been publicly approved for use with this program by Funtoo&lt;br /&gt;
Technologies (or its successors, if any.)&lt;br /&gt;
&lt;br /&gt;
usage: config-extract [options] arch [featureset] [subarch]&lt;br /&gt;
&lt;br /&gt;
  -h  --help        print this usage and exit&lt;br /&gt;
  -l  --list        list all available kernel configurations&lt;br /&gt;
  -o  --outfile     specify kernel config outfile --&lt;br /&gt;
                    defaults to .config in current directory&lt;br /&gt;
  [featureset]      defaults to &amp;quot;none&amp;quot; if not specified&lt;br /&gt;
  [subarch]         defaults to the only one available; otherwise required&lt;br /&gt;
&lt;br /&gt;
This program was written by Daniel Robbins for Funtoo Linux, for the purpose of&lt;br /&gt;
easily and conveniently extracting Debian kernel configurations. To see a nice&lt;br /&gt;
list of all available kernel configurations, use the --list option.&lt;br /&gt;
&lt;br /&gt;
Debian's kernel configs are specified internally in arch_featureset_flavor&lt;br /&gt;
format, such as: &amp;quot;amd64_openvz_amd64&amp;quot;. The featureset typically describes an&lt;br /&gt;
optional kernel configuration such as &amp;quot;xen&amp;quot; or &amp;quot;openvz&amp;quot;, while the flavor in&lt;br /&gt;
Debian terminology typically refers to the sub-architecture of the CPU.&lt;br /&gt;
&lt;br /&gt;
When using this command, you must specify an arch. A featureset of &amp;quot;none&amp;quot; is&lt;br /&gt;
assumed unless you specify one, and by default this program will pick the only&lt;br /&gt;
available subarch if there is only one to choose from. If not, you will need to&lt;br /&gt;
pick one (and the program will remind you to do this.)&lt;br /&gt;
&lt;br /&gt;
The kernel configuration will be written to &amp;quot;.config&amp;quot; in the current directory,&lt;br /&gt;
or the location you specified using the -o/--outfile option.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's use &amp;lt;tt&amp;gt;config-extract&amp;lt;/tt&amp;gt; to create a kernel configuration for an amd64 system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd linux&lt;br /&gt;
# ./config-extract amd64&lt;br /&gt;
Wrote amd64_none_amd64 kernel configuration to /usr/src/linux-debian-2.6.32.30/.config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;config-extract&amp;lt;/tt&amp;gt; also allows you to extract special Debian featuresets, such as settings for Xen and [[OpenVZ]] kernels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./config-extract amd64 openvz&lt;br /&gt;
Wrote amd64_openvz_amd64 kernel configuration to /usr/src/linux-debian-2.6.32.30/.config.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After using &amp;lt;tt&amp;gt;config-extract&amp;lt;/tt&amp;gt;, run &amp;lt;tt&amp;gt;make oldconfig&amp;lt;/tt&amp;gt; and accept all default options by hitting Enter at all prompts.&lt;br /&gt;
&lt;br /&gt;
=== Third step: Building and installing the kernel ===&lt;br /&gt;
&lt;br /&gt;
This is simply achieved by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# genkernel --kernel-config=config-2.6.32-5-amd64 all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* --kernel-config: use the given configfile. If you only give a filename here, it is searched for in your current working dir. You can also use a relative or an absolute path leading to your configfile here (for example: &amp;quot;--kernel-config=/usr/src/linux/configfile&amp;quot;).&lt;br /&gt;
* all: rebuild the kernel image and the initramfs ramdisk image (aside of kernel modules, the ramdisk image contains tools such as BusyBox and some generic startup scripts, depending on options you use on the command line several additional tools like lvm or raid volume management can be incorporated as well).&lt;br /&gt;
&lt;br /&gt;
{{ fancyimportant|Unless explicitly stated via ''--no-clean'' or ''--no-mrproper'', Genkernel will do a '''make mrproper''' in the kernel source tree, thus cleaning a previous build '''and removing the previous kernel configuration file''' in it. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you use Genkernel to rebuild a Linux kernel on SPARC64, remember to either:&lt;br /&gt;
* Set '''sparc64-unknown-linux-gnu-''' in ''General setup --&amp;gt; Cross-compiler tool prefix'' &lt;br /&gt;
* Put '''--kernel-cross-compile=sparc64-unknown-linux-gnu-''' on the Genkernel command line&lt;br /&gt;
&lt;br /&gt;
Once the kernel has been compiled and the ram disk has been generated, the kernel image plus its companion files (initramfs image and System.map) are placed in the /boot directory. You can use your favourite tool to update your bootloader configuration files.&lt;br /&gt;
&lt;br /&gt;
[[Category:Internals]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial</id>
		<title>Metro Quick Start Tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Metro_Quick_Start_Tutorial"/>
				<updated>2012-10-14T05:32:20Z</updated>
		
		<summary type="html">&lt;p&gt;Oleg: /* Installing Metro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Metro]] is the build system for [[Funtoo Linux]] and [[Gentoo Linux]] stages. It automates the bootstrapping process.&lt;br /&gt;
&lt;br /&gt;
This tutorial will take you through installing, setting up and running [[Metro]].&lt;br /&gt;
&lt;br /&gt;
= Preface = &lt;br /&gt;
&lt;br /&gt;
== How Metro Works == &lt;br /&gt;
&lt;br /&gt;
You may be wondering how [[Metro]] creates its first stage tarball. As you may have guessed, [[Metro]] cannot create a stage tarball out of thin air. To build a new stage tarball, [[Metro]] must use an existing, older stage tarball called a &amp;amp;quot;seed&amp;amp;quot; stage. This &amp;amp;quot;seed&amp;amp;quot; stage typically is used as the ''build environment'' for creating the stage we want.&lt;br /&gt;
&lt;br /&gt;
[[Metro]] can use two kinds of seed stages. Traditionally, [[Metro]] has used a stage3 as a seed stage. This stage3 is then used to build a new stage1, which in turn is used to build a new stage2, and then a new stage3. This is generally the most reliable way to build [[Gentoo Linux]] or [[Funtoo Linux]], so it's the recommended approach.&lt;br /&gt;
&lt;br /&gt;
== Seeds and Build Isolation ==&lt;br /&gt;
&lt;br /&gt;
Another important concept to mention here is something called ''build isolation''. Because [[Metro]] creates an isolated build environment, and the build environment is explicitly defined using existing, tangible entities -- a seed stage and a portage snapshot -- you will get consistent, repeatable results. In other words, the same seed stage, portage snapshot and build instructions will generate an essentially identical result, even if you perform the build a month later on someone else's workstation.&lt;br /&gt;
&lt;br /&gt;
== Local Build == &lt;br /&gt;
&lt;br /&gt;
Say you wanted to build a new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. The recommended method of doing this would be to grab an existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball to use as your seed stage. [[Metro]] will be told to use this existing &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 to build a new stage1 for the same &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;. For this process, the generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 would provide the ''build environment'' for creating our new stage1. Then, the new stage1 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2. And the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage2 would serve as the build environment for creating the new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3.&lt;br /&gt;
&lt;br /&gt;
In the [[Metro]] terminology this is called a '''local build''', which means a stage3 of a given architecture is used to seed a brand new build of the same architecture. Incidentally this will be the first exercise we are going to perform in this tutorial.&lt;br /&gt;
&lt;br /&gt;
A week later, you may want to build a brand new &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball. Rather than starting from the original &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 again, you'd probably configure [[Metro]] to use the most-recently-built &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as the seed. [[Metro]] has built-in functionality to make this easy, allowing it to easily find and track the most recent stage3 seed available.&lt;br /&gt;
&lt;br /&gt;
== Remote Build == &lt;br /&gt;
&lt;br /&gt;
[[Metro]] can also perform '''remote build''', where a stage3 of a different, but binary compatible, architecture is used as a seed to build a different architecture stage3. Consequentiality the second exercise we are going to perform in this tutorial will be to build a &amp;lt;tt&amp;gt;core2 32bit&amp;lt;/tt&amp;gt; stage3 tarball from the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 tarball we have just built.&lt;br /&gt;
&lt;br /&gt;
TODO: add caveats about what archs can be seeded and what can be not (maybe a table?)&lt;br /&gt;
&lt;br /&gt;
== Tailored Build == &lt;br /&gt;
&lt;br /&gt;
Last, it's also worthy noting that both in &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;remote builds&amp;lt;/tt&amp;gt;, [[Metro]] can be configured to add and/or remove individual packages to the final tarball.&lt;br /&gt;
Let's say you can't live without &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, at the end of this tutorial, we will show how to have your tailored stage3 to include it.&lt;br /&gt;
&lt;br /&gt;
= Installing Metro =&lt;br /&gt;
&lt;br /&gt;
Today the '''recommended and supported method''' is to use the Git repository of [[Metro]].  First ensure you remove the &amp;lt;tt&amp;gt;dev-util/metro&amp;lt;/tt&amp;gt; package if you had installed it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge -aC dev-util/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then ensure that &amp;lt;tt&amp;gt;dev-vcs/git&amp;lt;/tt&amp;gt; is installed on your system:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # emerge dev-vcs/git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, clone the master git repository as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d /root/git&lt;br /&gt;
(~) # cd /root/git&lt;br /&gt;
(~/git) # git clone git://github.com/funtoo/metro.git&lt;br /&gt;
(~/git) # ln -s /root/git/metro /usr/lib/metro&lt;br /&gt;
(~/git) # ln -s /root/git/metro/metro /usr/bin/metro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will now have a directory called &amp;lt;tt&amp;gt;/root/git/metro&amp;lt;/tt&amp;gt; that contains all the [[Metro]] source code.&lt;br /&gt;
Installation complete!&lt;br /&gt;
&lt;br /&gt;
= Configuring Metro =&lt;br /&gt;
&lt;br /&gt;
[[User:Drobbins|Daniel Robbins]] maintains [[Metro]], so it comes pre-configured to successfully build both [[Gentoo Linux]] and [[Funtoo Linux]] releases. Before reading farther, you might want to customize some basic settings like the number of concurrent jobs to fit your hardware's capabilities or the directory to use for produced stage archives. This is accomplished by editing &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt; which is the [[Metro]]'s master configuration file. The &amp;lt;tt&amp;gt;[path/mirror]&amp;lt;/tt&amp;gt; section defines where [[Metro]] will look for things it needs and also dump things it creates. As initially configured, [[Metro]] is set up to build [[Funtoo Linux]] and [[Gentoo Linux]] stage tarballs and place them in the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Mirror Paths - where to find required files and where to put created files&lt;br /&gt;
&lt;br /&gt;
[section path/mirror]&lt;br /&gt;
&lt;br /&gt;
: /home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the location of your mirror on disk, then edit the &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt; line (which defines the path/mirror variable) to point to another directory.&lt;br /&gt;
&lt;br /&gt;
For the purpose of the following steps, set an environment variable:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # export METRO_MIRROR=/home/mirror/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Of course, set the environment variable to whatever location you used in the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Arch and Subarch ==&lt;br /&gt;
&lt;br /&gt;
In the following example we are creating a pentium4 stage 3 compiled for x86-32bit binary compatibility. Pentium4 is a subarch of the x86-32bit architecture. Once you have metro installed you may find a full list of each subarch in your &amp;lt;tt&amp;gt;/usr/lib/metro/subarch&amp;lt;/tt&amp;gt; directory each subarch will have the file extension .spec&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
# ls /usr/lib/metro/subarch/&lt;br /&gt;
amd64-k10.spec         athlon-tbird.spec  generic_32.spec       native_32.spec   pentium-mmx.spec&lt;br /&gt;
amd64-k8_32.spec       athlon-xp.spec     generic_64.spec       native_64.spec   pentium-m.spec&lt;br /&gt;
amd64-k8.spec          atom_32.spec       generic_sparcv9.spec  niagara2.spec    pentiumpro.spec&lt;br /&gt;
amd64-k8+sse3_32.spec  atom_64.spec       geode.spec            niagara.spec     pentium.spec&lt;br /&gt;
amd64-k8+sse3.spec     btver1_64.spec     i486.spec             nocona.spec      prescott.spec&lt;br /&gt;
armv7a.spec            btver1.spec        i686.spec             opteron_64.spec  ultrasparc3.spec&lt;br /&gt;
athlon-4.spec          core2_32.spec      k6-2.spec             pentium2.spec    ultrasparc.spec&lt;br /&gt;
athlon-mp.spec         core2_64.spec      k6-3.spec             pentium3.spec    xen-pentium4+sse3_64.spec&lt;br /&gt;
athlon.spec            corei7.spec        k6.spec               pentium4.spec    xen-pentium4+sse3.spec&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an example list of Architectures, take a look at the directory listing on the [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-Current Mirror].&lt;br /&gt;
&lt;br /&gt;
= First stages build (local build) =&lt;br /&gt;
&lt;br /&gt;
To get this all started, we need to bootstrap the process by downloading an initial seed stage3 to use for building and place it in is proper location in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, so that [[Metro]] can find it. We will also need to create some special &amp;amp;quot;control&amp;amp;quot; files in &amp;lt;tt&amp;gt;/home/mirror/linux&amp;lt;/tt&amp;gt;, which will allow [[Metro]] to understand how it is supposed to proceed.&lt;br /&gt;
&lt;br /&gt;
== Step 0: Optional Quick Copy of Portage Tree ==&lt;br /&gt;
&lt;br /&gt;
There is a quick step you can perform to avoid having Metro re-clone the entire Portage tree. Perform this as root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /usr/portage; git checkout origin/master&lt;br /&gt;
# install -d /var/tmp/metro/cache/cloned-repositories&lt;br /&gt;
# cat /root/git/metro/etc/builds/funtoo-current/build.conf  | grep name&lt;br /&gt;
name: portage-mini-2011&lt;br /&gt;
# cp -a /usr/portage /var/tmp/metro/cache/cloned-repositories/portage-mini-2011&lt;br /&gt;
# cd /usr/portage; git checkout funtoo.org&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up pentium4 repository (local build) ==&lt;br /&gt;
&lt;br /&gt;
Assuming we're following the basic steps outlined in the previous section, and building an unstable funtoo (&amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt;) build for the &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt;, using a generic &amp;lt;tt&amp;gt;pentium4&amp;lt;/tt&amp;gt; stage3 as a seed stage, then here the first set of steps we'd perform:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # install -d &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # cd 2011-12-13&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # wget -c http://ftp.osuosl.org/pub/funtoo/funtoo-current/x86-32bit/pentium4/2011-12-13/stage3-pentium4-funtoo-current-2011-12-13.tar.xz&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4/2011-12-13) # cd ..&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/version&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;2011-12-13&amp;amp;quot; &amp;amp;gt; .control/version/stage3&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/pentium4) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OK, let's review the steps above. First, we create the directory &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt;, which is where Metro will expect to find unstable &amp;lt;tt&amp;gt;funtoo-current&amp;lt;/tt&amp;gt; pentium4 builds -- it is configured to look here by default. Then we create a specially-named directory to house our seed x86 stage3. Again, by default, Metro expects the directory to be named this way. We enter this directory, and download our seed x86 stage3 from funtoo.org. Note that the &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt; version stamp matches. Make sure that your directory name matches the stage3 name too. Everything has been set up to match Metro's default filesystem layout.&lt;br /&gt;
&lt;br /&gt;
Next, we go back to the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory, and inside it, we create a &amp;lt;tt&amp;gt;.control&amp;lt;/tt&amp;gt; directory. This directory and its subdirectories contain special files that Metro references to determine certain aspects of its behavior. The &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file is used by Metro to track the most recently-built stage3 for this particular build and subarch. Metro will automatically update this file with a new version stamp after it successfully builds a new stage3. But because Metro didn't actually ''build'' this stage3, we need to set up the &amp;lt;tt&amp;gt;.control/version/stage3&amp;lt;/tt&amp;gt; file manually. This will allow Metro to find our downloaded stage3 when we set up our pentium4 build to use it as a seed. Also note that Metro will create a similar &amp;lt;tt&amp;gt;.control/version/stage1&amp;lt;/tt&amp;gt; file after it successfully builds an pentium4 funtoo-current stage1.&lt;br /&gt;
&lt;br /&gt;
We also set up &amp;lt;tt&amp;gt;.control/strategy/build&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.control/strategy/seed&amp;lt;/tt&amp;gt; files with values of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; respectively. These files define the building strategy Metro will use when we build pentium4 funtoo-current stages. With a build strategy of &amp;lt;tt&amp;gt;local&amp;lt;/tt&amp;gt;, Metro will source its seed stage from funtoo-current pentium4, the current directory. And with a seed strategy of &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;, Metro will use a stage3 as a seed, and use this seed to build a new stage1, stage2 and stage3.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the pentium4 stages ==&lt;br /&gt;
&lt;br /&gt;
Incidentally, if all you wanted to do at this point was to build a new pentium4 funtoo-current stage1/2/3 (plus openvz and vserver templates). You would begin the process by typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/git/metro&lt;br /&gt;
# scripts/ezbuild.sh funtoo-current pentium4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have a slow machine, it could take several hours to be completed because several &amp;quot;heavy&amp;quot; components like gcc or glibc have to be recompiled in each stage. Once a stage has been successfully completed, it is placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/pentium4/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory, where &amp;lt;tt&amp;gt;YYYY-MM-DD&amp;lt;/tt&amp;gt; is today's date at the time the &amp;lt;tt&amp;gt;ezbuild.sh&amp;lt;/tt&amp;gt; script was started or the date you put on the ezscript.sh command line.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The next build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new pentium4 stage3. If you'd like, you can reconfigure Metro to use the most recently-built pentium stage3 as a seed for any pentium4 builds. To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/pentium4/.control/strategy/build&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now, Metro will use the most recentpentium4 stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Building for another binary compatible architecture (remote build) =&lt;br /&gt;
&lt;br /&gt;
As written above, [[Metro]] is able to perform '''remote build''' building different architecture stage3 from a binary compatible seeding stage3 (e.g. using a pentium4 stage3 to seed a &amp;lt;tt&amp;gt;Intel Core2 32bits&amp;lt;/tt&amp;gt; stage3). &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''remote build''' (a stage 3 of a different, but binary compatible, architecture is used as a seed). &lt;br /&gt;
What's not compatible? You can't use a &amp;lt;tt&amp;gt;Sparc&amp;lt;/tt&amp;gt; architecture to generate an &amp;lt;tt&amp;gt;x86&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;ARM&amp;lt;/tt&amp;gt; based stage and vice-versa. If you use a 32bit stage then you don't want to seed a 64bit build from it. Be sure that you are using a stage from the same architecture that you are trying to seed. Check [http://ftp.osuosl.org/pub/funtoo/funtoo-current/ Funtoo-current FTP Mirror] for a stage that is from the same Architecture that you will be building.  &lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up Core_2 32bit repository ==&lt;br /&gt;
&lt;br /&gt;
In this example, we're going to use this pentium4 funtoo-current stage3 to seed a new Core_2 32bit funtoo-current build. To get that done, we need to set up the pentium4 build directory as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # cd &amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit&amp;quot;&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # install -d core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit) # cd core2_32&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/strategy&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;remote&amp;amp;quot; &amp;amp;gt; .control/strategy/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;stage3&amp;amp;quot; &amp;amp;gt; .control/strategy/seed&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # install -d .control/remote&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;funtoo-current&amp;amp;quot; &amp;amp;gt; .control/remote/build&lt;br /&gt;
(/home/mirror/linux/funtoo-current/x86-32bit/core2_32) # echo &amp;amp;quot;pentium4&amp;amp;quot; &amp;amp;gt; .control/remote/subarch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps we follow are similar to those we performed for a ''local build'' to set up our pentium4 directory for local build. However, note the differences. We didn't download a stage, because we are going to use the pentium4 stage to build a new Core_2 32bit stage. We also didn't create the &amp;lt;tt&amp;gt;.control/version/stage{1,3}&amp;lt;/tt&amp;gt; files because Metro will create them for us after it successfully builds a new stage1 and stage3. We are still using a &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt; seed strategy, but we've set the build strategy to &amp;lt;tt&amp;gt;remote&amp;lt;/tt&amp;gt;, which means that we're going to use a seed stage that's not from this particular subdirectory. Where are we going to get it from? The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; directory contains this information, and lets Metro know that it should look for its seed stage3 in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/home/mirror/linux/funtoo-current/x86-32bit/pentium4&amp;quot;&amp;lt;/tt&amp;gt; directory. Which one will it grab? You guessed it -- the most recently built ''stage3'' (since our seed strategy was set to &amp;lt;tt&amp;gt;stage3&amp;lt;/tt&amp;gt;) that has the version stamp of &amp;lt;tt&amp;gt;2010-12-24&amp;lt;/tt&amp;gt;, as recorded in &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x86-32bit/pentium4/.control/version/stage3&amp;quot;&amp;lt;/tt&amp;gt;. Now you can see how all those control files come together to direct Metro to do the right thing.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Building the Core_2 32bit stages ==&lt;br /&gt;
&lt;br /&gt;
Now, you could start building your new Core_2 32bit stage1/2/3 (plus openvz and vserver templates) by typing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # /root/git/metro/scripts/ezbuild.sh funtoo-current core2_32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In that case, the produced stages are placed in the &amp;lt;tt&amp;gt;&amp;quot;${METRO_MIRROR}/funtoo-current/x32-bit/core2_32/YYYY-MM-DD&amp;quot;&amp;lt;/tt&amp;gt; subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Step 3: The Next Build ==&lt;br /&gt;
&lt;br /&gt;
At this point, you now have a new Core_2 32bit stage3. If you'd like, you can reconfigure Metro to use the most recently-built Core_2 32bit stage3 as a seed for any new Core_2 32bit builds. &lt;br /&gt;
&lt;br /&gt;
In the Metro terminology this is called a '''local build''' (a stage 3 of a a given architecture is used to seed a brand new build of the same architecture). &lt;br /&gt;
&lt;br /&gt;
To do this, simply type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(~) # echo &amp;amp;quot;local&amp;amp;quot; &amp;amp;gt; /home/mirror/linux/funtoo-current/x86-32bit/core2_32/.control/strategy/build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, Metro will use the most recent Core_2 32bit stage3 as a seed. The &amp;lt;tt&amp;gt;.control/remote&amp;lt;/tt&amp;gt; files you created will be ignored by Metro, since it's no longer going to perform a remote build.&lt;br /&gt;
&lt;br /&gt;
= Build your own tailored stage3 =&lt;br /&gt;
&lt;br /&gt;
Metro can be easily configured for building custom stage3 by including additional packages. Notice that including packages with heavy dependencies such as gnome, kde, xorg-server is not recommended (not tested so far). Well tested packages are &amp;lt;tt&amp;gt;app-misc/mc&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;app-misc/screen&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-process/htop&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;sys-apps/dstat&amp;lt;/tt&amp;gt;. An example for funtoo-current stage. Edit the following configuration file &amp;lt;tt&amp;gt;/root/git/metro/etc/builds/funtoo-current/build.conf&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[collect ../../fslayouts/funtoo/layout.conf]&lt;br /&gt;
&lt;br /&gt;
[section local]&lt;br /&gt;
&lt;br /&gt;
author: Daniel Robbins &amp;lt;drobbins@funtoo.org&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[section target]&lt;br /&gt;
&lt;br /&gt;
build: funtoo-current&lt;br /&gt;
compression: xz&lt;br /&gt;
&lt;br /&gt;
[section portage]&lt;br /&gt;
&lt;br /&gt;
stable: ~&lt;br /&gt;
MAKEOPTS: -j12&lt;br /&gt;
FEATURES: mini-manifest&lt;br /&gt;
SYNC: $[snapshot/source/remote]&lt;br /&gt;
USE:&lt;br /&gt;
profile: default/linux/$[target/arch:zap]/2008.0&lt;br /&gt;
&lt;br /&gt;
[section emerge]&lt;br /&gt;
&lt;br /&gt;
options: --jobs=4 --load-average=3 --keep-going=n&lt;br /&gt;
packages: [&lt;br /&gt;
	dev-vcs/git &lt;br /&gt;
	net-misc/dhcpcd&lt;br /&gt;
	sys-fs/reiserfsprogs&lt;br /&gt;
	net-misc/bridge-utils&lt;br /&gt;
	sys-devel/bc&lt;br /&gt;
	sys-apps/pciutils&lt;br /&gt;
	app-portage/gentoolkit&lt;br /&gt;
        app-misc/mc&lt;br /&gt;
        app-misc/screen&lt;br /&gt;
        sys-process/htop&lt;br /&gt;
        sys-apps/dstat &lt;br /&gt;
            &lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
[section snapshot]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see MAKEOPTS and emerge default options are additional strings to tweak, --keep-going=n is recommended, if something breaking during the stage building process, you can quickly diagnose the problem.&lt;br /&gt;
&lt;br /&gt;
Distfiles location can be specified in &amp;lt;tt&amp;gt;/root/git/metro/etc/metro.conf&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Main metro configuration file&lt;br /&gt;
# &lt;br /&gt;
# Path configuration:&lt;br /&gt;
&lt;br /&gt;
[collect ../targets/$[metro/target]/$[target:zap].spec]&lt;br /&gt;
[collect ./builds/$[metro/build]/build.conf]&lt;br /&gt;
[collect ../subarch/$[target/subarch:zap].spec]&lt;br /&gt;
&lt;br /&gt;
# General Paths&lt;br /&gt;
&lt;br /&gt;
[section path]&lt;br /&gt;
tmp: /var/tmp/metro&lt;br /&gt;
distfiles: /var/portage/distfiles&lt;br /&gt;
work: $[path/tmp]/work/$[metro/build]/$[target/name]&lt;br /&gt;
&lt;br /&gt;
[section path/cache]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Metro]]&lt;/div&gt;</summary>
		<author><name>Oleg</name></author>	</entry>

	</feed>