From 37808462790f363d27684c6c19852b7b2aa817fa Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 24 Feb 2021 14:24:48 +0300 Subject: [PATCH] install ZFS on Buster --- .../software/zfs/install-zfs-buster.md | 37 ++++++++++++++ .../zfs/install-zfs-buster/Dockerfile | 3 ++ .../install-zfs-buster/install-zfs-buster.sh | 50 +++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 docs/helios64/software/zfs/install-zfs-buster.md create mode 100644 docs/helios64/software/zfs/install-zfs-buster/Dockerfile create mode 100755 docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh diff --git a/docs/helios64/software/zfs/install-zfs-buster.md b/docs/helios64/software/zfs/install-zfs-buster.md new file mode 100644 index 0000000..12fd222 --- /dev/null +++ b/docs/helios64/software/zfs/install-zfs-buster.md @@ -0,0 +1,37 @@ +!!! Important This install procedure only works with *Armbian Buster* !!! + +Original forum post by @Grek https://forum.armbian.com/topic/16119-zfs-on-helios64/ + +Tested with Linux helios64 5.10.16-rockchip64 #21.02.2 SMP PREEMPT Sun Feb 14 21:35:01 CET 2021 aarch64 GNU/Linux + +First we need to have docker installed ( armbian-config -> software -> softy -> docker ) + +Create dedicated directory with Dockerfile ( we will customize ubuntu:bionic image with required libraries and gcc 10 . in next builds we can skip this step and just customize and run [install-zfs-buster.sh] (https://raw.githubusercontent.com/kobol-io/wiki/master/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh) script) + +```bash +mkdir zfs-builder +cd zfs-builder +wget https://raw.githubusercontent.com/kobol-io/wiki/master/docs/helios64/software/zfs/install-zfs-buster/Dockerfile +``` + +Build docker image for building purposes. + +```bash +sudo docker build --tag zfs-build-ubuntu-bionic:0.1 . +``` + +Build and install ZFS packages. + +```bash +wget https://raw.githubusercontent.com/kobol-io/wiki/master/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh +chmod +x install-zfs-buster.sh +screen -L -Logfile buildlog.txt ./install-zfs-buster.sh +tail -n40 buildlog.txt +``` + +On succeed, you may need to reboot and enable services: + +```bash +sudo reboot +sudo systemctl enable zfs-import-cache zsf-import.target zfs-mount zfs.target zfs-zed +``` diff --git a/docs/helios64/software/zfs/install-zfs-buster/Dockerfile b/docs/helios64/software/zfs/install-zfs-buster/Dockerfile new file mode 100644 index 0000000..193aff3 --- /dev/null +++ b/docs/helios64/software/zfs/install-zfs-buster/Dockerfile @@ -0,0 +1,3 @@ +FROM ubuntu:bionic +RUN apt update; apt install build-essential autoconf automake bison flex libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev python3 python3-dev python3-setuptools python3-cffi libffi-dev -y; apt install software-properties-common -y; add-apt-repository ppa:ubuntu-toolchain-r/test; apt install gcc-10 g++-10 -y; update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10; update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 + diff --git a/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh b/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh new file mode 100755 index 0000000..a5e5620 --- /dev/null +++ b/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +#define zfs version +zfsver="zfs-2.0.3" +#creating building directory +mkdir /tmp/zfs-builds && cd "$_" +rm -rf /tmp/zfs-builds/inside_zfs.sh +apt-get download linux-headers-current-rockchip64 +git clone -b $zfsver https://github.com/openzfs/zfs.git $zfsver-$(uname -r) + +#create file to execute inside container +echo "creating file to execute it inside container" +cat > /tmp/zfs-builds/inside_zfs.sh <