Having trouble booting linux? Try these tips and tricks

We are always used to it is that, when we press the button on the computer, the POST, or BIOS boot, is executed, and immediately afterwards our operating system begins to load . In a few seconds we will be at the login screen, after which we will see the desktop and we can start using the computer. However, neither Linux, nor any other operating system, is perfect. Therefore, it is very likely that we will find that our operating system does not start. In that case, what can we do? Well, learn how to troubleshoot Linux with these tips.

Linux does not usually give as many problems when starting as Windows, since, badly, even if we do not reach the desktop, at least we can load a basic TTY from which to repair the system. However, it may fail. And the most common failures that can cause this system to not boot are either the boot loader (GRUB) or hard drive failures.

Next, we are going to see what these main problems are and how we can solve them.

Reasons Linux Boot May Fail

It has always been said that Linux is much more stable than its rival, Windows. However, this does not mean that Linux never fails, but simply that it is more complicated to happen. But when it happens, it is also often more difficult to fix.

The reasons why the boot of our Linux distro may fail are, among others:

  • A problem with the hard drive’s boot partition.
  • A bad kernel update.
  • A badly applied patch on the system that makes it unable to finish loading.
  • If we have Dual-Boot, Windows may have configured the MBR as the main boot loader.
  • A bad GRUB configuration.
  • A bad BIOS / UEFI configuration, not pointing to the correct partition.

The good thing about Linux is that practically everything can be solved easily, either from Safe Mode or from another Live distro. We will rarely have to reinstall the system from scratch.

Next we are going to see how to solve the main problems that we can find.

Solution to Linux boot problems

Check that there are no problems with the PC hardware

First of all, it is very important to make sure that the problems are not related to the PC hardware . The most common is that the hard drive begins to fail (especially if it is mechanical), or we may have problems with the board, RAM or power supply.

If we get to GRUB, for example, we can launch Memtest to check the integrity of the RAM and the CPU. But if we want to know the status of the hard disk, for example, we will have to resort to other specialized programs that allow us to see the SMART of the disk. And for this, we can load an Ubuntu Live from RAM to avoid going through the hard disk.

Linux bootloader problems

When we install a Linux distribution, it usually installs a boot loader that will allow us to choose the version, or tool, that we want to load. The most common and used is GRUB. This bootloader allows us to load Linux, a different operating system (if we have, for example, Windows in Dual-Boot), run Memory Test (to see if the RAM is in good condition) or run other advanced tools and recovery tools. the distro in question.

If we only have one system installed, surely we will not see GRUB, since it will start the main system automatically by default. However, there are many reasons why this boot can be corrupted, for example a kernel update, or setting an old kernel that we have removed to boot.

If our Linux stops booting, we can hold down the Shift key of the PC while loading to be able to see this GRUB screen. Here we will see all the systems that we have installed, and we will be able to navigate through them using the keyboard arrows.

We can try loading a different kernel version to see if it works. And even if we use Dual Boot we will verify that we can boot this operating system. However, if GRUB does not appear, then the fault will be with the partition manager.

Repair GRUB with Boot-Repair

If we can’t boot Linux, how can we repair the boot? The answer is very simple: using a Live system, for example Ubuntu. Live systems are loaded into RAM so that they can be run without installing anything on the hard drive. Once loaded, it will have access to all the disks and all the resources of the PC, so we can use specific tools, such as Boot-Repair, to repair problems.

We will open a terminal and install this tool to repair GRUB by executing the following command:

sudo apt-add-repository ppa:yannubuntu/boot-repair && sudo apt update && sudo apt install -y boot-repair

Once the tool is ready, we execute it with the ” boot-repair ” command and let it analyze our system. The program will be able to detect all the operating systems that we have installed on our computer and will give us the option of applying a recommended repair. We choose it, we wait a second and that’s it.

We apply the changes, restart the PC and that’s it. Now we can see our GRUB again, and all the systems installed on the PC. We select the one we want to start and voila, everything should work normally again.

Troubleshoot Linux Boot

If we can see GRUB, choose the operating system, and where the problem is is in the boot process, then we must resort to other tools to help us solve it. This can happen, for example, when a package is incorrectly installed, or a file on the system is corrupted.

Among the entries that we can find in GRUB we will find a call « Advanced options «. In it we can find different entries, depending on the kernel we have installed, and a “Recovery” mode for all kernels. We can try to start an older version of the kernel to see if it works, but what we are going to explain is how to solve the problems of the latest version.

Within these advanced options, we will choose the Recovery Mode of the latest version of the Kernel. After a few seconds of loading, we can see a screen like the following one with a series of options.

The ones that interest us are:

  • fsck – Scans the hard drive and fixes any errors it finds. It is the Windows equivalent of chkdsk.
  • clean: frees up unnecessarily used space on the PC.
  • dpkg: fix broken, blocked or improperly installed packages.
  • grub: allows us to update the bootloader.

We execute all these options to check, release, repair and update our Linux and its boot loader, and that’s it. When we finish, we can restart the PC and see if it starts up again.

Reinstall Linux (and keep the data)

If we continue to have problems, it may be time to reinstall our operating system . Many of the distros, such as Ubuntu, have the option of reinstalling only the operating system, keeping all personal data (documents, music, photos, videos, etc.) intact, and even the applications that we have already installed.

In the installation wizard we must choose the option to keep our data so that it is not deleted from the PC . However, if we have a backup, we can also do a complete installation, from scratch, to make sure that all problems are solved.

In addition to reinstalling the entire operating system, the GRUB boot loader will automatically rebuild and reinstall.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button