Created
May 27, 2022 09:37
-
-
Save jumoog/71e19977d7edb82c60def8aa7b317c36 to your computer and use it in GitHub Desktop.
install hetzner Server with encrypted NVME
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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