Skip to content

Instantly share code, notes, and snippets.

@jumoog
Created May 27, 2022 09:37
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 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
/tmp/setup.conf
/tmp/authorized_keys (ssh-keygen -t rsa -b 4096)
/tmp/post-install.sh
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
PART / ext4 all crypt
IMAGE /root/images/Ubuntu-2204-jammy-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