Zfs: Add ZFS to the Clear Linux kernel

Created on 27 Feb 2020  路  5Comments  路  Source: openzfs/zfs

Distribution Name | Clear Linux
Distribution Version | 32050
Linux Kernel | 4.19.106-116.lts2018
Architecture |
ZFS Version | 0.8.3
SPL Version |

Question, does anyone know where I can find step by step instructions on how to add zfs to the Clear Linux kernel as it is not appearing on the ZFS on Linux website? I know Intel won't support it due to some licensing purgatory. I am new to adding any modules to the kernel and I am trying to follow the instructions found here: , but so far I cannot replicate the success of others on this issue post "Bundle for ZFS drivers #631" on the forum . Thank you in advance

Building Question

Most helpful comment

One more caveat - I believe those steps will land the ZFS tools in /usr/local, which doesn't appear to be in the default PATH for root.

So you might want to either change that or change PATH to include /usr/local/sbin and /usr/local/bin. Either way.

All 5 comments

Follow this for how to disable requiring signed modules, then:

for bundle in devpkg-openssl devpkg-util-linux kernel-lts-dkms;do swupd bundle-add ${bundle};done;

Then you should be able to ./autogen.sh && ./configure && make && make install && depmod -a, then modprobe zfs.

Setting it up in DKMS would require a bit more work - you could probably plunder the contents of the rpm or deb DKMS package and land it in /usr/src then dkms add it manually, so it keeps up to date.

If you wanted it packaged in swupd, you could submit a request for them to add it, unless you have reason to think that won't work.

A million thanks! I will try these steps...

One more caveat - I believe those steps will land the ZFS tools in /usr/local, which doesn't appear to be in the default PATH for root.

So you might want to either change that or change PATH to include /usr/local/sbin and /usr/local/bin. Either way.

Thanks again, that is very good to know.

Leaving my how-to log that I wrote up for anyone else that needs it using rincebrain's instructions. A big thanks to rincebrain. Hopefully this helps out the next person who might be as clueless as I was with getting ZFS up and working.

#

Pre 1) I downloaded the tar file from ZFS on Linux website and moved it to the root. I uncompressed the file and then renamed it to zfs for easier referencing.
Pre 2) I was doing this on Virtualbox. If you are like me and make mistakes, I suggest cloning your machine so if you hose it, you can restart all over again. Make sure the clone is a full clone that has everything of the machine you are cloning in the settings.
Follow this for how to disable requiring signed modules, then:

1) for bundle in devpkg-openssl devpkg-util-linux kernel-lts-dkms;do swupd bundle-add ${bundle};done;
C1) For the 'Disable Secure Boot in your system鈥檚 UEFI settings, if you have enabled it.' I followed the bash commands from the Clear Linux Project Docs website.
sudo mkdir -p /etc/kernel/cmdline.d
echo "module.sig_unenforce" | sudo tee /etc/kernel/cmdline.d/allow-unsigned-modules.conf
-Update the boot manager and reboot the system to implement the changed kernel parameters.
sudo clr-boot-manager update
sudo reboot
Note If successful, the clr-boot-manager update command does not return any console output.
After rebooting, manually load out-of-tree modules using the insmod command.
sudo insmod
After that, I added the bundles...and if needing to add it one at a time use 'sudo swupd bundle-add ' for each bundle (i.e. devpkg-openssl devpkg-util-linux kernel-lts-dkms).
2) Then you should be able to ./autogen.sh && ./configure && make && make install && depmod -a, then modprobe zfs.
C2) This was absolutely perfect for me...nothing to add here
3)Setting it up in DKMS would require a bit more work - you could probably plunder the contents of the rpm or deb DKMS package and land it in /usr/src then dkms add it manually, so it keeps up to date.
C3) This part I did not tackle yet, it will take some time to figure this part out for me when I have more time. Point being, I realized I did not need to add it to the DKMS to have it work for this version of the kernel. ZFS works great once you complete adding the PATH below in #5.
4)If you wanted it packaged in swupd, you could submit a request for them to add it, unless you have reason to think that won't work.
C4) Intel won't do it per licensing purgatory since Oracle isn't explicitly updating the licensing to GPL. So, I don't know this for a fact, but if only Intel can create a bundle, maybe this is the best the community can do is have a walkthrough? I don't know.
5) One more caveat - I believe those steps will land the ZFS tools in /usr/local, which doesn't appear to be in the default PATH for root.
So you might want to either change that or change PATH to include /usr/local/sbin and /usr/local/bin. Either way.
C5) Absolutely correct, I did have to do exactly that to get ZFS to finally work. If you need ZFS commands to work in both Gnome and CLI, go to /home/ folder and vim or vi into the file '.bashrc' and make an entry at the bottom of the file 'PATH=$PATH:/usr/local/sbin'. Save and close the terminal. Then open a new terminal and type 'echo $PATH'. The path to zpool and all of your ZFS commands are now accessible globally in the OS.

Was this page helpful?
0 / 5 - 0 ratings