Skip to content

Instantly share code, notes, and snippets.

@QuantumGhost
Created August 5, 2019 05:00
Show Gist options
  • Save QuantumGhost/f0379940e5d1b192e6e2f96b0d281ebc to your computer and use it in GitHub Desktop.
Save QuantumGhost/f0379940e5d1b192e6e2f96b0d281ebc to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
CODENAME=buster
APT_MIRROR=https://mirrors.ustc.edu.cn/debian
cat <<EOF | tee /etc/apt/sources.list.d/zfs.list
deb ${APT_MIRROR} ${CODENAME}-backports main contrib
deb-src ${APT_MIRROR} ${CODENAME}-backports main contrib
EOF
cat <<EOF | tee /etc/apt/preferences.d/90_zfs
Package: libnvpair1linux libuutil1linux libzfs2linux libzpool2linux spl-dkms zfs-dkms zfs-test zfsutils-linux zfsutils-linux-dev zfs-zed
Pin: release n=${CODENAME}-backports
Pin-Priority: 990
EOF
apt update
apt install --yes dpkg-dev linux-headers-$(uname -r) linux-image-amd64
apt-get install zfs-dkms zfsutils-linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment