Booting any Linux distribution into single user mode (or rescue mode) is one of the important troubleshooting methods that every Linux geek should know. In this guide we will demonstrate how to boot Arch Linux into a single user mode or rescue mode. There can be different scenarios where we need to boot arch linux into single user mode, some of these scenarios are listed below:
- Reset Forgotten user’s password including root
- Update /etc/fstab file
- Repair corrupted file system
- Release space from the file system which is 100 % utilized.
- Start & stop any application service at boot time
Let’s dive into the single user mode booting steps.
Step 1) Reboot Arch Linux & Interrupt booting
Reboot the Arch Linux and go the the grub boot loader screen, choose the first option ‘Arch Linux’ as shown below:
Step 2) Append an argument ‘init=/bin/bash’ to boot in single user mode
Press ‘e’ to enter in the edit mode and add ‘init=/bin/bash’ at the end of the line which starts with ‘linux’ word. Example is shown below
Now press ‘Ctrl-x‘ or F10 to boot Arch Linux in single user mode. Below window confirms that we have entered in single user mode or rescue mode.
Step 3) Mount root file system & perform troubleshooting
To run commands and perform troubleshooting steps, we have to first mount root file system (/) in read write mode.
Run following command to mount / file system in read write mode.
# mount -n -o remount,rw /
Now perform troubleshooting steps like resetting the forgotten root password and edit /etc/fstab file.
Once you are done with all the troubleshooting steps then execute the command ‘exec /sbin/init’ to save changes & start Arch Linux.
That’s all from this guide. I hope, now you have better understanding on how to boot arch linux in single user mode or rescue mode. Please don’t hesitate to share your feedback and comments in comments section below.
Also Read : How to Install LEMP Stack on Arch Linux