As a Linux Administrator, there are instances you may want to troubleshoot and repair boot problems. This is often achieved by booting the system into emergency / recovery mode from the Grub menu. In this guide, you will learn to diagnose issues and recover the system from emergency mode.

Booting CentOS/RHEL 7&8 Linux into Emergency / Recovery mode

Start your RHEL / CentOS 7/8 LInux machine. When the boot-loader menu appears, press any key except Enter to interrupt the countdown.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/02/echo/Screenshot-from-2020-02-18-00-24-16.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Press e key to edit the current entry so we can modify the default boot-loader entry and log in to emergency mode.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/02/echo/Screenshot-from-2020-02-18-00-25-07.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Now use the cursor keys to navigate to the line that starts withlinux. You need to appendsystemd.unit=emergency.targetto the end of the line.

Press Ctrl x key to boot using the modified configuration.

Log in to emergency mode by entering the root password.

<img alt="" data-ezsrc="https://kirelos.com/wp-content/uploads/2020/02/echo/Screenshot-from-2020-02-18-00-25-29.png" data-ez ezimgfmt="rs rscb8 src ng ngcb8 srcset" src="data:image/svg xml,”>

Use the mount command to remount the / file system read/write. This will enable you to edit the file system.

# mount -o remount,rw /

You should be able to rescue a broken system from the emergency mode. See more Linux guides below.

Tags:

  • Boot CentOS 8 / CentOS 7 in to recovery mode
  • Boot CentOS 8 / CentOS 7 in to emergency mode
  • Boot CentOS 8 / CentOS 7 in to single user mode
  • Boot RHEL 8 / RHEL 7 in to single user mode
  • Boot RHEL 8 / RHEL 7 in to recovery mode
  • Boot RHEL 8 / RHEL 7 in to emergency mode