From aa045068b0ef80e7bf1f6b526a056b1bd4dea8f5 Mon Sep 17 00:00:00 2001 From: terem42 <9478806+terem42@users.noreply.github.com> Date: Wed, 4 Oct 2023 21:33:39 +0200 Subject: [PATCH] updated wih testing --- hetzner-ubuntu20-zfs-setup.sh | 21 +++++++++++++++------ hetzner-ubuntu22-zfs-setup.sh | 2 -- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/hetzner-ubuntu20-zfs-setup.sh b/hetzner-ubuntu20-zfs-setup.sh index 4d851df..103d99c 100644 --- a/hetzner-ubuntu20-zfs-setup.sh +++ b/hetzner-ubuntu20-zfs-setup.sh @@ -462,9 +462,20 @@ 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 - apt-get install --yes software-properties-common - echo "y" | zfs + echo "zfs-dkms zfs-dkms/note-incompatible-licenses note true" | debconf-set-selections +# echo "y" | zfs +# linux-headers-generic linux-image-generic + apt install --yes software-properties-common dpkg-dev dkms + rm -f "$(which zfs)" + rm -f "$(which zpool)" + echo -e "deb http://deb.debian.org/debian/ testing main contrib non-free\ndeb http://deb.debian.org/debian/ testing main contrib non-free\n" >/etc/apt/sources.list.d/bookworm-testing.list + echo -e "Package: src:zfs-linux\nPin: release n=testing\nPin-Priority: 990\n" > /etc/apt/preferences.d/90_zfs + apt update + apt install -t testing --yes zfs-dkms zfsutils-linux + rm /etc/apt/sources.list.d/bookworm-testing.list + rm /etc/apt/preferences.d/90_zfs + apt update + export PATH=$PATH:/usr/sbin zfs --version echo "======= partitioning the disk ==========" @@ -530,9 +541,7 @@ zfs create -o canmount=noauto -o mountpoint=/boot "$v_bpool_name/BOOT/ubuntu" zfs mount "$v_bpool_name/BOOT/ubuntu" zfs create "$v_rpool_name/home" -zfs create -o mountpoint=/root "$v_rpool_name/home/root" zfs create -o canmount=off "$v_rpool_name/var" -zfs create -o canmount=off "$v_rpool_name/var/lib" zfs create "$v_rpool_name/var/log" zfs create "$v_rpool_name/var/spool" @@ -607,7 +616,7 @@ CONF rm -rf $c_zfs_mount_dir/etc/network/interfaces.d/50-cloud-init.cfg -cp /etc/resolv.conf $c_zfs_mount_dir/etc/resolv.conf +#cp /etc/resolv.conf $c_zfs_mount_dir/etc/resolv.conf echo "======= preparing the jail for chroot ==========" for virtual_fs_dir in proc sys dev; do diff --git a/hetzner-ubuntu22-zfs-setup.sh b/hetzner-ubuntu22-zfs-setup.sh index 88800d6..a96ecb3 100644 --- a/hetzner-ubuntu22-zfs-setup.sh +++ b/hetzner-ubuntu22-zfs-setup.sh @@ -617,8 +617,6 @@ CONF rm -rf $c_zfs_mount_dir/etc/network/interfaces.d/50-cloud-init.cfg -#cp /etc/resolv.conf $c_zfs_mount_dir/etc/resolv.conf - echo "======= preparing the jail for chroot ==========" for virtual_fs_dir in proc sys dev; do mount --rbind "/$virtual_fs_dir" "$c_zfs_mount_dir/$virtual_fs_dir"