Last active
March 1, 2025 18:37
-
-
Save jumoog/71e19977d7edb82c60def8aa7b317c36 to your computer and use it in GitHub Desktop.
install hetzner Server with encrypted NVME
This file contains hidden or 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
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 |
This file contains hidden or 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 hidden or 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 | |
# 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