There are some situations like user forget his / her password, file system is 100 % utilized, file system got corrupted and invalid entries in fstab file. So, to recover Linux system in these situations, we have to boot Linux system into rescue mode or single user mode.
In this article, we will learn how to boot Linux Mint 20 in rescue and emergency mode.
Booting Linux Mint 20 into Rescue / Single User Mode
Rescue mode is also known as single user mode, in order to boot Linux Mint 20 in rescue mode,
Step 1) Go to grub screen by pressing “SHIFT” key and then press “ESC” key. We will get the following Grub boot loader screen,
Choose first option and then press ‘e‘ to edit
Step 2) Append “systemd.unit=rescue.target” to end of line which begins with linux word
In the boot loader screen, look for the line which begins with “linux” word and append “systemd.unit=rescue.target“, example is shown below
Now, Press F10 or CTRL-X to boot the system in rescue mode,
Step 3) Perform troubleshooting steps and recover the system
We will get the following rescue mode screen; press enter and then do the troubleshooting steps. I am assuming “James” user has forget his password, so we will be resetting his password from rescue mode.
Once you are done with troubleshooting steps then run “systemctl reboot” command to restart the system.
Booting Linux Mint 20 Into an Emergency Mode
Emergency mode is used where we can not boot Linux system into single user mode, In this mode, file system is mounted in read only mode. To make any changes in the system we must first mount filesystem in read-write mode.
In order to boot Linux Mint 20 in emergency mode, go to Grub boot loader screen and choose the first option and then press “e” to enter into boot loader edit mode.
Look for the line which starts with ‘linux’ word and append “systemd.unit=emergency.target” at the end of line,
Now, press ctrl-x or F10 to boot. Once the system is booted into emergency mode, we will get the following screen,
To mount / file system in read-write mode, use following command:
# mount -o remount,rw /
Perform all the troubleshooting steps to recover system,
Once you are satisfied with all the troubleshooting steps and then reboot the system with “systemctl reboot” command.
That’s all from this article. I hope you got the clear idea on how we boot our Linux Mint 20 into rescue and emergency mode. Please don’t hesitate to share your feedback and comments in the comments section below.
from Linuxtechi https://www.linuxtechi.com/boot-linux-mint-rescue-emergency-mode/