How to fix grub in Ubuntu?

We’ll go through the actual process of getting your system to boot successfully by restoring the GRUB bootloader in Ubuntu in this guide. Now, we’ll see the required steps to fix grub in Ubuntu –

Step 1: Boot the system using Live CD/USB

First, we need to boot the internal system using Live CD/USB for better performance.

  • Insert the live Ubuntu CD/USB > Boot the system with it.
  • Select the Boot device from the system’s BIOS or UEFI menu.

Step 2: Open the system Terminal

Next, we need to open the system terminal for further processing.

  • Find out the already installed Linux partition > Use lsblk or fdisk command.
#bash
sudo fdisk -l
  • Look into Linux partition type > Note the required device name.

Step 3: Process the Root Partition system

After that, we need to process or mount the root partition system to follow the proper process.

  • Replace the sda1 with the name of the required device.
#bash
sudo mount /dev/sda1 /mnt

Step 4: Reinstall the GRUB initialization

The process of reinstalling the GRUB depends on the user’s preferences.

  • If users are using BIOS, then follow the below-mentioned command:
#bash
sudo grub-install --boot-directory=/mnt/boot /dev/sda1
  • If users are using UEFI, then follow the below-mentioned command:
#bash
sudo mount /dev/sda1 /mnt/boot/efi sudo grub-install --boot-directory=/mnt/boot --efi-directory=/mnt/boot/efi --removable /dev/sda1

Step 5: Update the GRUB initialization

To add all of your machine’s operating systems to the GRUB menu, follow these steps:

#bash
sudo chroot /mnt update-grub exit

Step 6: Reboot the System

Restart your computer after removing the live CD or USB. You should be able to choose which operating system to boot now that GRUB has displayed the menu.

sudo reboot

Also Read

How to Fix GRUB in Ubuntu?

One of the most important parts of Linux systems, including Ubuntu system software, is the GRUB (Grand Unified Bootloader), which controls the internal boot process. A live Linux distribution can be used to recover the overall Linux operating system if the GRUB bootloader has been corrupted or erased by the system. The GRUB bootloader may occasionally get corrupted or destroyed as a result of system updates, configuration modifications, or other causes, making it unable to boot into Ubuntu.

In this article, we will discuss how to fix grub in Ubuntu by using some simple processes.

Similar Reads

How to fix grub in Ubuntu?

We’ll go through the actual process of getting your system to boot successfully by restoring the GRUB bootloader in Ubuntu in this guide. Now, we’ll see the required steps to fix grub in Ubuntu –...

Conclusion

For Linux users, knowing how to restore the GRUB bootloader in Ubuntu is crucial, particularly when problems with booting arise. You may effectively fix GRUB and get back into your Ubuntu system by following the detailed instructions provided above. To prevent unexpected outcomes, always double-check commands and device identifiers. Your Ubuntu installation will start up without a hitch if your GRUB bootloader is working properly, letting you get on with your job uninterrupted....

How to fix grub in Ubuntu – FAQs

How to fix the internal GRUB error in Ubuntu?...

Contact Us