# Rescue mode & OS reinstall

> Recover a server that no longer boots or accepts your key, or start over with a clean image.

Source: https://docs.avenlith.com/en/rescue-and-reinstall  
Category: Servers & compute  
Last updated: 2026-09-22

## When to use rescue mode

- The server does not boot after a kernel or GRUB update
- You lost the SSH key or locked yourself out with a firewall rule
- The file system needs `fsck` while unmounted

## Boot into rescue

Rescue mode boots a small Linux system from the network. Your disks are untouched and can be mounted:

```bash
avenlith server rescue enable web-01 --image rescue-2026
# after reboot, from the rescue system:
mount /dev/md0 /mnt
nano /mnt/root/.ssh/authorized_keys
avenlith server rescue disable web-01 && avenlith server reboot web-01
```

> **Note:** > A temporary root password for the rescue system is shown once in the console and sent to the project owner by e-mail.

## Reinstall the operating system

```bash
avenlith server reinstall web-01 --image debian-13 --ssh-key default
```

Available images include Ubuntu 22.04/24.04/26.04, Debian 12/13, AlmaLinux 9/10, Rocky Linux 9, Windows Server 2022/2025 and Proxmox VE 9.

> **Danger:** > Reinstalling permanently deletes all data on every disk of the server. Snapshots of cloud servers are kept; dedicated servers have no automatic snapshots.
