如何解決centos虛擬機無法啟動?
用VMware虛擬機創(chuàng)建的一個centos桌面版系統(tǒng)。系統(tǒng)啟動時出現(xiàn)問題,在啟動certmonger之后,界面卡住,無法進入圖形界面,如圖:
解決方法:
首先,Ctrl+Alt+F2進入命令行界面,用root用戶登錄,查看/etc/X11/xorg.conf文件是否存在,如果存在,則執(zhí)行命令:
mv /etc/X11/xorg.conf /etc/X11/old_xorg.conf
重啟系統(tǒng),看是否正常。
然后Ctrl+Alt+F2進入命令行界面,用root用戶登錄,修改文件/etc/inittab
vim/etc/inittab
# inittab is only used by upstart for the default runlevel. # ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # System initialization is started by /etc/init/rcS.conf # Individual runlevels are started by /etc/init/rc.conf # Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf # Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf, # with configuration in /etc/sysconfig/init. # For information on how to write upstart event handlers, or how # upstart works, see init(5), init(8), and initctl(8). # Default runlevel. The runlevels used are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:5:initdefault:
將最后一行id:5:initdefault:
修改為id:3:initdefault:
則開機默認進入命令行界面。
重啟進入命令行之后,執(zhí)行startx,則可進系統(tǒng)圖形界面了!
相關參考:centOS教程