Linux Labs

Inside the system: resources, kernel, processes / Stage 11 of 13

The system did not boot: emergency mode

Not running Starting usually ~20 s
Leave the lesson

Step 1 of 7 · on a machine · 5 min

The machine did not boot

What you will learn

  • Recognise emergency mode on the console and tell it from rescue by what is mounted.
  • Find in the boot journal which fstab line stopped the boot and why.
  • Fix fstab from the emergency shell and bring the boot to the normal mode with daemon-reload, mount -a and systemctl default.

A colleague moved the site cache into memory: they added a line for /srv/cache to /etc/fstab, checked the table and rebooted the server. The server did not come back into service. Your machine has the same line: check the table yourself and reboot the machine.

Exercise · look

Check the table and reboot the machine

Look at the last line of /etc/fstab and check the table with sudo findmnt --verify. Then reboot the machine with sudo reboot, and when the boot stops, ask the system about its state: systemctl is-system-running.

First, predict

What will findmnt --verify say about the table with this line?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in
Check yourself 1 question

How did the boot end after the reboot?

  • The boot ended with the You are in emergency mode message and a root prompt: the machine waits for commands and answers them.

  • There was a single reboot: journalctl --list-boots shows the previous boot and the current one, which sits in emergency mode.

  • There was no student login: the prompt is root@ubuntu:~#, and systemctl is-system-running printed maintenance.

The boot stopped in emergency mode, and a root shell opened on the console.

Ubuntu 24.04
Loading…