Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. VPS Hosting
  6. /
  7. Vps Rescue Mode
GUIDEVPS Hosting

"Using Rescue Mode on Your VPS"

6 min read

Rescue mode is a special boot environment that lets you access your VPS when it will not start normally. Instead of booting from your server's disk, rescue mode boots a minimal operating system from a separate image, giving you access to your server's file system for repair and data recovery.

This guide explains when to use rescue mode, how to activate it, and common tasks you can perform while in rescue mode.

What Is Rescue Mode?

Rescue mode boots your VPS into a lightweight, temporary operating system — typically a minimal Linux distribution. Your server's regular disk is not used as the boot drive but is still accessible as a mounted (or mountable) volume. This allows you to:

  • Access and edit files on your server's disk when the server will not boot.
  • Fix corrupted configuration files that prevent normal startup.
  • Repair broken boot loaders or file system issues.
  • Recover data from a non-booting server.
  • Reset a root password that you have forgotten.
  • Diagnose disk and file system errors.
Think of rescue mode as "safe mode" for your VPS — a fallback environment for troubleshooting and repair.

When to Use Rescue Mode

Consider using rescue mode when:

  • Your server will not boot — The server is stuck during startup due to a misconfiguration, corrupted file, or broken update.
  • You are locked out — You changed the SSH configuration, firewall rules, or root password and can no longer log in.
  • File system errors — The disk has corruption that prevents normal operation.
  • Boot loader issues — The boot loader (GRUB) is misconfigured or corrupted.
  • Data recovery — You need to retrieve files from a server that cannot start normally.
  • Pre-reinstallation data salvage — You want to copy data off the disk before reinstalling the OS.

Step 1 — Activate Rescue Mode

  • Log in to your Data Mammoth dashboard.
  • Navigate to Services and click on the affected server.
  • Click the Settings tab (or Rescue tab, depending on the dashboard layout).
  • Find the Rescue Mode section.
  • Click Enable Rescue Mode or Boot into Rescue Mode.
  • Select the rescue operating system if options are provided (a minimal Linux is typically the default).
  • Confirm the action.
  • Your server will reboot into the rescue environment. The dashboard will display:

    • Temporary root password for the rescue system (note this down).
    • Instructions for connecting.
    The reboot typically takes 1 to 3 minutes.

    Step 2 — Connect to the Rescue System

    Once rescue mode is active, connect via SSH using the temporary credentials:

    text
    ssh [email protected]

    Enter the temporary root password provided by the dashboard. You are now logged into the rescue environment, not your regular server OS.

    Alternatively, use the web console in your Data Mammoth dashboard.

    Step 3 — Access Your Server's Disk

    In rescue mode, your server's regular disk is not mounted automatically. You need to mount it to access your files.

    Identify the Disk

    List available disks and partitions:

    text
    lsblk

    Your server's primary disk is typically /dev/sda or /dev/vda. The main partition is usually /dev/sda1 or /dev/vda1.

    Mount the Disk

    Create a mount point and mount the partition:

    text
    mkdir /mnt/server
    mount /dev/sda1 /mnt/server

    Your server's files are now accessible under /mnt/server. The root directory of your regular OS is at /mnt/server/, so for example:

    • Your server's /etc directory is at /mnt/server/etc/
    • Your server's /home directory is at /mnt/server/home/
    • Your server's /var/www directory is at /mnt/server/var/www/

    Common Rescue Mode Tasks

    Fix SSH Configuration

    If you accidentally broke your SSH configuration and cannot log in:

  • Mount the disk (see above).
  • Edit the SSH configuration file:
  • text
    nano /mnt/server/etc/ssh/sshd_config
  • Fix the problematic settings (e.g., re-enable password authentication, fix the port number, or allow root login).
  • Save the file and exit.
  • Exit rescue mode (see below) and reboot into normal mode.
  • Reset Root Password

    If you forgot the root password:

  • Mount the disk.
  • Change the root environment to use the mounted disk:
  • text
    chroot /mnt/server
  • Set a new root password:
  • text
    passwd root
  • Enter the new password twice.
  • Exit the chroot environment:
  • text
    exit
  • Exit rescue mode and reboot.
  • Fix Firewall Rules

    If firewall rules locked you out:

  • Mount the disk.
  • Edit the firewall configuration. The location depends on the firewall software:
  • - For iptables: /mnt/server/etc/iptables/rules.v4 - For nftables: /mnt/server/etc/nftables.conf - For ufw: /mnt/server/etc/ufw/user.rules
  • Remove or modify the offending rules.
  • Save and exit rescue mode.
  • Recover Data

    If you need to copy files off a non-booting server:

  • Mount the disk.
  • Use SCP to copy files to your local machine:
  • text
    scp -r /mnt/server/var/www/ user@your-local-machine:/backup/
  • Or compress and download:
  • text
    tar -czf /tmp/backup.tar.gz -C /mnt/server home var/www etc
    Then download /tmp/backup.tar.gz via SCP.

    Check and Repair File Systems

    If you suspect disk corruption:

  • Make sure the disk is not mounted.
  • Run a file system check:
  • text
    fsck /dev/sda1
  • Follow any prompts to fix detected errors.
  • After repair, try mounting the disk to verify it is accessible.
  • Step 4 — Exit Rescue Mode

    After completing your repairs or data recovery:

  • Unmount the server disk:
  • text
    umount /mnt/server
  • Return to your Data Mammoth dashboard.
  • Navigate to the server's Settings or Rescue tab.
  • Click Disable Rescue Mode or Boot Normally.
  • Confirm the action.
  • Your server will reboot from its regular disk with the changes you made. If everything was fixed correctly, the server should start normally.

    Troubleshooting Rescue Mode

    Cannot Mount the Disk

    • Double-check the device name with lsblk. It might be /dev/vda1 instead of /dev/sda1.
    • If the disk uses LVM, you may need to activate the volume group first:
    text
    vgchange -ay
    Then mount the logical volume.
    • If the file system is corrupted, run fsck before mounting.

    Changes Do Not Take Effect After Rebooting

    • Ensure you edited files on the mounted disk (/mnt/server/...), not on the rescue system's own file system.
    • Verify the disk was properly unmounted before rebooting.
    • Make sure rescue mode is disabled before rebooting, otherwise the server boots into rescue mode again.

    Server Still Will Not Boot After Repairs

    If the server remains unbootable after your repair attempts:

    • Consider restoring from a snapshot. See How to Create and Restore VPS Snapshots.
    • If no snapshot is available, use rescue mode to recover data, then reinstall the OS. See How to Reinstall Your VPS Operating System.
    • Contact Data Mammoth support for assistance.

    What to Do Next

    • How to Create and Restore VPS Snapshots — Always have a snapshot before things go wrong.
    • How to Reinstall Your VPS Operating System — Start fresh if repairs are not possible.
    • Troubleshooting — Server Not Responding — Diagnose other common server issues.
    • Troubleshooting — Cannot Connect via SSH — Fix SSH connection problems without rescue mode.

    Was this article helpful?

    ← Back to VPS HostingBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket