From 1e5604040fdfb52d6554c7d6f408df268a5d2d5b Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Fri, 13 Oct 2023 17:05:36 +0200 Subject: [PATCH] hetzner-dedicated/zfs: Install zfsutils-linux from apt --- hosters/hetzner-dedicated/zfs-uefi-nvme-nixos.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hosters/hetzner-dedicated/zfs-uefi-nvme-nixos.sh b/hosters/hetzner-dedicated/zfs-uefi-nvme-nixos.sh index 6ef83a1..736dd8e 100644 --- a/hosters/hetzner-dedicated/zfs-uefi-nvme-nixos.sh +++ b/hosters/hetzner-dedicated/zfs-uefi-nvme-nixos.sh @@ -26,8 +26,6 @@ # * exports of env vars are added throughout the script in case you want to run it manually export LC_ALL=C -set -euox pipefail - # ORIGINAL WARNING: on 2023/07/16 the rescue system of hetzner boots with kernel 6.3.7 which # is by default not supported by the latest debian package. You need to update to debian # unstable to proceed with the zfs installation. @@ -35,12 +33,14 @@ set -euox pipefail # NEW WARNING: Upgrading to unstable is too much work, maybe just downloading zfs and building it is easier. apt update -apt install -y dpkg-dev linux-headers-$(uname -r) linux-image-amd64 sudo parted +apt install -y dpkg-dev linux-headers-$(uname -r) linux-image-amd64 sudo parted zfsutils-linux libssl-dev uuid-dev zlib1g-dev libblkid-dev +set -euox pipefail + +# TODO: This part is slow and not idempotent, so it needs to be commented out on +# subsequent runs cd "$(mktemp -d)" wget "$(curl -Ls https://api.github.com/repos/openzfs/zfs/releases/latest| grep -E "browser_download_url.*\.tar.gz\"$"| cut -d '"' -f 4)" -apt update -apt install libssl-dev uuid-dev zlib1g-dev libblkid-dev -y tar xfv zfs*.tar.gz && rm zfs*.tar.gz cd zfs* ./configure && make -j "$(nproc)"