2014年2月11日 星期二

[CentOS 常見問題] Rescue your system with Single user mode in CentOS 6 / RHEL 6

來源自 這裡 
Preface: 
Single user mode is one of run level in Linux; this is also called as Init 1, in this mode all the filesytems will be mounted in read-write mode and can be modified by anybody; this is very insecure because it won’t ask password for login unless you have configured grub password. In this mode networking services (NFS, NIS, DNS and many more) won’t start, it is mainly used for troubleshooting system and administrative tasks by the super user. 

Here is the small tutorial about entering into the single user mode in CentOS 6 / RHEL 6. 

Steps: 
Step 1: Power on or Reboot (if it is already running) your machine. 
Step 2: While booting you might see the splash screen like below, grub is counting the time to boot the default operating system as mentioned in /etc/grub.conf; this timepress any key to interrupt the auto boot. 
 


Step 3: In the next screen you should see the following menu, this is called Grub menu; it will list operating systems (in my case only CentOS installed) that you have installed on the machine, In below that you might find some information about booting the OS and editing the parameters of menu. If you want to enter into single user mode; select the operating system and press “e” edit arguments of kernel. 
 

Step 4: Once you have pressed, you should see the information about the selected operating system. First line gives the information about the hard disk and partition where the OS installed; Second line gives the information about the location of the kernel, language, video output, keyboard type, keyboard table, crash kernel etc… Third line gives the information about the initrd (Initial ram disk). 
To enter into single user mode; select kernel line (Line no: 2) using up and down arrow then press “e”. 
 

Step 5: At the end of the line add “single” to enter into single user mode. Once added, press “Enter” 
 

Step 6: You will come back to same screen, now press “b” to boot with edited parameters. 
 

Now you should be in command line mode with root privileges (without entering password). Now you can start to troubleshoot your system or can do maintenance of your system. 
 

Supplement: 
[Linux]Centos光碟救援模式

沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...