From 6b3e6f83280a2238bdc8f69b719ff48960e4bedf Mon Sep 17 00:00:00 2001 From: Prokopenko Andrey Date: Wed, 15 Sep 2021 20:10:01 +0200 Subject: [PATCH 1/4] new install --- hetzner-debian11-zfs-setup.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hetzner-debian11-zfs-setup.sh b/hetzner-debian11-zfs-setup.sh index 27b4f08..0132545 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -492,18 +492,13 @@ done echo "======= installing zfs on rescue system ==========" echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections - cd "$(mktemp -d)" - wget "$(curl -Ls https://api.github.com/repos/openzfs/zfs/releases/latest| grep "browser_download_url.*tar.gz"|grep -E "tar.gz\"$"| cut -d '"' -f 4)" + apt-get install software-properties-common + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659 + add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu bionic main' apt update - apt install libssl-dev uuid-dev zlib1g-dev libblkid-dev -y - tar xfv zfs*.tar.gz - rm *.tar.gz - cd zfs* - ./configure - make -j "$(nproc)" - make install - ldconfig - modprobe zfs + rm /usr/local/sbin/zfs + apt install --yes zfs-dkms zfsutils-linux + export PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin zfs --version From 1dc0204c444cacd4e15059946eed5feeac27ea61 Mon Sep 17 00:00:00 2001 From: Prokopenko Andrey Date: Wed, 15 Sep 2021 20:13:24 +0200 Subject: [PATCH 2/4] update --- hetzner-debian11-zfs-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hetzner-debian11-zfs-setup.sh b/hetzner-debian11-zfs-setup.sh index 0132545..301db80 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -492,7 +492,7 @@ done echo "======= installing zfs on rescue system ==========" echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections - apt-get install software-properties-common + apt-get install --yes software-properties-common apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659 add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu bionic main' apt update From 86cfdfc69386fc029af17db6f63a7fcc0f1ab3a0 Mon Sep 17 00:00:00 2001 From: Prokopenko Andrey Date: Wed, 15 Sep 2021 20:57:45 +0200 Subject: [PATCH 3/4] updated to focal package --- hetzner-debian10-zfs-setup.sh | 19 +++++++------------ hetzner-debian11-zfs-setup.sh | 12 ++++++------ hetzner-ubuntu18-zfs-setup.sh | 21 ++++++++------------- hetzner-ubuntu20-zfs-setup.sh | 21 ++++++++------------- 4 files changed, 29 insertions(+), 44 deletions(-) diff --git a/hetzner-debian10-zfs-setup.sh b/hetzner-debian10-zfs-setup.sh index 746cd35..56b3a81 100644 --- a/hetzner-debian10-zfs-setup.sh +++ b/hetzner-debian10-zfs-setup.sh @@ -492,19 +492,14 @@ done echo "======= installing zfs on rescue system ==========" echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections - cd "$(mktemp -d)" - wget "$(curl -Ls https://api.github.com/repos/openzfs/zfs/releases/latest| grep "browser_download_url.*tar.gz"|grep -E "tar.gz\"$"| cut -d '"' -f 4)" + apt-get install --yes software-properties-common + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659 + add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - apt install libssl-dev uuid-dev zlib1g-dev libblkid-dev -y - tar xfv zfs*.tar.gz - rm *.tar.gz - cd zfs* - ./configure - make -j "$(nproc)" - make install - ldconfig - modprobe zfs - + apt install --yes zfs-dkms zfsutils-linux + add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' + apt update + rm /usr/local/sbin/zfs zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-debian11-zfs-setup.sh b/hetzner-debian11-zfs-setup.sh index 301db80..26df7c1 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -491,15 +491,15 @@ for kver in $(find /lib/modules/* -maxdepth 0 -type d | grep -v "$(uname -r)" | done echo "======= installing zfs on rescue system ==========" - echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections + echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections apt-get install --yes software-properties-common - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659 - add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu bionic main' + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659 + add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' + apt update + apt install --yes zfs-dkms zfsutils-linux + add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update rm /usr/local/sbin/zfs - apt install --yes zfs-dkms zfsutils-linux - export PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-ubuntu18-zfs-setup.sh b/hetzner-ubuntu18-zfs-setup.sh index dd4c2a8..7085e64 100644 --- a/hetzner-ubuntu18-zfs-setup.sh +++ b/hetzner-ubuntu18-zfs-setup.sh @@ -459,20 +459,14 @@ done echo "======= installing zfs on rescue system ==========" echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections - - cd "$(mktemp -d)" - wget "$(curl -Ls https://api.github.com/repos/openzfs/zfs/releases/latest| grep "browser_download_url.*tar.gz"|grep -E "tar.gz\"$"| cut -d '"' -f 4)" + apt-get install --yes software-properties-common + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659 + add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - apt install libssl-dev uuid-dev zlib1g-dev libblkid-dev -y - tar xfv zfs*.tar.gz - rm *.tar.gz - cd zfs* - ./configure - make -j "$(nproc)" - make install - ldconfig - modprobe zfs - + apt install --yes zfs-dkms zfsutils-linux + add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' + apt update + rm /usr/local/sbin/zfs zfs --version echo "======= partitioning the disk ==========" @@ -698,6 +692,7 @@ if [[ $v_zfs_experimental == "1" ]]; then chroot_execute "apt update" chroot_execute "apt install -t zfs-debian-experimental --yes zfs-initramfs zfs-dkms zfsutils-linux" else + chroot_execute "add-apt-repository --yes ppa:jonathonf/zfs" chroot_execute "apt install --yes zfs-initramfs zfs-dkms zfsutils-linux" fi diff --git a/hetzner-ubuntu20-zfs-setup.sh b/hetzner-ubuntu20-zfs-setup.sh index 61f868f..5023eab 100644 --- a/hetzner-ubuntu20-zfs-setup.sh +++ b/hetzner-ubuntu20-zfs-setup.sh @@ -459,20 +459,14 @@ done echo "======= installing zfs on rescue system ==========" echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections - - cd "$(mktemp -d)" - wget "$(curl -Ls https://api.github.com/repos/openzfs/zfs/releases/latest| grep "browser_download_url.*tar.gz"|grep -E "tar.gz\"$"| cut -d '"' -f 4)" + apt-get install --yes software-properties-common + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8CF63AD3F06FC659 + add-apt-repository 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - apt install libssl-dev uuid-dev zlib1g-dev libblkid-dev -y - tar xfv zfs*.tar.gz - rm *.tar.gz - cd zfs* - ./configure - make -j "$(nproc)" - make install - ldconfig - modprobe zfs - + apt install --yes zfs-dkms zfsutils-linux + add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' + apt update + rm /usr/local/sbin/zfs zfs --version echo "======= partitioning the disk ==========" @@ -699,6 +693,7 @@ if [[ $v_zfs_experimental == "1" ]]; then chroot_execute "apt update" chroot_execute "apt install -t zfs-debian-experimental --yes zfs-initramfs zfs-dkms zfsutils-linux" else + chroot_execute "add-apt-repository --yes ppa:jonathonf/zfs" chroot_execute "apt install --yes zfs-initramfs zfs-dkms zfsutils-linux" fi From 6a6d5f35f4ced66786b04c8d5c225f3e473b49cc Mon Sep 17 00:00:00 2001 From: Prokopenko Andrey Date: Wed, 15 Sep 2021 21:13:53 +0200 Subject: [PATCH 4/4] updated to focal package --- hetzner-debian10-zfs-setup.sh | 2 +- hetzner-debian11-zfs-setup.sh | 2 +- hetzner-ubuntu18-zfs-setup.sh | 2 +- hetzner-ubuntu20-zfs-setup.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hetzner-debian10-zfs-setup.sh b/hetzner-debian10-zfs-setup.sh index 56b3a81..70216c7 100644 --- a/hetzner-debian10-zfs-setup.sh +++ b/hetzner-debian10-zfs-setup.sh @@ -499,7 +499,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - rm /usr/local/sbin/zfs + find /usr/local/sbin/ -type l | xargs rm zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-debian11-zfs-setup.sh b/hetzner-debian11-zfs-setup.sh index 26df7c1..42231a1 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -499,7 +499,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - rm /usr/local/sbin/zfs + find /usr/local/sbin/ -type l | xargs rm zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-ubuntu18-zfs-setup.sh b/hetzner-ubuntu18-zfs-setup.sh index 7085e64..e73f088 100644 --- a/hetzner-ubuntu18-zfs-setup.sh +++ b/hetzner-ubuntu18-zfs-setup.sh @@ -466,7 +466,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - rm /usr/local/sbin/zfs + find /usr/local/sbin/ -type l | xargs rm zfs --version echo "======= partitioning the disk ==========" diff --git a/hetzner-ubuntu20-zfs-setup.sh b/hetzner-ubuntu20-zfs-setup.sh index 5023eab..d8ce96d 100644 --- a/hetzner-ubuntu20-zfs-setup.sh +++ b/hetzner-ubuntu20-zfs-setup.sh @@ -466,7 +466,7 @@ echo "======= installing zfs on rescue system ==========" apt install --yes zfs-dkms zfsutils-linux add-apt-repository -r 'deb http://ppa.launchpad.net/jonathonf/zfs/ubuntu focal main' apt update - rm /usr/local/sbin/zfs + find /usr/local/sbin/ -type l | xargs rm zfs --version echo "======= partitioning the disk =========="