diff --git a/hetzner-debian10-zfs-setup.sh b/hetzner-debian10-zfs-setup.sh index 746cd35..70216c7 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 + 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 27b4f08..42231a1 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -491,20 +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 - 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)" + 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 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 + 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 dd4c2a8..e73f088 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 + find /usr/local/sbin/ -type l | xargs rm 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 e138631..d8ce96d 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 + find /usr/local/sbin/ -type l | xargs rm zfs --version echo "======= partitioning the disk =========="