How to Recover GRUB When a Debian 12 or 13 VPS Fails to Boot on Hetzner Cloud

Automated English translation of the original Spanish article. Code examples keep their original identifiers.

Updated Technical Guide (2026)

When a VPS stops booting after an update, an apt full-upgrade, a partition change, or a snapshot restore, the problem is usually the same: GRUB cannot find the system.

On Hetzner Cloud, this is usually fixed without data loss by using the Rescue System. If you see typical messages like:

grub rescue>
error: no such device
error: no such partition

This guide explains how to recover GRUB on:

  • Debian 12 (Bookworm)
  • Debian 13 (Trixie)

This procedure applies to Hetzner Cloud in 2026 and can help you resolve boot issues with your VPS on Hetzner.

Why GRUB Fails on a VPS

GRUB is the bootloader that runs before the kernel. If it cannot find:

  • The correct UUID
  • The root partition
  • The /boot directory
  • A valid kernel

the system will not boot.

In cloud environments, recovery is performed using the Rescue System, since there is no physical console access.

Hetzner Cloud Quirks and Specifics

Before getting started, keep in mind:

Primary Disk Device

  • It always shows up as /dev/vda (virtio).
  • Do not use /dev/sda (typical for dedicated servers).

Default Partition Layout

Hetzner Cloud typically uses one of these schemes:

Installation TypePartitions
Standard (most cases)/dev/vda1 → / (single partition)
With LVM/dev/vda1 → LVM PV → VG → root LV
With EFI (rare)/dev/vda1 → ESP, /dev/vda2 → root

A separate /boot partition is not standard unless you created one manually.

Recovering GRUB via the Rescue System

1. Enable the Rescue System

  1. Open the Hetzner Cloud Console
  2. Go to Server → Rescue tab
  3. Enable it (choose an SSH key or a temporary password)
  4. Reboot the server
  5. Connect via SSH as root

2. Identify the Partitions

lsblk -f
fdisk -l /dev/vda
blkid

Locate:

  • The root partition
  • /boot if it exists
  • LVM volumes if they appear with FSTYPE="LVM2_member"

3. Mount the Installed System

Case A: Standard installation (single partition)

mount /dev/vda1 /mnt

Case B: Separate /boot (custom installations)

mount /dev/vda2 /mnt
mount /dev/vda1 /mnt/boot

Required bind mounts:

mount --bind /dev  /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys  /mnt/sys
mount --bind /run  /mnt/run

EFI case (rare in Cloud):

mount /dev/vda1 /mnt/boot/efi

Special case: Systems using LVM

If lsblk shows LVM:

  1. Activate the volumes:
vgchange -ay
lvscan
  1. Locate the root LV (e.g., /dev/mapper/vg0-root)
  2. Mount it:
mount /dev/mapper/vg0-root /mnt

Then apply the bind mounts just like in the standard case.

4. Enter chroot

chroot /mnt

You are now inside your actual Debian system.

5. Reinstall GRUB Properly

Always install onto the whole disk device:

grub-install /dev/vda

Never onto /dev/vda1 directly.

If an error occurs due to remnants of another bootloader:

grub-install --force /dev/vda

Regenerate the configuration:

update-grub

You should see it detecting the installed kernels.

Important Checks Before Exiting

Check UUIDs

blkid
cat /etc/fstab

If any UUID does not match, fix it.

Confirm a Kernel Exists

ls /boot/vmlinuz*

If no kernel is present:

apt update
apt install linux-image-amd64
update-grub

Exit and Unmount

exit
umount -R /mnt
sync

Reboot Normally

  1. Disable the Rescue System in the Cloud Console
  2. Reboot
  3. Wait 1–2 minutes
  4. Test SSH access

Post-Recovery Verification

lsblk -f
df -h
journalctl -b -p err..alert
dmesg | grep -i error

If you drop back into grub rescue>, double-check:

  • UUIDs
  • Installed kernel
  • Proper mounting of /boot

Common Errors and Solutions

MessageCauseSolution
no such deviceIncorrect UUIDCheck /etc/fstab and regenerate GRUB
no such partitionPartition table modifiedConfirm layout with lsblk
No kernel detectedEmpty /bootReinstall kernel
grub-install failsWrong target diskUse /dev/vda
Still fails to bootEarly kernel panicReview journalctl -b -1

Last Resort: Reinstall from Rescue

The Rescue System includes installimage, although in Cloud environments it offers fewer options than on dedicated servers.

Alternatively, you can use the Rebuild feature from the Hetzner Cloud Console.

Reinstalling is recommended when:

  • The system is heavily corrupted
  • Filesystem corruption is unrecoverable
  • There are no backups
  • Troubleshooting takes more time than redeploying

How to Prevent Future GRUB Issues

  • Create a snapshot before running apt full-upgrade
  • Never interrupt kernel updates
  • Back up your disk layout:
lsblk -f > /root/disk-layout-$(date +%F).txt
  • Monitor free space in /boot
  • Document your partition scheme

If Your VPS Fails to Boot, Don’t Panic

Recovering GRUB on Hetzner Cloud is usually quick when following a systematic approach.

Most incidents can be fixed without any data loss in under 15 minutes.

The most common issues are rarely technical hurdles, but simple mounting mistakes, mismatched UUIDs, or missing kernels.

Happy sysadminning.