How to Boot Debian 12 into Rescue Mode / Emergency Mode

In this blog post, we will show you how to boot Debian 12 into rescue mode (or Single User Mode) and 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. It provides a minimal environment, enabling users to troubleshoot and repair system issues, such as corrupted file system or misconfigured network settings or forgotten root password.

Apart from the rescue mode, Linux system can also be booted into an 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.

Boot Debian 12 Into Rescue Mode

In order to go boot loader screen, reboot or starts your Debian 12 system and press & hold the Shift key. If you are using UEFI, you may need to press ESC instead.The Grub (boot loader) screen would look like below:

Select “Debian GNU/Linux

Debian12-Bootloader-Screen

Press “e” and then go the end of line which starts with word “linux” and append “init=/bin/bash”.

Init-bin-bash-bootloader-debian12

Now Press Ctrl-x or F10 to boot, post that we will get below screen.

Rescue-Mode-Console-Debian12

Next, try mount the root file system in read-write mode using beneath command.

# mount -o remount,rw /

Once the file system is mounted in rw mode then we can execute admin like resetting root password.

Boot-Debian12-Into-Rescue-Mode

Once you are done with all troubleshooting, reboot the system by pressing Ctrl + Alt + Del

Boot Debian 12 into Emergency Mode

Reboot your Debian 12 system and go to grub (boot loader) screen using above mentioned instructions.

Boot-Loader-Screen-Debian12-System

Press “e” and go to end of line which starts with word linux and append “systemd.unit=emergency.target”.

Emergency-Mode-Debian12

Now press Ctrl-x or F10 to boot into emergency mode.

Note: In case root password is already set in your Debian 12 system then you must enter root password to enter in emergency mode. So, in my case I had already set the root password.

Emergency-Mode-Console-Debain12

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.

Troubleshooting-in-Emergency-Mode-Debian12

That’s all from this post, I hope you have found it informative and useful. Feel free to post your queries and feedback in below comments section.

Also Read: How to Boot Ubuntu 22.04 into Rescue / Emergency Mode

1 thought on “How to Boot Debian 12 into Rescue Mode / Emergency Mode”

  1. Hi

    In the first section: Reboot your server and go to boot loader (Grub) screen

    How do we get to this GRUB screen, if the system always boots to the login screen (even with or without pressing SHIFT key)?

    Thanks

    Reply

Leave a Comment