Funtoo's core system, the stage3 tarball, is 110 megabytes.
One of the features of Funtoo Linux is that it allows GUID partition tables. This partitioning scheme supports partitions greater than 2TiB, which is the size limit of the standard MBR (Master Boot Record) partitioning scheme.
This is essential for systems using RAID (redundant array of independent disks) logical volumes, as it is easy to exceed the partition size limit imposed by the MBR.
<ref>http://www.funtoo.org/wiki/GUID_Booting_Guide</ref>
History
Funtoo's history is closely tied to that of Gentoo. Daniel Robbins was the project creator,
chief architect and project leader of the Gentoo development team until April 26, 2004,
where he had to leave because of personal issues. <ref>http://article.gmane.org/gmane.linux.gentoo.nfp/65</ref>
Before leaving, Daniel created a non-profit foundation, Gentoo Technologies, which would
hold all of the Gentoo copyrights.
<ref>http://linux.sys-con.com/node/44614 Founder of Gentoo Linux, Daniel Robbins, Resigns as Chief Architect.</ref>
After working at Microsoft for two years, he joins back the Gentoo development team in 2007. He started working
on Funtoo after his proposals to fix problem with the Gentoo foundation were refused, due to his absence.
<ref>http://en.wikipedia.org/wiki/Funtoo</ref>
Virtualization Setup
Using Virtual Box 4.1.2.
I am sharing my virtual hard drive with two hosts, each running different virtual machines.
I do this because my desktop machine is faster at compiling.
Hosts
Gentoo Linux x64 w/ linux-3.0.4-gentoo kernel (Laptop)
Intel Core 2 Duo CPU P8400 @ 2.26GHz
Allocating 2 cores, 1024Mb RAM to VM.
Windows 7 Professional x64 (Desktop)
Intel Core 2 Quad CPU Q6700 @ 4.0GHz
Allocating 4 cores, 2048Mb RAM to VM.
Guest
Enabled IO APIC.
Enabled PAE/NX.
Enabled VT-x/AMD-V.
Using VHD format, 20GB.
Installation
Installing Funtoo Linux is a manual process. It does not have an automated installer because
it is not needed. You can actually install Funtoo Linux while being booted in you current
OS, provided you have the tools (ex. fdisk, git).
Overview
Boot in an arbitrary Linux system (Live CD or otherwise).
Prepare the disk where Funtoo Linux will be installed.
Partitioning with Gparted under SystemRescueCDCompiling kernel under SystemRescueCDFinished installing Funtoo Linux!
To perform a Funtoo install, you must use an existing Linux system or a live CD. Unlike Gentoo, Funtoo Linux
does not have a dedicated live CD. That is because its Metro build tool does not support live CD builds yet.
Instead, it recommends the use of SystemRescueCD, a Linux system rescue disk, because it comes with all the
software you need for the installation. For my installation, I used SystemRescueCD. I would have used my Linux
machine but I could not find a way to use fdisk with VHD's.
After booting in the Linux system of your choice, you must first prepare the disk that Funtoo will be installed on.
This is the preferred way of partitioning your disk for a Linux system. That said, I had to use MBR partitioning because
VirtualBox's BIOS does not support booting from GPT disks. <ref>https://forums.virtualbox.org/viewtopic.php?f=4&t=23279</ref>
No big deal: I am not planning on using a > 2TiB disk for my virtual machine.
I installed from a stage3 tarball, because I am not crazy enough to start from stage1. Stage3 is the recommended one to use
anyway. To install from a stage3 tarball, you first download the stage tarball and then you extract its contents in the
Funtoo Linux's root partition. Now that all the core Funtoo Linux programs are installed, you switch to the Funtoo Linux
system by chrooting into it.
Then, using git, you pull the Portage tree from Github. Funtoo Linux uses a git-based portage system, which allows
smaller manifest sizes because it leverages Git's file integrity checking mechanisms. In the rsync-based system,
you would also need a change log. With Git, commit messages are used instead. <ref>http://www.funtoo.org/wiki/Funtoo_Linux_FAQ#What_is_mini-manifest.3F</ref>
After tweaking a few config files, I had to get a kernel. I opted to use a kernel that would be generated by genkernel because I was not sure
what kind of configuration was needed for a virtual machine. During compilation, I got some strange gcc error. Since I was not sure what
the problem was, I decided to hop on the Funtoo irc channel and see if somebody could help me. Here's the chat log (Surjikal is me):
23:08 < Surjikal> I get some kind of weird error when I use emerge sysrescue-std-sources. gcc: Internal
error: Killed (program cc1)
23:09 < angry_vincent> oh
23:09 < angry_vincent> do you have enough space?
23:09 < drobbins> Surjikal: possibly bad memory
23:09 < Surjikal> Ahh I suspected that was it
23:10 < Surjikal> Yes I might be low on space, doing this on a VM
23:10 < drobbins> Surjikal: random segfaults during compile is generally bad mem
23:10 < drobbins> Surjikal: that could be it too
23:10 < drobbins> Surjikal: either bad mem or low mem
23:10 < drobbins> it may be the OOM killer
23:10 < drobbins> since it said it was killed
23:11 * drobbins wonders what to call Portage 1.0
23:11 < Surjikal> You know what, that could be it actually. I don't have lots of RAM allocate on that VM, and
I'm running the sysrescue live disk
23:11 < drobbins> Surjikal: did you do swapon first?
23:11 < drobbins> Surjikal: maybe if you add swap it will work ok
</cpde>
Turns out the 256MB of RAM I allocated to the VM was insufficient to compile a kernel. But what really surprised
me it was that the chief architect (drobbins) helped me out! Compilation took about 3 hours, but its not too bad
since the process is automated.
After compiling the kernel, you must setup the bootloader. This involves installing the GRUB package, modifying
a config file and running a GRUB config generator script. This step is much easier and much more automated than
on Gentoo, where you would have to edit the GRUB configuration directly. Setting up users was a breeze. There's
nothing Funtoo Linux specific about that step.
That's it! Now all that's needed is a reboot.
Basic Operation
Note:
This section may be easier to understand after reading
the software packaging section.
Funtoo Linux gives you the power to customize almost any aspect of your distribution. This is why after installation, you are only presented with a simple bash prompt.
While I had no problem with the command line, I needed some kind of window manager in order to stay sane. This means I had to install an X server.
But first, I must configure my use flags since I want to keep my installation as small as possible. I removed the gnome, kde and qt4use flags in my make.conf file, as only wanted GTK+ support.
USE="-gnome -kde -qt4"
In order to install an X server, I also had to add configuration entries in my make.conf that specified which video card and input devices I had.
<ref>Gentoo Wiki, VirtualBox Guest, http://en.gentoo-wiki.com/wiki/Virtualbox_Guest, Retrieved Wednesday, December 14 2011</ref>
I installed twm and xterm to check if my X server was working properly:
emerge -av twm xterm
And then I started X:
startx
Showing xterm and twm after emerging xorg-server
Awesome is a fast tiling window manager that features the ability to extend it via its LUA API and true multihead support.
<ref>http://awesome.naquadah.org/, Retrieved on Wednesday, December 14.</ref>
Using portage is as easy to use as apt-get.
Usage Evaluation
Awesome window manager running 2 lxterminals, showing irssi and make.conf
Funtoo Linux is an extremely capable source-based distribution. The process of compiling applications is painless,
but it is lengthy. However, for big applications such as firefox, you can set the binary use flag to
simply download and install the binary, instead of compiling from source.
The portage tree contains a lot of packages, and most of them are up to date. If a package is unavailable,
Gnome 3 for example, you can most likely find it through a third party overlays (Gnome 3 is in the Gnome
overlay).
Funtoo Linux is extremely customizable. It is the reason why I chose this distribution: I was tired of some distribution maker deciding what is best for me.
That said, Funtoo Linux can be a bit frustrating when it comes to errors. Since you are dealing with the source directly, it can be hard
to get everything configured properly. Also, updating your system can be quite a chore and it can take several days to complete the process.
Also, if a library is updated, and the ABI or API changes, then everything that depends on this library must be recompiled. To be fair,
these problems usually happens when you waiting too long (>6 months) before updating. And of course, all the tools to help you update your
system are available through portage.
Software Packaging
What packaging format and utilities are used?
There are no packages or archives like .deb or .rpm files in Funtoo Linux.
Instead, a package is a directory which contains an ebuild script, a manifest
file, patch files and configuration files. Funtoo Linux allows you to customize
which parts of the package you want to compile via use flags.
Ebuild Scripts
An ebuild or ebuild script is a bash script which runs in a
special environment, and describe how to download, compile, configure
and install a package. The ebuild usually downloads a distfile, which
is a source tarball, but can also pull the source from a repository.
<ref>http://en.gentoo-wiki.com/wiki/Writing_Ebuilds</ref>
Manifest File
The manifest file is used to determine the integrity of source tarballs
(called distfiles). In Gentoo, it is also used to check all files in
the package. This is not required in Funtoo Linux since git takes
care of that. The manifest files are still needed because the source
tarballs are not contained in the git repository and so they must be
checked after the ebuild downloads them.
To illustrate the difference in package management between Gentoo and Funtoo,
here's a comparaison of the Manifest file for the cowsay package:
Portage is the software management tool of Funtoo Linux.
<ref>http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1</ref>
It is composed of two programs: Ebuild and Emerge. Ebuild is the tool
which runs ebuild scripts. Emerge is the tool that keeps track of installed
packages, resolves dependencies and provides the main portage interface.
Porthole is a GUI frontend to portage. It is very useful if you are a first time
Funtoo Linux or Gentoo user and works great as a package and use flag browser.
The portage tree is the set of all packages available on the system. It is a
a directory tree, rooted at /usr/portage. In Funtoo Linux, the tree is composed of
the Gentoo overlay, the Funtoo overlay, and the slashbeast, multimedia, tarsius, golodhrim
third party overlays.
Use flags are used to specify which component of a package you want/don't want to compile.
Doing this cuts down compilation by a significant amount because it greatly reduces the number
of dependencies pulled in. Use flags can be set globally or they can be package specific.
Global use flags are specified in /etc/make.conf.
For example, if I want to disable the Gnome
and KDE components of packages, globally, this is how I would modify my make.conf file:
Equery is a collection of modules for querying the state of Funtoo Linux packages,
files and USE flags.<ref>Equery man page</ref> It is not bundled with the distribution
and it is part of the gentoolkit package. This program uses the /var/db/pkg directory
which contains the state of portage.
<ref>http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=1, Gentoo Files and Directories</ref>
How can you use these utilities to get a list of installed packages?
Equery can be used to get a list of installed packages:
equery list "*"
Alternatively, you can list the directories in /var/db/pkg.
Checking for reverse dependencies before removing:
emerge --pretend --verbose --depclean <package>
Updating the system:
emerge -pv --update --deep --newuse world
How extensive is the software catalog for this distribution?
Funtoo linux contains 15483 packages. We can determine this by running the following
command:
find /usr/portage -maxdepth 2 -type d | wc -l
Major Package Versions
A plain Funtoo Linux distribution contains very few programs. Contrary to Ubuntu or Fedora, it only includes programs that are absolutely needed in order to chroot into the system during installation. You are expected to completely update your system as soon as you are done configuring portage. It is actually one of the installation steps. When you install Funtoo Linux, you are essentially building your own distribution. Therefore, this question is not directly applicable. What I will show instead is a list of packages that I normally install on my Funtoo Linux systems and pretend that they are included in the distribution.
Linux Kernel
Here are some of the available Linux kernels available in Funtoo Linux:
After reading the ebuilds for these packages, I saw that no Funtoo Linux specific patches are applied.
The source is simply downloaded from upstream. It is your job to configure and compile the kernel.
Again, the source tarballs are downloaded directly from upstream. That said, Funtoo Linux or Gentoo specific patches are applied to certain packages after the source is unpacked:
Package
Patches and modifications
Cowsay
UTF-8 support added, added customizable tongue and eyes for the ascii cow.
Awesome
Added support for the release of xcb-util-0.3.8
Xorg Server
Removed acpi code, security vulnerability fix when creating lock file
Portage
Git based, uses mini manifest files
glibc
Two security patches (disable ld audit and dst expansion fix).
gcc
Fixed LANG var, added support for GCC_SPEC var, added default protection for stack smashing attacks.
Vim
Interix patches, Darwin bootloader patch
Firefox
Gentoo preferences fix, xulrunner 1.9.2 with gtk 2.21 patch
Bash
Many patches related to compilation configuration, allow negative values to 'return' statement.
Initialization
Funtoo Linux uses OpenRC for its initialization purposes. It supports running services in parallel, named runlevels and dependencies. It uses POSIX shell scripts as its init scripts.<ref>http://www.gentoo.org/proj/en/base/openrc/</ref> Funtoo Linux uses a fork of OpenRC, since it needs to be modified because of the way the distribution handles networking.<ref>http://www.funtoo.org/wiki/OpenRC_(Funtoo)</ref>
There are 4 named runlevels in Funtoo Linux: sysinit, boot, default and shutdown.
I was able to get this information by enabling OpenRC logging. This was done by editing the /etc/rc.conf file.
Initialization Order
The order of initialization is hard to determine since the services are initialized in parallel. That said, here's a table
of services with their dependencies:
Service
Runlevel
Need
Before
After
dhcpcd (DHCP daemon)
Default
bootmisc, modules
localmount
dns
udevd (udev daemon)
Sysinit
udev-mount
checkfs, fsck
n/a
fsck
Boot
n/a
n/a
n/a
hostname
Boot
n/a
n/a
n/a
bootmisc
Boot
localmount
logger
clock, sysctl
Need
Hard dependencies; program needed must have been initialized otherwise the current service initialization will fail.
Before
The service is initialized before a given service, if it is in the same runlevel.
Advantages of source-based distributions (ex. Gentoo, Funtoo)
Packages are optimized for your hardware.
You can exclude unwanted features from packages in order to minimize dependencies and reduce the binary size. For example, if your system uses Gnome, in most cases you will never need the KDE component of a package. In Funtoo/Gentoo, you are able to do this via 'use' flags.
Improved security: You can actually inspect the source of the package instead of trusting that the binary your distribution provides is not malicious.
Advantages of binary-based distributions (ex. Debian, Fedora)
Much faster to install large programs such as Firefox.
More user-friendly, since the user does not have to deal with compilation issues.
Stage tarballs
A stage tarball is a precompiled system used as a starting point to a Funtoo/Gentoo Linux install. Typically, you would use a stage3 tarball to do a Funtoo/Gentoo Linux installation but
some people may want to do a stage1 installation. This means that they would have to compile all the core tools (udev, portage, etc.) first.
<ref>http://www.funtoo.org/wiki/Funtoo_Linux_Installation#Installing_the_Stage_3_tarball</ref>