
<?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/index.php?title=Special:NewPages&amp;feed=atom&amp;hideredirs=1&amp;limit=50&amp;offset=&amp;namespace=0&amp;username=&amp;tagfilter=</id>
		<title>Funtoo Linux - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.funtoo.org/index.php?title=Special:NewPages&amp;feed=atom&amp;hideredirs=1&amp;limit=50&amp;offset=&amp;namespace=0&amp;username=&amp;tagfilter="/>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Special:NewPages"/>
		<updated>2013-05-22T08:00:58Z</updated>
		<subtitle>From Funtoo Linux</subtitle>
		<generator>MediaWiki 1.20.4</generator>

	<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: &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/Developer_Queries</id>
		<title>Developer Queries</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Developer_Queries"/>
				<updated>2013-04-08T21:35:46Z</updated>
		
		<summary type="html">&lt;p&gt;Drobbins: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents useful queries to perform to look at recent developer activity:&lt;br /&gt;
&lt;br /&gt;
== git Queries ==&lt;br /&gt;
&lt;br /&gt;
=== Committers from Date ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
xdev2 funtoo-overlay # ##i##git log --stat --after '04-01-2013' | grep Author: | sort -u&lt;br /&gt;
Author: Alexander Reitzel &amp;lt;shiin@funtoo.org&amp;gt;&lt;br /&gt;
Author: Daniel Robbins &amp;lt;drobbins@funtoo.org&amp;gt;&lt;br /&gt;
Author: Jean-Francis Roy &amp;lt;jeanfrancisroy@gmail.com&amp;gt;&lt;br /&gt;
Author: Oleg Vinichenko &amp;lt;oleg@funtoo.org&amp;gt;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== JIRA PostgreSQL Queries ==&lt;br /&gt;
&lt;br /&gt;
=== Top Commenters ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
jiradb=# ##i##SELECT author, count(author) as comments FROM jiraaction j WHERE UPDATED &amp;gt; now() - interval '30 days' group by author ORDER BY comments DESC limit 10;   &lt;br /&gt;
author    | comments -------------+---------- &lt;br /&gt;
oleg        |       55 &lt;br /&gt;
drobbins    |       29 &lt;br /&gt;
golodhrim   |       14 &lt;br /&gt;
arithmos    |       12 &lt;br /&gt;
jeanfrancis |       11 &lt;br /&gt;
fearedbliss |       10 &lt;br /&gt;
overkill    |        8 &lt;br /&gt;
janzhou     |        7 &lt;br /&gt;
anak1n      |        6 &lt;br /&gt;
sputnik     |        5&lt;br /&gt;
(10 rows)&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;/div&gt;</summary>
		<author><name>Drobbins</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/KnuthMuller386</id>
		<title>KnuthMuller386</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/KnuthMuller386"/>
				<updated>2013-04-03T05:55:11Z</updated>
		
		<summary type="html">&lt;p&gt;5.9.184.11: Created page with &amp;quot;These days, the very first priority of just about any educationalist, educator or even lecturer is always to check for Electronic digital Projectors which often carry impressi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These days, the very first priority of just about any educationalist, educator or even lecturer is always to check for Electronic digital Projectors which often carry impressive image lucidity and tremendous portability. Definitely, they look out there for technically advance projectors which could catch pupil's consideration using latest technology.&lt;br /&gt;
&lt;br /&gt;
Really, nothing at all can record the interest regarding pupils like a 3D projector. It is just a extraordinary resource which can jump the pupils in the world of fascination grabbing 3D program. Want to know the best part is that using 3D projectors; students often remember many get more info. Probably, Lightweight Projectors assist quite a lot throughout remembering instructions rich in visuals, graphics, animation, sound and wording for a lifetime. 3D Projectors offer extra fine image quality. Their particular remarkably stunning image good quality are able to turn regular lessons in to 3D lessons so that you can bring new magic in their classroom.&lt;br /&gt;
&lt;br /&gt;
Just imagine; the level of euphoria; pupils feels; when such helpful gadget will probably be mounted into their classes. By making use of 3D ready portable projectors, the actual most complex and hard to know training may be produced simple and exciting to find out. 3D projectors assist a great deal throughout eradicating communication gap among pupils along with lecturers. Additionally, they encourage classroom participation and also improve understanding retention good great lengthen. Scholars can indulge themselves within real-time online problem solving actions and enhance their essential thinking abilities.&lt;br /&gt;
&lt;br /&gt;
The largest advantage of utilizing 3D Projectors is can also add the 'wow' factor into the current curriculum as well. 3D projectors are unique but appealing into their strategy. Lecturers can use 3D projectors to carry out electronic dissections involving frog within the technology class or explore online topography to create location lessons alive and make them a lot more fascinating for your pupils. From the comfort of the particular live substantive the web to PowerPoint sales pitches, coming from music videos to be able to historical movies, coming from science research laboratory experiments to be able to mathematics courses, every thing is possible together with 3D projectors.&lt;br /&gt;
&lt;br /&gt;
Mobility associated with 3D projectors may be the most significant edge. Colleges and study centers which aren't afford person projectors to be put in in each and every class room can favor 3D set lightweight projectors. Such projectors are super easy to carry from class to another classroom and that way too on their.&lt;/div&gt;</summary>
		<author><name>5.9.184.11</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Viole9728</id>
		<title>Viole9728</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Viole9728"/>
				<updated>2013-04-02T16:49:09Z</updated>
		
		<summary type="html">&lt;p&gt;188.167.80.200: Created page with &amp;quot;Giant pandas are carnivores, but 99% of their food comes from more than 20 kinds of bamboos that grow in the high mountains and the deep valleys of China. With the changes of ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Giant pandas are carnivores, but 99% of their food comes from more than 20 kinds of bamboos that grow in the high mountains and the deep valleys of China. With the changes of the seasons, the kinds of the bamboos and the diet of the giant pandas are different. They like bamboo shoots best. From spring to summer, they like to live on the bamboo shoots of the Qiong bamboo (Q.tunidinoda Hsueh et Yi), some bamboos of the madake bamboo category, the wood bamboos in Bashan, the walking stick bamboos, the Chaohua arrow bamboos (Fargesia scabrida Yi), the Huaxi arrow bamboos and the big arrow bamboos. The bamboo shoots are the new trunks of the bamboos that have no branches or leaves and grow from the underground bamboo roots. The bamboo is very small and tender, and the water content is abundant. The nutritional components include: the raw fat is 1.27%, the raw fiber is 33.62%, the crude protein is 10.32%, and the general quantity of sugar is 26.15%. The bamboo shoots are small and tender and they are succulent which taste good and therefore are easy to be digested and absorbed and they are dainty dishes for giant pandas.&lt;/div&gt;</summary>
		<author><name>188.167.80.200</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/NetworkManager</id>
		<title>NetworkManager</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/NetworkManager"/>
				<updated>2013-03-16T03:38:00Z</updated>
		
		<summary type="html">&lt;p&gt;80.252.155.28: Created page with &amp;quot;If you're experiencing troubles, loosing connection after a 45-second timeout with NetworkManager and dhcpcd, consider moving to dhclient (net-misc/dhcp) - NetworkManager is d...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you're experiencing troubles, loosing connection after a 45-second timeout with NetworkManager and dhcpcd, consider moving to dhclient (net-misc/dhcp) - NetworkManager is designed for use with dhclient and have less (~0) problems with it.&lt;/div&gt;</summary>
		<author><name>80.252.155.28</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/CCACHE</id>
		<title>CCACHE</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/CCACHE"/>
				<updated>2013-03-10T03:45:47Z</updated>
		
		<summary type="html">&lt;p&gt;142.255.68.198: /* Using CCACHE to compile your kernel faster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CCACHE is an application that caches compilation results and reuses it in future compilations in order to achieve faster compile times. This short tutorial will show you how to use it on your system.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|'''CCACHE can cause build failures'''. If it does, please try to compile the application without CCACHE enabled. Bug reports reported with CCACHE enabled will be closed.}}&lt;br /&gt;
&lt;br /&gt;
== Installing CCACHE ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge ccache&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it finishes emerging, we will enable it in portage. This is very easy. Just open up /etc/portage/make.conf with your favorite text editor and add the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##FEATURES=&amp;quot;ccache&amp;quot;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it. If you want to check how much the cache is taking up on your disk and other info, you can run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##CCACHE_DIR=&amp;quot;/var/tmp/ccache&amp;quot; ccache -s&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You must pass the CCACHE_DIR option since ccache normally defaults to the user's home directory, and portage uses /var/tmp/ccache.&lt;br /&gt;
&lt;br /&gt;
== Tweaking CCACHE ==&lt;br /&gt;
&lt;br /&gt;
=== Disabling the CACHE limit ===&lt;br /&gt;
&lt;br /&gt;
If you want to let the cache have the flexibility to grow to whatever size it needs to (unlimited size cache), just do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##CCACHE_DIR=&amp;quot;/var/tmp/ccache&amp;quot; ccache -M 0&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will let the cache grow to whatever size it needs to grow over time.&lt;br /&gt;
&lt;br /&gt;
== Using CCACHE to compile your kernel faster ==&lt;br /&gt;
&lt;br /&gt;
In order to do this you need to change a few variables, you probably only want to change these variables temporarily, but you could change them permanently if you want to. Since we just want to do this temporarily for this example, make a new file called &amp;quot;build.sh&amp;quot; and put the following inside of it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
export CCACHE_DIR=&amp;quot;/var/tmp/ccache&amp;quot;&lt;br /&gt;
export PATH=&amp;quot;/usr/lib/ccache/bin:${PATH}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd /usr/src/linux&lt;br /&gt;
time make bzImage modules&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Give the file execute permission:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##chmod u+x build.sh&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will temporarily export the variables neccessary, then go into the /usr/src/linux folder (whatever you declared with 'eselect kernel') and then compile the kernel.[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Fearedbliss</name></author>	</entry>

	<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-03-10T00:19:16Z</updated>
		
		<summary type="html">&lt;p&gt;Fearedbliss: /* Compiling a compatible kernel */&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;
== 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.5.0 || 3.4.37 || 3.8.4&lt;br /&gt;
|-&lt;br /&gt;
| 3.4.2 || 3.4.35 || 3.7.10&lt;br /&gt;
|-&lt;br /&gt;
| 3.4.1 || 3.4.32 || 3.7.9&lt;br /&gt;
|-&lt;br /&gt;
| 3.4.0 || 3.4.30 || 3.7.8&lt;br /&gt;
|-&lt;br /&gt;
| 3.3.0 || 3.4.27 || 3.7.4&lt;br /&gt;
|}&lt;br /&gt;
&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;
Once that is complete, you will need to get the kernel sources 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;
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;
&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;
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;
Once the kernel is installed, now you need to make the SRM.&lt;br /&gt;
&lt;br /&gt;
== Creating the SRM ==&lt;br /&gt;
&lt;br /&gt;
Now it's time to gather the files and pack them in order to be an SRM. An SRM is nothing more than directory that has been compressed with squashfs. Thankfully I've (FearedBliss) written a script that will build it for you.&lt;br /&gt;
&lt;br /&gt;
You will need to install sys-fs/squashfs-tools and have squashfs support compiled in your kernel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are the required settings in the kernel to work with squashfs stuff.&lt;br /&gt;
&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;
Once all that is settled, clone my Bliss Initramfs Creator:&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;
You should have the following directory layout inside the &amp;quot;Bliss-Initramfs-Creator&amp;quot; folder:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
octopus initrd # ls -l&lt;br /&gt;
total 61&lt;br /&gt;
-rw-r--r-- 1 root root  4603 Mar  4 00:49 CHANGES&lt;br /&gt;
-rw-r--r-- 1 root root   176 Dec 28 12:46 CREDITS&lt;br /&gt;
-rw-r--r-- 1 root root 16726 Dec 28 12:46 LICENSE&lt;br /&gt;
-rw-r--r-- 1 root root  1842 Mar  4 00:49 README&lt;br /&gt;
-rw-r--r-- 1 root root  2367 Feb  3 19:07 USAGE&lt;br /&gt;
-rwxr-xr-x 1 root root  1794 Mar  4 00:49 createInit&lt;br /&gt;
drwxr-xr-x 3 root root     5 Mar  4 00:49 files&lt;br /&gt;
drwxr-xr-x 3 root root     6 Mar  4 00:49 hooks&lt;br /&gt;
drwxr-xr-x 2 root root     5 Mar  4 00:49 resources&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run it and follow the instructions for the kernel you want to make the srm for (In this case it's 3.4.35-std342-amd64):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
| Bliss Initramfs Creator - v1.6.7&lt;br /&gt;
| Author: Jonathan Vasquez &amp;lt;jvasquez1011@gmail.com&amp;gt;&lt;br /&gt;
| Distributed under the MPLv2&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;
&amp;gt;&amp;gt;&amp;gt; Do you want to use the current kernel: 3.8.1-ALL? [Y/n]: ##i##n&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Please enter the kernel name: ##i##3.4.32-std341-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.32-std341-amd64...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Creating ZFS System Rescue Module for 3.4.32-std341-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 SRM...&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; Complete :)&lt;br /&gt;
&amp;lt;/console&amp;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      78 Mar  9 22:04 zfs-3.4.32-std341-amd64.md5&lt;br /&gt;
-rw-r--r-- 1 root root 2584576 Mar  9 22:04 zfs-3.4.32-std341-amd64.srm&lt;br /&gt;
&amp;lt;/console&amp;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;
== Using the prebuilt srm ==&lt;br /&gt;
&lt;br /&gt;
=== Download the SRM ===&lt;br /&gt;
&lt;br /&gt;
We will use version 3.3.0 as an example. For version 3.3.0, you will be downloading the 3.4.27 srm.&lt;br /&gt;
&lt;br /&gt;
[http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/ Click to view and download the list of System Rescue CD versions and available modules.]&lt;br /&gt;
&lt;br /&gt;
Extract the file you just downloaded by doing:&lt;br /&gt;
&lt;br /&gt;
Create an empty directory, download the file, then extract it:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir temp &amp;amp;&amp;amp; cd temp&lt;br /&gt;
# ##i##wget http://ftp.osuosl.org/pub/funtoo/distfiles/sysrescuecd/zfs-3.4.27-std330-amd64.tar.bz2&lt;br /&gt;
# ##i##tar xvf zfs-3.4.27-std330-amd64.tar.bz2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Extracting it should give you a directory layout that looks like this:&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##ls -lh&lt;br /&gt;
total 2.5M&lt;br /&gt;
drwxr-xr-x 2 jon  jon  2 Jan 12 20:41     iso&lt;br /&gt;
-rwxr--r-- 1 jon  jon  1.5K Jan 12 20:31  make_iso.sh&lt;br /&gt;
drwxr-xr-x 2 jon  jon  4 Jan 12 19:44     srm&lt;br /&gt;
-rwxr--r-- 1 jon  jon  1.3K Jan 12 20:33  usb_inst.sh&lt;br /&gt;
-rwxr--r-- 1 jon  jon  294 Jan 12 20:05   vars.sh&lt;br /&gt;
-rw-r--r-- 1 root root 2.4M Jan 25 21:38  zfs-3.4.27-std330-amd64.tar.bz2&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The layout is as follows:&lt;br /&gt;
* iso - directory to place your system rescue cd iso in&lt;br /&gt;
* make_iso.sh - A script to automatically recreate the system rescue cd iso with the zfs stuff included&lt;br /&gt;
* srm - directory that has the srms&lt;br /&gt;
* usb_inst.sh - Creates a new flash drive for you with system rescue cd and puts the srms in it&lt;br /&gt;
* vars.sh - Variables (You don't need to worry about this).&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.&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 iso script. The new iso will be located in the iso directory as well with a -zfs ending. &lt;br /&gt;
&lt;br /&gt;
If you don't have the iso generating tools installed, the script will stop and tell you what to install.&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, then 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;
==== 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 .srm and .md5 to /mnt/usbstick&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cp zfs-3.4.27-std330-amd64.srm zfs-3.4.27-std330-amd64.md5 /mnt/usbstick&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancyimportant|If there are multiple kernel srms available for a System Rescue CD release, Only copy the srm for the kernel you will be booting.}}&lt;br /&gt;
&lt;br /&gt;
3. List your /mnt directory and you should see something similar to the following in your /mnt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
funtoo tmp # ls -lh /mnt&lt;br /&gt;
total 263M&lt;br /&gt;
drwxr-xr-x 3 root root 4.0K Jan  8 02:39 boot&lt;br /&gt;
drwxr-xr-x 2 root root 4.0K Jan  8 02:39 bootdisk&lt;br /&gt;
drwxr-xr-x 2 root root 4.0K Jan  8 02:39 bootprog&lt;br /&gt;
drwxr-xr-x 3 root root 4.0K Jan  8 02:39 efi&lt;br /&gt;
drwxr-xr-x 2 root root 4.0K Jan  8 02:39 ntpasswd&lt;br /&gt;
drwxr-xr-x 3 root root 4.0K Jan  8 02:40 syslinux&lt;br /&gt;
drwxr-xr-x 2 root root 4.0K Jan  8 02:49 sysrcd&lt;br /&gt;
-rwxr-xr-x 1 root root 260M Jan  8 02:39 sysrcd.dat&lt;br /&gt;
-rwxr-xr-x 1 root root   45 Jan  8 02:39 sysrcd.md5&lt;br /&gt;
drwxr-xr-x 2 root root 4.0K Jan  8 02:39 usb_inst&lt;br /&gt;
-rwxr-xr-x 1 root root  16K Jan  8 02:39 usb_inst.sh&lt;br /&gt;
-rwxr-xr-x 1 root root  877 Jan  8 02:39 usbstick.htm&lt;br /&gt;
-rwxr-xr-x 1 root root    6 Jan  8 02:39 version&lt;br /&gt;
-rwxr-xr-x 1 root root   62 Jan  8 02:50 zfs-3.4.27-std330-amd64.md5&lt;br /&gt;
-rwxr-xr-x 1 root root 2.4M Jan  8 02:50 zfs-3.4.27-std330-amd64.srm&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now unmount the 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;
3. Run 'depmod' so that the new modules can be seen by the kernel.&lt;br /&gt;
4. Run 'modprobe -v zfs to load the modules.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##depmod&lt;br /&gt;
# ##i##modprobe -v zfs&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! And after modprobe you can check with 'lsmod' if the 6 modules where loaded.}}&lt;br /&gt;
&lt;br /&gt;
5. 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.0-rc13, ZFS pool version 28, 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;
== Extra ==&lt;br /&gt;
&lt;br /&gt;
=== A more accurate kernel build setup ===&lt;br /&gt;
If you want to have a more accurate setup to upstream, you can check out the git repo he has for the target release. Example: [http://sourceforge.net/p/systemrescuecd/code/ci/74e7a9712a019958fbe099386c9fb6bd7813d907/tree/ Upstream Git Repo]&lt;br /&gt;
&lt;br /&gt;
If you navigate to portage-overlay/sys-kernel/std-sources, you can see the ebuild there and the files directory with the patches for the std-sources kernel.&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Fearedbliss</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Whenjobs</id>
		<title>Whenjobs</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Whenjobs"/>
				<updated>2013-02-01T22:10:45Z</updated>
		
		<summary type="html">&lt;p&gt;Golodhrim: update warning about shellscript and #-sign&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What are whenjobs ==&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|This document is a work in progress, as we are still investigating whenjobs for funtoo usage. For information about it see Funtoo tickets about [http://bugs.funtoo.org/browse/FL-316 whenjobs], [http://bugs.funtoo.org/browse/FL-337 initscript], [http://bugs.funtoo.org/browse/FL-338 User Feedback] and [http://bugs.funtoo.org/browse/FL-351 this document].}}&lt;br /&gt;
&lt;br /&gt;
Whenjobs are written by Richard Jones from [http://www.redhat.com RedHat Linux]. They are designed to be a cron daemon replacement with some improvements over normal cron-jobs. Further more we from Funtoo Linux added some improvements to them already. Whenjobs give users a simpler syntax for jobs to run and with funtoo improvements a good way of user-management for whenjobs, that way we fixed the default behaviour of whenjobs to not been able to run as root and let us execute the daemon on a userbasis by default.&lt;br /&gt;
&lt;br /&gt;
=== Question for help and testing ===&lt;br /&gt;
&lt;br /&gt;
With this tutorial we like to ask users to help us and test whenjobs. We would like to get your feedback to [http://bugs.funtoo.org/browse/FL-338 FL-338]. So please test and report there what you think and what you think should be improved.&lt;br /&gt;
&lt;br /&gt;
== How to install whenjobs ==&lt;br /&gt;
&lt;br /&gt;
The installation of whenjobs is really easy, just merge them and you would get all that is needed for a first testrun and later perhaps also a production usage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -avt whenjobs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's what is needed for installing whenjobs, nothing big so far.&lt;br /&gt;
&lt;br /&gt;
== How to get started ==&lt;br /&gt;
&lt;br /&gt;
As mentioned above we added a user-management and whenjobs has a changed syntax compared to normal cronjobs so we will discuss all these parts now. :)&lt;br /&gt;
&lt;br /&gt;
=== user management ===&lt;br /&gt;
&lt;br /&gt;
The user management for whenjobs is done with a single file located at '''/etc/whenjobs.users.conf''' just add a user to that file by a commaseperated list like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root,user1,user2,user3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where user1-user3 have to be system-usernames as they are checked. please do not add any other lines to that file, as there is atm now way for comments in the file and adding other lines will break so far the usage and you won't be able to start the daemon later. ATM there is no initscript, but we are working on one and that initscript will then use that file in the same way. :)&lt;br /&gt;
&lt;br /&gt;
=== whenjobs commands ===&lt;br /&gt;
&lt;br /&gt;
There are some basic commands for whenjobs you should be aware of before we get to explain the script syntax for whenjobs. this part will explain them.&lt;br /&gt;
&lt;br /&gt;
To edit/list a job script use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##whenjobs -e | --edit&lt;br /&gt;
# ##i##whenjobs -l | --list&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in the above case we added both the short and long version in one line so please use either the '''-e''' or the '''--edit''' version as there is no piping done at that part. We will use the same syntax for further examples if there are multiple ways of calling the function we need.&lt;br /&gt;
&lt;br /&gt;
Another import part is to set or get variables we want to set or set in whenjobs, that can be done with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
to get a variable:&lt;br /&gt;
# ##i##whenjobs --get variable&lt;br /&gt;
to set a variable or multiple varibles:&lt;br /&gt;
# ##i##whenjobs --set variable=value [variable=value ...]&lt;br /&gt;
and to display all set variables:&lt;br /&gt;
# ##i##whenjobs --variables&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another important function in whenjobs is the way to start, stop and request the status of the per-user daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##whenjobs --daemon-start&lt;br /&gt;
# ##i##whenjobs --daemon-stop&lt;br /&gt;
# ##i##whenjobs --daemon-status&lt;br /&gt;
# ##i##whenjobs --daemon-restart&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally we have the ability to inspect running jobs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##whenjobs --jobs&lt;br /&gt;
# ##i##whenjobs --cancel serial&lt;br /&gt;
# ##i##whenjobs --start &amp;quot;name&amp;quot;&lt;br /&gt;
# ##i##whenjobs --tail serial&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to get started with whenjobs now ===&lt;br /&gt;
&lt;br /&gt;
First edit the above mentioned '''whenjobs.users.conf''' file if not already done and start a daemon on a per-user basis with&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##whenjobs --daemon-start&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thats all for starting whenjobs and now we have time to write some whenjobs-scripts. We will use here some basic examples nothing for real time usage but it should be able to give you the impression on how to write your own scripts and use the variables in the later process. First we need to edit our whenjobs-script. This can be done by two ways:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
Version A) (manual way, not recommended)&lt;br /&gt;
# ##i##EDITOR ~/.whenjobs/jobs.ml&lt;br /&gt;
Edit the file with the scripts you want to use and save it, but after that you need to upload it so that whenjobs knows about it&lt;br /&gt;
# ##i##whenjobs --upload&lt;br /&gt;
Version B) (automatically by whenjobs, recommended)&lt;br /&gt;
# ##i##whenjobs -e  | --edit&lt;br /&gt;
just save your script now and whenjobs will upload it automatically for you.&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So far we are now fine with getting to the scripts, next let us add some basics. We will now start with a periodic call, like if we would like to check out load everyage every 10 minutes we would do it like this:&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|A note aside, the scripts are real shell scripts, so parts beginning with a '''#''' are comments and parts without are the shell script commands that are executed!}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
every 10 minutes :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # Get the current load average.&lt;br /&gt;
  load=`awk '{print $1}' /proc/loadavg`&lt;br /&gt;
  whenjobs --set --type float load=$load&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The power of whenjobs comes in game when you would like to base on a variable you set somewhere else:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
when load &amp;gt;= 6 :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  mail -s &amp;quot;ALERT: high load average: $load&amp;quot; MAILADDRESS &amp;lt; /dev/null&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That part will notify a user via email when his load average is greater or equal to 6, as when statements are &amp;quot;edge-triggered&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The '''--type''' switch above for setting a variable can be one of '''bool, int, float, string or unit'''&lt;br /&gt;
&lt;br /&gt;
==== Periodic expressions ====&lt;br /&gt;
&lt;br /&gt;
For periodic expressions you have to use the following syntax&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
every &amp;lt;period&amp;gt; :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where '''&amp;lt;period&amp;gt;''' is one of the following period expressions:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;period&amp;gt;&lt;br /&gt;
! Description&lt;br /&gt;
!&lt;br /&gt;
! Special &amp;lt;period&amp;gt;&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| second&lt;br /&gt;
| runs every second&lt;br /&gt;
|&lt;br /&gt;
| X seconds&lt;br /&gt;
| runs every X seconds&lt;br /&gt;
|-&lt;br /&gt;
| minute&lt;br /&gt;
| runs every minute&lt;br /&gt;
| &lt;br /&gt;
| X minutes&lt;br /&gt;
| runs every X minutes&lt;br /&gt;
|-&lt;br /&gt;
| hour&lt;br /&gt;
| runs every hour&lt;br /&gt;
| &lt;br /&gt;
| X hours&lt;br /&gt;
| runs every X hours&lt;br /&gt;
|-&lt;br /&gt;
| day&lt;br /&gt;
| runs every day, at midnight UTC&lt;br /&gt;
| &lt;br /&gt;
| X days&lt;br /&gt;
| runs every X days, at midnight UTC&lt;br /&gt;
|-&lt;br /&gt;
| week&lt;br /&gt;
| runs every week, on a Thursday at midnight UTC&lt;br /&gt;
| &lt;br /&gt;
| X weeks&lt;br /&gt;
| runs every X weeks, on a Thursday at midnight UTC&lt;br /&gt;
|-&lt;br /&gt;
| month&lt;br /&gt;
| runs every month, on the 1st at midnight UTC&lt;br /&gt;
| &lt;br /&gt;
| X months&lt;br /&gt;
| runs every X month, on the 1st at midnight UTC&lt;br /&gt;
|-&lt;br /&gt;
| year&lt;br /&gt;
| runs every year, on the 1/1 at midnight UTC&lt;br /&gt;
| &lt;br /&gt;
| X years&lt;br /&gt;
| runs every X years, on the 1/1 at midnight UTC&lt;br /&gt;
|-&lt;br /&gt;
| decade&lt;br /&gt;
| runs every 10 years&lt;br /&gt;
| &lt;br /&gt;
| X decades&lt;br /&gt;
| runs every X decades&lt;br /&gt;
|-&lt;br /&gt;
| century&lt;br /&gt;
| runs every 100 years&lt;br /&gt;
| &lt;br /&gt;
| X centuries&lt;br /&gt;
| runs every X centuries&lt;br /&gt;
|-&lt;br /&gt;
| millenium&lt;br /&gt;
| runs every 1000 years&lt;br /&gt;
| &lt;br /&gt;
| X millenia&lt;br /&gt;
| runs every X mellenia&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== When expressions ====&lt;br /&gt;
&lt;br /&gt;
For dependent jobs you need to use the when-statements with the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
when &amp;lt;expr&amp;gt; :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where '''&amp;lt;expr&amp;gt;''' is a when expression. But don't forget the colon between periods expression or when expression and the shell script.&lt;br /&gt;
&lt;br /&gt;
All in all you can say, that a when-expression is a job which runs, when the described conditions become true.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &amp;lt;expr&amp;gt;&lt;br /&gt;
! meaning&lt;br /&gt;
!&lt;br /&gt;
! &amp;lt;expr&amp;gt;&lt;br /&gt;
! meaning&lt;br /&gt;
|-&lt;br /&gt;
| expr &amp;amp;&amp;amp; expr&lt;br /&gt;
| boolean &amp;quot;and&amp;quot; of the two sub-expressions&lt;br /&gt;
|&lt;br /&gt;
| ! expr&lt;br /&gt;
| boolean negative of expr&lt;br /&gt;
|-&lt;br /&gt;
| expr &amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt; expr&lt;br /&gt;
| boolean &amp;quot;or&amp;quot; of the two sub-expressions&lt;br /&gt;
|&lt;br /&gt;
| expr + expr&lt;br /&gt;
| for numeric sub-expression, this performs addition, for strings it performs string concatenation, else it returns an error.&lt;br /&gt;
|-&lt;br /&gt;
| expr &amp;lt; expr&lt;br /&gt;
| evaluates sub-expressions and compares them with the operator&lt;br /&gt;
|&lt;br /&gt;
| expr - expr&lt;br /&gt;
| evaluates sub-expressions and if both are numeric uses operator on them else returns error&lt;br /&gt;
|-&lt;br /&gt;
| expr &amp;lt;= expr&lt;br /&gt;
| evaluates sub-expressions and compares them with the operator&lt;br /&gt;
|&lt;br /&gt;
| expr * expr&lt;br /&gt;
| evaluates sub-expressions and if both are numeric uses operator on them else returns error&lt;br /&gt;
|-&lt;br /&gt;
| expr == expr&lt;br /&gt;
| evaluates sub-expressions and compares them with the operator&lt;br /&gt;
|&lt;br /&gt;
| expr / expr&lt;br /&gt;
| evaluates sub-expressions and if both are numeric uses operator on them else returns error&lt;br /&gt;
|-&lt;br /&gt;
| expr &amp;gt;= expr&lt;br /&gt;
| evaluates sub-expressions and compares them with the operator&lt;br /&gt;
|&lt;br /&gt;
| expr mod expr&lt;br /&gt;
| evaluates sub-expressions and if both are numeric uses operator on them else returns error (infix operator)&lt;br /&gt;
|-&lt;br /&gt;
| expr &amp;gt; expr&lt;br /&gt;
| evaluates sub-expressions and compares them with the operator&lt;br /&gt;
|&lt;br /&gt;
| len expr&lt;br /&gt;
| returns the length of the string in expr&lt;br /&gt;
|-&lt;br /&gt;
| variable&lt;br /&gt;
| returns the value of named variable&lt;br /&gt;
| &lt;br /&gt;
| prev variable&lt;br /&gt;
| returns previous value of named variable&lt;br /&gt;
|-&lt;br /&gt;
| changes variable&lt;br /&gt;
| same as !(prev variabel == variable)&lt;br /&gt;
| &lt;br /&gt;
| increases variable&lt;br /&gt;
| same as prev variable &amp;lt; variable&lt;br /&gt;
|-&lt;br /&gt;
| decreases variable&lt;br /&gt;
| prev variable &amp;gt; variable&lt;br /&gt;
| &lt;br /&gt;
| reloaded ()&lt;br /&gt;
| do not use it, it does not what you want (manpage warning)&lt;br /&gt;
|-&lt;br /&gt;
| false&lt;br /&gt;
| constant equals always false&lt;br /&gt;
| &lt;br /&gt;
| true&lt;br /&gt;
| constant equals always true&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;any string&amp;quot;&lt;br /&gt;
| empty string in boolean = false, else equals true&lt;br /&gt;
| &lt;br /&gt;
| N&lt;br /&gt;
| any integer, boolean 0=false, non-zero=true&lt;br /&gt;
|-&lt;br /&gt;
| N. | .N | N.N | N.NeN&lt;br /&gt;
| and floating point number, boolean 0=false, non-zero=true&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== shell scripts ====&lt;br /&gt;
&lt;br /&gt;
The code between '''&amp;lt;&amp;lt; ... &amp;gt;&amp;gt;''' is a simple shell script and is executed using $SHELL. If $SHELL is not set, it is executed with '''/bin/sh'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! available variable&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| $JOBNAME&lt;br /&gt;
| The name of the job. If the job has been named explicitly, then that name is available through this variable, else it will be some implicit name like '''job$1'''.&lt;br /&gt;
|-&lt;br /&gt;
| $JOBSERIAL&lt;br /&gt;
| The serial number of the job. This is simply a variable that increments each time a job is run, and is unique to that run of the job.&lt;br /&gt;
|-&lt;br /&gt;
| $HOME, $LOGNAME etc&lt;br /&gt;
| these are available as normal&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The shell scripts run with its current directory set to an temporary directory, that is cleaned up automacically after the job exists. So you don't have to worry about cleaning them up later. If you would like to store some values permanently, save the files to a well-known directory, eg. $HOME, '''/var''' etc.&lt;br /&gt;
&lt;br /&gt;
All shell scripts are executed as the ordinary user. They have no special privileges.&lt;br /&gt;
&lt;br /&gt;
==== Job names ====&lt;br /&gt;
&lt;br /&gt;
If you like to give a job a unique name use the following syntax:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
job &amp;quot;JOBNAME&amp;quot;&lt;br /&gt;
every &amp;lt;period&amp;gt; :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== OCAML expressions ====&lt;br /&gt;
&lt;br /&gt;
You can also use OCAML expressions in the code. they are useful for factoring common code or strings, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
let prefix = &amp;quot;daily_&amp;quot;&lt;br /&gt;
&lt;br /&gt;
job (prefix ^ &amp;quot;virus_scan&amp;quot;)&lt;br /&gt;
every day :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
job (prefix ^ &amp;quot;disk_check&amp;quot;)&lt;br /&gt;
every day :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== initial value of variables =====&lt;br /&gt;
&lt;br /&gt;
Variables are empty until they first get set, you can set a default starting value for a variable if you like with the following code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
let () =&lt;br /&gt;
  Whentools.set_variable &amp;quot;variable&amp;quot; &amp;quot;value&amp;quot;;&lt;br /&gt;
  Whentools.set_variable_int &amp;quot;counter&amp;quot; 0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Pre functions =====&lt;br /&gt;
&lt;br /&gt;
You can let arrange to run a '''pre''' function before a job runs. This function may decide to not run the job. One possible usage for that is the that you only want to have one job at time from the same job to run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
job &amp;quot;only one&amp;quot;&lt;br /&gt;
pre (Whentools.one ())&lt;br /&gt;
every &amp;lt;period&amp;gt; :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Post functions =====&lt;br /&gt;
&lt;br /&gt;
The same is for stuff after a job has run. This is handled by the '''post''' function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
job &amp;quot;talk to me after finished&amp;quot;&lt;br /&gt;
post (Whentools.mailto &amp;quot;you@example.com&amp;quot;)&lt;br /&gt;
every &amp;lt;period&amp;gt; :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Basic available Whentools functions =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! function&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot;| whentools.mailto [~only_on_failure:true] [~from:from_address] email_address result&lt;br /&gt;
| This built-in post function sends the result of the script by email to the given email address.&lt;br /&gt;
&lt;br /&gt;
If the optional &amp;quot;~only_on_failure:true&amp;quot; flag is set, then it is only sent out if the script failed.&lt;br /&gt;
&lt;br /&gt;
If the optional &amp;quot;~from&amp;quot; flag is set, then the from address is set accordingly.  This is sometimes needed when sending mail.&lt;br /&gt;
&lt;br /&gt;
Note the &amp;quot;result&amp;quot; parameter is passed implicitly by the daemon. You do not need to add it.&lt;br /&gt;
&lt;br /&gt;
Here are some examples of using the mailto function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
job &amp;quot;ex.1&amp;quot;&lt;br /&gt;
post (Whentools.mailto &amp;quot;you@example.com&amp;quot;)&lt;br /&gt;
every 10 seconds :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
   # shell script 1&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
job &amp;quot;ex.2&amp;quot;&lt;br /&gt;
post (Whentools.mailto ~only_on_failure:true &amp;quot;you@example.com&amp;quot;)&lt;br /&gt;
every 10 seconds :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script 2&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let from = &amp;quot;me@example.com&amp;quot;&lt;br /&gt;
let to_addr = &amp;quot;you@example.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
job &amp;quot;ex.3&amp;quot;&lt;br /&gt;
post (Whentools.mailto ~from to_addr)&lt;br /&gt;
every 10 seconds :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  # shell script 3&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot;| Whentools.max n&lt;br /&gt;
| This built-in pre function ensures that a maximum of n instances of the job are running.&lt;br /&gt;
&lt;br /&gt;
It checks the list of running jobs, and if n or more instances are already running, then it returns &amp;quot;false&amp;quot;, which ensures that the new job is not started.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot;| Whentools.one ()&lt;br /&gt;
| This built-in pre function ensures that only one instance of the job is running.  It is the same as calling: Whentools.max 1&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot;| Whentools.set_variable name string&lt;br /&gt;
| Set variable name to the string&lt;br /&gt;
|-&lt;br /&gt;
| Whentools.set_variable_bool name b&lt;br /&gt;
| Set variable name to the boolean value b&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot;| Whentools.set_variable_int name i&lt;br /&gt;
| Set variable name to the integer value i&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot;| Whentools.set_variable_string name s&lt;br /&gt;
| Set variable name to the string value &amp;lt;s&amp;gt;.  This is the same as Whentools.set_variable&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top;&amp;quot;| Whentools.set_variable_float name f&lt;br /&gt;
| Set variable name to the floating point value f&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the preinfo passed to the pre functions and results for the post functions have a view in the manpage.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Finally here are some examples to which questions came up, hope you find them helpful for your first own tries... :)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ocaml&amp;quot;&amp;gt;&lt;br /&gt;
every 1 minute :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  testtime=`date +%H%M`&lt;br /&gt;
  whenjobs --set --type int test=${testtime}&lt;br /&gt;
  whenjobs --set --type int runtime=0016&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
when test == 0017 :&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  echo `date` &amp;gt;\&amp;gt; ~/test.log &lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
when test == runtime&lt;br /&gt;
&amp;lt;&amp;lt;&lt;br /&gt;
  whenjobs --get runtime &amp;gt;\&amp;gt; ~/test.log&lt;br /&gt;
&amp;gt;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above whenjobs have the need to run each day at a specific time, so we show you here two ways of doing it.&lt;br /&gt;
&lt;br /&gt;
First we define a variable test for whenjobs based on the date with the HHMM output what would for example result in 0017 for 12:17am and 1428 for 2:28pm. then in the first when expression we test if our variable equals 0017 and if yes it runs, the second version is to define a second variable called runtime and then do like the second test does a test for it based on comparing both variables.&lt;br /&gt;
&lt;br /&gt;
But now enough with that long doc, happy whenjobing for all of you... :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;br /&gt;
[[Category:Labs]]&lt;br /&gt;
[[Category:Featured]]&lt;/div&gt;</summary>
		<author><name>Golodhrim</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Funtoo_Events</id>
		<title>Funtoo Events</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Funtoo_Events"/>
				<updated>2013-01-29T21:29:28Z</updated>
		
		<summary type="html">&lt;p&gt;Golodhrim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Event Calendar Item&lt;br /&gt;
|event=Start of Funtoo Events Calendar&lt;br /&gt;
|start=2013/01/29&lt;br /&gt;
|type=Meeting&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This site is a WIP for events the Funtoo Community is invited to join and get a meet and greet with devs and other entusiast of Funtoo Linux. :)&lt;br /&gt;
&lt;br /&gt;
{{#ask:[[Has event::+]][[Has event start::+]]&lt;br /&gt;
|?Has event=title&lt;br /&gt;
|?Has event start&lt;br /&gt;
|?Has event end&lt;br /&gt;
|?Has event description=Description&lt;br /&gt;
|?Has event icon=icon&lt;br /&gt;
|?Has event color=color&lt;br /&gt;
|?Has event location         &lt;br /&gt;
|format=eventcalendar&lt;br /&gt;
|start=earliest&lt;br /&gt;
|defaultview=month&lt;br /&gt;
|limit=   &lt;br /&gt;
|link=subject&lt;br /&gt;
|legend=pane&lt;br /&gt;
|firstday=Sunday&lt;br /&gt;
|dayview=yes&lt;br /&gt;
|headers=show&lt;br /&gt;
|theme=vector}}&lt;br /&gt;
&lt;br /&gt;
{{#formlink:popup|form=Event Calendar Item|link text=Create event|link type=button}}&lt;/div&gt;</summary>
		<author><name>Golodhrim</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Boot_Methods</id>
		<title>Boot Methods</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Boot_Methods"/>
				<updated>2013-01-22T00:28:34Z</updated>
		
		<summary type="html">&lt;p&gt;D2 racing: /* Pure UEFI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the various methods that can be used to set up a disk to boot Funtoo Linux. If you have more than one disk, choose a single disk to serve as your boot disk.&lt;br /&gt;
&lt;br /&gt;
=== Pure MBR + GRUB ===&lt;br /&gt;
&lt;br /&gt;
This option is the &amp;quot;classic&amp;quot; way to boot Funtoo Linux and uses traditional MBR partitions, which have existed since the origin of the PC. Here is the typical disk layout:&lt;br /&gt;
&lt;br /&gt;
* MBR at beginning of boot disk&lt;br /&gt;
* MBR partition 1, &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt; is the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem (typically ext2)&lt;br /&gt;
* MBR partition 2, &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt; is ''swap''.&lt;br /&gt;
* MBR partition 3, &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; is the &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root) filesystem.&lt;br /&gt;
&lt;br /&gt;
Here's how the boot process works:&lt;br /&gt;
&lt;br /&gt;
# The system BIOS loads the MBR from your boot disk (containing stage1 of the GRUB boot loader) and runs it.&lt;br /&gt;
# Extra boot-related code is loaded by the GRUB stage1 from the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem on the disk.&lt;br /&gt;
&lt;br /&gt;
Now, the boot loader is able to run and load the Linux kernel and initramfs, and start Funtoo Linux.&lt;br /&gt;
&lt;br /&gt;
=== GPT + GRUB ===&lt;br /&gt;
&lt;br /&gt;
This is a more modern way to boot Linux. It uses MBR for booting but uses the more modern GPT partition scheme. Here's the disk layout:&lt;br /&gt;
&lt;br /&gt;
* ''no MBR is installed or required''&lt;br /&gt;
* GPT partition 1, &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt; is the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem (typically ext2)&lt;br /&gt;
* GPT partition 2 type 0xEF02, &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt; is the ''boot loader partition'' (this contains a fake MBR).&lt;br /&gt;
* GPT partition 3, &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; is ''swap''.&lt;br /&gt;
* GPT partition 4, &amp;lt;tt&amp;gt;/dev/sda4&amp;lt;/tt&amp;gt; is the &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root) filesystem.&lt;br /&gt;
&lt;br /&gt;
Here's how this hybrid scheme works:&lt;br /&gt;
&lt;br /&gt;
# The system BIOS loads the fake MBR from your boot disk(/dev/sda2) (containing stage1 of the GRUB boot loader) and runs it.&lt;br /&gt;
# Extra boot-related code is loaded by the GRUB stage1 from a small (a few MB) GPT partition on the disk.&lt;br /&gt;
&lt;br /&gt;
Now, the boot loader is able to run and load the Linux kernel and initramfs, and start Funtoo Linux.&lt;br /&gt;
&lt;br /&gt;
=== UEFI + GRUB ===&lt;br /&gt;
&lt;br /&gt;
UEFI is a new-style firmware that is used for booting. It is generally available on all new PCs (2012 and newer) and may be available on older systems as well. Here's the disk layout:&lt;br /&gt;
&lt;br /&gt;
* ''no MBR is installed or required''&lt;br /&gt;
* GPT partition 1, &amp;lt;tt&amp;gt;/dev/sda1&amp;lt;/tt&amp;gt; is the &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem (&amp;lt;tt&amp;gt;vfat&amp;lt;/tt&amp;gt; aka &amp;quot;FAT32&amp;quot;).&lt;br /&gt;
* GPT partition 2, &amp;lt;tt&amp;gt;/dev/sda2&amp;lt;/tt&amp;gt; is ''swap''.&lt;br /&gt;
* GPT partition 3, &amp;lt;tt&amp;gt;/dev/sda3&amp;lt;/tt&amp;gt; is the &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; (root) filesystem.&lt;br /&gt;
&lt;br /&gt;
Here's how this boot scheme works:&lt;br /&gt;
&lt;br /&gt;
# UEFI (contained in your motherboard's firmware) loads the Bootmanager entry from the RW NVRAM inside your motherboard. &lt;br /&gt;
# If there's a valid entry that contains Grub, then the GRUB boot loader code from your &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem will be loaded. &lt;br /&gt;
# UEFI can read from &amp;lt;tt&amp;gt;vfat&amp;lt;/tt&amp;gt; partitions directly, which is why we use &amp;lt;tt&amp;gt;vfat&amp;lt;/tt&amp;gt; instead of the normal &amp;lt;tt&amp;gt;ext2&amp;lt;/tt&amp;gt; for &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now, the boot loader is able to run and load the Linux kernel and initramfs from the &amp;lt;tt&amp;gt;vfat&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;/boot&amp;lt;/tt&amp;gt; filesystem, and start Funtoo Linux.&lt;br /&gt;
&lt;br /&gt;
=== Pure UEFI ===&lt;br /&gt;
&lt;br /&gt;
A Pure UEFI boot is also possible. The partitioning scheme is the same as the UEFI + GRUB scheme, above.&lt;br /&gt;
&lt;br /&gt;
Here's how this boot scheme works:&lt;br /&gt;
&lt;br /&gt;
# UEFI (contained in your motherboard's firmware) loads the Bootmanager entry from the RW NVRAM inside your motherboard.&lt;br /&gt;
#  UEFI loads the Linux kernel STUB and initramfs directly, and runs the Linux kernel to start Funtoo Linux.&lt;/div&gt;</summary>
		<author><name>Drobbins</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Forking_An_Ebuild</id>
		<title>Forking An Ebuild</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Forking_An_Ebuild"/>
				<updated>2013-01-21T03:40:15Z</updated>
		
		<summary type="html">&lt;p&gt;Palica: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Often, a Funtoo developer needs to fork an upstream ebuild. This is necessary when we want to apply fixes to it. This page will explain the concepts of forking and how this works in the context of Funtoo.&lt;br /&gt;
&lt;br /&gt;
== Portage Tree Generation ==&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux generates its Portage tree using a special script that essentially takes a Gentoo tree as its starting point, and then applies various modifications to it. The modifications involve adding packages from various overlays, including our [[Overlay:Funtoo-overlay]]. Some packages added are brand new, while other packages are our special forked versions that replace existing packages. &lt;br /&gt;
&lt;br /&gt;
In the vast majority of cases, when we fork a package, we take full responsibility for all ebuilds associated with that package, meaning that we have a full copy of the &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; directory in one of our overlays.&lt;br /&gt;
&lt;br /&gt;
If you're interested in seeing the actual script that does all these things, take a look at the following files:&lt;br /&gt;
&lt;br /&gt;
; http://git.funtoo.org/funtoo-overlay/tree/funtoo/scripts/current-update.sh: cronned script that calls &amp;lt;tt&amp;gt;merge.py&amp;lt;/tt&amp;gt;.&lt;br /&gt;
;http://git.funtoo.org/funtoo-overlay/tree/funtoo/scripts/merge.py: python script that does the heavy lifting of combining Gentoo tree with various overlays, including our flora and funtoo-overlay. When we want to change what overlays we merge, what packages we exclude as a matter of policy (such as stale packages in some overlays), we make changes to this file.&lt;br /&gt;
; http://git.funtoo.org/funtoo-overlay/tree/funtoo/scripts/merge_utils.py: python module that contains classes and methods that implement the merging functionality.&lt;br /&gt;
&lt;br /&gt;
== Forking an Ebuild ==&lt;br /&gt;
&lt;br /&gt;
In general, we fork ebuilds from Gentoo that we want to modify in some way. Before you fork an ebuild, it's important to understand that in general we fork entire packages, not just a single ebuild. This means that if you want to make some changes to &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt;, you are going to fork all &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; ebuilds, and then Funtoo will be responsible for continuing to maintain these ebuilds until the package is unforked. Here are the steps we would use to fork &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
# Find &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; in you regular Portage tree. Make sure you have run &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt; recently to ensure it is up-to-date. If you want to fork from very recent changes that are not yet in our tree, you may need to grab the most recent Gentoo Portage tree to serve as your source for &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; (this typically isn't necessary.)&lt;br /&gt;
# Copy the &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; directory in its entirety to &amp;lt;tt&amp;gt;funtoo-overlay/sys-foo/bar&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Make any necessary modifications to &amp;lt;tt&amp;gt;funtoo-overlay/sys-foo/bar&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Perform some funtoo-ification steps prior to commit.&lt;br /&gt;
# Add and commit the changes to funtoo-overlay.&lt;br /&gt;
# Push changes to funtoo-overlay.&lt;br /&gt;
&lt;br /&gt;
At this point, the forked &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; package will be part of funtoo-overlay. The next time our unified Portage tree is generated by &amp;lt;tt&amp;gt;merge.py&amp;lt;/tt&amp;gt; (the one that users have in their &amp;lt;tt&amp;gt;/usr/portage&amp;lt;/tt&amp;gt; and is updated via &amp;lt;tt&amp;gt;emerge --sync&amp;lt;/tt&amp;gt;), your forked ebuild will be used in place of the Gentoo ebuild. Why is this? It is because our &amp;lt;tt&amp;gt;merge.py&amp;lt;/tt&amp;gt; script has been defined with a policy that any ebuilds in funtoo-overlay will replace any existing Gentoo ebuilds if they exist. The mechanism of replacement is that our &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; directory will be used in place of Gentoo's &amp;lt;tt&amp;gt;sys-foo/bar&amp;lt;/tt&amp;gt; directory. So this is how the forking process works.&lt;br /&gt;
&lt;br /&gt;
== Funtoo-ification ==&lt;br /&gt;
&lt;br /&gt;
When we fork a package from Gentoo, we perform the following tweaks to the package directory before committing:&lt;br /&gt;
&lt;br /&gt;
# Removal of &amp;lt;tt&amp;gt;ChangeLog&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;ebuild foo-1.0.ebuild digest&amp;lt;/tt&amp;gt; before committing. This will cause the &amp;lt;tt&amp;gt;Manifest&amp;lt;/tt&amp;gt; file to be regenerated. Gentoo has a lot more entries in this file than we do, since we use mini-Manfiests that only include DIST listings (for distfiles only.) We want to commit our mini-Manifest (still called &amp;lt;tt&amp;gt;Manifest&amp;lt;/tt&amp;gt;, just with less entries in it) rather than the one that came from Gentoo.&lt;br /&gt;
# Edit the top of each ebuild, and remove all &amp;lt;tt&amp;gt;Copyright&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;$Header:&amp;lt;/tt&amp;gt; lines at the top of the file. We have a LICENSE.txt and COPYRIGHT.txt file in the root of our Portage tree, which is easier to maintain than keeping all the years up-to-date in each ebuild. Also, the &amp;lt;tt&amp;gt;$Header:&amp;lt;/tt&amp;gt; line is there for the CVS version control system in Gentoo which Funtoo does not use. ''The only comment that should remain on the top of the ebuild is the one stating that it is distributed under the GPLv2.''.&lt;br /&gt;
&lt;br /&gt;
Here are a few additional changes that you are allowed to make to any forked ebuilds:&lt;br /&gt;
&lt;br /&gt;
# Line length greater than 80 characters. Gentoo enforces an 80-character line length limit. We don't.&lt;br /&gt;
# &amp;lt;tt&amp;gt;KEYWORDS&amp;lt;/tt&amp;gt; of &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;~*&amp;lt;/tt&amp;gt;. Gentoo does not allow these shortcuts. We do. They allow you to say &amp;quot;all arches&amp;quot; and &amp;quot;all unstable arches&amp;quot; in a concise way. Gentoo doesn't allow these shortcuts because it's Gentoo's policy to have each arch team manually approve each package. We do not have this policy so we can use the shortcuts.&lt;br /&gt;
# Use of &amp;lt;tt&amp;gt;4-python&amp;lt;/tt&amp;gt; EAPI. We allow the use of this EAPI for enhanced python functionality.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Drobbins</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ODROID_U2</id>
		<title>ODROID U2</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ODROID_U2"/>
				<updated>2013-01-14T01:20:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jeanfrancis: /* Kernel and modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [http://www.hardkernel.com/renewal_2011/products/prdt_info.php| ODROID U2 ] is an ARM development board, featuring a 1.7 GHz quad-core CPU (ARMv7a). This document contains notes about installing Funtoo Linux on this device.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cross-compiler installation ==&lt;br /&gt;
&lt;br /&gt;
To compile a suitable Linux kernel and bootloader for the ODROID U2, you need to install an ARMv7a hardfloat toolchain on your system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge crossdev&lt;br /&gt;
# ##i##crossdev -v -t armv7a-hardfloat-linux-gnueabi&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|In the following sections, replace /dev/sdX with the actual device node of your SD card.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== U-boot bootloader ==&lt;br /&gt;
&lt;br /&gt;
The ODROID-U2 needs U-boot as a bootloader. The ODROID U2 vendor provides a git repository with all what is needed to build and install U-boot on the SD-card that will be used to boot the device.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkdir ~/odroid_u2&lt;br /&gt;
# ##i##cd ~/odroid_u2&lt;br /&gt;
# ##i##git clone https://github.com/hardkernel/u-boot.git&lt;br /&gt;
# ##i##cd u-boot&lt;br /&gt;
# ##i##make smdk4412_config&lt;br /&gt;
# ##i##make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If U-boot does not build with your ARM toolchain, see the troubleshooting section. It may happen that U-boot does not build with a recent toolchain.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, the following will install U-boot on the beginning sectors of your SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd sd_fuse&lt;br /&gt;
# ##i##./sd_fusing.sh /dev/sdX&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Partitionning ==&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|The bootloader takes a bit more space than usual. You must keep about 5 MB (10240 sectors for example) of free space before the first partition.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may now partition your SD card to fit your needs. However, U-boot expects to find a FAT32 boot partition (first or second). Also, U-boot needs free space before the first partition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Partition Table for /dev/sdX&lt;br /&gt;
&lt;br /&gt;
               First       Last&lt;br /&gt;
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag&lt;br /&gt;
-- ------- ----------- ----------- ------ ----------- -------------------- ----&lt;br /&gt;
   Pri/Log           0       10239*     0#      10240*Free Space           None&lt;br /&gt;
 1 Primary       10240*     215039*     0      204800*W95 FAT32 (0B)       None&lt;br /&gt;
 2 Primary      215040*    2214599*     0     1999560*Linux swap / So (82) None&lt;br /&gt;
 3 Primary     2214600*   15269887*     0    13055288*Linux (83)           None&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, format your partitions, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.vfat /dev/sdX1&lt;br /&gt;
# ##i##mkswap /dev/sdX2&lt;br /&gt;
# ##i##mkfs.ext4 /dev/sdX3&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Funtoo Linux Installation ==&lt;br /&gt;
Follow the guide from [[Funtoo Linux Installation on ARM]] to begin the installation of Funtoo on the root filesystem. Note that once you are finished, you will not be able to boot the ODROID U2 until you complete the next sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Kernel and modules ===&lt;br /&gt;
&lt;br /&gt;
The ODROID U2 vendor provides kernel sources and default .config files for the ODROID U2. In this example, we clone the git repository, use the default branch, and build the default ubuntu kernel config. Note that other branches exist, some of them provide default configurations for the U2, others not.&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|As in [[Funtoo Linux Installation on ARM]], we consider that the root partition is mounted in /mnt/SD_root. Also, we consider that the boot partition is /dev/sdX1.}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd ~/odroid_u2&lt;br /&gt;
# ##i##git clone https://github.com/hardkernel/linux.git&lt;br /&gt;
# ##i##cd linux&lt;br /&gt;
# ##i##ARCH=arm make odroidu2_ubuntu_defconfig&lt;br /&gt;
# ##i##ARCH=arm CROSS_COMPILE=/usr/bin/armv7a-hardfloat-linux-gnueabi- make -j8 (adapt depending on the number of cores available on the build machine)&lt;br /&gt;
# ##i##mount /dev/sdX1 /mnt/SD_root/boot&lt;br /&gt;
# ##i##ARCH=arm CROSS_COMPILE=/usr/bin/armv7a-hardfloat-linux-gnueabi- make modules_install INSTALL_MOD_PATH=/mnt/SD_root&lt;br /&gt;
# ##i##cp arch/arm/boot/zImage /mnt/SD_root/boot&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Boot partition setup ==&lt;br /&gt;
You now have a kernel in /mnt/SD_root/boot. The only missing part is a file named ''boot.scr'', which will be read by U-boot.&lt;br /&gt;
&lt;br /&gt;
First, create a ''boot.txt'' file on the boot partition.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/SD_root/boot&lt;br /&gt;
# ##i##touch boot.txt&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modify this file to contain the following :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
setenv initrd_high &amp;quot;0xffffffff&amp;quot;&lt;br /&gt;
setenv fdt_high &amp;quot;0xffffffff&amp;quot;&lt;br /&gt;
setenv fb_x_res &amp;quot;1920&amp;quot;&lt;br /&gt;
setenv fb_y_res &amp;quot;1080&amp;quot;&lt;br /&gt;
setenv hdmi_phy_res &amp;quot;1080&amp;quot;&lt;br /&gt;
setenv bootcmd &amp;quot;fatload mmc 0:1 0x40008000 zImage; bootm 0x40008000&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;console=tty1 console=ttySAC1,115200n8 fb_x_res=${fb_x_res} fb_y_res=${fb_y_res} hdmi_phy_res=${hdmi_phy_res} root=/dev/mmcblk0p3 rootwait ro mem=2047M&amp;quot;&lt;br /&gt;
boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{fancywarning|Modify the screen resolution to fit your needs. Also, modify ''/dev/mmcblk0p3'' for the correct device of your root partition. ''/dev/mmcblk0p3'' is the third partition of the SD-card. Modify the last digit to fit your partitioning scheme.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, install u-boot-tools that provides ''mkimage'' and create ''boot.scr''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge u-boot-tools&lt;br /&gt;
# ##i##mkimage -A arm -T script -C none -n &amp;quot;Boot.scr for odroid-u2&amp;quot; -d boot.txt boot.scr&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Further configuration ==&lt;br /&gt;
&lt;br /&gt;
=== fstab ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/dev/mmcblk0p1		/boot		vfat		noauto,noatime	1 2&lt;br /&gt;
/dev/mmcblk0p2		none		swap		sw		0 0&lt;br /&gt;
/dev/mmcblk0p3		/		ext4		noatime		0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: We disable fsck checking of some devices as it may fail because of the missing hardware clock on the device.&lt;br /&gt;
&lt;br /&gt;
=== inittab ===&lt;br /&gt;
&lt;br /&gt;
If you have USB/UART debugging hardware, you may want to change /etc/inittab the following way :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# SERIAL CONSOLESs0:12345:respawn:/sbin/agetty 115200 ttySAC1 vt100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Error: selected processor does not support ARM mode `smc 0' ===&lt;br /&gt;
&amp;lt;pre&amp;gt;--- board/samsung/smdk4212/smc.c.orig	2013-04-30 17:34:16.556093458 -0400&lt;br /&gt;
+++ board/samsung/smdk4212/smc.c	2013-04-30 17:34:50.422095103 -0400&lt;br /&gt;
@@ -90,6 +90,7 @@&lt;br /&gt;
 	register u32 reg3 __asm__(&amp;quot;r3&amp;quot;) = arg3;&lt;br /&gt;
&lt;br /&gt;
  	__asm__ volatile (&lt;br /&gt;
+		&amp;quot;.arch_extension sec\n&amp;quot;&lt;br /&gt;
 		&amp;quot;smc	0\n&amp;quot;&lt;br /&gt;
 		: &amp;quot;+r&amp;quot;(reg0), &amp;quot;+r&amp;quot;(reg1), &amp;quot;+r&amp;quot;(reg2), &amp;quot;+r&amp;quot;(reg3) &lt;br /&gt;
&lt;br /&gt;
@@ -104,6 +105,7 @@&lt;br /&gt;
 	register u32 reg1 __asm__(&amp;quot;r1&amp;quot;) = 0;&lt;br /&gt;
  	__asm__ volatile (&lt;br /&gt;
+		&amp;quot;.arch_extension sec\n&amp;quot; 		&amp;quot;smc	0\n&amp;quot;&lt;br /&gt;
 		: &amp;quot;+r&amp;quot;(reg0), &amp;quot;+r&amp;quot;(reg1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source :http://forum.insignal.co.kr/viewtopic.php?f=10&amp;amp;t=118&lt;br /&gt;
&lt;br /&gt;
=== armv7a-hardfloat-linux-gnueabi-ld: error: /usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.7.2/libgcc.a(bpabi.o) uses VFP register arguments, u-boot does not ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- arch/arm/cpu/armv7/config.mk.orig	2013-04-30 17:40:20.842111160 -0400&lt;br /&gt;
+++ arch/arm/cpu/armv7/config.mk	2013-04-30 17:40:52.368112692 -0400&lt;br /&gt;
@@ -20,7 +20,7 @@ &lt;br /&gt;
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,&lt;br /&gt;
 # MA 02111-1307 USA&lt;br /&gt;
 #&lt;br /&gt;
-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float&lt;br /&gt;
+PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -mfloat-abi=hard -mfpu=vfpv3  &lt;br /&gt;
&lt;br /&gt;
 # Make ARMv5 to allow more compilers to work, even though its v7a.&lt;br /&gt;
 PLATFORM_CPPFLAGS += -march=armv7-a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source :&lt;br /&gt;
https://code.google.com/p/chromium/issues/detail?id=213120&lt;/div&gt;</summary>
		<author><name>Jeanfrancis</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Raspberry_Pi</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Raspberry_Pi"/>
				<updated>2013-01-08T19:02:49Z</updated>
		
		<summary type="html">&lt;p&gt;Drobbins: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [http://raspberrypi.org Raspberry Pi] is an ARM device (BCM2835, ARMv6).&lt;br /&gt;
&lt;br /&gt;
This document contains notes about getting Funtoo Linux up-and-running on the Raspberry Pi. Most information is already available on other documents, so this document mostly explains how to get the information needed to perform the installation.&lt;br /&gt;
&lt;br /&gt;
Please read [[Funtoo Linux Installation on ARM]] for general information about installing Funtoo Linux on ARM architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
Gentoo Linux's wiki already provide a complete installation manual for Gentoo Linux. To avoid duplicating information, only parts that are different for Funtoo Linux will be highlighted here.&lt;br /&gt;
&lt;br /&gt;
[http://wiki.gentoo.org/wiki/Raspberry_Pi_Quick_Install_Guide Gentoo's Raspberry Pi Quick Install Guide]&lt;br /&gt;
&lt;br /&gt;
=== Stage 3 ===&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux Stage 3 tarballs for Raspberry Pi can be found on [http://ftp.osuosl.org/pub/funtoo/funtoo-current/arm-32bit/armv6j_hardfp/].&lt;br /&gt;
&lt;br /&gt;
Extracting the tarball is done using &amp;lt;tt&amp;gt;tar xf&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;tar xjf&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Portage ===&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux Portage tarballs can be found on [http://ftp.osuosl.org/pub/funtoo/funtoo-current/snapshots/].&lt;br /&gt;
&lt;br /&gt;
Extracting the tarball is done using &amp;lt;tt&amp;gt;tar xf&amp;lt;/tt&amp;gt; instead of &amp;lt;tt&amp;gt;tar xjf&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Enabling networking on boot ===&lt;br /&gt;
&lt;br /&gt;
Please consult [[Funtoo Linux Networking]] for information regarding network configuration.&lt;br /&gt;
&lt;br /&gt;
=== Select profile ===&lt;br /&gt;
&lt;br /&gt;
Funtoo Linux has a different profile than Gentoo. Correct ''arch'' and ''build'' will be already set. It is possible to change ''flavor'' or add ''mix-ins'' using eselect.&lt;br /&gt;
&lt;br /&gt;
More information can be found on [[Funtoo 1.0 Profile]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##eselect profile list&lt;br /&gt;
Currently available arch profiles:&lt;br /&gt;
[1]   funtoo/1.0/linux-gnu/arch/arm-32bit/armv7a_hardfp&lt;br /&gt;
[2]   funtoo/1.0/linux-gnu/arch/arm-32bit/armv6j_hardfp *&lt;br /&gt;
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;
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;
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/media  &lt;br /&gt;
[16]  funtoo/1.0/linux-gnu/mix-ins/print  &lt;br /&gt;
[17]  funtoo/1.0/linux-gnu/mix-ins/python3-only  &lt;br /&gt;
[18]  funtoo/1.0/linux-gnu/mix-ins/rhel5-compat  &lt;br /&gt;
[19]  funtoo/1.0/linux-gnu/mix-ins/server-db  &lt;br /&gt;
[20]  funtoo/1.0/linux-gnu/mix-ins/server-mail  &lt;br /&gt;
[21]  funtoo/1.0/linux-gnu/mix-ins/server-web  &lt;br /&gt;
[22]  funtoo/1.0/linux-gnu/mix-ins/X  &lt;br /&gt;
[23]  funtoo/1.0/linux-gnu/mix-ins/xfce&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jeanfrancis</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Squid</id>
		<title>Squid</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Squid"/>
				<updated>2013-01-07T16:54:09Z</updated>
		
		<summary type="html">&lt;p&gt;77.109.107.46: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Squid Proxy Server ==&lt;br /&gt;
&lt;br /&gt;
'''This is a quick and dirty howto about getting Squid up und running in 5min...'''&lt;br /&gt;
&lt;br /&gt;
What benefits one may get from using an anonymous proxy server? Well, I would say many things but the most important one is that you can browse the web anonymously without exposing your IP, location etc.. out there. Anyhow, even though I usually use OpenVPN or PPTP for safe browsing and such things, having a private anonymous proxy server in your toolbox is a nice thing.&lt;br /&gt;
Furthermore, a cache is speeding up you daily internet connection with repeating objects getting out of the cache instead of downloading it again. Advanced filtering technics (Antivirus, Content, Ad-Blocks, etc) are also possible.&lt;br /&gt;
&lt;br /&gt;
Please start always by refreshing your portage tree, like:&lt;br /&gt;
&lt;br /&gt;
# emerge --sync&lt;br /&gt;
then I’ve searched the portage tree for ‘squid’ using my pkgfile function and got this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# pkgfile squid&lt;br /&gt;
=&amp;gt; net-analyzer/squid-graph&lt;br /&gt;
=&amp;gt; net-analyzer/squidsites&lt;br /&gt;
=&amp;gt; net-analyzer/squidview&lt;br /&gt;
=&amp;gt; net-proxy/squid&lt;br /&gt;
=&amp;gt; net-proxy/squidclamav&lt;br /&gt;
=&amp;gt; net-proxy/squidguard&lt;br /&gt;
=&amp;gt; sec-policy/selinux-squid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ok, then emerged ‘net-proxy/squid’ using:&lt;br /&gt;
# emerge -av net-proxy/squid&lt;br /&gt;
&lt;br /&gt;
once it got installed, since this squid proxy setup will be using authentication to authenticate users via the ‘ncsa_auth‘ helper, we need to know the location of this helper so we can use it in our squid.confconfiguration file. To find this I’ll be using a tool named as ‘qfile‘ which is shipped in ‘app-portage/portage-utils‘.&lt;br /&gt;
&lt;br /&gt;
# qfile ncsa_auth&lt;br /&gt;
net-proxy/squid (/usr/libexec/squid/ncsa_auth)&lt;br /&gt;
&lt;br /&gt;
ok, so the auth helper is located in ‘/usr/libexec/squid/ncsa_auth’ so let’s setup Squid’s configuration file (/etc/squid/squid.conf). Make sure you change ‘XXX.XX.XX.XXX’ with your actual server’s IP address and edit anything else you want to suit your needs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# cp /etc/squid/squid.conf{,_orig} &amp;amp;&amp;amp; \cat &amp;gt; /etc/squid/squid.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
auth_param basic program /usr/libexec/squid/ncsa_auth /etc/squid/passwd&lt;br /&gt;
auth_param basic children 5&lt;br /&gt;
auth_param basic realm please login?&lt;br /&gt;
auth_param basic credentialsttl 2 hours&lt;br /&gt;
auth_param basic casesensitive off&lt;br /&gt;
acl ncsa_users proxy_auth REQUIRED&lt;br /&gt;
http_access allow ncsa_users&lt;br /&gt;
acl manager proto cache_object&lt;br /&gt;
acl localhost src 127.0.0.1/32 ::1&lt;br /&gt;
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1&lt;br /&gt;
acl localnet src 10.0.0.0/8     &lt;br /&gt;
# RFC 1918 possible internal network&lt;br /&gt;
acl localnet src 172.16.0.0/12  &lt;br /&gt;
# RFC 1918 possible internal network&lt;br /&gt;
acl localnet src 192.168.0.0/16 &lt;br /&gt;
# RFC 1918 possible internal network&lt;br /&gt;
acl localnet src fc00::/7       &lt;br /&gt;
# RFC 4193 local private network range&lt;br /&gt;
acl localnet src fe80::/10      &lt;br /&gt;
# RFC 4291 link-local (directly plugged) machines&lt;br /&gt;
acl SSL_ports port 443&lt;br /&gt;
acl Safe_ports port 80          # http&lt;br /&gt;
acl Safe_ports port 21          # ftp&lt;br /&gt;
acl Safe_ports port 443         # https&lt;br /&gt;
acl Safe_ports port 70          # gopher&lt;br /&gt;
acl Safe_ports port 210         # wais&lt;br /&gt;
acl Safe_ports port 1025-65535  # unregistered ports&lt;br /&gt;
acl Safe_ports port 280         # http-mgmt&lt;br /&gt;
acl Safe_ports port 488         # gss-http&lt;br /&gt;
acl Safe_ports port 591         # filemaker&lt;br /&gt;
acl Safe_ports port 777         # multiling http&lt;br /&gt;
acl Safe_ports port 901         # SWAT&lt;br /&gt;
acl CONNECT method CONNECT&lt;br /&gt;
http_access allow manager localhost&lt;br /&gt;
http_access deny manager&lt;br /&gt;
http_access deny !Safe_ports&lt;br /&gt;
http_access deny CONNECT !SSL_ports&lt;br /&gt;
http_access allow localnet&lt;br /&gt;
http_access allow localhost&lt;br /&gt;
http_access allow localhost&lt;br /&gt;
http_access deny all&lt;br /&gt;
http_port 2222&lt;br /&gt;
coredump_dir /var/cache/squid&lt;br /&gt;
refresh_pattern ^ftp:           1440    20%     10080&lt;br /&gt;
refresh_pattern ^gopher:        1440    0%      1440&lt;br /&gt;
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0&lt;br /&gt;
refresh_pattern .               0       20%     4320 &lt;br /&gt;
icp_access allow localnet&lt;br /&gt;
icp_access deny all&lt;br /&gt;
acl ip1 myip XXX.XX.XX.XXX&lt;br /&gt;
tcp_outgoing_address XXX.XX.XX.XXX ip1&lt;br /&gt;
cache_mgr mail@maiwald.tk&lt;br /&gt;
cache_mem 128 MB&lt;br /&gt;
visible_hostname ViruSzZ&lt;br /&gt;
maximum_object_size 20 MB&lt;br /&gt;
cache_dir ufs /var/cache/squid 512 32 512&lt;br /&gt;
&lt;br /&gt;
forwarded_for off&lt;br /&gt;
request_header_access Allow allow all&lt;br /&gt;
request_header_access Authorization allow all&lt;br /&gt;
request_header_access WWW-Authenticate allow all&lt;br /&gt;
request_header_access Proxy-Authorization allow all&lt;br /&gt;
request_header_access Proxy-Authenticate allow all&lt;br /&gt;
request_header_access Cache-Control allow all&lt;br /&gt;
request_header_access Content-Encoding allow all&lt;br /&gt;
request_header_access Content-Length allow all&lt;br /&gt;
request_header_access Content-Type allow all&lt;br /&gt;
request_header_access Date allow all&lt;br /&gt;
request_header_access Expires allow all&lt;br /&gt;
request_header_access Host allow all&lt;br /&gt;
request_header_access If-Modified-Since allow all&lt;br /&gt;
request_header_access Last-Modified allow all&lt;br /&gt;
request_header_access Location allow all&lt;br /&gt;
request_header_access Pragma allow all&lt;br /&gt;
request_header_access Accept allow all&lt;br /&gt;
request_header_access Accept-Charset allow all&lt;br /&gt;
request_header_access Accept-Encoding allow all&lt;br /&gt;
request_header_access Accept-Language allow all&lt;br /&gt;
request_header_access Content-Language allow all&lt;br /&gt;
request_header_access Mime-Version allow all&lt;br /&gt;
request_header_access Retry-After allow all&lt;br /&gt;
request_header_access Title allow all&lt;br /&gt;
request_header_access Connection allow all&lt;br /&gt;
request_header_access Proxy-Connection allow all&lt;br /&gt;
request_header_access User-Agent allow all&lt;br /&gt;
request_header_access Cookie allow all&lt;br /&gt;
request_header_access All deny all&lt;br /&gt;
shutdown_lifetime 3 seconds&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
proceed with creating the ‘/etc/squid/passwd’ file and adding your user by executing:&lt;br /&gt;
# htpasswd -c /etc/squid/passwd your_user&lt;br /&gt;
(note that you need to omit the ‘-c’ switch when adding another user to the file)&lt;br /&gt;
&lt;br /&gt;
then do a &amp;lt;code&amp;gt;# squid -z&amp;lt;/code&amp;gt; to create the cache direcory.&lt;br /&gt;
Finally, restart your squid server and check if it’s actually listening using:&lt;br /&gt;
# /etc/init.d/squid restart&lt;br /&gt;
# netstat -tunlp | grep 2222&lt;br /&gt;
tcp        0      0 0.0.0.0:2222            0.0.0.0:*               LISTEN      482/(squid)&lt;br /&gt;
if you like it to start on your system’s start-up, then you can execute:&lt;br /&gt;
# rc-update add squid default&lt;br /&gt;
To test it, for example I use Opera for this so I just go to ‘Settings → Preferences → Advanced → Network → Proxy Servers’ and set the browser to use the proxy server we just created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Mmatk</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/ZFS_rootfs_over_encrypted_container</id>
		<title>ZFS rootfs over encrypted container</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/ZFS_rootfs_over_encrypted_container"/>
				<updated>2013-01-03T08:08:54Z</updated>
		
		<summary type="html">&lt;p&gt;Golodhrim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will show you how to install Funtoo on ZFS (rootfs) over an encrypted container.&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;
&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;
&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;
&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;
&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;
&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;
&lt;br /&gt;
== Creating partitions ==&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;
&lt;br /&gt;
(All commands will be ran as root).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== fdisk (MBR Style) ===&lt;br /&gt;
'''Create Partition 1''' (boot):&lt;br /&gt;
&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;
&lt;br /&gt;
'''Create Partition 2''' (ZFS over encrypted container):&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;
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;
Command: ##i##p ↵&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;
   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;
&lt;br /&gt;
=== gdisk (GPT Style) ===&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;
&lt;br /&gt;
'''Create Partition 2''' (BIOS Boot Partition):&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;
&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;
&lt;br /&gt;
'''Create Partition 2(/3)''' (ZFS over encrypted container):&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;
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;
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;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Format your boot volume ===&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##mkfs.ext2 /dev/sda1&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Create the crypto container ===&lt;br /&gt;
Be aware that this step will take a lot of time, 1-2 days might be possible depending on your disksize. The bs part in the next commands is important, so that you don't know about the actual disksize and the disk get's filled up to the end with data for the cryptocontainer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##dd if=/dev/zero of=/dev/sda2 bs=100M&lt;br /&gt;
# ##i##dd if=/dev/urandom of=/dev/sda2 bs=100M&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next we will create the cryptocontainer in the before prepared partition and mount the container after that:&lt;br /&gt;
&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 enc-root&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This opens the cryptocontainer in '''/dev/mapper/enc-root''', what will from now on the device for our ZFS pool.&lt;br /&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;
&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/mapper/enc-root&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&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;
&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;
&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;
&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;
&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;
&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;
&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;
&lt;br /&gt;
=== Create your swap dataset ===&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
=== Format your swap dataset ===&lt;br /&gt;
&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;
&lt;br /&gt;
Alright that finishes the creation of the zpool and zfs datasets. Check to make sure everything appears fine:&lt;br /&gt;
&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;
&lt;br /&gt;
Copy the zpool.cache file to your new environment.&lt;br /&gt;
&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;
You might also need to copy your zdev.conf file:&lt;br /&gt;
# ##i##cp /etc/zfs/zdev.conf /mnt/funtoo/etc/zfs&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make an empty mtab file&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
Then chroot into your new funtoo environment:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##cd /mnt/funtoo&lt;br /&gt;
&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;
&lt;br /&gt;
Bind the kernel related directories&lt;br /&gt;
# ##i##for i in proc dev sys; do mount --bind /$i ./$i; done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy network settings&lt;br /&gt;
# ##i##cp /etc/resolv.conf etc/&lt;br /&gt;
&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;
&lt;br /&gt;
=== Syncing your portage tree ===&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;
&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;
==== If you did create a separate portage dataset, let's now get the portage snapshot set up. ====&lt;br /&gt;
&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;
&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;
&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;
&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;
&lt;br /&gt;
== Kernel Configuration ==&lt;br /&gt;
Tested with kernel 2.6.32, 3.2.34, 3.6.9, 3.7.1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you get up to the kernel, make sure that you disable the CFQ scheduler, and turnon No-op (It's the default one once you disable all schedulers). The reason for this is because ZFS has itsown scheduler and the CFQ one conflicts with it.&lt;br /&gt;
&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;
&amp;lt;pre&amp;gt;&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;
&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;
[*] Enable loadable module support ---&amp;gt;&lt;br /&gt;
[*] Module unloadingEnable 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 schedulerDefault I/O scheduler (No-op)&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;
&lt;br /&gt;
Cryptographic API ---&amp;gt;&lt;br /&gt;
&amp;gt; &amp;lt;*&amp;gt; XTS support&lt;br /&gt;
&amp;gt; -*- AES cipher algorithms&lt;br /&gt;
&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;
&lt;br /&gt;
Continue and compile/install your kernel:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##make bzImage&lt;br /&gt;
# ##i##make modules_install&lt;br /&gt;
# ##i##cp arch/x86_64/boot/bzImage /boot/bzImage-&amp;lt;Kernel-version&amp;gt;&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&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;
== Bliss Initramfs Creator ==&lt;br /&gt;
Make sure you compile sys-apps/busybox and sys-fs/cryptsetup 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/busybox&lt;br /&gt;
# ##i##echo &amp;quot;sys-fs/cryptsetup static&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use/cryptsetup&lt;br /&gt;
# ##i##echo &amp;quot;sys-libs/e2fsprogs-libs static-libs&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use/e2fsprogs-libs&lt;br /&gt;
# ##i##echo &amp;quot;dev-libs/popt static-libs&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use/popt&lt;br /&gt;
# ##i##echo &amp;quot;sys-apps/util-linux static-libs&amp;quot; &amp;gt;&amp;gt; /etc/portage/package.use/util-linux&lt;br /&gt;
# ##i##emerge -avt sys-apps/busybox sys-fs/cryptsetup&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;
# ##i##cd Bliss-Initramfs-Creator&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run the script as root, and place the initrd into /boot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##./createInit&lt;br /&gt;
Choose Option 2 ZFS+LUKS&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: bzImage-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;
 encrypted root is: /dev/sda2&lt;br /&gt;
&lt;br /&gt;
== Installing Extlinux ==&lt;br /&gt;
To install extlinux first merge syslinux&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##emerge -avt syslinux&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
next prepare your /boot folder&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;
Finally install Extlinux for your Boot Record&lt;br /&gt;
&lt;br /&gt;
=== MBR ===&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##touch /boot/extlinux/extlinux.conf&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GPT ===&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;
=== Config Extlinux ===&lt;br /&gt;
Open '''/boot/extlinux/extlinux.conf''' with your favorite editor and add the following to it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
TIMEOUT 30&lt;br /&gt;
UI menu.c32&lt;br /&gt;
&lt;br /&gt;
MENU TITLE Funtoo 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 funtoo bzImage-&amp;lt;Kernel-Version&amp;gt;&lt;br /&gt;
  MENU LABEL Funtoo Linux bzImage-&amp;lt;Kernel-Version&amp;gt;&lt;br /&gt;
  KERNEL /bzImage-&amp;lt;Kernel-Version&amp;gt;&lt;br /&gt;
  INITRD /initrd-&amp;lt;Kernel-Version&amp;gt;.img&lt;br /&gt;
  APPEND enc_root=/dev/sda2 pool_root=rpool/ROOT/funtoo&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;&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;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##nano /etc/fstab&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;
/dev/sda1               /boot           ext2            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;
&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;
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. 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;br /&gt;
&lt;br /&gt;
== Getting back into your ZFS pool in case of emergency ==&lt;br /&gt;
If you ever need to get back into your ZFS pool in case of an emergency (missing rebuild of modules, unable to boot, etc) reboot your box with the System Rescue USB you created earlier, then issue the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;console&amp;gt;&lt;br /&gt;
# ##i##depmod&lt;br /&gt;
# ##i##cryptsetup luksOpen /dev/sda2 enc-root&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;
&lt;br /&gt;
Now you should be able to mount the system like we did earlier in this Guide [[ZFS_rootfs_over_encrypted_container#Installing_Funtoo|(chroot instructions)]], fix your problem and enjoy.&lt;br /&gt;
&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>Golodhrim</name></author>	</entry>

	<entry>
		<id>http://www.funtoo.org/wiki/Developer_Guide</id>
		<title>Developer Guide</title>
		<link rel="alternate" type="text/html" href="http://www.funtoo.org/wiki/Developer_Guide"/>
				<updated>2012-12-26T05:34:35Z</updated>
		
		<summary type="html">&lt;p&gt;Drobbins: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to be a developer guide for Funtoo Linux.&lt;br /&gt;
&lt;br /&gt;
== Learn About Ebuilds ==&lt;br /&gt;
&lt;br /&gt;
* [[Portage Variables]] -- learn about all those variables inside an ebuild, and in &amp;lt;tt&amp;gt;make.conf&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* [[Forking An Ebuild]] -- explains how to take an ebuild from Gentoo and fork it, so you can make local changes.&lt;br /&gt;
* [[Ebuild Functions]] -- &amp;lt;tt&amp;gt;src_unpack&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;src_compile&amp;lt;/tt&amp;gt; -- these are ebuild functions. There are others. See all of them and learn how they work.&lt;br /&gt;
&lt;br /&gt;
== Funtoo Internals ==&lt;br /&gt;
&lt;br /&gt;
* [[Multiple ABI Support]] -- learn how the &amp;lt;tt&amp;gt;gcc&amp;lt;/tt&amp;gt; wrapper and &amp;lt;tt&amp;gt;multilib.eclass&amp;lt;/tt&amp;gt; work in Gentoo and Funtoo.&lt;br /&gt;
&lt;br /&gt;
== Portage ==&lt;br /&gt;
&lt;br /&gt;
* [[Portage (Funtoo)]] -- learn about Funtoo changes to Portage (needs updating).&lt;br /&gt;
* [[Portage Dynamic Slot]] - dynamic SLOT functionality now in Portage.&lt;br /&gt;
&lt;br /&gt;
== Metro ==&lt;br /&gt;
&lt;br /&gt;
* [[Metro Quick Start Tutorial]] -- learn how to use Metro, our automated build tool.&lt;br /&gt;
* [[Metro]] - a full index of Metro-related documentation.&lt;br /&gt;
&lt;br /&gt;
== Working With Git ==&lt;br /&gt;
&lt;br /&gt;
Also check out:&lt;br /&gt;
&lt;br /&gt;
* [[Git Merging Guide]]&lt;br /&gt;
&lt;br /&gt;
Learning how to help squash out bugs can be a difficult thing to do, especially since sometimes JIRA looks a little overwhelming and confusing. A thank you to Daniel for making some videos (see below) on explaining this better, but there were a couple things left out. So I will take you through that. (With picture reference).&lt;br /&gt;
&lt;br /&gt;
The first thing you're going to want to do is make an account, which is simple as clicking on the 'Log in' button on the top right, then clicking 'Sign up'.&lt;br /&gt;
[[File:Signupjira.png|720px|center]]&lt;br /&gt;
&lt;br /&gt;
After you've made your account, the best way to watch bugs is to click on the 'Agile' drop-down menu, and choose 'Classic'.&lt;br /&gt;
[[File:Agileclassic.png|720px|center]]&lt;br /&gt;
&lt;br /&gt;
Now, we're going to want to change a couple things even with this. By default, the 'Classic' mode takes you to 'Classic Planning Board', you want to change this to 'Classic Task Board'. This makes things much easier to read.&lt;br /&gt;
I also recommend going to the '''Views''' eyeball icon to the right and selecting the '''List''' issue view, and the '''Compact (Kanban)''' task board mode. This will give you a top-level overview of all our bugs and their statuses, and JIRA will remember your view preferences the next time you log in.&lt;br /&gt;
&lt;br /&gt;
[[File:Classicview.png|720px|center]]&lt;br /&gt;
&lt;br /&gt;
After that, we're almost ready to rock and roll. We need to also make sure that you're not set to any version or we'll only see a few bugs. So in case it says '1.1' or '1.0' change it to 'Unscheduled'. &lt;br /&gt;
[[File:Jiraversion.png|720px|center]]&lt;br /&gt;
&lt;br /&gt;
And after all that, you can view and look at bugs that are in queue, To-do, or testing, which Daniel's videos are very great at explaining. Thanks for helping Funtoo Linux better and better.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;{{#widget:YouTube|id=JCg5DWjy6Ro|width=720}}&lt;br /&gt;
&lt;br /&gt;
{{#widget:YouTube|id=tuFE9ZgVOpY|width=720}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Drobbins</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;Touri: /* genkernel */&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). 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. The required steps for getting and extracting the snapshot will be shown later on in the guide once you chroot into the environment. &lt;br /&gt;
&lt;br /&gt;
For now just create the datasets:&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;
&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;
chroot into your new funtoo environment&lt;br /&gt;
# ##i##env -i HOME=/root TERM=$TERM chroot . /bin/bash -l&lt;br /&gt;
&amp;lt;/console&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syncing your portage tree ===&lt;br /&gt;
==== If you didn't create a separate portage dataset, then just sync your portage tree as normal. ====&lt;br /&gt;
&amp;lt;console&amp;gt;# ##i##emerge --sync&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;
&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;
{{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 root=rpool/ROOT/funtoo quiet&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;
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;# ##i##git clone git://github.com/fearedbliss/Bliss-Initramfs-Creator.git&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;
&amp;lt;console&amp;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. 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>

	</feed>