How to Recover from Linux Emergency Mode & into Default Mode
Steps to Exit Linux Emergency Mode and Restore Normal Boot
What Is Emergency Mode in Linux?
Linux emergency mode is a basic systemd target (emergency.target) that provides a single root shell when the system fails to complete a normal boot process. It serves as the lowest-level recovery environment, with only the root filesystem mounted in read-only mode, and operates without network connectivity or additional services.
What is the purpose of emergency mode in Linux?
- Make a root shell available even if the filesystem is corrupted.
- Permit errors in /etc/fstab to be manually corrected
- Use fsck to resolve disc corruption.
- Determine which systemd units are failing and preventing a normal boot.
- Recover from a broken initramfs or bad kernel parameters
Emergency vs rescue mode
Emergency mode (emergency.target) mounts only root read-only and starts almost nothing. Rescue mode (rescue.target) mounts all local filesystems and starts more services. Use emergency mode for the most broken systems; use rescue mode for configuration issues.
Common Causes of Linux Emergency Mode in Ubuntu Systems
| Cause | Symptom / Error | Fix |
|---|---|---|
| Bad /etc/fstab entry | Dependency failed for local-fs.target | Comment out bad line; correct UUID |
| Filesystem corruption | failed to mount on real root | Run fsck -y /dev/sdXN |
| Missing / replaced disk | UUID not found in fstab | Run blkid; update fstab UUID |
| Broken initramfs | Entering emergency mode. Exit the shell to continue. | Regenerate with dracut --force |
| Failed systemd service | Failed to start default.target | systemctl list-units --failed |
| Root account locked | Cannot open root shell, try again… | Use GRUB rd.break or live USB |
You will see the following screen –
Welcome to emergency mode! After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” or ^D to try again to boot into default mode.
Give root password for maintenance (or type control-D to continue):
The following steps are used in Linux to boot the server in default mode and leave emergency mode in the Ubuntu system.
Step 1: Enter the password for the root. It might be your password to restart the server if necessary.
Step 2: For Quick Reboot: CTRL+D at the emergency prompt to attempt continuing the boot without logging in. If the error is transient, the system will boot normally. If not, you will be returned to emergency mode.
Step 3: For Force Reboot: Press CTRL+ALT+DELETE to trigger a systemd-managed reboot — safer than a hard power cycle.
Step 4: If the above steps do not resolve the issue, restart the server with CTRL+D with the root password and try the following commands to reboot the server in default mode.
Step 5: Before executing the unmount command, make a note of every valid mount point. All of the discs can be unmounted using these commands.
# unmount -a
Step 6: The next step is to edit the fstab file in /etc folder (/etc/fstab). Comment using the # the unmounted mount points.
Step 7: Next reboot the server, and the system will reboot in default mode.
Some Linux terminal commands used to fix a system that fails to boot properly
| Goal | Command |
|---|---|
| View boot error logs | journalctl -xb -p err |
| Remount root writable | mount -o remount,rw / |
| List disk UUIDs | blkid |
| Check & repair filesystem | fsck -y /dev/sdXN |
| Unmount all filesystems | umount -a |
| Edit fstab | nano /etc/fstab |
| Test fstab | mount -a |
| List failed units | systemctl list-units --failed |
| Reset failed units | systemctl reset-failed |
| Boot to default target | systemctl default |
| Reboot | systemctl reboot |
| Regenerate initramfs (RHEL) | dracut --force |
| Regenerate initramfs (Ubuntu) | update-initramfs -u |
| Regenerate initramfs (Arch) | mkinitcpio -P |
| Check system state | systemctl is-system-running |
Professional Linux Emergency Server Support
Dealing with a Linux server in emergency mode on a production system can be stressful and time-critical. At Velan Remote IT Support, our server support engineers specialize in exactly these kinds of urgent recovery scenarios — from corrupted filesystems and broken /etc/fstab entries to failed kernel updates and initramfs issues.
We troubleshoot Linux emergency mode, rescue mode, and server crash recovery for clients every day across Ubuntu, RHEL, CentOS, Debian, Rocky Linux, and many other distributions. Our team is available 24/7 for emergency server support.
If your server is stuck in emergency mode right now and you need immediate help, fill out our Quick Connect form and a support engineer will reach out to you promptly.
Frequently Asked Questions on Ubuntu Systems
Edit the GRUB kernel line and add rd.break (Fedora/RHEL) or init=/bin/bash (Arch/Ubuntu) to get a shell without a password. Alternatively, boot from a live USB and use the chroot method above.
Check these in order: (1) fstab still has an error — test with mount -a; (2) filesystem corruption is not fully repaired — run fsck -f to force a check; (3) the UUID changed after a disk replacement; (4) a systemd unit is still failing — check systemctl list-units --failed.
It means systemd could not mount one or more filesystems listed in /etc/fstab. The most common cause is a wrong UUID after a disk was replaced or resized. Run blkid and compare UUIDs against /etc/fstab.
No. Emergency mode is more restrictive — only the root filesystem is mounted read-only. Rescue mode mounts all local filesystems and starts more services. Emergency mode is the fallback when even rescue mode cannot start.
Add systemd.unit=emergency.target to the kernel line in GRUB, or run systemctl emergency from a running system.
Search
Categories
- Applications 01