Skip to content

Instantly share code, notes, and snippets.

@CodeBradley
Last active April 12, 2025 20:40
Show Gist options
  • Save CodeBradley/6acef34563323f8c2a11b72900c20092 to your computer and use it in GitHub Desktop.
Save CodeBradley/6acef34563323f8c2a11b72900c20092 to your computer and use it in GitHub Desktop.
How to Setup Open Media Vault (OMV) 7 on FriendlyElec CM3588 Nas Kit with ZFS

How to Setup Open Media Vault (OMV) 7 on FriendlyElec CM3588 Nas Kit with ZFS

The FriendlyElec (NanoPC) CM3588 is a RK3588 based solution with 4/8/16GB LPDDR4x memory and 0/64GB eMMC flash storage. The inital carrier board released with the CM3588 features 4x M.2 NVMe SSD slots (PCIe 3.0 x1 each) and a 2.5gbps RJ45 port, making it an attractive option for a low powered silent NAS at $130/$145/$174 depending on which RAM configuration you purchase.

I ordered this in response to the LTT video. I have seen a few people struggling to configure these, and figured I would offer some basic guides in order to get those who need some assistance on getting their NAS up and going.

I will be using the precompiled Debian 12 installer found here. ( 01_Official images > 02_SD-to-eMMC images > rk3588-eflasher-debian-bookworm-core-6.1-arm64-xxxxxxxx.img.gz)

The FriendlyElec Wiki is actually pretty good, but it can feel like a wall of text/commands to run and can be overwhelming to a new user.

Want to power this over POE+? I used this adapter, and verified it supplies up to 25 watts and passes 2.5gbps.

Typical power consumption with 4 Micron 2300 NVMe drives and (2) Noctua NF-A4x10 fans @ 5V:

  • idle = ~5w idle
  • "typical" load = ~7-15w
  • stress testing CPU and SSDs = ~20-23w

I have found that transfering at linerate (2.5gbps) uses about 35% CPU and ~15-20w in my testing.

I remixed sgofferj's CM3588-NAS-case to accomadate the case fan screws (M5.5) that come with the Noctua fans. You can find that here.

Installing an OS

Since I bought a 8GB RAM/64GB eMMC model, I will be using an SD to eMMC install image for this guide. You will need a MicroSD card that is 8GB or larger.

  1. Download Debian 12 Bookworm Core from here. ( 01_Official images > 02_SD-to-eMMC images > rk3588-eflasher-debian-bookworm-core-6.1-arm64-xxxxxxxx.img.gz)
  2. Use a tool like 7Zip, to extract the .img file
  3. Use Balena Etcher to write the image to the SD card.
  4. Install the SD card into the CM3588 NAS, then power the unit on.
  5. If you use one of the HDMI out ports, you can track the progress. Otherwise you can wait ~5 minutes (mine consistently takes around 80 seconds to install).
  6. Power down the unit, then power it back on.
  7. If you have HDMI hooked up, you should be prompted at the main login screen. If you want to use SSH, scan your network or check your router/DHCP server for the device's IP address.

Configuring Debian 12

There are 2 accounts by default.

  • root/fa
  • pi/pi (in the sudoers group)

In this guide we will be:

Use your favorite tool to SSH into the unit.

Changing root password

passwd

Enter a new password, and confirm.

Delete default user

We are going to create our own user, so we don't need this one.

deluser pi

Set your locale

If you're not US based, change this to your locale

sudo localectl set-locale LANG=en_US.UTF-8

Create a new user

I am using nas in this example, but feel free to name it whatever you want, then we will add it to sudoers group

useradd nas
passwd nas
usermod -aG sudo -d /home/nas nas

To verify user was added to the sudoers group

getent group sudo

If you need to add the users home dir manually

sudo mkdir -p /home/nas
sudo chmod 755 /home/nas
sudo usermod -d /home/nas nas

Move over skeleton files

sudo cp -r /etc/skel/. /home/nas/
sudo chown -R nas:nas /home/nas

Configure the user to use bash

chsh -s /bin/bash nas

Disabling root SSH logins

This is for security, as the username is always root and the access rights are unlimited.

You can skip this step if installing OMV right away, otherwise you will need to run it again later.

nano /etc/ssh/sshd_config

Go to line 33, change PermitRootLogin yes to PermitRootLogin no.

systemctl restart sshd
exit

SSH back in as your newly created user

Reconfigure Apt sources

By default the sources file comes with a mirror that is based out of China. While this is fine, it would be much faster if you used the local Debian apt sources. So we will change them back. I have commented them out for now.

sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
sudo nano /etc/apt/sources.list
#deb https://mirrors.aliyun.com/debian bookworm main non-free contrib
#deb-src https://mirrors.aliyun.com/debian bookworm main non-free contrib
#deb https://mirrors.aliyun.com/debian-security bookworm-security main
#deb-src https://mirrors.aliyun.com/debian-security bookworm-security main
#deb https://mirrors.aliyun.com/debian bookworm-backports main non-free contrib
#deb-src https://mirrors.aliyun.com/debian bookworm-backports main non-free contrib

deb http://deb.debian.org/debian bookworm main non-free-firmware contrib
deb-src http://deb.debian.org/debian bookworm main non-free-firmware

deb http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware
deb-src http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware

deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware

deb http://deb.debian.org/debian bookworm-backports main non-free-firmware contrib
deb-src http://deb.debian.org/debian bookworm-backports main non-free-firmware

Then update and upgrade apt

sudo apt update && sudo apt upgrade

Compiling linux-headers for DKMS (Dynamic Kernel Module Support)

In order to install ZFS, we first need to install linux headers for our kernel to add DKMS support.

Luckily, pre-compiled headers can already be found in /opt/archives.

Note: Versions will change, if the command fails then ls /opt/archives to find the file to use

sudo -i
dpkg -i /opt/archives/linux-*

Installing ZFS

Now that we have Linux headers, we can use apt to install ZFS

sudo apt install zfs-dkms zfsutils-linux

Now that ZFS is installed, we will try to run a command to test that ZFS and DKMS are actually functional.

zpool status

If this works, it will report that we have 0 pools. If you get an error that says: "The ZFS modules are not loaded. Try running '/sbin/modprobe zfs' as root to load them", that means DKMS isn't working properly and you likely missed a step up above or it failed to compile, which should have given you an error.

Now that we have ZFS working, we can create our ZFS pool. You have a few options, depending on how much redundancy or performance you want. I would recommend the following options, although there are a few more. You will have to check the ZFS documenation for any other array types.

ZFS should be working now.

Create ZFS Pool

Create the zfs drive now by running the following command

zpool create <poolname> <raidtype> <devices> <devices> [<devices>] [<devices>]

example

sudo zpool create zfs-nmve-z1 raidz1 /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1

After that, run the below command to verify the drive was created.

zpool status

It should look like this

zpool status
  pool: zfs-nmve-z1
 state: ONLINE
config:

        NAME         STATE     READ WRITE CKSUM
        zfs-nmve-z1  ONLINE       0     0     0
          raidz1-0   ONLINE       0     0     0
            nvme0n1  ONLINE       0     0     0
            nvme1n1  ONLINE       0     0     0
            nvme2n1  ONLINE       0     0     0
            nvme3n1  ONLINE       0     0     0

errors: No known data errors

Openmedia Vault uses podman for certain apps, and you are going to run into two issues. Permissions and the OverlayFS.

Run the following two commands to fix the issue with permissions.

zfs set acltype=posixacl <poolname>

example

sudo zfs set acltype=posixacl zfs-nmve-z1

Installing OpenMediaVault

Next you need to add fuse-overlayfs

sudo apt install fuse-overlayfs

Then run

vi /etc/containers/storage.conf

or

nano /etc/containers/storage.conf

your choice.

The conf file should look like the following.

[storage]
driver = "overlay"
runroot = "/run/containers/storage"
graphroot = "/var/lib/containers/storage"

[storage.options]
pull_options = {enable_partial_images = "false", use_hard_links = "false", ostree_repos=""}
#mount_program = "/usr/local/bin/overlayzfsmount"
mount_program = "/usr/bin/fuse-overlayfs"

[storage.options.overlay]
mountopt = "nodev"

From this point,

Install OpenMediaVault from the website

https://docs.openmediavault.org/en/latest/installation/on_debian.html

if you used the nas user from the github page you'll be locked out. you need to run the following to add the ssh group to nas to login with it again. You will also need to disable permitrootlogin in the sshd_config again.

sudo usermod –a –G _ssh nas

Then run the omv-extras install

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash

After that you should be all set.

In the WebGui

Run Updates

Go to System -> Update Management -> Updates

Hit the Magnifying Glass then do all updates.

Download Plugins

Go to System -> Plugins

Hit the Magnifying Glass

Then search for ZFS, install the plugin like normal. It should go through without any errors.

You should be all done now, Enjoy.


Credits

https://www.reddit.com/r/OpenMediaVault/comments/1dq4toy/omv7_cm3588_zfs_setup/

https://github.com/Vincent-Dalstra/CM3588?tab=readme-ov-file#changing-root-password

@veryscarycary
Copy link

veryscarycary commented Dec 17, 2024

Thanks for the gist! This has been super helpful!

There are a couple of revisions that I would recommend though:

  1. When it says:

    sudo -i
    dpkg -i /opt/archives/linux-headers-6.1.57_6.1.57-11_arm64.deb
    

    do instead:

    sudo -i  # MUST BE RUN INDIVIDUALLY(dont paste these 2 commands at once)
    dpkg -i /opt/archives/* # this is because the kernal image needs to be installed too and must match the headers
    
  2. The line that says:

    sudo usermod -a -G _ssh nas
    

    has the wrong type of dash(en-dash, instead of hyphen), which breaks the code. I have corrected the code in the above snippet, however.

@jagagemo
Copy link

In "Reconfigure Apt sources", I think you meant to copy, not to move to a .old file.

@danackerson
Copy link

@veryscarycary's comments definitely got me much closer. What I needed to do additionally was create a symbolic link from the installed, current kernel headers to the linux-headers-arm64 -> sudo ln -s /usr/src/linux-headers-6.1.57 /usr/src/linux-headers-arm64 .
Since ZFS dkms is only using linux-headers-arm64 and this was actually pointed to an older kernel version (6.1.0-28), the mismatch resulted in a modprobe: ERROR: could not insert 'zfs': Exec format error.

After linking it to the current kernel headers, however, everything worked as expected!

@SadL
Copy link

SadL commented Jan 7, 2025

For some reason I couldn't boot from the SD card, so I had to use the USB cable to install the image. Had the modprobe: ERROR: could not insert 'zfs': Exec format error message as well. I just rebooted the system at that point and the problem was solved.

@CodeBradley
Copy link
Author

Thanks for the gist! This has been super helpful!

No problem guys, glad some people are finally getting some use out of this. I made it, then I accidentally wiped my entire emmc following a tutorial on FEs website then had to run through all of this again and had it re-provisioned in 10 minutes; instead of the initial 4 or so right before that. Versions will definitely be outdated at this point, so make sure you check for updated ones.

If I get time I might throw this into an Ansible playbook or role and add it here or link another Gist. Would be really cool if someone with time could throw one in the comments. Would be quick with ChatGPT but I don't have time to test/debug it at the moment.

FriendlyElec has instructions on how to clone this and store it in a USB where it will auto install the custom image. I wanted to do it but again limit on time and wanted to throw this thing at that time I finished this... I would freaking love anyone that could link a custom image of this here with no further customizations.

There are a couple of revisions that I would recommend though:

  1. When it says:

    sudo -i
    dpkg -i /opt/archives/linux-headers-6.1.57_6.1.57-11_arm64.deb
    

    do instead:

    sudo -i  # MUST BE RUN INDIVIDUALLY(dont paste these 2 commands at once)
    dpkg -i /opt/archives/* # this is because the kernal image needs to be installed too and must match the headers
    

I updated the dpkg command, but I left linux- in it still just in case.

2. The line that says:

sudo usermod -a -G _ssh nas

has the wrong type of dash(en-dash, instead of hyphen), which breaks the code. I have corrected the code in the above snippet, however

The _ssh is intentional. That's one of the default groups that OMV uses to provide SSH access to the nas user, in this instance. Not too sure why it would through and error after -G? -ssh isn't a usermod flag.

In "Reconfigure Apt sources", I think you meant to copy, not to move to a .old file.

Just updated it for everyone.

@veryscarycary's comments definitely got me much closer. What I needed to do additionally was create a symbolic link from the installed, current kernel headers to the linux-headers-arm64 -> sudo ln -s /usr/src/linux-headers-6.1.57 /usr/src/linux-headers-arm64 . Since ZFS dkms is only using linux-headers-arm64 and this was actually pointed to an older kernel version (6.1.0-28), the mismatch resulted in a modprobe: ERROR: could not insert 'zfs': Exec format error.

After linking it to the current kernel headers, however, everything worked as expected!

Sorry I'm on mobile right now, I'm unable to check this one out right now or add on new sections.

@R3vb3n
Copy link

R3vb3n commented Jan 22, 2025

Hello guys,
i have issues with my permissions.
everything i tested shows no effect.
Target: access shared folders over mac or iphone via smb. Only read access is granted.

Maybe following command is the issue, because this shows no effect on the webgui:
sudo zfs set acltype=posixacl zfs-nmve-z1

on webgui is acltype = posix

Can somone help me. Thank you

@R3vb3n
Copy link

R3vb3n commented Jan 23, 2025

Hello guys, i have issues with my permissions. everything i tested shows no effect. Target: access shared folders over mac or iphone via smb. Only read access is granted.

Maybe following command is the issue, because this shows no effect on the webgui: sudo zfs set acltype=posixacl zfs-nmve-z1

on webgui is acltype = posix

Can somone help me. Thank you

I found the answer.
ios cause the issue.
every big update in this case from 17 to 18 smb acces over the ios files app crashes.
https://forum.openmediavault.org/index.php?thread/54039-smb-write-access-with-ios18-device-is-not-working-anymore-omv7-on-raspberry-pi-5/

In this Articel is also the solution.
activate the Time Machine option and write access is working.

but let me ask another question.
why we need Podman for the installation?

@tgreeff
Copy link

tgreeff commented Jan 25, 2025

Hey y'all,

First, I wanna say thank you for making this guide. Super appreciated with (from what I can tell) a smaller community with the CM3588 NAS kit. Bought it around a year ago to try to setup a NAS and I'm finally getting to setting it up.

Anyway, It looks like I'm running into some DNS issues with the installation. I figured I'd post this in case someone else was having some issues or maybe there is a solution. Essentially, I'm running into issues like:

Resolving github.com (github.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘github.com’

This became apparent on the "omv-extras install" section. First I ran the command. Proceeded to just open the link myself, create the install file, and then run it, but that basically provided the same thing. I can tell this is a pretty standard step from this page: https://forum.openmediavault.org/index.php?thread/5549-omv-extras-org-plugin/

Maybe this is something easy to resolve that I haven't figured out yet, which I've tried changing Network Config with omv-firstaid. This just results in the SSH session closing and the IP changing, so maybe I need to say yes to all the pop-ups? This was suggested here: https://forum.openmediavault.org/index.php?thread/40714-fixed-wget-unable-to-resolve-host-address-github-com-when-trying-to-install-anyt/

They also have an option to run it without networking, and that seemed to net no results.

Luckily I can at least access the OMV local site, so something's working at least! I did look at trying to edit the /etc/resolv.conf, however that had a scary DO NOT EDIT note on the top of the file. Maybe that's my next target?

But again, thank you! And I'll update if I figure something out.

@veryscarycary
Copy link

Hey @tgreeff, I remember running into that issue as well, twice(had to restart the process a few times) and I was similarly perplexed. I’m not exactly sure why, but I’m pretty sure this step can be resolved by simply rebooting the CM3588 and trying again after the reboot.

Give that a shot and let me know if that resolves it for you too.

@tgreeff
Copy link

tgreeff commented Jan 26, 2025

Okay! I figured out I needed to run nano /etc/dhcp/dhclient.conf, which then I uncommented the line starting with "#prepend domain-name-servers" and appended Google DNS servers "8.8.8.8, 8.8.4.4;". This line will then look like this:

prepend domain-name-servers 8.8.8.8, 8.8.4.4;

image

I originally restarted from here and realized I couldn't SSH anymore, so I manually logged into root and reran omv-firstaid. I clicked the Network Config option, selected yes to everything, and BAM! SSH, pinging, and the plugin script now execute without the errors. 👍

Once I got that setup, I realized that I needed to login with the Admin account that OMV created, so I was logging into the nas account that was made. The main hint that gave me this realization was doing some searching and stumbled upon the OMV forums here: https://forum.openmediavault.org/index.php?thread/18225-new-to-omv-gui-or-web-interface/

I was using the right URL with http://cm3588.local, but not this (which I will need to change the password)
image

@tgreeff
Copy link

tgreeff commented Jan 26, 2025

Hey @tgreeff, I remember running into that issue as well, twice(had to restart the process a few times) and I was similarly perplexed. I’m not exactly sure why, but I’m pretty sure this step can be resolved by simply rebooting the CM3588 and trying again after the reboot.

Give that a shot and let me know if that resolves it for you too.

Hey @veryscarycary! Yeah, it's an odd issue. I went through the process a few times wondering why it was happening. Checked some forums and was wondering if something on OMV got updated. Some things were saying HomeAutomation could be causing issues, but I hadn't even installed anything for that yet haha.

Maybe it was just the fact of using omv-firstaid network config fully, so I guess YMMV? So far it's working now at least. 😅

Anyway, thanks for getting back! I appreciate the help!

@matzede3
Copy link

matzede3 commented Jan 27, 2025

Hello guys,
might be a stupid question: But is there an advantage to setting up OMV using this guide in comparison to the official OMV image provided by friendlelec?
Is this only done for ZFS?
And if so, wouldn´t it be possible to set that up within OMV directly?

@pthorsson
Copy link

pthorsson commented Mar 2, 2025

First of all, thanks for a good guide! It was very helpful getting started with my CM3588 Plus. Everything goes very smooth until the point after I've installed OMV and trying to update through either OMV UI or via command line. It seems to want to upgrade to a kernel version (6.12.9) not yet supported by ZFS (<=6.2), if I'm understanding the logs correctly(?). I haven't managed to get out of this situation and ended up re-flashing my eMMc (twice, by trying updating through both the OMV UI and the command line).

Any ideas on how to approach this problem?

UPDATE: I ended up removing the 6.12.9 kernel and set to hold the current stable kernel. Now it seems to be working.


Here's a full log of the apt update and upgrade that breaks it.

root@CM3588-Plus:~# apt update

Get:1 file:/var/cache/openmediavault/archives  InRelease
Ign:1 file:/var/cache/openmediavault/archives  InRelease
Get:2 file:/var/cache/openmediavault/archives  Release
Ign:2 file:/var/cache/openmediavault/archives  Release
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Translation-en
Ign:4 file:/var/cache/openmediavault/archives  Translation-en
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Translation-en
Ign:4 file:/var/cache/openmediavault/archives  Translation-en
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Translation-en
Ign:4 file:/var/cache/openmediavault/archives  Translation-en
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Translation-en
Ign:4 file:/var/cache/openmediavault/archives  Translation-en
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Translation-en
Ign:4 file:/var/cache/openmediavault/archives  Translation-en
Get:3 file:/var/cache/openmediavault/archives  Packages
Ign:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Translation-en
Ign:4 file:/var/cache/openmediavault/archives  Translation-en
Get:3 file:/var/cache/openmediavault/archives  Packages
Get:4 file:/var/cache/openmediavault/archives  Translation-en
Ign:4 file:/var/cache/openmediavault/archives  Translation-en
Hit:5 http://deb.debian.org/debian bookworm InRelease
Hit:6 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:7 http://deb.debian.org/debian bookworm-updates InRelease
Hit:8 http://deb.debian.org/debian bookworm-backports InRelease
Hit:9 http://httpredir.debian.org/debian bookworm-backports InRelease
Hit:10 http://security.debian.org/debian-security bookworm-security InRelease
Hit:11 http://packages.openmediavault.org/public sandworm InRelease
Hit:12 https://openmediavault-plugin-developers.github.io/packages/debian sandworm InRelease
apt-listchanges: Changelogs
---------------------------

linux-signed-arm64 (6.12.9+1~bpo12+1) bookworm-backports; urgency=medium

  * Sign kernel from linux 6.12.9-1~bpo12+1

  * Rebuild for bookworm-backports:
    - d/salsa-ci.yml: Set RELEASE to bookworm-backports
    - Revert compiler version to gcc-12
    - debian_linux.config_v2: Add workaround for a bug in older dacite
Hit:13 https://openmediavault.github.io/packages sandworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

root@CM3588-Plus:~# apt upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-6.1.0-31-arm64 linux-headers-6.1.0-31-common linux-kbuild-6.1
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  initramfs-tools initramfs-tools-core klibc-utils libklibc linux-base linux-headers-6.12.9+bpo-arm64 linux-headers-6.12.9+bpo-common
  linux-image-6.12.9+bpo-arm64 linux-kbuild-6.12.9+bpo
The following packages will be upgraded:
  linux-headers-arm64
1 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 105 MB/105 MB of archives.
After this operation, 252 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://deb.debian.org/debian bookworm-backports/main arm64 linux-headers-6.12.9+bpo-common all 6.12.9-1~bpo12+1 [10.7 MB]
Get:2 http://deb.debian.org/debian bookworm-backports/main arm64 linux-image-6.12.9+bpo-arm64 arm64 6.12.9-1~bpo12+1 [91.3 MB]
Get:3 http://deb.debian.org/debian bookworm-backports/main arm64 linux-kbuild-6.12.9+bpo arm64 6.12.9-1~bpo12+1 [1189 kB]
Get:4 http://deb.debian.org/debian bookworm-backports/main arm64 linux-headers-6.12.9+bpo-arm64 arm64 6.12.9-1~bpo12+1 [1546 kB]
Get:5 http://deb.debian.org/debian bookworm-backports/main arm64 linux-headers-arm64 arm64 6.12.9-1~bpo12+1 [1412 B]
Fetched 105 MB in 2s (50.9 MB/s)
Reading changelogs... Done
Preconfiguring packages ...
Selecting previously unselected package libklibc:arm64.
(Reading database ... 77408 files and directories currently installed.)
Preparing to unpack .../0-libklibc_2.0.12-1_arm64.deb ...
Unpacking libklibc:arm64 (2.0.12-1) ...
Selecting previously unselected package klibc-utils.
Preparing to unpack .../1-klibc-utils_2.0.12-1_arm64.deb ...
Unpacking klibc-utils (2.0.12-1) ...
Selecting previously unselected package initramfs-tools-core.
Preparing to unpack .../2-initramfs-tools-core_0.142+deb12u1_all.deb ...
Unpacking initramfs-tools-core (0.142+deb12u1) ...
Selecting previously unselected package linux-base.
Preparing to unpack .../3-linux-base_4.9_all.deb ...
Unpacking linux-base (4.9) ...
Selecting previously unselected package initramfs-tools.
Preparing to unpack .../4-initramfs-tools_0.142+deb12u1_all.deb ...
Unpacking initramfs-tools (0.142+deb12u1) ...
Selecting previously unselected package linux-headers-6.12.9+bpo-common.
Preparing to unpack .../5-linux-headers-6.12.9+bpo-common_6.12.9-1~bpo12+1_all.deb ...
Unpacking linux-headers-6.12.9+bpo-common (6.12.9-1~bpo12+1) ...
Selecting previously unselected package linux-image-6.12.9+bpo-arm64.
Preparing to unpack .../6-linux-image-6.12.9+bpo-arm64_6.12.9-1~bpo12+1_arm64.deb ...
Unpacking linux-image-6.12.9+bpo-arm64 (6.12.9-1~bpo12+1) ...
Selecting previously unselected package linux-kbuild-6.12.9+bpo.
Preparing to unpack .../7-linux-kbuild-6.12.9+bpo_6.12.9-1~bpo12+1_arm64.deb ...
Unpacking linux-kbuild-6.12.9+bpo (6.12.9-1~bpo12+1) ...
Selecting previously unselected package linux-headers-6.12.9+bpo-arm64.
Preparing to unpack .../8-linux-headers-6.12.9+bpo-arm64_6.12.9-1~bpo12+1_arm64.deb ...
Unpacking linux-headers-6.12.9+bpo-arm64 (6.12.9-1~bpo12+1) ...
Preparing to unpack .../9-linux-headers-arm64_6.12.9-1~bpo12+1_arm64.deb ...
Unpacking linux-headers-arm64 (6.12.9-1~bpo12+1) over (6.1.128-1) ...
Setting up linux-kbuild-6.12.9+bpo (6.12.9-1~bpo12+1) ...
Setting up linux-base (4.9) ...
Setting up linux-headers-6.12.9+bpo-common (6.12.9-1~bpo12+1) ...
Setting up libklibc:arm64 (2.0.12-1) ...
Setting up klibc-utils (2.0.12-1) ...
No diversion 'diversion of /usr/share/initramfs-tools/hooks/klibc to /usr/share/initramfs-tools/hooks/klibc^i-t by klibc-utils', none removed.
Setting up initramfs-tools-core (0.142+deb12u1) ...
Setting up initramfs-tools (0.142+deb12u1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.12.9+bpo-arm64 (6.12.9-1~bpo12+1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-6.12.9+bpo-arm64
I: /initrd.img.old is now a symlink to boot/initrd.img-6.12.9+bpo-arm64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.12.9+bpo-arm64
I: /initrd.img is now a symlink to boot/initrd.img-6.12.9+bpo-arm64
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.12.9+bpo-arm64.
Sign command: /lib/modules/6.12.9+bpo-arm64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Running the pre_build script:
checking for gawk... gawk
checking metadata... META file
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... aarch64-linux-gnu-gcc-12
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether aarch64-linux-gnu-gcc-12 accepts -g... yes
checking for aarch64-linux-gnu-gcc-12 option to enable C11 features... none needed
checking whether aarch64-linux-gnu-gcc-12 understands -c and -o together... yes
checking dependency style of aarch64-linux-gnu-gcc-12... none
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by aarch64-linux-gnu-gcc-12... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert aarch64-unknown-linux-gnu file names to aarch64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert aarch64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from aarch64-linux-gnu-gcc-12 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if aarch64-linux-gnu-gcc-12 supports -fno-rtti -fno-exceptions... no
checking for aarch64-linux-gnu-gcc-12 option to produce PIC... -fPIC -DPIC
checking if aarch64-linux-gnu-gcc-12 PIC flag -fPIC -DPIC works... yes
checking if aarch64-linux-gnu-gcc-12 static flag -static works... yes
checking if aarch64-linux-gnu-gcc-12 supports -c -o file.o... yes
checking if aarch64-linux-gnu-gcc-12 supports -c -o file.o... (cached) yes
checking whether the aarch64-linux-gnu-gcc-12 linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) aarch64-linux-gnu-gcc-12
checking whether the compiler supports GNU C... (cached) yes
checking whether aarch64-linux-gnu-gcc-12 accepts -g... (cached) yes
checking for aarch64-linux-gnu-gcc-12 option to enable C11 features... (cached) none needed
checking whether aarch64-linux-gnu-gcc-12 understands -c and -o together... (cached) yes
checking dependency style of aarch64-linux-gnu-gcc-12... (cached) none
checking whether ln -s works... yes
checking for pkg-config... no
checking dependency style of aarch64-linux-gnu-gcc-12... none
checking whether to build with code coverage support... no
checking how to create a pax tar archive... gnutar
checking zfs author... OpenZFS
checking zfs license... CDDL
checking whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking for ld... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for the common suffixes of directories in the library search path... lib,lib
checking zfs config... kernel
checking the number of available CPUs... 8
checking whether aarch64-linux-gnu-gcc-12 supports -Wno-clobbered... yes
checking whether aarch64-linux-gnu-gcc-12 supports -Winfinite-recursion... yes
checking whether aarch64-linux-gnu-gcc-12 supports -Wimplicit-fallthrough... yes
checking whether aarch64-linux-gnu-gcc-12 supports -Wframe-larger-than=<size>... yes
checking whether aarch64-linux-gnu-gcc-12 supports -Wno-format-truncation... yes
checking whether aarch64-linux-gnu-gcc-12 supports -Wno-format-zero-length... yes
checking whether aarch64-linux-gnu-gcc-12 supports -fno-omit-frame-pointer... yes
checking whether aarch64-linux-gnu-gcc-12 supports -fno-ipa-sra... yes
checking whether to build with -fsanitize=address support... no
checking for system type (linux-gnu)... Linux
checking for python3... python3
checking for python version... 3.11
checking for python platform... linux
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.11/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.11/site-packages
configure: Disabling pyzfs for kernel/srpm config
checking whether to enable pyzfs: ... no
checking for sed --in-place... --in-place
checking for cppcheck... no
checking for shellcheck... no
checking for checkbashisms... no
checking for parallel... no
checking kernel source and build directories... done
checking kernel source directory... /lib/modules/6.12.9+bpo-arm64/source
checking kernel build directory... /lib/modules/6.12.9+bpo-arm64/build
checking kernel source version... 6.12.9+bpo-arm64
checking for kernel config option compatibility... done
checking whether CONFIG_MODULES is defined... yes
checking whether CONFIG_BLOCK is defined... yes
checking whether mutex_lock() is GPL-only... no
checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... yes
checking whether CONFIG_ZLIB_DEFLATE is defined... yes
checking whether CONFIG_ZLIB_INFLATE is defined... yes
checking kernel file name for module symbols... Module.symvers
checking whether fpu headers are available... i387.h & xcr.h
checking whether objtool header is available... linux/objtool.h
checking whether wait_queue_entry_t exists... yes
checking whether /dev/zfs minor is available... 249
checking whether DECLARE_EVENT_CLASS() is available... no
checking for available kernel interfaces... done
checking whether access_ok() has 'type' parameter... no
checking whether global_node_page_state() exists... yes
checking whether global_zone_page_state() exists... yes
checking whether enum node_stat_item contains NR_FILE_PAGES... yes
checking whether enum node_stat_item contains NR_INACTIVE_ANON... yes
checking whether enum node_stat_item contains NR_INACTIVE_FILE... yes
checking whether enum zone_stat_item contains NR_FILE_PAGES... no
checking whether enum zone_stat_item contains NR_INACTIVE_ANON... no
checking whether enum zone_stat_item contains NR_INACTIVE_FILE... no
checking whether global_page_state enums are sane... yes
checking whether compile-time stack validation (objtool) is available... no
checking whether pde_data() is lowercase... yes
checking whether fops->fallocate() exists... 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.11-1+deb12u1
	*** Compatible Kernels: 3.10 - 6.2


Building module:
Cleaning build area...(bad exit status: 2)
make -j8 KERNELRELEASE=6.12.9+bpo-arm64...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.12.9+bpo-arm64 (aarch64)
Consult /var/lib/dkms/zfs/2.1.11/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.12.9+bpo-arm64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.12.9+bpo-arm64 (--configure):
 installed linux-image-6.12.9+bpo-arm64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-6.12.9+bpo-arm64:
 linux-headers-6.12.9+bpo-arm64 depends on linux-image-6.12.9+bpo-arm64 (= 6.12.9-1~bpo12+1) | linux-image-6.12.9+bpo-arm64-unsigned (= 6.12.9-1~bpo12+1); however:
  Package linux-image-6.12.9+bpo-arm64 is not configured yet.
  Package linux-image-6.12.9+bpo-arm64-unsigned is not installed.

dpkg: error processing package linux-headers-6.12.9+bpo-arm64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-arm64:
 linux-headers-arm64 depends on linux-headers-6.12.9+bpo-arm64 (= 6.12.9-1~bpo12+1); however:
  Package linux-headers-6.12.9+bpo-arm64 is not configured yet.

dpkg: error processing package linux-headers-arm64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.142+deb12u1) ...
Errors were encountered while processing:
 linux-image-6.12.9+bpo-arm64
 linux-headers-6.12.9+bpo-arm64
 linux-headers-arm64
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@CM3588-Plus:~#

@CodeBradley
Copy link
Author

Hello guys, might be a stupid question: But is there an advantage to setting up OMV using this guide in comparison to the official OMV image provided by friendlelec? Is this only done for ZFS? And if so, wouldn´t it be possible to set that up within OMV directly?

When I put this together the official FriendlyElec OMV image wasn't on Bookworm yet and the custom headers were needed to get the ZFS plugin to work. They may have released an updated image at this point but I haven't checked since setting this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment