Linux GRUB 方式切換啟動層級(runlevel)__Linux

來源:互聯網
上載者:User

    事因修改了某個設定檔,導致系統啟動某個服務的時候hold住了,系統啟動不起來。這種情況下常常通過修改表啟動層級,切換到非xwindow模式下重新啟動,一般選取啟動層級runlevel為3即可。

參考環境:Redhat Enterprise Linux AS 4

步驟:

1.當Linux啟動時,按 e  進去參數選擇編輯介面:

2.移動游標選中系統(Red Hat Enterprise Linux AS (2.6.9-55.ELsmp)),按 e:

3.移動游標選中(kernel /vmlinuxz-2.6.9-55.ELsmp ro root=LABEL=/ rhgb quiet):

4.修改rhgb為3,然後按enter鍵:

5.選中(kernel /vmlinuxz-2.6.9-55.ELsmp ro root=LABEL=/ 3 quiet),按 b, 系統則進去啟動程式。

 

注,當系統reboot時,會自動切換到xwindows啟動方式的runlevel(5);

另,如果能進去系統, 或者能啟動sshd服務,則通過修改/etc/inittab 檔案更改runlevel。

 

遺憾的是暫時無法上傳圖片,各個步驟的截圖只能擱下了~~

 

參考:

Runlevel  System State
0  Halt the system
1   Single user mode
2  Basic multi user mode
3  Multi user mode
5  Multi user mode with GUI
6  Reboot the system
S, s  Single user mode

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.