When a VPS will not boot – after a bad kernel update, a wrong /etc/fstab entry or file system damage – rescue mode lets you start a small separate Linux system and work on your server's disk from outside. Virtualizor offers this as Rescue Mode on many setups, or you can boot a rescue ISO on KVM.
Before you start
- Access to the Virtualizor panel and the VNC console.
- Basic Linux command-line skills: mounting disks, editing files with
nano. - If your data is critical and you are unsure, contact support before making changes.
Enable rescue mode
- Log in to Virtualizor and open your VPS.
- Click Rescue Mode (sometimes under Settings or a lifebuoy icon).
- Set a temporary root password for the rescue system.
- Click Enable Rescue. The VPS restarts into the rescue system.
- Connect over SSH to the VPS IP with user
rootand the rescue password, or use VNC.
Alternative: boot a rescue ISO (KVM)
If rescue mode is not offered, go to the VPS Settings, mount an ISO such as SystemRescue or a distribution's live image from the ISO list, set the Boot Order to CD-ROM first, and restart. Work in the VNC console.
Find and mount your disk
- List disks:
lsblk -f. Your VPS disk is usually/dev/vdaor/dev/sdawith partitions likevda1. - Mount the root partition:
mount /dev/vda1 /mnt(use the partition with your OS). For LVM, runvgchange -ayfirst and mount the logical volume. - Check:
ls /mnt/etcshould show your server's configuration.
Common repairs
- File system errors: unmount first (
umount /mnt), then runfsck -y /dev/vda1for ext4 orxfs_repair /dev/vda1for XFS. - Bad fstab entry: edit
/mnt/etc/fstaband comment out the wrong line with#, or addnofailto optional disks. - Forgotten root password: chroot into the system and set a new one:
mount --bind /dev /mnt/dev && mount --bind /proc /mnt/proc && mount --bind /sys /mnt/sys && chroot /mnt passwd root- Firewall locked you out: disable it in the chroot, for example
systemctl disable ufworsystemctl disable firewalld. - Broken kernel update: in the chroot, reinstall the kernel package or regenerate GRUB (
update-gruborgrub2-mkconfig -o /boot/grub2/grub.cfg).
Copy data off the server
If the system cannot be repaired, copy what you need before reinstalling:
rsync -avz /mnt/var/www/ user@backup-server:/backups/www/Also copy database files (/mnt/var/lib/mysql) – ideally restore them on a server with the same MySQL or MariaDB version.
Leave rescue mode
- Exit any chroot and unmount:
umount -R /mnt. - In Virtualizor, click Disable Rescue (or unmount the ISO and set boot order back to Hard Disk).
- Restart the VPS and watch the boot in VNC.
Troubleshooting
- SSH warns about a changed host key: expected in rescue mode; remove the old key with
ssh-keygen -R ip. - Disk not visible: the rescue kernel lacks a driver; try another rescue ISO.
- Still boots into rescue: rescue mode or the ISO boot order is still enabled.
