When a VPS is not booting, SSH and the website go down, but the server's disk is usually intact. The first job is to see where the boot stops, which you do through the VNC console in your VPS control panel. From there most boot failures – a bad /etc/fstab line, a broken kernel update or a damaged filesystem – can be fixed from emergency mode or a rescue system.
Before you start
- Access to your VPS control panel (VNC console, rescue mode, reinstall options).
- Your root password; the console needs it, not an SSH key.
Read the error on the console
- Open the VNC or Console in your VPS panel and reboot the server.
- Watch where it stops. The common screens are: GRUB rescue>, You are in emergency mode, Kernel panic, or a filesystem check (fsck) failure.
Emergency mode after an fstab change
A wrong UUID, a removed disk or a typo in /etc/fstab stops the boot.
- Enter the root password at the emergency prompt.
- Run
mount -o remount,rw /. - Edit
/etc/fstabwithnano /etc/fstaband comment out the bad line with#. Addnofailto optional disks. - Check with
mount -a, thenreboot.
Filesystem errors
If boot drops to a prompt asking to run fsck, run it on the reported device, for example:
fsck -y /dev/vda1Never run fsck on a mounted filesystem; use rescue mode if the root disk is affected.
Kernel panic or GRUB problems after an update
- Reboot and, at the GRUB menu, choose Advanced options and an older kernel.
- Once booted, reinstall or remove the broken kernel and regenerate GRUB (
update-grubon Debian/Ubuntu,grub2-mkconfig -o /boot/grub2/grub.cfgon RHEL-based systems). - If
/bootwas full, remove old kernels first.
Use rescue mode
- Boot the VPS into the rescue system from the panel.
- Mount the disk:
mount /dev/vda1 /mnt. - Fix files under
/mnt/etc, check free space withdf -h /mnt, and copy off important data. - For GRUB repair,
chrootinto/mntafter binding/dev,/procand/sys. - Exit rescue mode and reboot normally.
Tip: A completely full root disk can also stop services from starting. If the server boots but nothing works, check df -h first.
FAQ
Can I lose data from a boot failure?
Usually not. The disk remains; rescue mode lets you copy data off before any reinstall.
Why is my SSH key not accepted on the console?
The console is a local login and needs the root password. Reset it from the panel if needed.
When should I reinstall?
Only after backing up data, when the system is too damaged to repair.
