Posts by dikov

    After trial and error here is what worked for me. I built in Ubuntu.

    Code
    $ sudo apt-get update
    $ sudo apt-get install gcc g++ gperf flex bison gawk help2man ncurses-dev make exuberant-ctags texinfo git bc libexpat-dev libxml2-dev libxml2-utils xsltproc python-dev python3-dev zlib1g-dev libssl-dev unzip autopoint libtool shtool automake pkg-config gettext
    $ git clone https://github.com/LibreELEC/LibreELEC.tv.git
    $ cd LibreELEC.tv
    $ echo "CONFIG_ZFS=y" >> projects/Generic/linux/linux.x86_64.conf
    $ echo "ADDITIONAL_PACKAGES+=\" zfs\"" >> projects/Generic/options
    $ mkdir -p packages/filesystem/zfs

    create instructions to build a zfs module

    Code
    $ nano packages/filesystem/zfs

    It's time to compile the build!

    Code
    $ PROJECT=Generic ARCH=x86_64 make image VERBOSE=1

    If it did not crash, proceed to installation. Insert installation USB flash drive (here as /dev/sda)

    Code
    $ cd target
    $ gunzip LibreELEC-Generic.x86_64-13.0-devel-20250301013418-f3936e7.tar.img
    $ sudo dd if=LibreELEC-Generic.x86_64-13.0-devel-20250301013418-f3936e7.tar of=/dev/sda bs=4M


    Install as usual (Insert the flash drive into a computer that you want to run libreelec; Boot from it, Install LibreElec on another drive; Reboot)

    At first launch, enable ssh . Then


    $ ssh root@<ip.of.your.htpc>

    at htpc

    Code
    $ modprobe zfs
    $ zpool import -f <ZFS_8Tb> (i.e. name of your ZFS_drive)
    $ zfs set mountpoint=/var/media/ZFS ZFS_8Tb


    To make this ZFS drive visible among in the list of filesystems, folders and drives use Add button and point to /var/media/ZFS.

    To automate the process so after reboot it will be there:

    nano /storage/.config/autostart.sh

    Bash
    #!/bin/sh 
    depmod -a 6.12.15 
    modprobe zfs 
    zpool import -f ZFS_8Tb 
    zfs set mountpoint=/var/media/ZFS ZFS_8Tb 

    I just compared build directories of zfs (installing improperly) to nano (installed properly)
    in case of nano there are files withing:

    $ ls nano-8.3/.x86_64-libreelec-linux-gnu/
    config.h config.log config.status  configure.lineno  doc  lib  m4 Makefile po  src stamp-h1 syntax
    but same is empty in zfs folder.
    $ ls zfs-2.3.0/.x86_64-libreelec-linux-gnu/

    Hi,

    Thank you for the answers. With variable set


    Code
    MAKE=gmake
    LINUX_DIR=/full/path/to/LibreElec/kernel/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/build/linux-6.12.15
    PROJECT=Generic ARCH=x86_64 make image VERBOSE=1


    and package.md


    I successfully compiled a built , but it appears that this setup overrides all other drivers in /lib/modules/6.2.15/

    Code
    ls /lib/modules/6.12.15/ 
    extra                      modules.dep.bin 
    modules.alias              modules.devname 
    modules.alias.bin          modules.softdep 
    modules.builtin.alias.bin  modules.symbols 
    modules.builtin.bin        modules.symbols.bin 
    modules.dep                modules.weakdep 
    LibreELEC:~ # ls /lib/modules/6.12.15/extra/ 
    spl.ko  zfs.ko

    and I need to load zfs with

    insmod /lib/modules/6.12.15/extra/spl.ko
    insmod /lib/modules/6.12.15/extra/zfs.ko
    zpool import -f dSTOR_8Tb
    zfs set mountpoint=/var/media/dSTOR dSTOR_8Tb
    zfs mount dSTOR_8Tb

    How to add zfs drivers to the modules in a right manner?

    Thank you

    We intentionally omit all forms of software RAID to reduce the scope of what we need to support and maintain. ZFS might interest a small number of people, but it's a small number. The remaining 99.9995% of our userbase has no clue what ZFS is or how to use or benefit from it's features. There's no objection to someone packaging ZFS as an add-on, but it's not for the core distro.

    No ideas on the build issue .. not something I personally have time to look at right now, but others might comment.

    What filesystem for a large storage then many people use? Since I am a Linux guy, I need best compatibility with it.

    Hi there,

    I was curious lack of support of ZFS in LibreElec (is there any reason for that?) so i want to build my own.
    Three days and still nothing.

    Here is my package.md

    config.status: creating module/Makefile
    config.status: creating rpm/generic/zfs-dkms.spec
    config.status: creating rpm/generic/zfs-kmod.spec
    config.status: creating rpm/generic/zfs.spec
    config.status: creating rpm/redhat/zfs-dkms.spec
    config.status: creating rpm/redhat/zfs-kmod.spec
    config.status: creating rpm/redhat/zfs.spec
    config.status: creating tests/zfs-tests/tests/Makefile
    config.status: creating zfs.release
    config.status: creating zfs_config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    config.status: executing po-directories commands
    make[1]: Entering directory '/home/work/SOFT/Linux/libreElec/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/b
    uild/zfs-2.3.0'
    Makefile:14040: *** missing separator. Stop.
    make[1]: Leaving directory '/home/work/SOFT/Linux/libreElec/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/bu
    ild/zfs-2.3.0'
    FAILURE: scripts/build zfs:target during make_target (package.mk)
    *********** FAILED COMMAND ***********
    make
    **************************************
    *********** FAILED COMMAND ***********
    ${SCRIPTS}/build "${1}" "${PARENT_PKG}"
    **************************************
    FAILURE: scripts/install zfs:target has failed!

    The following log for this failure is available:
    /home/work/SOFT/Linux/libreElec/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/.threads/logs/188.log

    >>> zfs:target seq 188 >>>
    [303/314] [FAIL] install zfs:target

    The following log for this failure is available:
    /home/work/SOFT/Linux/libreElec/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/.threads/logs/188.log

    Parallel build failure - see log for details. Time of failure: Tue Feb 25 22:26:12 CST 2025
    make: *** [Makefile:10: image] Error 1


    In the zfs Makefile the line 14430 is

    @CODE_COVERAGE_RULES@

    I tried to disable --disable-dependency-tracking

    But still it did not work as you see.

    Any ideas?


    Cheers,