Skip to content

Instantly share code, notes, and snippets.

@jumoog
Last active March 1, 2025 18:37
Show Gist options
  • Save jumoog/71e19977d7edb82c60def8aa7b317c36 to your computer and use it in GitHub Desktop.
Save jumoog/71e19977d7edb82c60def8aa7b317c36 to your computer and use it in GitHub Desktop.
install hetzner Server with encrypted NVME
create: (files are below)
/tmp/setup.conf
/tmp/authorized_keys (ssh-keygen -t rsa -b 4096)
/tmp/post-install.sh
execute
chmod +x /tmp/post-install.sh
installimage -a -c /tmp/setup.conf -x /tmp/post-install.sh
#!/bin/bash
# Copy SSH keys for dropbear
mkdir -p /etc/dropbear-initramfs
cp -a /root/.ssh/authorized_keys /etc/dropbear-initramfs/authorized_keys
# Update system
apt-get update >/dev/null
apt-get -y install cryptsetup-initramfs dropbear-initramfs
CRYPTPASSWORD changeme
DRIVE1 /dev/nvme0n1
DRIVE2 /dev/nvme1n1
SWRAID 1
SWRAIDLEVEL 0
BOOTLOADER grub
HOSTNAME s1.jumoog.io
PART /boot ext4 1G
# In case you have UEFI
#PART /boot/efi esp 256M
PART / ext4 all crypt
IMAGE /root/images/Ubuntu-2404-noble-amd64-base.tar.gz
SSHKEYS_URL /tmp/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment