systemctl-rescue
Boot into rescue shell for system recovery
TLDR
Enter rescue mode
Enter rescue mode asynchronously
SYNOPSIS
systemctl [OPTIONS...] rescue
PARAMETERS
--no-block
Do not wait for the requested operation to finish. If an operation is requested that would block, this option makes it return immediately.
--job-mode=MODE
Controls how new jobs interact with existing pending jobs. Common modes include fail (if a job conflicts, new job fails), replace (replaces conflicting jobs), ignore-dependencies (starts target without pulling in dependencies). Default is usually replace.
-h, --help
Show a short help text and exit.
--version
Show a short version string and exit.
--system
Connect to the systemd system manager. This is the default.
--user
Connect to the systemd user manager. (Not typically relevant for rescue mode).
--host=HOST
Operate on a remote host via systemd's D-Bus interface. Requires appropriate setup and authentication.
DESCRIPTION
The systemctl-rescue command is a convenient shortcut provided by systemd to transition the system into rescue mode. This special operational state is designed for system troubleshooting, maintenance, and recovery when the normal boot process fails or when specific low-level system repairs are required. When invoked, systemctl-rescue effectively executes systemctl isolate rescue.target.
In rescue mode, systemd attempts to mount all local filesystems but starts only a minimal set of services essential for basic system operation, such as a root shell. Unlike emergency mode, which provides an even more restricted environment (often read-only root), rescue mode typically provides a more functional environment with network capabilities and a login prompt, allowing administrators to log in and perform diagnostics, fix broken configurations, or repair filesystem issues before a full system boot. It's an invaluable tool for recovering systems that fail to boot into a graphical or even standard multi-user environment.
CAVEATS
- Requires root privileges: Changing the system target requires superuser permissions.
- Data loss potential: Incorrect commands or operations in rescue mode can lead to data loss or further system instability. Exercise caution.
- Limited environment: Not all services or applications will be running. Some tools or configurations might not be available as they would be in a fully booted system.
- No guaranteed network: While rescue mode is generally more functional than emergency mode, network interfaces or specific networking services might not be fully operational by default, depending on the distribution and configuration.
- Reboot required: After troubleshooting and fixing issues, a system reboot is typically required to return to normal operation.
EXITING RESCUE MODE
To exit rescue mode and attempt a normal boot, you can use systemctl default or simply reboot.
BOOTING INTO RESCUE MODE DIRECTLY
You can typically instruct the boot loader (GRUB) to boot directly into rescue mode by appending systemd.unit=rescue.target or rescue to the kernel command line during boot.
COMPARISON WITH EMERGENCY MODE
Rescue mode (rescue.target) mounts local filesystems and starts essential services, often including a login prompt. Emergency mode (emergency.target) provides an even more minimal environment, often with the root filesystem mounted read-only and no services started, requiring manual mounting and setup. Rescue mode is generally preferred when you need more tools or network access.
HISTORY
The systemctl-rescue command is an integral part of systemd, the widely adopted init system and service manager for Linux. systemd was first released in 2010 by Lennart Poettering and Kay Sievers, aiming to provide a more efficient and parallelized boot process compared to traditional System V init scripts. The concept of rescue mode, however, existed prior to systemd in various forms (e.g., single user mode, runlevel 1). systemd standardized this functionality through specific targets like rescue.target and provided systemctl rescue as a direct, intuitive way to activate it. Its usage has grown steadily with the increasing adoption of systemd across major Linux distributions.
SEE ALSO
systemctl(1), systemctl-isolate(1), systemctl-emergency(1), systemd.special(7), init(1)


