Environment: Debian 9.6 64 bit
0. Make sure Debian can connect to the Internet
1. apt install x-window-system-core gnome-core #Install the most basic gnome graphics related software
2. init 6 #Set the system to start with a graphical interface, the system will restart after the command is executed
3. Set the system to be able to log in as root
1) Modify the /etc/gdm3/daemon.conf file and add a line AllowRoot = true under [security]
2) Modify the /etc/pam.d/gdm-password file and comment out auth required pam_succeed_if.so user != root quiet_success
3) After restarting the system, you can use root to log in.