Recovering Linux without getting into rescue mode

In large organizations, mostly the servers would be managed remotely through the console (ilo/drac/imm).

 

he following steps needs to be followed to skip init from loading into the memory in the booting process.
1. Reboot the server.
2. At the Grub Prompt, press “a” to provide additional kernel parameters.
3. Add “init=/bin/bash” at the end and press “Enter”. Basically, we are just telling the kernel to load /bin/bash in place of init to skip init from loading into the memory.  The kernel would load /bin/bash in place of init and would drop you to the # Prompt. But, since rc.sysinit script is not yet executed, the root file system is mounted in read-only mode. Hence you need to mount the root file system in read/write mode before making any changes to the system configuration.
4.  mount the root file system in read/write mode using the following command :

bash-3.1# mount -o remount,rw /

 

 5.Now you can do everything, which you can do from single user mode.  Update any config file, scan file systems for errors or even enable/disable services at boot time. Once you are done, type exit and hit enter to reboot the server.
You would get an error message, “Kernel panic – not syncing : Attempted to kill init !”. Ignore the error and hard reboot the server.

source: simpleans.blogspot.ie/2012/10/recovering-linux-without-getting-into.html