Every server Unmetered traffic, DDoS protection and IPMI included. No setup fees, no contract. Unmetered traffic on every server See pricing

Documentation

Reinstall the OS or boot rescue mode

Back up your data, reinstall a one-click OS image, or boot the rescue system to mount your disks, fix fstab and GRUB, and reset a password through chroot.

  • 6 min read
  • Updated
  • FlexDedi Engineering

About this page

Applies to
Every FlexDedi dedicated server
Updated
November 2, 2026
On this page

Two control panel tools cover most "start over" and "it will not boot" situations. A reinstall writes a fresh operating system and erases your data. Rescue mode starts a separate Linux system, so you can repair the installed one without touching your data.

  • Reinstall when you want a clean system or a different OS, and your data is safely copied elsewhere.
  • Use rescue mode when the server does not boot, you lost the root password, or you need to copy data off before a reinstall.

One-click images

The control panel lists the versions currently offered for each image.

ImageLogin after installGood to know
UbunturootAPT packages, Netplan networking
DebianrootAPT packages, long support cycle
AlmaLinuxrootRHEL-compatible, DNF packages
Rocky LinuxrootRHEL-compatible, DNF packages
Windows ServerAdministratorConnect with Remote Desktop
Proxmox VErootWeb interface on port 8006

For anything else, boot your own ISO through the KVM console, as described in Use IPMI and the HTML5 KVM console. The OS library describes each image.

What a reinstall erases

Plan as if every drive in the server will be wiped. A reinstall removes:

  • the operating system, applications, databases, containers, virtual machines and home directories
  • everything you configured yourself: users, SSH keys added after installation, firewall rules, extra IPv6 addresses, private VLAN interfaces and scheduled jobs
  • the SSH host keys, so your SSH client will warn that the host identification has changed

Back up before you reinstall

A backup stored on the same server is erased with everything else, so copy your data to another machine. A second server in the same location works well over the free private network, and so does a Storage 264.

bash
# Dump databases to files
sudo -u postgres pg_dumpall | gzip > /root/pg-all.sql.gz
mysqldump --all-databases --single-transaction --routines --events | gzip > /root/mysql-all.sql.gz

# Save the configuration and the list of installed packages
tar -czf /root/etc.tar.gz /etc
dpkg --get-selections > /root/packages.txt    # rpm -qa on AlmaLinux and Rocky Linux

# Copy everything off the server, here over a private VLAN
rsync -aHAX --numeric-ids /root /srv /home backup@10.20.0.30:/backups/web1/

Before you continue, check that the files arrived and that at least one database dump restores on the other machine.

Reinstall the server

  1. Finish and verify your backup.
  2. In the control panel, open your server and choose Reinstall.
  3. Select the image and your SSH key, then confirm.
  4. When the reinstall completes, find the new login credentials with your server in the control panel.
  5. On your workstation, run ssh-keygen -R 203.0.113.10 with your server's address to forget the old host key.
  6. Repeat the first-login steps from Getting started: change passwords, add keys, install updates.

Boot rescue mode

The rescue system runs instead of your installed OS, so your disks are not in use and can be checked, mounted and repaired.

  1. In the control panel, open your server, choose Rescue mode and reboot the server into it.
  2. Connect over SSH with the access details given for the rescue session, or use the KVM console.
  3. When you are done, turn rescue mode off and reboot into your installed system.

Find and mount your disks

List the drives and assemble any RAID or LVM volumes first:

bash
lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINTS
cat /proc/mdstat              # software RAID arrays, if any
mdadm --assemble --scan       # start them if they are not running
vgchange -ay                  # activate LVM volume groups, if any

If the root file system reports errors, check it while it is unmounted: fsck -f /dev/nvme0n1p2 for ext4, or xfs_repair /dev/nvme0n1p2 for XFS, the default on AlmaLinux and Rocky Linux. Use /dev/md0 or /dev/mapper/... paths for RAID and LVM volumes.

Then mount the root file system, read its fstab to see which other partitions it needs, and mount those too:

bash
mount /dev/nvme0n1p2 /mnt             # root file system (example device)
cat /mnt/etc/fstab                    # shows /boot or /boot/efi, if separate
mount /dev/nvme0n1p1 /mnt/boot/efi    # EFI system partition on UEFI installs

Chroot into the installed system

Bind the kernel's virtual file systems, then switch into your installation:

bash
for d in dev proc sys run; do mount --rbind /$d /mnt/$d; done
chroot /mnt /bin/bash

From here, commands act on the installed system. passwd root resets a forgotten password, and you can edit /root/.ssh/authorized_keys to restore SSH access.

Fix /etc/fstab

A boot that stops in emergency mode often comes from an fstab entry that points to a missing or replaced disk. Compare the UUIDs in fstab with the real ones, correct them, then check the file:

bash
blkid
nano /etc/fstab
findmnt --verify

For disks the system can boot without, add nofail to the mount options, for example UUID=3f2a9c4e-... /data ext4 defaults,nofail 0 2. A missing data disk then no longer blocks the boot.

Repair GRUB

Check the boot mode first, because GRUB must be reinstalled for the mode the server boots in:

bash
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

On Ubuntu and Debian:

bash
grub-install --target=x86_64-efi --efi-directory=/boot/efi   # UEFI
grub-install /dev/nvme0n1                                     # legacy BIOS, repeat for each boot disk
update-grub

On AlmaLinux and Rocky Linux:

bash
dnf reinstall shim-x64 grub2-efi-x64      # UEFI, if boot loader files are missing
grub2-install /dev/nvme0n1                # legacy BIOS only
grub2-mkconfig -o /boot/grub2/grub.cfg

Leave rescue mode

Exit the chroot and unmount everything before you reboot:

bash
exit
umount -R /mnt

Turn rescue mode off in the control panel and reboot. Watch the boot in the KVM console: if it stops again, the messages on screen tell you what to fix next. If the hardware itself looks faulty, open a support ticket: our engineers are available 24/7.