A Linux file server running systemd hangs during startup because a bad entry in /etc/fstab prevents non-root volumes from mounting. The administrator needs a maintenance environment that
mounts the local file systems so they can be edited,
does not start normal network or application services, and
presents a root shell for repairs. Which systemd boot target entered at the GRUB prompt best meets these requirements?
Boot into graphical.target (runlevel 5)
Boot into multi-user.target (runlevel 3)
Boot into emergency.target (init=/bin/sh equivalent)
The target that implements single-user mode under systemd is rescue.target (also known as runlevel 1). When the kernel is started with the parameter systemd.unit=rescue.target (or simply the digit "1"), systemd:
Mounts all local file systems so they are available for editing,
Starts only the minimal set of services required for a root login shell, and
Leaves networking and most other daemons inactive. This provides exactly the maintenance environment described.
emergency.target is even more minimal-it does not mount the file systems-so you would still have to mount them manually. multi-user.target and graphical.target start full sets of services (including networking, and in the latter case a display manager), which does not satisfy the requirement to avoid normal services during troubleshooting.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between rescue.target and emergency.target in systemd?
Open an interactive chat with Bash
How do you configure GRUB to boot into a specific systemd target?
Open an interactive chat with Bash
Why is multi-user.target not suitable for troubleshooting bad entries in /etc/fstab?