Short article to learn how to enter single user mode in SUSE 12 Linux server.
In this short article we will walk you through steps which demonstrate how to enter single user mode in SUSE 12 Linux. Single user mode is always preferred when you are troubleshooting major issues with your system. Single user mode disables networking and no other users are logged in, you rule out many situations of multi user system and it helps you in troubleshooting fast. One of the most popular use of single user mode is to reset forgotten root password.
1. Halt boot process
First of all you need have console of your machine to get into single user mode. If its VM then VM console, if its physical machine then you need its iLO/serial console connected. Reboot system and halt automatic booting of kernel at grub boot menu by pressing any key.
2. Edit boot option of kernel
Once you are on above screen, press
e on selected kernel (which is normally your preferred latest kernel) to update its boot options. You will see be below screen.
Now, scroll down to your booting kernel line and add
init=/bin/bash at the end of the line as shown below.
3. Boot kernel with edited entry
F10 to boot this edited kernel. Kernel will be booted in single user mode and you will be presented with hash prompt i.e. root access to server. At this point of time, your root file system is mounted in read only mode. So any changes you are doing to system wont be saved.
Run below command to remount root filesystem as re-writable.
kerneltalks:/ # mount -o remount,rw /
And you are good to go! Go ahead and do your necessary actions in single user mode. Dont forget to reboot server to boot into normal multiuser mode once you are done.