Site icon LinuxAndUbuntu

[Fixed] Kali Linux Stuck At Black Screen On Boot

Kali Linux Stuck At Black Screen On Boot

Kali Linux Stuck At Black Screen On Boot

Kali Linux is the best Linux distribution for penetration testing. It has almost every tool you need to test your system against hundreds of vulnerabilities.

Recently, I saw a few questions floating around the internet about Kali Linux not being able to boot correctly. To run into the problem, I made a Kali Linux bootable USB and booted it into live mode with the USB. The system stuck on a screen on boot.

Though I was able to select and boot into the graphical installer.

kali Linux boot menu

I installed Kali Linux using a graphical installer. Everything went okay, but the newly installed Kali won’t continue from the black screen.

After some tests and tinkering with the I found out that this is related issue. The default graphics drivers do not support my system hardware.

I also noticed that the issue mostly occurs with modern PCs. I installed kali on my old PC, and it booted without any problems.

Install Graphics drivers

First of all, install Kali Linux using a graphical installer. After the installation has run successfully, reboot your computer, eject the USB drive, and boot from the hard drive.

On the grub menu, select Kali Linux and press [Tab] or [e] to edit the grub settings. Now search for the line that starts with ‘‘ and ends with ‘quiet splash’ or ‘splash’.

Found the line? Good. Now add the following parameter to this line. Give a space and type this –

xxxx.modeset=0

Where xxxx = the name of your graphics card.

xxxx value based on your graphics card

nouveau or nvidia for Nvidia cards
radeon for / cards
i915 for intel based motherboards
r128 for every old rage 128 cards

For example, I have Nvidia, so I added the following parameter to the line.

nvidia.modeset=0

After this, press CTRL+X to boot with the added settings. If it works for you, then you’re good. Unfortunately, this step did not work for me.

If the above step did not work for you, no problem. It has brought you to a screen with many lines of commands it executed to start your system. From here, press F3.

It’ll bring you to a terminal asking for your username. Now type the username as ‘root’ and enter the password you set while installing the distro.

We’ll now install the drivers manually. Do not worry; it’s simple. First of all, connect to the internet. If you use a LAN cable to connect to the internet, then skip this step.

Connect to wifi network in Kali Linux command line

There are various command-line tools to connect to a wifi network. For this tutorial, we can use iw. It is quick and easy to use.

Scan available wifi networks –

iw dev device_name scan

Connect to open wifi network –

iw dev device_name connect ssid

Connect to password protected wifi network –

iw dev device_name connect ssid ssid_password

Where ‘ssid’ & ‘ssid_password’ is the wifi name and password, respectively.

device_name is the name of your wireless card set by the operating system. Use iwconfig to find your wifi card name.

For more information on how to connect to wifi using CLI, visit this article on LAU.

Upgrade to a faster Kali Linux repository

You wouldn’t install any package if you did not configure the repository during the Kali Linux installation process.

Visit the following link and get the fastest repository from your location.

Use apt to edit the apt-source file.

apt edit-sources

Execute the above command and select nano to edit the sources file. Delete the Kali repository and add the new repository that you got from the above link.

deb http://kali.download/kali kali-rolling main non-free contrib

In the above line, replace the URL with the URL you got above.

Now update the system.

sudo apt update

Your system should now update pretty fast after adding a repo located near you.

Install graphics drivers

You are now ready to install graphics drivers. In this article, I will only show you to install drivers for Nvidia and AMD. If you are using any other graphics drivers, let me know in the comment section below, including that.

Install Nvidia drivers in Kali Linux

sudo apt install nvidia-drivers-390

If you want to install 418 or 430, simply change it in the above command.

You can also follow a detailed article I have written covering Nvidia drivers installation in Linux.

For installing AMD drivers, please visit the official guide for installing AMD drivers in Linux.

Conclusion

And that’s it. After installing the correct graphics drivers, your Kali Linux installation will boot into graphical mode without any problems.

If you have any problem with any step mentioned above, do not hesitate to drop it in the comment section below. I will reply ASAP.

Exit mobile version