Centos8 startup reported error

Record the errors reported by Centos8 during startup and the solutions

Startup error 1:

Note: in this case, it means that the Centos8 service has been started, but there is a problem with the interface startup. At this time, it can be used (xshell connection) and the service can be accessed.

Solution 1:

1. Use xshell and other software to connect: set the command line to start to enter the service

1.1. Check the current startup mode

systemctl get-default
multi-user.target(Command line terminal)
graphical.target(Graphical interface)

2. Change the system startup mode through the command:

systemctl set-default graphical.target Set the default startup as graphical interface. After restarting, the interface will automatically be a graphical window
systemctl set-default multi-user.target Switch back to the command interface to start.

3. Restart to enter the command line mode

Solution 2: re enter the interface version mode

1. Execute the command:

startx

2. Error reporting

At this time, the interface can be accessed as follows (but restart or something can't be used again. And it can't be remotely)

Solution 2

1. Update it first

 yum update

2. Installation service

yum groupinstall "Server with GUI" -y

3. The following information appears:

4, Set GDM boot

1. Check whether gdm.service is started. It is found that GDM service is not started.

[root@localhost ~]# systemctl status gdm
● gdm.service - GNOME Display Manager
   Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

2. Set gdm startup as follows and start the service immediately:

[root@localhost ~]# systemctl enable gdm --now


3. Next, set the startup level of CentOS8 to graphical.target

[root@localhost ~]# systemctl set-default graphical.target 
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target ¡ú /usr/lib/systemd/system/graphical.target.

[root@localhost ~]# systemctl get-default 
graphical.target

5, Enter GNOME3 desktop

After setting the above configuration, restart the operating system. Enter the system interface:

Startup error 2: druct:/#

1, Solution 1:

1. My CentOS 8 boot has two kernels. The first is the new kernel (the default is the first one)
The second is the old kernel, which may be caused by the mismatch between the new kernel and the system

2. Log in to the server with the old kernel and check the current system kernel version:

$ uname -r
4.18.0-193.6.3.el8_2.x86_64

3. Check the installed kernel:

$ rpm -qa | grep kernel

As follows:

kernel-core-4.18.0-193.6.3.el8_2.x86_64
kernel-modules-4.18.0-147.5.1.el8_1.x86_64
kernel-ml-modules-5.7.7-1.el8.elrepo.x86_64
kernel-devel-4.18.0-147.5.1.el8_1.x86_64
kernel-4.18.0-80.el8.x86_64
kernel-tools-libs-4.18.0-193.6.3.el8_2.x86_64
kernel-core-4.18.0-80.el8.x86_64
kernel-4.18.0-147.5.1.el8_1.x86_64
kernel-modules-4.18.0-80.el8.x86_64
kernel-4.18.0-193.6.3.el8_2.x86_64
kernel-tools-4.18.0-193.6.3.el8_2.x86_64
kernel-ml-5.7.7-1.el8.elrepo.x86_64
kernel-headers-4.18.0-193.6.3.el8_2.x86_64
kernel-core-4.18.0-147.5.1.el8_1.x86_64
kernel-devel-4.18.0-193.6.3.el8_2.x86_64
kernel-modules-4.18.0-193.6.3.el8_2.x86_64
kernel-ml-core-5.7.7-1.el8.elrepo.x86_64

Delete the useless kernel:

yum remove  Kernel version
$ yum remove kernel-core-4.18.0  kernel-devel-4.18.0  kernel-tools-libs-4.18.0 kernel-headers-4.18.0

Just restart

Error 3 during startup: keep turning around

It may be that the place reported an error, as the startup failed and stuck. However, remote connection is still possible (such as xshell connection) and services can also be accessed

1. Use the command:

startx

2. Errors are reported as follows:

3. At this time, it is found that the interface appears as follows (but the restart interface turns around as above)

solve:

1. Update the system

 yum update

2. Use the command to view the service of your interface version

[root@localhost ~]# yum grouplist

3. My are as follows:

4. Installation service

yum groupinstall "Server with GUI" -y

5. The following information appears:

6. Set GDM startup

1. Check whether gdm.service is started. It is found that GDM service is not started. (don't worry if you start it. Just set the startup mode directly - see Step 3)

[root@localhost ~]# systemctl status gdm
● gdm.service - GNOME Display Manager
   Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

2. Set gdm startup as follows and start the service immediately:

[root@localhost ~]# systemctl enable gdm --now

Start as shown in the figure:

3. Next, set the startup level of CentOS8 to graphical.target

[root@localhost ~]# systemctl set-default graphical.target 
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target ¡ú /usr/lib/systemd/system/graphical.target.

[root@localhost ~]# systemctl get-default 
graphical.target

4. After setting the above configuration, restart the operating system. Enter the system interface:

The above is my Centos8 startup process and solutions

Keywords: Linux Operation & Maintenance CentOS

Added by frans-jan on Tue, 21 Sep 2021 05:33:20 +0300