# Raspberry Pi Stage 4 Gentoo Tarball

Tarballs (a term for .tar archives) are a common medium for installing the Gentoo Linux operating system. The standard Gentoo installation starts with a non-bootable “stage 3” tarball, which includes only very limited software. As discussed in a previous article, on the Raspberry Pi - and other embedded systems - it is in certain respects better to start off with a bootable (and wifi-capable) tarball.

For these purposes we are publishing a stage 4 tarball with all the basic software you need on the Raspberry Pi - including the sys-kernel/linux-firmware package for broad wifi-device support and a Git repository for customizing and deploying the newest Raspberry Pi kernel sources from upstream. Though the archives total under 1 GB in size, we recommend you use at least an 8 GB SD card for use with your Raspberry Pi.

## Our Tarball Structure

The structure is fairly straightforward, our tarball distribution consists of 2 archives, which can be downloaded from this directory. The boot.tar.bz2 archive contains files needed for the boot partition (namely the /boot directory), whereas the system.tar.bz2 archive contains the files for the system partition (the rest of the root directory).

It is important to partition the drive so that the tarball system will recognise everything properly. For this you will need:

• First partition: formatted as fat32, we recommend 100 MB (this will be your /boot partition).
• Second partition: formatted as linux swap, we recommend 1 GB or more (this will be your swap partition)
• Third partition: formatted as ext4, as large as the remainder of your disk (this will be your system partition).

You may partition the drive with gparted, parted, or whatever else you are most comfortable with.

## Extracting the Tarballs

To extract the tarballs simply mount your first and third partitions (boot and system respectively) on a functioning system; navigate to them and extract the archives with the tar -xvjpf command.

As an example:

We recommend you perform the above operations as root. Unmount, plug the SD card into your Raspberry Pi, and you are good to go!

You should also add a new user for yourself and add a password for that user as well. To do this type:

## Connecting with Connman

Our tarball comes with a basic Connman installation, so that you can easily access your network whilst keeping system resource use at a minimum. For a more thorough explanation of how to use Connman we kindly refer you to the connman page on the Arch wiki.

We have added Connman to your default runlevel, and after you connect to your network once, everything should work automatically the next time you boot up - presuming the network is still reachable.

We have set up a repository which you can use to download the newest kernel sources. The repository is located under /usr/src/linux-9999-rpi and pulls the files from git://github.com/raspberrypi/linux.git.

You can control which kernel your /usr/src/linux symlink points to via eselect, though you should bear in mind that navigating to the Git repository via the symlink directory prevents you from using Git.

To instruct your Rapsberry Pi boot loader to use the new kernel edit your /boot/config.txt file. The first entry should read:

## Shipped Packages

For ease of overview - here is a paste of our @world file, which specifies all the packages we have explicitly installed.

## Increased Performance

To speed up your Raspberry, we have enabled a few optimizations (medium overclocking and reduced GPU memory) in the /boot/config.txt file. For more information on these or other potential optimizations please consult the relevant section on the Gentoo wiki.

full history here