1. Home
  2. Linux

Ubuntu: Grub repair [Guide]

Do you have a Ubuntu Linux PC that you can’t boot because of the Grub bootloader’s problems? We can help! Follow along with this guide as we go over how to repair Grub.

Note: although this guide assumes the user is repairing the Grub bootloader for Ubuntu, Boot Repair can fix almost any Linux operating system running Grub. Feel free to follow along with the guide even if you’re not an Ubuntu user!

Ubuntu live USB

Repairing Grub in Ubuntu requires the Ubuntu live USB. Locate the Ubuntu live USB you used to install Ubuntu on your desktop computer or laptop and plug it into the USB port.

If you no longer have the Ubuntu live USB available, you will need to create a new one. Follow the step-by-step instructions to create a new Ubuntu live USB quickly.

Step 1: Go to another working PC that you can use in place of your broken Ubuntu PC. You will need a PC to create a bootable Ubuntu live USB.

Once on the spare PC, head over to Ubuntu.com, click on the “Download” button. Then, find the “Desktop” section on the website, and click on it. Then, download the latest version of Ubuntu to your PC.

Step 2: When the Ubuntu ISO file is done downloading to your  PC, head over to Etcher.io, download the latest version for your operating system, and open it up. Etcher works on Windows, Mac OS, and Linux.

Step 3: With Etcher open, find the “Flash from file” button in the app and click on it. Then, select the Ubuntu ISO file in the pop-up window.

Step 4: Plug your USB flash drive into the USB port. Find the “Select” target button, and click on it. After that, select your USB flash drive in the “Select target” area.

Step 5: Find the “Flash!” button in Etcher and click on it to flash Ubuntu to the USB flash drive. Keep in mind that this process may take a couple of minutes to complete.

Booting into the Ubuntu live installer

Before you can repair the Grub bootloader on your Ubuntu Linux system, you must boot into the Ubuntu live installer. To do that, take the Ubuntu USB and plug it into your Ubuntu PC. Then, configure it to boot from USB in the BIOS to load up the Ubuntu live installer.

Once the installer is loaded up, you will see a welcome screen. On this welcome screen, there are two options. Locate the “Try Ubuntu” option. By selecting this option, you will be able to load up an Ubuntu live environment directly from the USB flash drive without installing anything.

Install Boot Repair on Ubuntu live installer

Repairing your Ubuntu Grub bootloader requires installing a unique piece of software. This software is known as “Boot Repair.” This software needs to be installed on the Ubuntu live environment to fix Grub.

To start the installation of Boot Repair in the Ubuntu live environment, open up a terminal window. To open up a terminal window in the Ubuntu live environment, press the Win key on the keyboard and search for “terminal.” Or, press Ctrl + Alt + T on the keyboard.

Once the terminal window is open and ready to use, it is time to start installing Boot Repair. The first step is to add the Boot Repair PPA. To add the Boot Repair PPA, make use of the following add-apt-repository command below.

sudo apt-add-repository ppa:yannubuntu/boot-repair

With the Boot Repair PPA added to the Ubuntu live environment, you must run the update command. This command will refresh the Ubuntu live environment’s software sources.

sudo apt update

Finally, install the Boot Repair software on the Ubuntu live environment by using the apt install command below.

sudo apt install  boot-repair

Ubuntu grub repair

Once Boot Repair is installed in the Ubuntu live environment, the repair can begin. To repair your Ubuntu PC’s Grub bootloader, follow the step-by-step instructions outlined below.

Step 1: Launch the Boot Repair application as root using the sudo boot-repair command below.

sudo boot-repair

Allow the Boot Repair application to start up. When it does start up, a loading screen will appear. This loading screen indicates that Boot Repair is scanning your computer for any traces of Grub. Please allow it to scan.

Step 2: When the scanning is complete, the Boot Repair UI will appear. In this UI, you will see a few buttons. Find the button that says “Recommended repair (repairs most frequent problems) and click on it with the mouse.

Step 3: Boot Repair will begin repairing the Grub bootloader on your Ubuntu PC. Please allow it to repair. During the repair, a window may appear, and you may be asked to enter commands into a terminal window. If this happens, open up a second terminal window and do so.

Step 4: When the repair is complete, close the Boot Repair app, and reboot your Linux PC. From here, your Grub bootloader should appear again, and you’ll be able to access Ubuntu! Enjoy!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.