Project

General

Profile

Support #521

Updated by Daniel Curtis almost 10 years ago

{{>toc}} 

 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. 

 *WARNING*: I have not yet finished this yet, so please treat this as experimental for the time being. 

 *NOTE*: I have found that installing the zfs-dkms package from the AUR is much easier than trying to roll a custom kernel just for ZFS.  

 h2. Prepare The System 

 * Update the system: 
 <pre> 
 pacman -Syu 
 </pre> 

 * Install base-devel, cmake, base-devel and linux-headers cmake packages 
 <pre> 
 pacman -S base-devel cmake linux-headers 
 </pre> 

 h2. Backup the Existing Kernel 

 It is always a good idea to backup the kernel before mucking around with it. 

 * Copy the original kernal 
 <pre> 
 cp /boot/kernel.img /boot/kernel.img.orig 
 </pre> 

 h2. Building the Specific Kernel 

 In order to build ZFS, a specific kernel is necessary; 3.17.6 

 * Install a few dependencies: 
 <pre> 
 pacman -S gcc make bc 
 </pre> 

 * Download and extract the 3.17.6 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/arm/boot/Image /boot/kernel.img 
 </pre> 

 * Make the initial RAM disk 
 <pre> 
 mkinitcpio -k 3.17.6 -c /etc/mkinitcpio.conf -g /boot/initramfs-3.17.6.img 
 </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 package-query.tar.gz 
 tar xzf yaourt.tar.gz 
 </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-dkms: zfs-git 
 <pre> 
 yaourt zfs-dkms zfs-git 
 </pre> 

 * *NOTE*: Edit the PKGBUILD 
 #* And modify Follow the arch parameter steps to match compile the following: zfs-git package: 
 <pre> 
 arch=("i686" "x86_64" "armv6h") 1 
 n 
 n 
 y 
 </pre>

Back