Funtoo's Wiki

Welcome to the Funtoo's Wiki, you will find helpful stuff here.

This wiki is here to help you with Funtoo.

πŸ“’ANNOUNCEMENT

The goal of this Wiki is to use Funtoo even after it's transition to hobby mode.

This Wiki will use new UNOFFICIAL repos hosted on github.

You will also find a few brand new Stages 3 built with Metro.

Hopefully you will benefit from the informations here and keep enjoying Funtoo for the next years, that is the only goal of this wiki.

Thank you for using this wiki.

BlakaDivin, 26 April 2025, France.

Funtoo Logo

~ Funtoo's Wiki: Second Edition Revised and Enlarged.

Update and Upgrade​

Considering you already got Funtoo installed, it is now time to update your repos and upgrade your system.

echo 'sync_base_url=https://github.com/funtoo-repo/{repo}' >> /etc/ego.conf

echo 'GENTOO_MIRRORS=https://direct-github.funmore.org' >> /etc/portage/make.conf

rm -rf /var/git/meta-repo

ego sync && emerge -DuavNA @world && emerge --depclean


Installation​

Here's a small guide (20 Steps) to install Funtoo (26 April 2025)

For a French keyboard: loadkeys fr
For wifi connection: nmtui

1. Setting up the Disks

lsblk
cfdisk /dev/nvme0n1 or cfdisk /dev/sda

πŸ“’Disk Setup
First parition: 1G (EFI System)
Second partition: 70G+ (Linux File System)
Third partition: 8G+ (Linux Swap)

2. Formatting the Disks

lsblk
mkfs.fat -F 32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2
mkswap /dev/nvme0n1p3
swapon /dev/nvme0n1p3

3. Mounting the Disks

mkdir -p /mnt/funtoo
mount /dev/nvme0n1p2 /mnt/funtoo
mkdir /mnt/funtoo/boot
mount /dev/nvme0n1p1 /mnt/funtoo/boot

4. Synching the clock

hwclock --systohc

5. Downloading a gnome stage 3

cd /mnt/funtoo

Method 1: wget https://metro.funmore.org/next/x86-64bit/generic_64/2025-04-23/gnome-light-workstation-stage3-generic_64-next-2025-04-23.tar

Method 2: links https://metro.funmore.org

6. Unpacking your gnome stage 3

tar --numeric-owner --xattrs --xattrs-include='*' -xpf gnome*

7. Time to chroot

Method 1: fchroot /mnt/funtoo

Method 2: cd /mnt/funtoo
mount --rbind /proc proc
mount --rbind /sys sys
mount --rbind /dev dev
cp /etc/resolv.conf /mnt/funtoo/etc/
chroot . /bin/su --login

8. Download the tree

ping www.google.com

Update your repos first!

echo 'sync_base_url=https://github.com/funtoo-repo/{repo}' >> /etc/ego.conf

echo 'GENTOO_MIRRORS=https://direct-github.funmore.org' >> /etc/portage/make.conf

rm -rf /var/git/meta-repo

ego sync

9. Edit profile

epro show

epro flavor desktop

OPTIONAL: epro subarch amd64-zen2

10. Update Funtoo

emerge -DuavNA @world && emerge --depclean

11. Create fstab

nano -w /etc/fstab

πŸ“’Fstab Setup
/dev/nvme0n1p1     /boot     vfat     noauto,noatime 1 2
/dev/nvme0n1p2     /             ext4     noatime 0 1
/dev/nvme0n1p3      none     swap     sw 0 0

12. Setting locales

nano -w /etc/locale.gen

πŸ“’Locale Setup
en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8

locale-gen

eselect locale list

EXAMPLE: eselect locale set 5

13. Setting keymap

nano -w /etc/conf.d/keymaps

πŸ“’French keyboard Setup
keymap="fr"

πŸ“’US keyboard Setup
keymap="us"

14. Setting hostname

nano /etc/conf.d/hostname

πŸ“’Hostname Setup
hostname="funtoo"

15. Setting Grub

mount -o remount,rw /sys/firmware/efi/efivars

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="Funtoo Linux [GRUB]" --recheck

ego boot update

16. Setting Users

passwd
useradd -m div
usermod -G wheel,audio,video,plugdev,portage div
passwd div

17. Final steps

emerge sys-kernel/debian-sources sys-apps/busybox

ramdisk /tmp/initramfs

πŸ“’CHECK KERNEL version
emerge -s debian-sources

EXAMPLE: mv /tmp/initramfs /boot/initramfs-debian-sources-x86_64-6.12.20_p1

ego boot

18. Leaving the chroot

exit
cd /mnt
umount -lR funtoo
reboot

19. Configure your new system

su -

nano /etc/conf.d/xdm

πŸ“’Display manager setup
DISPLAYMANAGER="gdm"

rc-update add dbus default
rc-update add elogind default

reboot

20. The end

OPTIONAL: /etc/init.d/xdm start
OPTIONAL: rc-update add xdm default


Links to Stages​

πŸ“’GNOME
Find all our gnomes stages 3 below.
Four Subarches are available: amd64-zen,amd64-zen2,amd64-zen3 and generic_64


Gnome AMD x64 Zen:
wget https://github.com/BlakaDivin/metro/releases/download/amd64-2/gnome-light-workstation-2-stage3-amd64-zen-next-2025-04-27.tar.xz

Gnome AMD x64 Zen 2:
wget https://github.com/BlakaDivin/metro/releases/download/amd64/gnome-light-workstation-2-stage3-amd64-zen2-next-2025-04-26.tar.xz

Gnome AMD x64 Zen 3:
wget https://github.com/BlakaDivin/metro/releases/download/amd64-1/gnome-light-workstation-2-stage3-amd64-zen3-next-2025-04-27.tar.xz

Gnome Generic x64:
wget https://github.com/BlakaDivin/metro/releases/download/generic64/gnome-light-workstation-2-stage3-generic_64-next-2025-04-27.tar.xz

πŸ“’BASIC
Find all our basics stages 3 (without Desktop environment) below.
One subarch is available: generic_64


Basic Generic x64:
wget https://github.com/funtoo-stages/generic_64/releases/download/2025-04-23/stage3-generic_64-next-2025-04-23.tar.xz

πŸ“’LXD
Find all our LXD stages (For containers) below.
One subarch is available: generic_64


LXD Generic x64:
wget https://github.com/funtoo-stages/generic_64/releases/download/2025-04-23/lxd-generic_64-next-2025-04-23.tar.xz


Become your own BDFL​

πŸ“’ansible playbook
"Taste what the daily job of BDFL looks like!"
-Borisp, 17 March 2024.

This ansible playbook will help you to create a local Funtoo Linux infrastructure setup.
After the execution of this ansible playbook you will have 3 running lxd container.

What is all about?
1. Create and use your own local Funtoo infrastructure.
2. Create and use your own Funtoo Linux tar images.
3. Create, regenerate and use your own Funtoo Meta-Repo tree.
4. Use the local repos for development tasks.

Playbook link: https://github.com/org-tekeli-borisp/ansible-funtoo

Using Metro to build Stages​

πŸ“’Metro
Metro is used to build Stages.
See very basic usage below.

su - or sudo -i

cd /root

git clone https://github.com/funtoo-src/metro

emerge -av dev-python/lxml dev-python/requests

cp /root/metro/metro.conf /root/.metro

Then you launch the setup to select your seed:

/root/metro/scripts/setup

Then you can build your own stage file with any subarch and using freshen or full:

EXAMPLE 1: export EGO_SYNC_BASE_URL="https://github.com/funtoo-repo/{repo}" && metro/scripts/ezbuild.sh next x86-64bit amd64-zen2 freshen+gnome-light-workstation

EXAMPLE 2: export EGO_SYNC_BASE_URL="https://github.com/funtoo-repo/{repo}" && metro/scripts/ezbuild.sh next x86-64bit amd64-zen2 full+gnome-light-workstation

EXAMPLE 3: export EGO_SYNC_BASE_URL="https://github.com/funtoo-repo/{repo}" && metro/scripts/ezbuild.sh next x86-64bit generic_64 freshen+lxd

Adding Packages​

πŸ“’Packages
We recommend you to use Flatpaks.

1. Installing Flatpak App

ego sync && emerge -av =sys-fs/fuse-2.9.9 flatpak

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo

reboot

2. Installing Flatpak Packages

flatpak install flathub org.mozilla.firefox

flatpak install flathub org.filezillaproject.Filezilla

flatpak install flathub org.gnome.Rhythmbox3

flatpak install flathub org.videolan.VLC

flatpak install flathub org.libreoffice.LibreOffice

flatpak install flathub org.adishatz.Screenshot

flatpak install flathub org.gimp.GIMP

flatpak install flathub com.obsproject.Studio

πŸ“’More Flatpaks
Visit: https://flathub.org/

3. Uninstalling Flatpak Packages

EXAMPLE: flatpak uninstall vlc

4. Updating Flatpak Packages

flatpak update


LXD/Setting Containers​

πŸ“’LXD
LXD is a container "hypervisor" designed to provide an easy set of tools to manage Linux containers.

Installation:

emerge -a lxd

rc-update add lxd default

gedit /etc/security/limits.conf

πŸ“’/etc/security/limits.conf
*      soft       nofile       1048576
*       hard       nofile       1048576
root       soft       nofile       1048576
root       hard       nofile       1048576
*       soft       memlock       unlimited
*        hard       memlock       unlimited
# End of file

gedit /etc/subuid

πŸ“’ /etc/subuid
root:1000000:1000000000

gedit /etc/subgid

πŸ“’ /etc/subgid
root:1000000:1000000000

Initialization:

/etc/init.d/lxd start

lxd init

πŸ“’ LXD Settings
Would you like to use LXD clustering? (yes/no) [default=no]: ↡
Do you want to configure a new storage pool? (yes/no) [default=yes]: ↡
Name of the new storage pool [default=default]: ↡
Name of the storage backend to use (btrfs, dir, lvm) [default=btrfs]: dir ↡
Would you like to connect to a MAAS server? (yes/no) [default=no]: ↡
Would you like to create a new local network bridge? (yes/no) [default=yes]: ↡
What should the new bridge be called? [default=lxdbr0]: ↡
What IPv4 address should be used? (CIDR subnet notation, β€œauto” or β€œnone”) [default=auto]: ↡
What IPv6 address should be used? (CIDR subnet notation, β€œauto” or β€œnone”) [default=auto]: none ↡
Would you like LXD to be available over the network? (yes/no) [default=no]: ↡
Would you like stale cached images to be updated automatically? (yes/no) [default=yes] ↡
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: ↡

Create your first Container:

cd /

wget https://github.com/funtoo-stages/generic_64/releases/download/2025-04-23/lxd-generic_64-next-2025-04-23.tar.xz

lxc image import lxd-generic_64-next-2025-04-23.tar.xz --alias funtoo

lxc launch funtoo YourContainerName

lxc list

Enter your Container:

lxc exec YourContainerName -- /bin/bash

Delete container if needed:

lxc stop YourContainerName

lxc delete YourContainerName

Delete image if needed:

lxc image delete funtoo

LXD/Laptop Network Setup​

πŸ“’ WARNING!
Special setup is required on a laptop when you are using WiFi. Without special steps, LXD will cause a conflict with the default route on your system which is managed by NetworkManager.

Create the following file on your laptop:

gedit /etc/conf.d/netif.brwan

πŸ“’ /etc/conf.d/netif.brwan
template="bridge"
ipaddrs="10.0.30.1/24"

Now, let's enable this bridge:

cd /etc/init.d

ln -s netif.tmpl netif.brwan

rc-update add netif.brwan default

reboot

New Bridge In, Old Bridge Out:

/etc/init.d/lxd restart

lxc network list

lxc profile edit default

Remember that this is YAML which expects indents to consist of two spaces -- not tabs:

πŸ“’ Edit the file
eth0:
name:  eth0
nictype:  bridged
parent:  brwan
type:  nic

lxc network delete lxdbr0

Enter a container:

lxc exec YourContainerName -- /bin/bash

cd /etc/conf.d

nano netif.eth0

πŸ“’ /etc/conf.d/netif.eth0
template='interface'
ipaddrs='10.0.30.2/24'
gateway='10.0.30.1'
nameservers='1.1.1.1 1.0.0.1'

We are setting the container's IP address to 10.0.30.2

Now, let's start this network:

cd /etc/init.d
ln -s netif.tmpl netif.eth0
rc-update add netif.eth0 default
exit
lxc restart YourContainerName
lxc list

Enter your container and try Ping:

lxc exec YourContainerName -- /bin/bash
ping 10.0.30.1

exit

We'll now set up IP Masquerading. This is done on the host:

gedit /etc/local.d/masquerade.start

(Below, I am using wlan0 below, because this is the interface on my laptop)

πŸ“’ /etc/local.d/masquerade.start
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

Make it executable -- and run it just this once. It will get automatically run when your system starts in the future:

chmod +x masquerade.start

./masquerade.start

Now you can enter your container and ping things on the internet:

lxc exec YourContainerName -- /bin/bash

ping www.yahoo.com

Add DHCP Daemon:

emerge dnsmasq

gedit /etc/dnsmasq.conf

πŸ“’ /etc/dnsmasq.conf
interface=brwan
dhcp-range=10.0.30.2,10.0.30.254,12h

rc-update add dnsmasq default

reboot