如何解决centos虚拟机无法启动?
用VMware虚拟机创建的一个centos桌面版系统。系统启动时出现问题,在启动certmonger之后,界面卡住,无法进入图形界面,如图:
解决方法:
首先,Ctrl+Alt+F2进入命令行界面,用root用户登录,查看/etc/X11/xorg.conf文件是否存在,如果存在,则执行命令:
mv /etc/X11/xorg.conf /etc/X11/old_xorg.conf
重启系统,看是否正常。
然后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:
则开机默认进入命令行界面。
重启进入命令行之后,执行startx,则可进系统图形界面了!
相关参考:centOS教程
Atas ialah kandungan terperinci 如何解决centos虚拟机无法启动. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!