When something breaks in your Ubuntu system—like a misconfigured file or failed boot—Rescue Mode and Emergency Mode can help you fix it. These modes give you limited access to your system for troubleshooting and repair.
In this guide, you’ll learn how to boot into both Rescue Mode and Emergency Mode on Ubuntu 22.04, 20.04, or 18.04.
🆘 What’s the Difference?
- Rescue Mode: A recovery environment that loads most essential services and gives you a root shell.
- Emergency Mode: A minimal boot state with only the root filesystem mounted read-only. It’s useful when core system services fail.
🧰 Method 1: Boot into Rescue Mode via GRUB
Step 1: Reboot and Enter GRUB
- Restart your computer.
- When the system starts, hold down the Shift key (BIOS systems) or press Esc (UEFI systems) to show the GRUB menu.
Step 2: Select Advanced Options
Use arrow keys to choose:
Advanced options for Ubuntu
Press Enter.
Step 3: Choose Recovery Mode
Select the kernel with (recovery mode) at the end:
Ubuntu, with Linux x.x.x-xx-generic (recovery mode)
Press Enter.
Step 4: Enter the Root Shell
You’ll see a Recovery Menu. Select:
root - Drop to root shell prompt
You now have root access in a recovery shell. The filesystem is mounted as read-only.
To remount it as writable:
mount -o remount,rw /
Now you can fix broken configs, update packages, reset passwords, etc.
🔧 Method 2: Boot into Emergency Mode Manually
Use this when the system won’t boot, or you want ultra-minimal access.
Step 1: Edit GRUB at Boot
- At the GRUB menu, highlight the default Ubuntu entry.
- Press
e
to edit it.
Step 2: Modify the Boot Command
Look for the line that starts with:
linux /boot/vmlinuz...
Go to the end of that line and add:
systemd.unit=emergency.target
To boot into rescue mode instead, use:
systemd.unit=rescue.target
Step 3: Boot
Press F10 or Ctrl + X to boot with the modified parameters.
You’ll boot into a minimal shell. For Emergency Mode, the root filesystem is read-only. To make changes, remount it:
mount -o remount,rw /
✅ When to Use Each Mode
Situation | Use Mode |
---|---|
System not booting | Emergency Mode |
Forgot root password | Rescue Mode |
Broken fstab or systemd unit | Emergency Mode |
Fix networking or services | Rescue Mode |
Minimal shell access with nothing loaded | Emergency Mode |
⚠️ Tips & Reminders
- Always back up important config files before editing.
- Exit the shell with
reboot
orexit
. - Use
journalctl -xb
to view logs after boot failures.
Final Thoughts
Rescue and Emergency modes are powerful tools that help recover broken Ubuntu systems. They’re built in and easy to access through GRUB, giving you a lifeline when the GUI or even the shell won’t load normally.
Need help fixing a specific boot issue once you’re in? Leave a comment—I’ll help you sort it out.
Leave a Reply