Server Management 3 min read Last updated: 2026-10-23

OS Reinstallation & Rescue Mode Guide

How to reinstall modern Linux distributions (Ubuntu 24.04/26.04, Debian 12/13, Rocky/AlmaLinux 9/10) via VirtFusion and use Rescue Mode chroot to recover files or repair bootloaders.

Whether you want to start fresh with a different Linux distribution or recover from a severe misconfiguration that prevents standard booting, FlawlessNode provides automated One-Click Reinstallation and an independent Rescue Mode via the VirtFusion control panel.

1. VirtFusion One-Click Operating System Reinstallation

FlawlessNode’s official image repository provides clean, minimal, and kernel-optimized 64-bit distributions:

  • Ubuntu: 24.04 LTS (Noble), 26.04 LTS (Resolute), 22.04 LTS (recommended for modern web stacks and containers)
  • Debian: 12 (Bookworm), 13 (Trixie) (ultra-lightweight memory footprint and rock-solid stability)
  • AlmaLinux / Rocky Linux: 9.x, 10.x (enterprise RHEL binary compatibility)

Reinstallation Steps:

  1. Log in to the FlawlessNode Client Portal and open your instance’s VirtFusion management console;
  2. Click Rebuild / Reinstall in the top action bar;
  3. Select your target distribution and version;
  4. Generate a new random root password or select your saved SSH public keys;
  5. Click Confirm Reinstall.

[!WARNING] One-click reinstallation completely formats the primary virtual NVMe drive. All existing data on the disk will be permanently erased and cannot be recovered! Always back up critical files off-site before initiating a rebuild.

Provisioning typically completes within 60 to 90 seconds via Cloud-Init, after which the server reboots with a fresh SSH host fingerprint.


2. When and How to Use Rescue Mode

When an instance fails to boot or becomes unreachable due to configuration mistakes, you rarely need to wipe the disk. Use Rescue Mode to repair the system in place:

  • Malformed entries in /etc/fstab causing the boot process to hang in emergency mode;
  • Accidental UFW / nftables firewall rules blocking SSH while VNC login is unavailable;
  • Forgotten root password when no SSH public key is configured;
  • Deleted or corrupted network configurations under /etc/netplan/ or /etc/network/interfaces.

Enabling Rescue Mode:

  1. In the VirtFusion instance dashboard, toggle Rescue Mode;
  2. Confirm instance shutdown to boot from the pre-built in-memory (RAM) Debian/Alpine Live rescue image;
  3. Copy the temporary Rescue Mode root password displayed on screen;
  4. Wait ~30 seconds, then connect via SSH to your server’s normal IPv4 address on port 22.

3. Mounting Your Original Disk & Repairing via chroot

Inside Rescue Mode, your session runs inside a temporary RAM disk (/). Your actual server filesystem resides on the unmounted virtual block device (typically /dev/vda1 or /dev/vda2).

3.1 Identify the Primary Partition

lsblk
# Typical output:
# NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
# vda    252:0    0   60G  0 disk
# └─vda1 252:1    0   60G  0 part

3.2 Mount the Partition and Enter chroot

# Create mount point and mount the primary root partition
mkdir -p /mnt/sys
mount /dev/vda1 /mnt/sys

# Bind essential kernel and runtime virtual filesystems
mount --bind /dev /mnt/sys/dev
mount --bind /proc /mnt/sys/proc
mount --bind /sys /mnt/sys/sys
mount --bind /run /mnt/sys/run

# Switch root environment into your original OS
chroot /mnt/sys

3.3 Common Repair Operations

Resetting the Root Password:

passwd root

Fixing Broken SSH Daemon Configuration:

nano /etc/ssh/sshd_config
# Verify syntax before exiting:
sshd -t

Commenting Out Faulty Mounts in /etc/fstab:

nano /etc/fstab

3.4 Cleanly Unmounting and Exiting Rescue Mode

Once repairs are finished, flush disk buffers and unmount cleanly:

exit              # Exit the chroot environment
umount -R /mnt/sys
sync

Finally, click Exit Rescue Mode in the VirtFusion control panel. Your instance will reboot directly from its repaired NVMe drive.

Was this page helpful?