RHCSA Rapid Track
systemd will display an emergency shell in most cases dealing with file system issues.
The
emergency.targettarget can also be used to diagnose and fix file system issues.
Objectives
After completing this section, students should be able to repair file system issues during boot.
Errors in /etc/fstab and corrupt file systems can
stop a system from booting. In most cases, systemd will
actually continue to boot after a timeout, or drop to an emergency repair
shell that requires the root password.
The following table lists some common errors and their results.
| Problem | Result |
|---|---|
|
Corrupt file system |
systemd will attempt a fsck. If the problem is too serious for an automatic fix, the user will be prompted to run fsck manually from an emergency shell. |
|
Non-existent device/UUID referenced in
|
systemd will wait for a set amount of time, waiting for the device to become available. If the device does not become available, the user is dropped to an emergency shell after the timeout. |
|
Non-existent mount point in |
systemd creates the mount point if possible; otherwise, it drops to an emergency shell. |
|
Incorrect mount option specified in
|
The user is dropped to an emergency shell. |
In all cases, an administrator can also utilize the
emergency.target target to diagnose and fix the issue, since
no file systems will be mounted before the emergency shell is displayed.
Note
When using the automatic recovery shell during file system issues, do not
forget to issue a systemctl daemon-reload after
editing /etc/fstab. Without this reload,
systemd will continue using the old version.
References
systemd-fsck(8), systemd-fstab-generator(3), and systemd.mount(5) man pages