Rescue mode allows you to boot your VPS from a temporary environment to troubleshoot issues, recover data, or repair system configurations when your regular operating system won't start. You can enable rescue mode through your VPS control panel, which will boot your server from a minimal Linux environment that gives you access to your file system and recovery tools.
This feature is essential when you're locked out of your server or experiencing boot failures that prevent normal access.
What is Rescue Mode?
Rescue mode boots your VPS using a lightweight operating system loaded into memory rather than from your main disk. This separate environment allows you to mount your primary disk as a secondary volume, giving you full access to diagnose problems, edit configuration files, reset passwords, or recover important data. Think of it as a safety net that helps you regain control when standard SSH or console access fails.
How to Enable Rescue Mode
Follow these steps to activate rescue mode for your VPS:
- Log in to your VPS control panel using your credentials
- Navigate to the management section for your specific server
- Look for the rescue mode or recovery option in the menu
- Click to enable rescue mode and confirm the action
- Wait for the system to reboot (this typically takes 1-2 minutes)
- Note the temporary root password provided by the control panel
- Connect to your server using SSH with the rescue credentials
Your server is now running in rescue mode with a minimal operating system. Your original disk is not mounted automatically and will need manual mounting to access your files.
Mounting Your Main Disk in Rescue Mode
Once connected to rescue mode, you'll need to mount your primary disk to access your data:
- Connect to your server via SSH using the rescue mode credentials
- Run fdisk -l to identify your disk partitions (usually /dev/sda or /dev/vda)
- Create a mount point directory: mkdir /mnt/rescue
- Mount your root partition: mount /dev/sda1 /mnt/rescue (adjust the device name based on your setup)
- Access your files by navigating to /mnt/rescue
If you have multiple partitions, you may need to mount them individually to access all your data.
Common Rescue Mode Tasks
Resetting the Root Password
One of the most common uses for rescue mode is resetting a forgotten root password. After mounting your disk, use the chroot command to change into your system environment, then use the passwd command to set a new root password. This approach works even when you're completely locked out of your VPS.
Repairing File System Errors
If your VPS won't boot due to file system corruption, rescue mode lets you run repair utilities. Unmount any mounted partitions, then use fsck to check and repair file system issues. Always ensure partitions are unmounted before running file system checks to prevent data corruption.
Editing Configuration Files
Sometimes a misconfigured file prevents your server from booting correctly. In rescue mode, you can navigate to the mounted disk, locate the problematic configuration file (such as network settings or SSH configurations), and make the necessary corrections using text editors like nano or vi.
Recovering Important Data
If your operating system is damaged beyond repair, rescue mode provides an opportunity to copy critical files to another location before reinstalling. You can use tools like scp or rsync to transfer data to another server or download it to your local machine.
Exiting Rescue Mode
After completing your troubleshooting or recovery tasks:
- Unmount any mounted partitions: umount /mnt/rescue
- Return to your VPS control panel
- Disable rescue mode or select normal boot
- Reboot your server
- Connect using your regular credentials once the server is back online
Your VPS will now boot from its original operating system. Test all services to ensure everything is functioning correctly after your repairs.
Important Considerations
Keep these points in mind when using rescue mode:
- Rescue mode uses a different IP address in some configurations, so firewall rules may need temporary adjustment
- The rescue environment has limited tools installed; you may need to install additional utilities using the package manager
- Always create backups before making significant changes, even in rescue mode
- Document any changes you make so you can reference them later if issues recur
- The temporary rescue password expires when you disable rescue mode
At OBHost, our VPS control panel makes rescue mode activation straightforward with clear instructions and automatic credential generation for quick recovery access.
Frequently Asked Questions
Will rescue mode delete my data or affect my files?
No, rescue mode does not modify or delete your existing data. It simply boots your server from a temporary environment while keeping your original disk intact. Your files remain untouched unless you explicitly make changes while in rescue mode. Always exercise caution when editing or deleting files to avoid accidental data loss.
How long can I keep my VPS in rescue mode?
You can keep your VPS in rescue mode as long as needed to complete your troubleshooting or recovery tasks. However, rescue mode is intended for temporary use only. Your server runs with limited functionality in this state, so you should return to normal operation as soon as possible. Most recovery tasks can be completed within 30-60 minutes.
What if I can't mount my disk in rescue mode?
If mounting fails, your disk may have serious file system corruption or hardware issues. First, verify you're using the correct device name by carefully checking the output of fdisk -l or lsblk. Try running fsck on the unmounted partition to repair errors. If mounting still fails, the disk may require professional data recovery, or you may need to restore from backups.
Can I access rescue mode without my control panel?
Rescue mode activation requires access to your VPS control panel, as it involves changing the boot configuration at the virtualization level. If you've lost access to your control panel credentials, you'll need to recover those first. This is different from SSH access and operates at a lower system level to ensure you can boot into recovery even when the operating system is damaged.
If you need assistance with rescue mode or encounter issues during recovery, our support team is available 24/7 to help. Visit our contact page or email us at support@obhost.org for expert guidance.