A summary of solutions to black screen when VMware opens centos
- Foreword:
- 1. Summary of solutions to black screen when VMware opens centos
-
- 1. Situation
-
- Situation one:
- Situation 2
- Situation three
- 2. Solution
-
- The simplest way:
- 1. Execute from the command line with administrator privileges
-
-
- 1. Run cmd as administrator
- 2. Enter “netsh winsock reset” and press Enter
- 3. Restart your computer
-
- 2. At this point, the black screen problem of the virtual machine will be solved with a high probability after restarting. If it is not solved after restarting, try the following more crude and direct method.
-
- 1. Force close the VMware window in Task Manager
- 2. Close processes with the word vmware in the background process as much as possible
- 3. Find the installation directory of the Linux system in your virtual machine and directly delete these three files with the suffix .lck
- 4. After completing these operations, repeat the steps of the previous method. Run `cmd` as an administrator, enter “`netsh winsock reset`”, press Enter, and restart the computer! After restarting again, the black screen problem is basically solved, and I can finally use the Linux system happily.
- 5. There is a pit here, please read on ([BigData] Centos7 system network exception: systemctl status network.service appears LSB: Bring up/down networking and cannot ping Baidu)
-
- Phenomenon:
- abnormal
-
- Exception 1: `systemctl restart network` has no effect
- Exception 2: `systemctl status network.service` displays `Bring up/down networking`
- Cause of the problem: The `VMware NAT service` service is not enabled on the `win` system.
- solution:
-
- 1. Start Task Manager
- 2. Select the service item to open `VMware NAT service`
- 3. Restart the network and check the network status
- 4. Problem verification
- 3. It may be that the machine does not support virtualization or the virtualization function is not turned on.
- 4. Change virtual machine settings:
- 5. Update or reinstall VMware (what happened to me)
- 6. If starting the virtual machine from the “suspended” state fails, it may be that the location of the ISO image file mounted with the “CD/DVD” option in the virtual machine settings has been changed.
- 2. CentOS7 cannot enter the graphical interface, black screen, only one mouse arrow
-
- 1. Situation
- 2. Phenomenon
-
- 1. Can enter tty2
- 2. Solution
- 3. This can be tried (the solution to CentOS7 being unable to enter the image interface), but it is not the final solution:
-
- question:
- reason:
- solve:
-
- 1. Use the command `yum` to check whether `yum` can be used normally
- 2. Use the command `yum groupinstall “GNOME Desktop” “Graphical Administration Tools”` to obtain and install the `CentOS` default graphical interface `GNOME` package
- 3. Modify CentOS default startup mode to graphical mode
- 4.`reboot` restarts `CentOS` and checks the `GUI` interface effect
- 4. The solution for installing centos7 shows that the installation is successful, but the graphical interface cannot appear after restarting.
-
- 1. Think about which one you choose when dressing up
- 2. Execute `Ctrl + Alt + F1` test
- 3. If it still doesn’t work, try executing the following command
- 5. Solve the problem that only the desktop wallpaper and mouse are displayed after booting and logging in under Linux, and no other problems are displayed.
-
- Error reported:
- Phenomenon
-
- 1. Just started the installation
- 2. But sometimes it restarts and enters the login interface.
- 3. It suddenly occurred to me that I had set the `grub` startup settings when installing the system.
-
- 1. After entering the system, edit the file ”`’/etc/default/grub`”’ (administrator rights `sudo` required).
- 2. Find this line:
- 3. Update GRUB: `sudo update-grub`
Foreword:
The author uses
CPU:AMD
System: Windows 10 system (Windows 11 standard)
vmware worastation version number: 16.2.0 build-18760230
The previous version either caused a blue screen restart or reported various errors.
The black screen problem has not been solved yet
If you have other solutions, please leave a comment or send a private message
1. Summary of solutions to the black screen when VMware opens centos
1. Situation
Situation 1:
I believe that many people will use a tool called VM (VMware Workstation) virtual machine when learning Linux. After installing CentOS7, it was clear that the system was working well before, but there were always a few times when CentOS7 in the virtual machine was always in a black screen after booting up, which was very frustrating. I suffered deeply from this in the process of learning Docker.
The screen remains black after turning on the computer
I can’t even close the window, I can only close it through the task manager.
There should be many people who have encountered similar problems. Here I have summarized some solutions, which can indeed effectively solve the problem of black screen when the virtual machine is started.
Scenario 2
Some time ago, I used centos7
to install the GNOME
desktop and failed unexpectedly. As a result, every time I started the virtual machine, the screen was black, busy, and unable to be suspended or shut down. Even deleting and reinstalling cannot solve the problem (deleting a virtual machine is particularly troublesome. There is a vmx
process that has been running. When I tried to end the process, I was told “inaccessible”. I could only end it after restarting. process). Here are some solutions.
Scenario 3
Currently, the C environment, nmap, missing scanning environment, docker, redis, etc. are installed. After shutting down and starting, the screen goes black.
2. Solution
The easiest way:
If this method can help you, you are undoubtedly lucky
# Enter command line shortcut keys Ctrl + Alt + F2|F3 # Check network ifconfig # Check the network card connection status -- means not connected nmclid # Enter configuration (obtain IP automatically) nmtui # Exit and restart network systemctl restart network # If an error is reported at this time, check the network status nmclid # If status is unmanaged # Temporary solution dhclient ens33 # Permanent solution # Check hosting status nmcli n # If it is displayed as disabled, it is the problem encountered in this article. # Enable hosting mucli n on # Restart to take effect systemctl restart NetworkManager \t# or reboot # Restart network service systemctl restart network # Check IP ifconfig # or ipaddr
1. Execute from the command line with administrator privileges
1. Run cmd as administrator
2. Enter “netsh winsock reset” and press Enter
netsh winsock reset
3. Just restart the computer
2. At this point, the black screen problem of the virtual machine will be solved with a high probability after restarting. If it is not solved after restarting, try the more crude and direct method below
1. Force close the VMware window in Task Manager
2. Close processes with the word vmware as much as possible in background processes
3. Find the installation directory of the Linux system in your virtual machine and directly delete these three files with the suffix .lck
4. After completing these operations, repeat the steps of the previous method. Run cmd
as an administrator, enter “netsh winsock reset
“, and press Enter. Just restart your computer! After restarting again, the black screen problem is basically solved, and I can finally use the Linux system happily
5. There is a pit here, please read on ([BigData] Centos7 system network exception: systemctl status network.service appears LSB: Bring up/down networking and cannot ping Baidu)
Big data environment configuration: Centos7 system network exception: systemctl status network.service appears LSB: Bring up/down networking and cannot ping Baidu
Phenomena:
The computer restarted, and I opened the ssh connection tool as usual to connect to the IP of the black screen virtual machine, but found that the connection could not be made.
After trying N times, I had to open the virtual machine that had no black screen before, and then used the ssh tool to connect, but found that the connection was still not possible.
I was wondering if the dynamic IP had changed since I had not set a static IP, so I opened the virtual machine in VMware worstation and ifconfig
At this time, it was found that ipv4 was not displayed
then start trying
systemctl stop NetworkManager
Still not working, after checking more information
Exception
Exception 1: systemctl restart network
has no effect
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
Exception 2: systemctl status network.service
displays Bring up/down networking
● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: failed (Result: exit-code) since 三 2022-04-06 23:01:58 CST; 11s ago Docs: man:systemd-sysv-generator(8) Process: 3809 ExecStop=/etc/rc.d/init.d/network stop (code=exited, status=0/SUCCESS) Process: 4824 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE) April 06 23:01:58 centos01 network[4824]: RTNETLINK answers: File exists April 06 23:01:58 centos01 network[4824]: RTNETLINK answers: File exists April 06 23:01:58 centos01 network[4824]: RTNETLINK answers: File exists April 06 23:01:58 centos01 network[4824]: RTNETLINK answers: File exists April 06 23:01:58 centos01 network[4824]: RTNETLINK answers: File exists April 06 23:01:58 centos01 network[4824]: RTNETLINK answers: File exists April 06 23:01:58 centos01 systemd[1]: network.service: control process exited, code=exited status=1 April 06 23:01:58 centos01 systemd[1]: Failed to start LSB: Bring up/down networking. April 06 23:01:58 centos01 systemd[1]: Unit network.service entered failed state. April 06 23:01:58 centos01 systemd[1]: network.service failed.
Cause of the problem: VMware NAT service
service is not enabled on the win
system
The Centos7
system relies on the hardware environment virtualized by VMWare on Windows
. The hardware environment itself is virtualized but is actually the hardware environment of Windows
Assignment, the VMware NAT service
service process is closed in the Windows system service, causing the virtual machine to be unable to start the NAT network mode.
Solution:
1. Start Task Manager
In win10
system press win + x
to select Task Manager
2. Select the service item to open VMware NAT service
3. Restart the network and check the network status
systemctl restart network
systemctl status network
4. Problem verification
4.1 Centos7
There is a network connection logo in the upper right corner of the desktop
4.2 Terminal performs Baidu URL ping
test
3. It may be that the machine does not support virtualization or the virtualization function is not turned on
4. Change virtual machine settings:
Set the memory of the virtual machine in question to 2G, and check the following two items in the “Processor” settings:
5. Update or reinstall VMware (what I encountered)
Since this error cannot be avoided even when creating a new virtual machine, it may be that some settings of VMware have been changed due to previous errors. Try updating the VM, or reinstalling it, then reboot and run VMware as administrator.
6. If starting the virtual machine from the “suspended” state fails, it may be that the location of the ISO image file mounted with the “CD/DVD” option in the virtual machine settings has been changed
As shown in the figure, the mounted image file cannot be modified in the suspended state. I retrieved the original file and it can start normally.
Above are some solutions. Everyone is welcome to add to it in the comment area, and try to solve the problem in one blog. Don’t waste a lot of time on countless similar articles like me.
2. CentOS7 cannot enter the graphical interface. Black screen, only one mouse arrow
1. Situation
I installed CentOS7 before and it worked normally. I always used the graphical interface. Then I needed to use yum to update a certain library, so I loaded the yum mirror site and updated yum. Some errors occurred during the update. After troubleshooting, the update was completed, restarted, and a prompt appeared. One day when I needed to use it, I suddenly found a black screen.
2. Phenomenon
After starting up and going to the graphical interface, you can see the login background (only the login background, no login dialog box) and after a mouse click, the screen goes black.
1. Can enter tty2
I use ctrl + alt + F2
. Under the bash
of the root
account, I can use yum upgrade
to upgrade the entire Upgrade the system and then restart.
I found that a graphical interface appeared, but after a while it became the mouse image above.
After restarting, I was pleasantly surprised to find that the kernel version was upgraded from 3.10 (2XX) to 3.10 (3XX), and I was able to enter Gnome.
I’m so happy, I’m telling you, it saves you the trouble of reinstalling the system.
I can’t finish the update. Still black screen.
2. Solution
Method 1: Manually switch to the tty7
terminal, CTRL + ALT + F7
.
Method 2: In the tty1
terminal, delete the /tmp/.X0-lock
file, and then use # startx
to start X Window
code>.
Method 3: Download rhgb-0.16.4-3.fc6.i386.rpm
and update it, or use # yum update rhgb
to update
Note: Sometimes after executing method one, you still cannot enter the graphical interface. In this case, you can continue to execute method two. If it still doesn’t work, you can continue to execute it.
CTRL + ALT + F1
and CTRL + ALT + F7
are sufficient. This is recent experience.
3. You can try this (the solution to CentOS7 being unable to enter the image interface), but it is not the final solution:
Question:
After the CenOS7 installation is completed, entering init 5 /startx
on the command line cannot enter the image interface.
Reason:
When installing the centOS7
server version, the system will not install the GUI
graphical interface program by default. This requires manual installation of the CentOS7 Gnome GUI
package.
Solution:
After installing CentOS7 and normal networking
1. Use the command yum
to check whether yum
can be used normally
2. Use the command yum groupinstall “GNOME Desktop” “Graphical Administration Tools”
to obtain and install the CentOS
default graphical interface GNOME
package
Note: If an error occurs during installation, for example, it is prompted that the package file xxx.noarch in a certain directory conflicts, use the command yum -y remove xxx.noarch to remove the conflicting file, and then use the command yum groupinstall "GNOME Desktop " "Graphical Administration Tools" installs the GNOME graphics module
During the process, there will be a prompt similar to “… is ok? (Y/N)”, just select Y and press Enter. Then just wait for the installation. . . Until it prompts “Finished!”, it means that the installation of the GNOME package has been completed.
3. Modify CentOS default startup mode to graphical mode
systemctl get-default
can view the current default mode as multi-user.target
, which is the command line mode
systemctl set-default graphical.target
changes to graphical interface mode
Modify mode command:
systemctl set-default graphical.target # Change the default mode to graphical interface mode systemctl set-default multi-user.target # Change the default mode to command line mode
systemctl get-default
can view the currently modified default mode as graphical.target
, which is the graphical interface mode
4.reboot
Restart CentOS
and check the GUI
interface effect
Click the login user avatar area and enter the password to log in.
According to the normal method, it is like this, but in the end I still failed to enter the graphical interface.
Do not you know why
4. The solution for installing centos7 shows that the installation is successful, but the graphical interface cannot appear after restarting
1. Think about which one you choose when pretending
Server with GUI, GNOME desktop, KDE, etc. Make sure you select the desktop when choosing.
2. Execute Ctrl + Alt + F1
test
3. If it still doesn’t work, try executing the following command
yum groupinstall “GNOME Desktop” “Graphical Administration Tools”
Change the runlevel afterwards
ln -sf /lib/systemd/system/runlevel5.target/etc/systemd/system/default.target
Then restart the test.
5. Solve the problem that only the desktop wallpaper and mouse are displayed after logging in under Linux, and no other problems are displayed
Error report:
7th generation CPU
installs Ubuntu
, error Hardware error
Phenomena
1. Just started the installation
Select Install Ubuntu
, do not press Enter first, press e
to enter the editing mode, add nomodeset
after quiet splash
Then you can install the Ubuntu
system normally. At first, it felt smooth. The installation was fine.
2. But sometimes I restart to enter the login interface
After entering the password to log in, only the wallpaper and mouse are displayed but not the desktop. Pressing any keys is useless.
The console cannot be opened either. The mouse can be moved but cannot be right-clicked, and the console cannot be opened. I have tried many methods online but to no avail. At first I thought it was due to the graphics card driver.
I tried it later but to no avail.
3. It suddenly occurred to me that I had set the grub
startup settings
when installing the system.
So I took a look, and in the grub
interface, press e to enter the startup settings of Ubuntu
.
It was still quiet splash
, so I thought about adding nomodeset
and found that I could go in directly. (In fact, you can also enter the desktop in recovery
mode)
I thought I couldn’t change it every time, so I checked if I could change this setting directly in the system.
1. After entering the system, edit the file ”'/etc/default/grub
”’ (administrator rights sudo
required).
Ubuntu
>Open the terminal and enter sudo vi /etc/default/grub
2. Find this line:
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
change into:
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash nomodeset”
3. Update GRUB: sudo update-grub
After restarting, you can enter the desktop normally again.
Tina Run Run
Summary of solutions to black screen when VMware opens centos
Never the same again, young man’s journey~
Solve the problem of black screen after booting CentOS7 in VMware virtual machine
little hun
Solution to CentOS7 being unable to enter the image interface
Endless kites flying
Solve the problem under Linux that only the desktop wallpaper and mouse are displayed after booting and logging in, and no other problems are displayed.
GSWJ
CentOS7 cannot enter the graphical interface. Black screen with only one mouse arrow.
Quantify Mike
[BigData] Centos7 system network abnormality: systemctl status network.service appears LSB: Bring up/down networking and cannot ping Baidu