Support #521
Updated by Daniel Curtis almost 10 years ago
One of the many projects I had for my pi was installing ZFS. While Raspbian is a a good distro for beginners, I require a bit more control and up to date packages than Raspbian can provide, so I use Arch Linux. This is a guide on how I compiled support for ZFS on my Raspberry Pi.
h2. Building the Specific Kernel
In order to build ZFS, a specific kernel is necessary; 3.17.6-1
* Install a few dependencies:
<pre>
pacman -S gcc make bc
</pre>
* Download and extract the 3.17.6-1 kernel
<pre>
sudo -s
cd /usr/src
wget -c https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.17.6.tar.xz
tar -xJf linux-3.17.6.tar.xz
cd linux-3.17.6
</pre>
* Prepare for compilation by running the following command:
<pre>
make mrproper
</pre>
* *Optionally*, the kernel can be customized with:
<pre>
make menuconfig
</pre>
* Copy the @.config@ file from the running kernel, if you want to start with the default Arch settings.
<pre>
zcat /proc/config.gz > .config
</pre>
* Compile the kernel
<pre>
make
</pre>
* Install modules
<pre>
make modules_install
</pre>
* Make the kernel image and copy the kernel to /boot directory
<pre>
make bzImage
cp -v arch/armv6/boot/bzImage /boot/vmlinuz-3.17.6-1
</pre>
* Make the initial RAM disk
<pre>
mkinitcpio -k 3.17.6-1 -c /etc/mkinitcpio.conf -g /boot/initramfs-3.17.6-1.img
</pre>
* Copy System.map to /boot, appending your kernel's name to the destination file. Then create a symlink /boot/System.map to point to /boot/System.map-YourKernelName.
<pre>
cp System.map /boot/System.map-YourKernelName
ln -sf /boot/System.map-YourKernelName /boot/System.map
</pre>
---
h2. Install yaourt
Yaourt isn't necessary, but makes managing AUR packages a lot easier.
* Download the packages for yaourt:
<pre>
cd /tmp
wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz && wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
tar xzf *.tgz
</pre>
#* Install package-query:
<pre>
cd package-query
makepkg -csi
</pre>
#* Install yaourt
<pre>
cd ../yaourt
makepkg -csi
</pre>
h2. Install the ZFS Git package from the Arch User Repository
* Install zfs-git
<pre>
yaourt zfs-git
</pre>
#* Follow the steps to compile the zfs-git package:
<pre>
1
n
n
y
</pre>