Setting Up ZFS on a ROCKPro64 Running Debian Buster
Update: Although the method described below does work, I eventually switched to Armbian’s Ubuntu 20.04 server image, and the ZFS DKMS module works there without any extra hacking.
I recently got a ROCKPro64 single-board computer that I’m planning to use as a home server. Once it arrived, I quickly discovered that setting up ZFS on it was going to be a bit tricky because there were issues building DKMS modules. After a few hours of troubleshooting, I finally figured it out, so I thought I’d write up what I did in hopes that it’ll help someone else get ZFS installed more easily.
I initially discovered a fairly involved way of getting it all to work (see “The Hard Way” below), but later I found an easier way (see “The Easy Way” below). I’d recommend starting with the easy way and only resorting to the hard way if that doesn’t work.
Both of these methods worked for me on ayufan’s minimal Debian Buster image running kernel
The Easy Way
- Load the zfs module -
I discovered this method thanks to this GitHub issue comment.
The Hard Way
spl-dkms. The latter will likely fail with errors about the DKMS build failing.
make scripts. You may see some errors. If there is an error about missing
classmap.h, you can comment out the line in
scripts/Makefilethat ends with
+= selinux. I also saw some other errors about a few other headers missing from
tools/. I fixed that by downloading the kernel source from ayufan’s repo and then copying the needed files from
tools/include/tools/in the full kernel source to
tools/include/tools/in the headers. Once
make scriptsruns successfully, you can proceed.
/var/lib/dkms/spl/<spl version>/source/configure. There will be two instances of these lines:
kuid_t userid = KUIDGT_INIT(0); kgid_t groupid = KGIDT_INIT(0);
Those can be deleted. There will also be two instances of these lines:
kuid_t userid = 0; kgid_t groupid = 0;
= 0part of both of those.
spl-dkms. It should succeed now.
Load the zfs module -
I discovered this method thanks to this Github issue comment and this Armbian forum post.
Via the easy way, I tried installing
zfsutils-linux all from the normal repo as well as from
buster-backports as the Debian docs on ZFS say to do. I only tried installing them from the normal repo when doing the hard way, but I would guess they would install from
buster-backports as well.
[Last updated January 20, 2021]