How to Boot Ubuntu 22.04 into Rescue / Emergency Mode
Hello geeks, booting Ubuntu 22.04 (Jammy Jellyfish) into rescue and emergency mode helps to reset the forgotten user password, fix the file system errors and disabling or enabling systemd service during boot.
In this post, we will learn how to boot Ubuntu 22.04 LTS system into rescue and emergency mode. Rescue mode is similar to single user mode where are all troubleshooting steps are executed. Rescue mode loads the minimal environment and mount root file system.
Whereas in emergency mode, we get the single user shell without starting any system services. So emergency mode is required when we can’t boot the system into rescue mode.
Boot Ubuntu 22.04 into Rescue or Single User Mode
Head to target system which you want to boot into rescue or single user mode. At the boot press ‘SHIFT & ESC’ key to enter into grub bootloader screen.
Choose the first option Ubuntu and press ‘e’ to enter edit mode.
Go the end of line which starts with linux and delete the string ‘$vt_handoff’ and add the string ‘systemd.unit=rescue.target’
After making the changes, either press Ctrl+x or F10 to boot in rescue mode,
Once you enter into rescue mode, run all troubleshooting commands and to reboot the system run ‘systemctl reboot’ command
Alternate Way to Boot System into Rescue Mode
Reboot the system and press ‘ESC & Shift’ Key to go to grub boot screen.
Choose the 2nd option ‘Advanced Options for Ubuntu’ –> Choose recovery mode option and hit enter –> Choose Root (Drop to root shell prompt).
Example is show below
Once you have root shell, run commands to recover and fix the system issues and finally use ‘systemctl reboot’ to reboot the system.
Boot Ubuntu 22.04 into Emergency Mode
To boot the system into emergency mode, first go to grub screen.
Select the first option as ‘Ubuntu’ and press ‘e’ to edit. Look for the line which starts with linux word, go to the end of that line, remove the string $vt_handoff and add the string ‘systemd.unit=emergency.target’
Press Ctrl+x or F10 to boot the system into emergency mode,
Similarly in rescue mode, you can perform all the troubleshooting in this mode and once done reboot the system with command ‘systemctl reboot’.
That’s all from this post. I found it informative and don’t hesitate to share this among your technical friends. Kindly post your queries and feedback in below comments section.
Read Also : How to Set Custom $PATH Environment Variable in Linux
The post How to Boot Ubuntu 22.04 into Rescue / Emergency Mode first appeared on LinuxTechi.