Project

General

Profile

Support #521

Updated by Daniel Curtis over 9 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. 

 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 *.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>

Back