Server Does Not Boot: Recovery via Rescue¶
In this article
Diagnostics via the Console¶
If the server does not respond via SSH or RDP, first find out at which stage the boot process stops:
- for a VPS, open the Native Console in the Console tab of the server card;
- for dedicated servers, use the IPMI/KVM console.
Reboot the server and watch the output. Typical symptoms:
| Message on screen | Cause | Section |
|---|---|---|
You are in emergency mode, Give root password for maintenance | error in /etc/fstab or a corrupted file system | File system errors |
grub rescue>, No bootable device, error: unknown filesystem | corrupted bootloader | GRUB does not load |
dracut-initqueue timeout, (initramfs), Unable to find root device | corrupted initramfs | Corrupted initramfs |
Kernel panic - not syncing | problem with a new kernel | Kernel panic |
Accessing the System from Rescue Mode¶
Rescue mode boots the server into a separate recovery system without affecting the data on the disks. It is available on all dedicated (Bare Metal) servers and on VPS with at least 3 GB of RAM, and only for Linux-based operating systems.
- In the server card, go to the Rescue Mode tab, select an image, and click
Enable Rescue and reboot. - Connect to the server via the Console tab.
-
Find the root partition:
-
If software RAID or LVM is used, activate them:
-
Mount the root partition, then
/bootand, on UEFI systems,/boot/efi(substitute the device names from thelsblkoutput): -
Bind the system directories and switch to the installed OS environment:
After making fixes, leave the chroot with exit, unmount the partitions (umount -R /mnt), and reboot the server. Rescue mode is disabled on the next reboot.
File System Errors and Emergency Mode¶
Most often, the system drops into emergency mode because of an /etc/fstab entry that refers to a missing disk or an incorrect UUID (for example, after a disk was replaced or removed).
-
In Rescue mode, check the file system. The partition must be unmounted:
-
Mount the root partition and compare the UUIDs in
/mnt/etc/fstabwith theblkidoutput. -
Fix the incorrect UUID or comment out the line for the non-existent disk. For additional disks, add the
nofailoption so that a missing disk does not block the boot:
Tip
If the console shows the emergency mode prompt, you can fix /etc/fstab without Rescue: enter the root password, run mount -o remount,rw /, edit the file, and run reboot.
GRUB Does Not Load¶
Reinstall the bootloader from the chroot (see Accessing the System from Rescue Mode). First determine the boot mode: if the /sys/firmware/efi directory exists in the Rescue system and the installed OS has a /boot/efi partition, UEFI is used; otherwise it is BIOS (Legacy).
Debian/Ubuntu:
# BIOS: specify the disk, not a partition
grub-install /dev/sda
# UEFI
grub-install --target=x86_64-efi --efi-directory=/boot/efi
update-grub
CentOS ⅞, AlmaLinux, Rocky Linux:
# BIOS
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub2/grub.cfg
# UEFI: reinstall the bootloader packages instead of grub2-install
dnf reinstall grub2-efi-x64 shim-x64 # use yum on CentOS 7
grub2-mkconfig -o /boot/efi/EFI/<almalinux|rocky|centos>/grub.cfg
Note
On AlmaLinux/Rocky Linux 9 and later, /boot/efi/EFI/<distribution>/grub.cfg is a stub that points to /boot/grub2/grub.cfg, so generate the configuration with grub2-mkconfig -o /boot/grub2/grub.cfg.
If the disks are combined into software RAID 1, install the bootloader on each disk of the array (/dev/sda, /dev/sdb).
Corrupted initramfs¶
A dracut-initqueue timeout error or the (initramfs) prompt after a kernel update usually means that the initramfs image was not built completely — for example, because /boot ran out of space. Rebuild it from the chroot:
Debian/Ubuntu:
CentOS ⅞, AlmaLinux, Rocky Linux:
Full Boot Partition¶
If the /boot partition is full, a new kernel and initramfs are installed with errors. Check the free space with df -h /boot and remove old kernels:
- Debian/Ubuntu — see My kernel and drivers are not updating/installing on Ubuntu;
-
CentOS, AlmaLinux, Rocky Linux — keep the two most recent kernels:
After cleaning up, rebuild the initramfs as described above.
Kernel Panic After a Kernel Update¶
Boot the previous kernel version:
- Reboot the server and open the console.
- In the GRUB menu, select Advanced options (Debian/Ubuntu) or the previous entry in the kernel list (RHEL family). If the menu is not displayed, hold Shift (BIOS) or press Esc (UEFI) during boot.
-
Once booted, set this kernel as the default:
# CentOS 7/8, AlmaLinux, Rocky Linux grubby --info=ALL | grep -E "^index|^kernel" grubby --set-default /boot/vmlinuz-<version>On Debian/Ubuntu, remove or reinstall the problematic kernel package (
apt remove linux-image-<version>) and runupdate-grub.
Repairing Windows Boot¶
Rescue mode is not available for Windows, so use a Windows Server installation ISO image: Mounting an ISO Image on a VPS or Mounting ISO using IPMI.
- Boot from the ISO and select Repair your computer in the console.
-
Run Startup Repair. If that does not help, open Command Prompt and run:
-
On UEFI systems, recreate the boot files (check the system partition's drive letter in
diskpart→list volume): -
Check the system files:
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows.
When to Contact Support¶
You can contact technical support in two ways: by email from the address specified in your account, or through the Help Center in the Invapi control panel by creating a ticket (how to create a ticket).
Create a ticket for technical support if:
- the console or Rescue mode is unavailable;
lsblkin Rescue mode does not show the disks, ordmesgcontains I/O errors (I/O error) — the disk may be faulty;- the server does not pass POST or does not see the boot device after the bootloader has been reinstalled.
If you do not need the data or have an up-to-date backup, it is faster to reinstall the server or restore it from a backup or snapshot.