Software & AppsOperating SystemLinux

How To Reinstall Grub2 After Installing Windows 11 on Dual Boot System with Ubuntu 18.04

Ubuntu 18

In this guide, we will walk you through the process of reinstalling GRUB2 after installing Windows 11 on a dual boot system with Ubuntu 18.04. This can be a common issue for users who have a dual boot setup and have recently installed or updated their Windows system.

Quick Answer

To reinstall GRUB2 after installing Windows 11 on a dual boot system with Ubuntu 18.04, you can use the Boot-Repair tool or manually reinstall GRUB2. Boot-Repair is a simple tool that can automatically fix boot issues and reinstall GRUB2. If Boot-Repair doesn’t solve the issue, you can manually reinstall GRUB2 by booting into a live Ubuntu session, mounting the Ubuntu partition, and using the chroot command to reinstall GRUB2.

Why Reinstall GRUB2?

The GRUB2 (GRand Unified Bootloader version 2) is a default bootloader for Ubuntu systems. When you install Windows after Ubuntu, the Windows bootloader overwrites GRUB, which makes the system boot directly into Windows, leaving no option to boot into Ubuntu. To restore the dual boot functionality, we need to reinstall GRUB2.

Prerequisites

You will need a live USB or DVD of Ubuntu to follow this guide. If you don’t have one, you can download the Ubuntu ISO from the official Ubuntu website and create a live USB or DVD.

Method 1: Using Boot-Repair

Boot-Repair is a simple tool that can repair frequent boot issues. Here’s how to use it:

Step 1: Boot into Live Ubuntu Session

Restart your computer and boot into the live Ubuntu session using your live USB or DVD.

Step 2: Install Boot-Repair

Open a terminal (Ctrl+Alt+T) and run the following commands to add the Boot-Repair repository and install the tool:

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

Step 3: Run Boot-Repair

Launch Boot-Repair by typing boot-repair in the terminal and hitting Enter. In the Boot-Repair window, click on the “Recommended repair” button. This will automatically reinstall GRUB2 and fix any boot issues.

Step 4: Restart Your System

Once the repair process is completed, restart your computer and remove the live USB or DVD. You should now see the GRUB menu with options to boot into Ubuntu 18.04 and Windows 11.

Method 2: Manual Reinstallation

If Boot-Repair doesn’t solve your issue, you can manually reinstall GRUB2. Here’s how:

Step 1: Boot into Live Ubuntu Session

Restart your computer and boot into the live Ubuntu session using your live USB or DVD.

Step 2: Mount Ubuntu Partition

Open a terminal and run the following command to mount the Ubuntu partition:

sudo mount /dev/sdb4 /mnt

Replace /dev/sdb4 with the correct partition if it’s different in your case.

Step 3: Mount System Directories

Now, mount the necessary system directories by running the following commands:

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

These commands allow the Ubuntu system on the live USB/DVD to access the file systems on the hard drive.

Step 4: Change Root Directory

Change the root directory to the mounted Ubuntu partition:

sudo chroot /mnt

This command changes the root directory to /mnt (your installed Ubuntu system). This means that commands you run will affect your installed Ubuntu system and not the live session.

Step 5: Reinstall GRUB2

Now, reinstall GRUB2 by running the following command:

grub-install /dev/sdb

Replace /dev/sdb with the correct disk if it’s different in your case. This command installs GRUB2 to the specified disk’s MBR.

Step 6: Update GRUB Configuration

Update the GRUB configuration by running:

update-grub

This command generates a new GRUB configuration file based on the installed systems it finds.

Step 7: Exit and Restart

Exit the chroot environment by typing exit in the terminal. Restart your computer and remove the live USB or DVD. You should now be able to boot into both Ubuntu 18.04 and Windows 11 using the GRUB menu.

Conclusion

Reinstalling GRUB2 after installing Windows 11 on a dual boot system with Ubuntu 18.04 can be a bit tricky, but with the right steps, it’s a straightforward process. Whether you choose to use Boot-Repair or manually reinstall GRUB2, this guide should help you restore your dual boot system. Remember to replace the partition and disk names with the correct ones in your case.

Can I use this guide to reinstall GRUB2 on a different version of Ubuntu?

Yes, you can use this guide to reinstall GRUB2 on different versions of Ubuntu, as long as the basic steps and commands are the same.

Can I use Boot-Repair to fix boot issues on systems other than Ubuntu?

Boot-Repair is primarily designed for Ubuntu systems, but it can also be used to fix boot issues on other Linux distributions that use GRUB2 as the bootloader.

What should I do if I encounter an error during the manual reinstallation process?

If you encounter an error during the manual reinstallation process, double-check the commands you entered and make sure you correctly identified your Ubuntu partition and disk. You can also search for the specific error message online for troubleshooting steps.

Can I use this guide to dual boot Windows 11 with a different version of Ubuntu?

Yes, you can use this guide to dual boot Windows 11 with different versions of Ubuntu. The steps for reinstalling GRUB2 should be the same regardless of the Ubuntu version.

Will reinstalling GRUB2 delete any of my files or data?

Reinstalling GRUB2 should not delete any of your files or data. However, it’s always a good practice to backup your important files before making any changes to your system, just to be safe.

Leave a Comment

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