You added a new disk to your VPS, or tidied up /etc/fstab, ran reboot, and now SSH won't connect at all. When you open the VNC console in your SkyServer panel, the server is sitting at a prompt that says "You are in emergency mode" and wants the root password. Don't panic, and please don't reinstall the OS yet. This is almost always a single bad line in one file, and you can usually fix it in about five minutes.
Symptom: what you'll see
Usually one or more of these:
- SSH times out after a reboot, but the VPS shows as "running" in the panel.
- The console shows
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs. - The boot hangs for about 90 seconds on
A start job is running for dev-disk-by\x2duuid-...device, then drops into emergency mode. - Messages like
Dependency failed for /dataorDependency failed for Local File Systems. - On some systems you get
Give root password for maintenance (or press Control-D to continue)instead.
The common thread is that systemd couldn't mount something that /etc/fstab told it was required. So it stopped the boot to protect you, before networking or SSH ever started.
Cause: why one line can stop the whole boot
Every line in /etc/fstab becomes a systemd mount unit at boot. Unless you say otherwise, systemd treats each one as required for local-fs.target. If any required mount fails, the boot doesn't continue past that point, and you land in emergency mode.
Here are the usual culprits:
| What happened | Typical log line |
|---|---|
| A typo in the UUID, or the disk was re-created so the UUID changed | Timed out waiting for device /dev/disk/by-uuid/... |
A device name like /dev/vdb1 or /dev/sdb1 changed order after a reboot | special device /dev/vdb1 does not exist |
| A block storage volume was detached or deleted but its fstab line stayed | Dependency failed for /mnt/storage |
Wrong filesystem type (ext4 written where the disk is xfs) | wrong fs type, bad option, bad superblock |
A misspelled mount option (defualts, noatim) | unknown mount option / bad option |
A network mount (NFS/CIFS) without _netdev | Mount attempted before the network is up, then fails |
| The mount point directory doesn't exist | mount point does not exist |
Fix: step by step
1. Get to a shell
Open the VNC/console from your VPS control panel. SSH is dead at this point, so you can't skip this. At the emergency prompt, type the root password. If you've never set a root password (cloud images often lock it), boot into rescue mode from the panel instead and mount your root disk there. Our rescue mode guide walks through that part.
2. Find out exactly which mount failed
Don't guess. Ask systemd:
systemctl --failed
journalctl -xb -p err | head -50
You'll typically see something like data.mount or mnt-storage.mount listed as failed. That unit name maps directly to the mount point (/data, /mnt/storage), which tells you which fstab line to look at.
3. Make the root filesystem writable
In emergency mode, root is often mounted read-only, so your edit won't save. Remount it:
mount -o remount,rw /
4. Compare fstab with the disks you actually have
cat /etc/fstab
lsblk -f
blkid
lsblk -f shows every disk and partition along with its real UUID and filesystem type. Put the two side by side. Nine times out of ten you'll spot it right away: a UUID that doesn't appear in blkid output, a /dev/vdb1 that's now /dev/vdc1, or ext4 where lsblk says xfs.
5. Fix or neutralise the bad line
Back up the file first, then edit it:
cp /etc/fstab /etc/fstab.bak
nano /etc/fstab
You have three options, depending on what's wrong:
- Wrong UUID or type: correct it using the values from
lsblk -f. - Disk is gone for good: comment the line out with a
#at the start. - Disk is optional (backup volume, extra storage): add
nofailso a missing disk never blocks boot again.
A safe data-disk line looks like this:
UUID=3f2a9c1e-7b44-4d2e-9a1f-0c5e8d6b2a11 /data ext4 defaults,nofail,x-systemd.device-timeout=10s 0 2
For an NFS share, add _netdev so systemd waits for the network:
10.0.0.5:/exports/backup /mnt/backup nfs defaults,_netdev,nofail 0 0
6. Test before you reboot
Don't skip this step. It catches the second typo that sends you straight back to emergency mode:
systemctl daemon-reload
findmnt --verify
mount -a
findmnt --verify (util-linux 2.29+, which covers any current Ubuntu, Debian or AlmaLinux) parses fstab and complains about unknown options, missing targets and bad UUIDs without mounting anything. If mount -a also returns silently, you're good.
7. Continue the boot
systemctl default
# or simply
reboot
Give it a minute, then try SSH again.
Prevention: never get locked out by fstab again
- Always use UUIDs, never
/dev/vdXnames. Device letters can change between boots, especially when you attach or detach block storage. - Put
nofailon every non-root disk. Your OS doesn't need/datato boot, so don't let it block SSH. - Run
findmnt --verifyandmount -aafter every fstab edit. Make it muscle memory. - Remove the fstab line before you detach or delete a volume. Do it in that order.
- Take a snapshot before disk work. Thirty seconds in the panel can save an evening. See VPS snapshots explained.
- Know your console login. Set a strong root password, or confirm your sudo user can log in at the console, while things are working. Finding out it doesn't work during an outage is no fun.
Quick rule of thumb: if a disk going missing shouldn't stop your website, its fstab line needs nofail.
Frequently Asked Questions
Can I just press Control-D to carry on booting?
Sometimes, yes. The system may come up without the broken mount. But the next reboot will land you in the same place, and anything that expected that disk (databases, backups, uploads) may now be writing to the wrong place on your root disk. Fix the fstab line properly.
Why does my VPS sit for 90 seconds before failing?
That's systemd's default device timeout. It waits for the disk to show up before giving up. Adding x-systemd.device-timeout=10s to the mount options shortens the wait. With nofail, the boot carries on without the disk after that.
I don't know the root password and the console won't accept my user. What now?
Boot the VPS into rescue mode from your panel, mount your root partition (for example mount /dev/vda1 /mnt), and edit /mnt/etc/fstab from there. Then reboot normally. If you're stuck, SkyServer support can attach rescue media for you.
Is this the same as the "read-only file system" problem?
They're related but not the same. Here, the boot stops because a mount is missing or misconfigured. A read-only root at runtime usually points to filesystem errors or a failing disk. That's covered in our read-only file system guide.
Will fixing fstab delete any data?
No. Editing /etc/fstab only changes what gets mounted and where. The data on the disks isn't touched. Just don't run mkfs on anything while you're troubleshooting.
