TABLE OF CONTENTS


Use this guide to start a BinaryLane Linux VPS from the Finnix Recovery Live CD, inspect the installed disk and repair a boot problem while the installed operating system is offline.


Finnix is useful when the VPS no longer boots normally, SSH is unavailable, a configuration file is preventing startup, or the filesystem needs to be checked while it is unmounted.


Before you begin: recovery work causes downtime and can cause data loss if the wrong disk or file is changed. Take a backup or snapshot first where possible. Confirm every device name before running a mount or repair command. The VPS operating system remains customer-managed; BinaryLane provides the recovery environment and general guidance.


Example: recover a VPS with a broken fstab entry


In this example, Ubuntu stops in emergency mode because /etc/fstab contains an invalid filesystem entry.


Ubuntu boot stopping in emergency mode and asking for the root password


The same workflow can be used to inspect other Linux boot and configuration problems. Replace the example device names with those shown for your VPS.


Boot the VPS into Finnix

  1. Log in to mPanel and open the affected VPS.
  2. Select Recovery.
  3. Open the Rescue Disk tab.
  4. Select Boot from Finnix Recovery Live CD.
  5. Select Apply. This restarts the VPS.
  6. Open the VPS console from mPanel.

mPanel Recovery page with Boot from Finnix Recovery Live CD selected


If the operating system does not shut down cleanly, mPanel may offer Continue Waiting, Abort or Force Shutdown


Continue waiting where possible. A forced shutdown can leave filesystems inconsistent and should be used only when the VPS is unresponsive and you accept that risk.

At the Finnix 251 boot menu, select Live system (amd64) and press Enter.

Finnix 251 boot menu with Live system amd64 selected


Finnix finishes at a root shell prompt:

Finnix 251 root shell prompt after booting


You can confirm the running kernel and ext filesystem tools with:

uname -r
e2fsck -V


Finnix showing the running kernel and e2fsck version


Identify the installed disk


Finnix runs from the recovery CD rather than the installed VPS disk. List the available disks, partitions, filesystems, labels and UUIDs:

lsblk -f
blkid


Finnix lsblk and blkid output showing the recovery media and installed VPS disk


In this example, /dev/vda1 is the installed Ubuntu root filesystem. The sr0 device is the Finnix recovery media. Your layout may differ, particularly if the VPS uses LVM or separate partitions.

Do not continue until you have identified the correct installed filesystem.

Run a read-only filesystem check


For an ext2, ext3 or ext4 filesystem, perform a read-only check before mounting it:

fsck.ext4 -fn /dev/vda1


The -n option answers no to repair prompts, so this command reports problems without changing the filesystem.

Finnix completing a read-only ext4 filesystem check


If the check reports errors, review the repair section below before proceeding. Do not run a write-enabled filesystem repair while the filesystem is mounted.

Mount and inspect the installed system


Mount the root filesystem read-only first:

mkdir -p /mnt/server
mount -o ro /dev/vda1 /mnt/server
findmnt /mnt/server

Inspect the relevant configuration file. For a boot failure involving filesystem mounts:

cat /mnt/server/etc/fstab

This example shows an invalid UUID entry that refers to a filesystem which does not exist:

Finnix showing an invalid UUID entry in the installed system fstab file


Edit a broken configuration file


Warning: the following steps change the installed operating system. Back up the file before editing it, and remove or correct the entire invalid entry. Leaving a partial line can still prevent the VPS from booting.


Remount the filesystem read-write, make a backup and open the file:

mount -o remount,rw /mnt/server
cp -a /mnt/server/etc/fstab /mnt/server/etc/fstab.before-recovery
nano /mnt/server/etc/fstab

See the invalid UUID:

Nano showing the invalid fstab entry that must be removed or corrected


In Nano:

  • Locate the invalid entry. Each /etc/fstab entry occupies one complete line.
  • If the entry is no longer required, delete the entire line from UUID= through the final filesystem-check value. Do not remove only the UUID value, as the remaining incomplete entry may still prevent the server from booting.
  • If the entry is required, replace the incorrect UUID with the correct UUID shown by blkid. Also confirm that its mount point, filesystem type and mount options are correct.
  • Leave all unrelated valid entries unchanged.
  • Press Ctrl+O to write the file.
  • Press Enter to confirm the filename.
  • Press Ctrl+X to exit.

Review the saved file before unmounting:

cat /mnt/server/etc/fstab
sync
umount /mnt/server


Finnix showing the corrected fstab file followed by a successful unmount


If you need to undo the edit before unmounting, restore the backup:

cp -a /mnt/server/etc/fstab.before-recovery /mnt/server/etc/fstab

Repair an ext filesystem if required


Filesystem repair can change disk metadata and may discard damaged data. Take a backup first where possible. Confirm that the target filesystem is unmounted:

findmnt -S /dev/vda1

If this produces no output, run a repair for an ext2, ext3 or ext4 filesystem:

fsck.ext4 -f /dev/vda1

Review each prompt carefully. Replace /dev/vda1 with the correct filesystem for your VPS. Do not use fsck.ext4 on XFS, Btrfs, NTFS or another filesystem type.

Boot back into the installed operating system

  1. Confirm that any mounted installed filesystems have been unmounted.
  2. Return to Recovery > Rescue Disk in mPanel.
  3. Select Normal Boot.
  4. Select Apply. This restarts the VPS.
  5. Open the VPS console and confirm that the installed operating system reaches its normal login prompt.

mPanel Recovery page with Normal Boot selected


Ubuntu reaching its normal login prompt after recovery


After the VPS starts normally, test SSH or the affected service.

Other recovery tasks


After mounting the installed filesystem under /mnt/server, Finnix can also be used to inspect or repair:

  • SSH keys and SSH server configuration;
  • netplan and other network configuration;
  • firewall rules which block remote access;
  • a full root filesystem;
  • logs under /mnt/server/var/log/; and
  • important files which need to be copied before rebuilding the VPS.

Use read-only mounts while diagnosing a problem, remount read-write only when a specific change is required, and unmount the installed filesystem before leaving Finnix.