fix(vps-relay): switch to GRUB/BIOS — Hetzner Cloud is not UEFI 🧷

This commit is contained in:
DannyDannyDanny 2026-04-24 16:05:27 +02:00
parent f4738584c3
commit 244988d52d
2 changed files with 14 additions and 12 deletions

View file

@ -1,4 +1,5 @@
# Disko layout for cloud VPS installs (e.g. Hetzner Cloud). # Disko layout for cloud VPS installs (e.g. Hetzner Cloud).
# GPT with a 1MB BIOS boot partition (for GRUB on a BIOS system) + root.
# No LUKS — the provider has physical disk access anyway and there's # No LUKS — the provider has physical disk access anyway and there's
# no operator present at boot to enter a passphrase. # no operator present at boot to enter a passphrase.
{ {
@ -9,15 +10,11 @@
content = { content = {
type = "gpt"; type = "gpt";
partitions = { partitions = {
ESP = { # GRUB BIOS boot partition — holds stage-1.5 bootloader code.
size = "512M"; # Type EF02. No filesystem.
type = "EF00"; BIOSBOOT = {
content = { size = "1M";
type = "filesystem"; type = "EF02";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "fmask=0022" "dmask=0022" ];
};
}; };
root = { root = {
size = "100%"; size = "100%";

View file

@ -9,9 +9,14 @@
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
# Hetzner Cloud boots EFI with systemd-boot. # Hetzner Cloud vServers boot in BIOS mode (confirmed via rescue:
boot.loader.systemd-boot.enable = true; # /sys/firmware/efi doesn't exist, product_name=vServer). systemd-boot
boot.loader.efi.canTouchEfiVariables = true; # is UEFI-only, so use GRUB with BIOS MBR support instead.
boot.loader.grub = {
enable = true;
device = "/dev/sda";
efiSupport = false;
};
# Hetzner Cloud cx23 uses QEMU virtio-scsi for the disk and virtio-net # Hetzner Cloud cx23 uses QEMU virtio-scsi for the disk and virtio-net
# for the NIC. Without these modules in initrd, the kernel can't find # for the NIC. Without these modules in initrd, the kernel can't find