How does the grub menu solve the booting problem

Knowing the grub menu is important if you face issues while booting your machine. GRUB is a powerful boot loader that allows you to load multiple operating systems such as windows, ubuntu, Linux, etc.

There could be various reasons when your system doesn’t start properly, and at times even machines don’t boot, that’s a huge problem! To solve that, one of the keys is to check the grub menu and bios settings.

In this tutorial, you will learn, step by step, how knowing about the grub menu along with bios setting solves the booting problem.

Let’s begin!

Prerequisites

This tutorial will assume you have any Ubuntu version, such as Ubuntu 14.04 or the latest Ubuntu 21.04, which you will need to perform the testing and fix.

Checking and performing BIOS update

BIOS is the first software program to load in the system. If your system cannot boot even with a LIVE DVD or USB Drive, there could be two possibilities either you accidentally deleted the boot device, or It’s a hardware issue. To solve the boot issues, the first thing you could do is try to restore the BIOS settings or do a bios update.

To restore the BIOS settings or bios update, follow the below steps:

  • First step is to restart or Power the system on and quickly press the “F2” button until you see the BIOS setting menu.
  • Next, restore BIOS settings to default settings or, set “Reset Config Data” in BIOS
  • Once you select the default setting, you will hear a beep tone.
  • Finally restart the system.

Related: Windows Boot Process Step by Step

Checking GRUB menu

In the previous section, you learned that if you cannot boot with DVD/USB or a hardware issue, consider replacing hardware or changing the BIOS Settings, which is the first step. But If you can turn on the computer and get past the initial BIOS startup, consider checking the GRUB menu.

A few things might have been overwritten or caused corruption in the system, which can be solved using the recovery mode within the GRUB menu. To recover from the above problems, follow the steps as shown below:

  • Press the Shift key after the BIOS to access the GRUB menu and select the Advanced Options for Ubuntu menu from the downdrop list.
Accessing the GRUB menu and selecting the Advanced Options for Ubuntu menu
Accessing the GRUB menu and selecting the Advanced Options for Ubuntu menu
  • Further from the Advanced options menu, select an entry with the words recovery mode which boots the machine into a recovery menu with options to automatically fix several possible problems, or at least it lets you boot into a minimal recovery-mode version of Ubuntu with only the most necessary processes loaded. From here, you may be able to fix disks, check file systems, drop to a root prompt to fix file permissions, and so on.

As you can see below in the image, there are two additional options for every kernel: upstart and recovery.

  • (upstart): an event-based replacement for the /sbin/init daemon, which handles starting tasks and services during boot, stopping them during the shutdown, and supervising them while the system is running.
  • (recovery mode): to recover the kernel from any failures in the system.
Displaying of kernels in GRUB menu
Displaying of kernels in GRUB menu

Reinstall GRUB

Earlier in the previous section, you learned how to check the GRUB menu and fix the corruption of file systems or kernels, etc. But what if you cannot bring up the GRUB menu then reinstalling GRUB is your last resort.

To reinstall GRUB perform the below steps as mentioned below:

  • Boot the Ubuntu machine from a live DVD or bootable USB drive that has the same Ubuntu release as your system, such as 16.04. To find the ubuntu release run below command.
lsb_release -a
Command to check ubuntu release version
Command to check the ubuntu release version
  • To determine the boot drive on your system open a terminal and run below command to list the drives attached to the system.
sudo fdisk -l
Command to check drivers attached to the system
Command to check drivers attached to the system
  • Next, search for an entry in the output with an * in the boot column. This should be the boot device which will be similar to something like /dev/sda1.
  • Now, mount the Ubuntu partition at /mnt by replacing /dev/sda1 with the information you just found.
sudo mount /dev/sda1 /mnt
  • Next, reinstall GRUB by replacing /dev/sda1
sudo grub-install --boot-directory=/mnt/boot /dev/sda1
  • Finally, restart the computer, and Ubuntu should boot properly.
Ubuntu restart network
Ubuntu restart network

Conclusion

In this critical post, you learned how to bring back an ubuntu machine that didn’t boot using different stages such as Checking and performing BIOS updates, Checking the GRUB menu, and reinstalling the GRUB that you should consider to recover them in the future.

Now, you are pro in fixing the ubuntu machine that doesn’t boot, so which method will you plan to check first while troubleshooting the issue.