How To Fix Kali Linux Bad Archive Mirror Problem?

Many users face a common issue when they want to install Kali Linux or other Linux distros: the Bad Archive Mirror error. You may also face this error when trying to upgrade Kali Linux.

No worries because this article will show you what this error is, why it happens, and how you can resolve it on Kali Linux.

Let’s get started!

What is a Kali Linux Bad Archive Mirror?

Bad Archive Mirror is a common problem that occurs when you try to install Kali Linux. On a particular window, the installer asks you to choose a mirror from a list to download the components for the OS.

Kali Linux Bad Archive Mirror

The mirrors depend on the country location you chose previously.

When you choose a mirror and try to proceed, the system shows you the bad archive mirror error.

Why this Error Occurs

It’s good to know the reasons that cause a bad archive mirror. It makes it easier to diagnose the problem and plans a solution.

The most possible reasons are as follows-

  1. You specified the incorrect mirror.
  2. The mirror you chose isn’t available. This can happen due to unreliable network connections.
  3. The mirror you chose is broken. This can be the result of an invalid Release file.
  4. The mirror you chose doesn’t support the correct Kali Linux version.

If you’d like to learn more about why the error occurred in your particular case, you can check out the file at /var/log/syslog.

Alternatively, you can go to Virtual Console 4. To do so, depending on your VM, press Alt+F4 or Ctrl+Alt+F4.

Now that you’re aware of the Bad Archive Mirror on Kali Linux and why it happens, let’s move on to how we can fix this issue.

Related: Best laptops for White Hat hacking

Fixes to Bad Archive Mirror on Kali Linux

Fix 1: Don’t Use A Mirror For Installing Kali Linux

If you’re currently on the bad archive mirror window of the installer, press the Go Back button at the bottom right of the window.

The installer will tell you that no network mirror has been selected, and if you don’t choose a mirror, you will end up with only a very minimal base system.

You will be given a prompt asking whether you want to continue without a network mirror or not. From the options, choose Yes and press Continue.

Process Without A Network Mirror
Continue the process without a network mirror.

This will start installing the GRUB bootloader. Continue from there until the full installation is finished.

Since you only installed a minimal version, it’s best to update your system now. To do so, open the terminal. It’s the black box icon with a dollar sign.

Type the following commands in your terminal:

sudo apt-get update

This command updates the package lists. Wait a bit till it finishes. Now type this command.

sudo apt-get upgrade

This command downloads and installs the updated packages.

Finally, reboot your device.

sudo reboot

Fix 2: Use An Alternative Mirror

When installing Kali Linux, when you arrive at the window to choose a mirror, pick a different mirror than the one that gave you the Bad Archive Mirror problem.

Depending on your location, you should have a bunch of mirror options. Keep trying each one until you don’t receive the error.

If you got an error for every available option, proceed to the next step.

Fix 3: Change Your DNS Settings

Sometimes your router’s DNS IP may block the repositories you need to connect to in order to install Kali Linux. In such cases, you can make some small changes to your DNS settings.

To do so, press Alt+F2 or Ctrl+Alt+F2 to open a new TTY window.

Remove the configuration using this command:

rm /etc/resolv.conf

Now type this command:

echo "nameserver 8.8.8.8" > /etc/resolv.conf

Lastly, use this command:

echo "nameserver 8.8.4.4" >> /etc/resolv.conf

Now check your configuration with this command:

cat /etc/resolv.conf

Check if it is similar to this(contains the last two lines)

Name Server Change

If so, you’ve successfully changed your DNS settings. Now go and try to install Kali Linux and see if the problem has been resolved or not.

Fix 4: Wrong BIOS Time

Another reason you’re getting a bad archive mirror is because your computer’s BIOS time is out of sync.

To fix your BIOS time(hardware clock), use this command below:

sudo hwclock --systohc

This changes your hardware clock to match your system clock.

Now try to install Kali Linux to see if the issue comes back or not.

Fix 5: Change The Network Connection Of The VM

The last fix we have for you is to tweak the network connection of your Virtual Machine.

Before installing Kali Linux, change your Virtual Machine’s network from NAT to Bridged Adapter.

If you’re using Oracle VirtualBox, then follow along with us. For other VM software, it’s more or less the same process.

  1. Turn on your VM.
  2. Select the OS you want to change the settings of from the left panel.
  3. Go to MachineSettings
Kali Linux VM Settings
VirtualBox Settings
  1. Choose Network on the left panel.

  1. From the ‘Attached to’ dropdown menu, pick Bridged Adapter.
  2. Press Ok and close it.

The NAT setting provides a different subnet for your VM than your host computer. On the other hand, the Bridged Adapter setting makes your VM use the same network as your host computer.

In other words, your VM and host will have separate IPs with NAT, and with the Bridged Adapter, both will have the same IP.

Try to install Kali Linux and see if the problem still exists.

Conclusion

This article shows you everything you need to know to fix the Kali Linux bad archive mirror error many users face while installing the OS or other apps. We made sure every fix was up to date and working. These are tried and tested fixes that we hope will fix your error too.

If any of the above solutions did not fix the Windows PC issues, we recommend downloading the below PC repair tool to identify and solve any PC Issues.

Dinesh is the founder of Sysprobs and written more than 400 articles. Enthusiast in Microsoft and cloud technologies with more than 15 years of IT experience.