mirror of
https://github.com/terem42/zfs-hetzner-vm.git
synced 2025-12-23 23:38:38 +00:00
cryptsetup
This commit is contained in:
@@ -771,7 +771,6 @@ if [[ $v_encrypt_rpool == "1" ]]; then
|
|||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
|
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
|
||||||
|
|
||||||
mkdir -p "$c_zfs_mount_dir/etc/dropbear-initramfs"
|
mkdir -p "$c_zfs_mount_dir/etc/dropbear-initramfs"
|
||||||
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
||||||
@@ -800,6 +799,7 @@ CONF
|
|||||||
|
|
||||||
echo "========running packages upgrade==========="
|
echo "========running packages upgrade==========="
|
||||||
chroot_execute "apt upgrade --yes"
|
chroot_execute "apt upgrade --yes"
|
||||||
|
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
||||||
|
|
||||||
echo "===========add static route to initramfs via hook to add default routes for Hetzner due to Debian/Ubuntu initramfs DHCP bug ========="
|
echo "===========add static route to initramfs via hook to add default routes for Hetzner due to Debian/Ubuntu initramfs DHCP bug ========="
|
||||||
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
||||||
@@ -827,17 +827,17 @@ ip route add 172.31.1.1/255.255.255.255 dev eth0
|
|||||||
ip route add default via 172.31.1.1 dev eth0
|
ip route add default via 172.31.1.1 dev eth0
|
||||||
CONF
|
CONF
|
||||||
|
|
||||||
cat > "$c_zfs_mount_dir/etc/network/interfaces" <<'CONF'
|
#cat > "$c_zfs_mount_dir/etc/network/interfaces" <<'CONF'
|
||||||
auto lo
|
#auto lo
|
||||||
iface lo inet loopback
|
#iface lo inet loopback
|
||||||
iface lo inet6 loopback
|
#iface lo inet6 loopback
|
||||||
|
|
||||||
allow-hotplug eth0
|
#allow-hotplug eth0
|
||||||
iface eth0 inet dhcp
|
#iface eth0 inet dhcp
|
||||||
iface eth0 inet6 dhcp
|
#iface eth0 inet6 dhcp
|
||||||
CONF
|
#CONF
|
||||||
|
|
||||||
chmod 755 "$c_zfs_mount_dir/etc/network/interfaces"
|
#chmod 755 "$c_zfs_mount_dir/etc/network/interfaces"
|
||||||
|
|
||||||
echo "======= update initramfs =========="
|
echo "======= update initramfs =========="
|
||||||
chroot_execute "update-initramfs -u -k all"
|
chroot_execute "update-initramfs -u -k all"
|
||||||
|
|||||||
@@ -774,7 +774,6 @@ if [[ $v_encrypt_rpool == "1" ]]; then
|
|||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
|
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
|
||||||
|
|
||||||
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
||||||
|
|
||||||
@@ -802,6 +801,7 @@ CONF
|
|||||||
|
|
||||||
echo "========running packages upgrade==========="
|
echo "========running packages upgrade==========="
|
||||||
chroot_execute "apt upgrade --yes"
|
chroot_execute "apt upgrade --yes"
|
||||||
|
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
||||||
|
|
||||||
echo "===========add static route to initramfs via hook to add default routes for Hetzner due to Debian/Ubuntu initramfs DHCP bug ========="
|
echo "===========add static route to initramfs via hook to add default routes for Hetzner due to Debian/Ubuntu initramfs DHCP bug ========="
|
||||||
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
||||||
|
|||||||
@@ -773,7 +773,6 @@ if [[ $v_encrypt_rpool == "1" ]]; then
|
|||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
|
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
|
||||||
|
|
||||||
mkdir -p "$c_zfs_mount_dir/etc/dropbear/initramfs"
|
mkdir -p "$c_zfs_mount_dir/etc/dropbear/initramfs"
|
||||||
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear/initramfs/authorized_keys"
|
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear/initramfs/authorized_keys"
|
||||||
@@ -806,7 +805,7 @@ cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/root/.ssh/authorized_keys"
|
|||||||
|
|
||||||
echo "========running packages upgrade and autoremove==========="
|
echo "========running packages upgrade and autoremove==========="
|
||||||
chroot_execute "apt upgrade --yes"
|
chroot_execute "apt upgrade --yes"
|
||||||
chroot_execute "apt autoremove --yes"
|
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
||||||
|
|
||||||
echo "===========add static route to initramfs via hook to add default routes for Hetzner due to Debian/Ubuntu initramfs DHCP bug ========="
|
echo "===========add static route to initramfs via hook to add default routes for Hetzner due to Debian/Ubuntu initramfs DHCP bug ========="
|
||||||
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
||||||
|
|||||||
@@ -755,7 +755,6 @@ done
|
|||||||
if [[ $v_encrypt_rpool == "1" ]]; then
|
if [[ $v_encrypt_rpool == "1" ]]; then
|
||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
|
||||||
|
|
||||||
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
||||||
|
|
||||||
@@ -795,6 +794,7 @@ CONF
|
|||||||
|
|
||||||
echo "========running packages upgrade==========="
|
echo "========running packages upgrade==========="
|
||||||
chroot_execute "apt upgrade --yes"
|
chroot_execute "apt upgrade --yes"
|
||||||
|
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
||||||
|
|
||||||
echo "===========add static route to initramfs via hook to add default routes due to Ubuntu initramfs DHCP bug ========="
|
echo "===========add static route to initramfs via hook to add default routes due to Ubuntu initramfs DHCP bug ========="
|
||||||
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
||||||
|
|||||||
@@ -755,7 +755,6 @@ done
|
|||||||
if [[ $v_encrypt_rpool == "1" ]]; then
|
if [[ $v_encrypt_rpool == "1" ]]; then
|
||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
|
||||||
|
|
||||||
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
||||||
|
|
||||||
@@ -795,6 +794,7 @@ CONF
|
|||||||
|
|
||||||
echo "========running packages upgrade==========="
|
echo "========running packages upgrade==========="
|
||||||
chroot_execute "apt upgrade --yes"
|
chroot_execute "apt upgrade --yes"
|
||||||
|
chroot_execute "apt purge cryptsetup-initramfs --yes"
|
||||||
|
|
||||||
echo "===========add static route to initramfs via hook to add default routes due to Ubuntu initramfs DHCP bug ========="
|
echo "===========add static route to initramfs via hook to add default routes due to Ubuntu initramfs DHCP bug ========="
|
||||||
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
||||||
|
|||||||
Reference in New Issue
Block a user