2011年4月8日星期五

Login the Linux using single user mode

I

Technorati Tags: ,

t’s common to boot a Unix/Linux system into single user mode to debug boot problems.

1.  Select the kernel that should be booted.

2. Press ‘a’ to modify what parameters are passed to the kernel and init.

2.5 use Backspace to remove rhgb and quiet from the list of kernel parameters. The rhgb parameter starts up the graphical bootup display and quiet suppresses almost all of the kernel’s output on boot.

3. Type S. Adding an s to the end of the line tells the system to start in single user mode. Make sure there is space before the s. This can be an S, an s or the word single.

4. Press enter.

After the system has booted, a root shell will be loaded without requiring the root user’s password to be entered.

At the command prompt, verify that this is indeed a root shell by issuing the id command.

With root access, it is possible to perform a file system check, turn off services that are stopping the system from booting correctly, change the root password, fix incorrect network settings, etc.

Sometimes, it’s necessary to change runlevels from single user mode to the default runlevel for the system:

Press Ctrl + d