Skip to content

Instantly share code, notes, and snippets.

@dimaskiddo
Last active May 31, 2023 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimaskiddo/96f305377aa18bdfa1802eda7af0d79c to your computer and use it in GitHub Desktop.
Save dimaskiddo/96f305377aa18bdfa1802eda7af0d79c to your computer and use it in GitHub Desktop.
Debian Linux ZFS Packages Setup Script
#!/usr/bin/env bash
apt-get -y update --allow-releaseinfo-change
apt-get -y install ca-certificates apt-transport-https software-properties-common lsb-release bash-completion dirmngr gnupg curl wget rsync logrotate byobu
apt-get -y install dpkg-dev
linux_kernel_is_cloud=`uname -r | grep cloud | wc -l`
if [[ ${linux_kernel_is_cloud} -eq 1 ]]
then
# Install Linux Kernel Dependencies (Cloud)
apt-get -y install linux-image-cloud-amd64 linux-headers-cloud-amd64
else
# Install Linux Kernel Dependencies (Desktop)
apt-get -y install linux-image-amd64 linux-headers-amd64
fi
echo "zfs" > /etc/modules-load.d/zfs.conf
chmod 644 /etc/modules-load.d/zfs.conf
apt-get -y install zfs-dkms
apt-get -y install zfsutils-linux
modprobe zfs
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment