orangepi-xunlong / orangepi-build

Orange Pi build for H2+, H3, H5, H6, H616, RK3328, RK3399 and RK3588(s)
http://www.orangepi.cn/
GNU General Public License v2.0
643 stars 273 forks source link

(bug) unable to build / install zfs on orangepi 5 #82

Closed thefiredragon closed 8 months ago

thefiredragon commented 1 year ago

Dear all and first thanks your work, Sadly it's impossible at the moment to build zfs dkms modules under kernel 5.10 and hope this could be fixed in future, Best Regards Dan

leeboby commented 1 year ago
  1. The latest orangepi5 v1.1.6 ubuntu/debian has solved this problem.
  2. The desktop version images has been preinstalled with zfs and can be used directly.
thefiredragon commented 1 year ago

Sadly it's not currently working. If I install latest image from here: https://drive.google.com/drive/folders/1F2uc8v_EQnvsNrevDihwoymOJlFgM-dZ Kernel Headers: https://drive.google.com/drive/folders/1SiUkTWQ5X7U07e5GJvLirqtrVRCIxfr5

I'm running into this issue:

Setting up zfs-dkms (2.0.3-9+deb11u1) ...
Removing old zfs-2.0.3 DKMS files...

------------------------------
Deleting module version: 2.0.3
completely from the DKMS tree.
------------------------------
Done.
Loading new zfs-2.0.3 DKMS files...
Building for 5.10.110-rockchip-rk3588
Building initial module for 5.10.110-rockchip-rk3588
configure: error:
        *** None of the expected "PDE_DATA" interfaces were detected.
        *** This may be because your kernel version is newer than what is
        *** supported, or you are using a patched custom kernel with
        *** incompatible modifications.
        ***
        *** ZFS Version: zfs-2.0.3-9+deb11u1
        *** Compatible Kernels: 3.10 - 5.10

Error! Bad return status for module build on kernel: 5.10.110-rockchip-rk3588 (aarch64)
Consult /var/lib/dkms/zfs/2.0.3/build/make.log for more information.
dpkg: error processing package zfs-dkms (--configure):
 installed zfs-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of zfs-zed:
 zfs-zed depends on zfs-modules | zfs-dkms; however:
  Package zfs-modules is not installed.
  Package zfs-dkms which provides zfs-modules is not configured yet.
  Package zfs-dkms is not configured yet.

dpkg: error processing package zfs-zed (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.140) ...
ln: failed to create hard link '/boot/initrd.img-5.10.110-rockchip-rk3588.dpkg-bak' => '/boot/initrd.img-5.10.110-rockchip-rk3588': Operation not permitted
update-initramfs: Generating /boot/initrd.img-5.10.110-rockchip-rk3588
update-initramfs: Converting to u-boot format
Errors were encountered while processing:
 zfs-dkms
 zfs-zed
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@armnode01:~#

Newer zfs versions runs into this issue:

Deleting module version: 2.1.6
completely from the DKMS tree.
------------------------------
Done.
Loading new zfs-2.1.6 DKMS files...
Building for 5.10.110-rockchip-rk3588
Building initial module for 5.10.110-rockchip-rk3588
configure: error:
        *** None of the expected "file_fallocate" interfaces were detected.
        *** This may be because your kernel version is newer than what is
        *** supported, or you are using a patched custom kernel with
        *** incompatible modifications.
        ***
        *** ZFS Version: zfs-2.1.6-3
        *** Compatible Kernels: 3.10 - 5.19

Error! Bad return status for module build on kernel: 5.10.110-rockchip-rk3588 (aarch64)
Consult /var/lib/dkms/zfs/2.1.6/build/make.log for more information.
dpkg: error processing package zfs-dkms (--configure):
 installed zfs-dkms package post-installation script subprocess returned error exit status 10
Processing triggers for initramfs-tools (0.140) ...
ln: failed to create hard link '/boot/initrd.img-5.10.110-rockchip-rk3588.dpkg-bak' => '/boot/initrd.img-5.10.110-rockchip-rk3588': Operation not permitted
update-initramfs: Generating /boot/initrd.img-5.10.110-rockchip-rk3588
update-initramfs: Converting to u-boot format
Errors were encountered while processing:
 zfs-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@armnode01:/usr/src/linux-headers-5.10.110-rockchip-rk3588#
leeboby commented 1 year ago

Please use the kernel header file in the /opt directory, not in Google Drive, the latest image /opt has kernel header file.

In addition, ubuntu22.04 and debian11 cannot install zfs using the apt command.

If you want to install zfs yourself, use the deb packages here: https://drive.google.com/drive/folders/11S6k25H8dhlrP4nP0miTxqas3viA8FVG

image

Again, the latest desktop version of the images can use zfs directly.

joshdick commented 9 months ago

I'm curious if there's any update on this issue? (I am experiencing the same symptoms as @thefiredragon when attempting to install Ubuntu's first-party ZFS packages.)

I appreciate that you've provided prebuilt packages to work around the issue, but It would be nice to be able to install the official/first-party Ubuntu ZFS packages using the apt command for increased confidence in both longer-term stability and security.