How to Boot Debian 11 into Rescue / Emergency Mode
Booting a Linux system into rescue mode or single user mode is one of the important troubleshooting for Linux admins. Rescue mode is also known as single user mode. Generally Linux system is booted into rescue mode in order to recover forgotten root password and to repair and fix corrupted file system.
Apart from the rescue mode, Linux system can be booted into emergency mode, the main difference between them is that rescue mode loads a minimal environment with read only root file system whereas emergency mode doesn’t mount root file system.
In this guide, we will learn how to boot Debian 11 (Bullseye) into Rescue (or Single User Mode) and emergency mode.
Boot Debian 11 Into Rescue Mode
Reboot Debian 11 system and go to boot loader (Grub) screen and select “Debian GNU/Linux”.
Note: If the system is booting up using default BIOS settings, then hold down the Shift key to go boot loader screen. In case of UEFI booting, press ESC key couple of time to go to bootloader screen.
The Grub (boot loader) screen would look like below,
Press “e” and then go the end of line which starts with word “linux” and append “init=/bin/bash”.
Now Press Ctrl-x or F10 to boot, we will get the following screen
Mount the root file system in read-write mode, run
# mount -o remount,rw /
Once the file system is mounted in rw mode then we can execute admin like resetting root password.
Once you are done with all troubleshooting, reboot the system by pressing Ctrl + Alt + Del
Boot Debian 11 into Emergency Mode
Reboot your Debian 11 system and go to grub (boot loader) screen
Press “e” and go to end of line which starts with word linux and append “systemd.unit=emergency.target”.
Now press Ctrl-x or F10 to boot into emergency mode.
Note: In case root password is already set in your Debian 11 system then you must enter root password to enter in emergency mode. So, in my case I have already set the root password.
Enter root user password to get the shell and use “mount -o remount,rw /” command to mount the root file system in read-write mode.
Perform the troubleshooting steps and type ‘systemctl reboot’ to reboot the system.
That’s all from this guide, I hope you have found it informative. Kindly do share your feedback and queries in below comments section.
Also Read: How to Boot Ubuntu 20.04 LTS in Rescue / Emergency Mode
The post How to Boot Debian 11 into Rescue / Emergency Mode first appeared on LinuxTechi.