Rescue Mode Is Not a Reinstall
In a support thread, “reinstall” means four different things. On a laptop the ambiguity costs an afternoon: you can hand the machine to someone, boot a USB stick, and start again. On a server it costs more, because the recovery path goes through a web console, the console is sometimes the thing that is broken, and there is nobody in the room to press a key at the right moment.
The single most useful distinction before touching anything: where the operating system you are about to run comes from. If it comes from the network and your disk is mounted underneath it, you are in rescue mode and nothing has been destroyed yet. If it is written onto the disk, that disk is now a different disk.
Three things called rescue mode
A provider rescue image. The panel’s “rescue” or “recovery” boot starts the machine from a small image delivered over the network, usually with your own filesystem attached as a secondary disk you can mount. netboot.xyz describes the same mechanism from the packaging side — “a small iPXE bootloader that opens to a menu of network installers, live distros, and rescue tools — fetched from upstream over the network, so there’s no install media to manage.”
The systemd target of the same name. This one is not an image. It is your installed system, booted with base mounts and no services:
“A special target unit that pulls in the base system (including system mounts) and spawns a rescue shell. Isolate to this target in order to administer the system in single-user mode with all file systems mounted but with no services running, except for the most basic. Compare with emergency.target, which is much more reduced and does not provide the file systems or most basic services.”
Read the end of that quote carefully, because it is the practical difference between the two targets: rescue.target gives you the filesystems, emergency.target may not. If your problem is “a config file is wrong”, rescue is the one that puts the file in front of you. If your problem is “the root filesystem failed to mount”, neither target will help and you need the provider’s image instead.
A serial or VNC console. Not a mode at all — just a screen attached to the machine. It is what you use when SSH is down but the machine is otherwise fine, and it is the only way to see a boot that fails before the network comes up.
Confusing these three is the usual source of the damage. Someone asks for “rescue mode”, gets a console, runs a reinstall from the panel’s adjacent menu item because it was one click away, and discovers afterwards that the operation they wanted was the read-only one.
What a reinstall actually does
A reinstall writes a fresh image over the disk, then boots it. The boot is not the interesting part; the first boot is:
“Cloud images are operating system templates and every instance starts out as an identical clone of every other instance. It is the user data that gives every cloud instance its personality and cloud-init is the tool that applies user data to your instances automatically.”
So after a reinstall the machine is not “your server, cleaned” — it is a stock image plus whatever your provider’s user-data says. Users, hostnames, SSH keys, packages and firewall rules come back only if that user-data still contains them, and the data on the disk comes back only if you had a snapshot.
That is the whole risk in one sentence: a reinstall is a restore from an image you did not write, into a machine whose configuration you did write. Where those two disagree, you find out on first boot.
The four operations and the symptom each one fixes
| Operation | What it touches | Fixes | Keeps your data |
|---|---|---|---|
| Console access | Nothing | Anything where the machine boots but you cannot reach it | Yes |
| Rescue boot | Nothing (disk mounted) | Boot loops, bad fstab, full disk, broken SSH config, forgotten password | Yes |
| Reinstall | The disk | Compromised system, unrepairable package state, a distribution you want gone | No |
| Clean install from scratch | The disk and the config | “This should not have been a server in the first place” | No |
The first two rows are reversible. The last two are not, and the boundary between row two and row three is exactly one click in most panels — which is why the decision should be made before you are in the panel, not while looking at it.
There is a second-order version of the same mistake on desktops, where the four operations are reset, in-place repair, reinstall and clean install, and where the wrong choice costs files rather than uptime. The decision page before the walkthrough separates them properly, and its advice — that most people asking how to reinstall do not need a clean install — applies to servers for the same reason: the longest operation is rarely the one that matches the symptom.
The order that works
- Snapshot before anything. Most providers charge for snapshots by the gigabyte-month; a 40 GB snapshot kept for a week is a rounding error next to an unrecoverable disk.
- Boot the rescue image, mount read-only first. Reading the filesystem tells you what state it is in without changing it. If
fsckis needed, you will know before you run it. - Read the logs from outside.
journalctl --directoryagainst the mounted filesystem, plus the application logs, is usually enough to name the failure. This is the step people skip, and it is the only step that makes the next one a decision rather than a guess. - Fix, reboot, verify. Then, and only then, consider whether the fix is permanent.
- If you do reinstall: restore deliberately. Bring back configuration from a repository, not from memory. The two-hour version of this step is where the forgotten cron job lives.
The cost that does not appear in the panel
The disk is the cheap part. What a reinstall destroys and a snapshot may not recover cleanly is the accumulated knowledge of why the machine looks like it does: the firewall rule added for one customer’s IP, the DNS token that only existed in an environment file, the TLS certificate issued by hand, the systemd unit with a comment explaining a workaround.
That is the argument for treating configuration as a file in a repository from the first day, and it is the same argument as the first hour on a new VPS, just arriving from the other direction. A machine you can rebuild in twenty minutes is a machine you can reinstall without hesitation. A machine you cannot rebuild is a machine where “just reinstall it” is the most expensive sentence in the thread.
A note on whose site this is
ReinstallOS is run by the same person who writes this site. The link above is not paid and carries no affiliate parameter; it is included because the desktop walkthroughs are the counterpart to the server procedure described here, and because the site’s own rule — every download link points at Microsoft’s or Apple’s servers — is the same rule this article applies to rescue images. The disclosure page lists every commercial relationship on this site.
Sources
Primary documentation only — the provider's own page, the specification, or the standard itself. Claims that rest on anything else are described in the text as a market pattern or an inference, not as documentation.
Written by Sam Wang. Spotted something out of date? Tell us.