Skip to main content
p. 162

6.8 Emergency Booting and Single-User Mode

When something goes wrong with the system, your first recourse is usually to boot the system with a distribution’s “live” image or with a dedicated rescue image, such as SystemRescueCD, that you can put on removable media. A live image is simply a Linux system that can boot and run without an installation process; most distributions’ installation images double as live images. Common tasks for fixing a system include the following:

  • Checking filesystems after a system crash.
  • Resetting a forgotten password.
  • Fixing problems in critical files, such as /etc/fstab and /etc/passwd.
  • Restoring from backups after a system crash.

Another option for booting quickly to a usable state is single-user mode. The idea is that the system quickly boots to a root shell instead of going through the whole mess of services. In the System V init, single-user mode is usually runlevel 1. In systemd, it’s represented by rescue.target. You normally enter the mode with the -s parameter to the boot loader. You may need to type the root password to enter single-user mode.

p. 165

The biggest problem with single-user mode is that it doesn’t offer many amenities. The network almost certainly won’t be available (and if it is, it will be hard to use), you won’t have a GUI, and your terminal may not even work correctly. For this reason, live images are nearly always considered preferable.