Categories: FAQ

How to Restore GRUB Bootloader After Installing Windows

If you have a dual-boot system with Windows and Linux, it’s common for the Windows installation or update process to overwrite the GRUB bootloader. This can prevent you from booting into Linux. Fortunately, there are several ways to restore GRUB and regain access to your Linux installation.

Method 1: Restore GRUB from a Live CD/USB

Boot from a live Linux CD or USB drive, such as an Ubuntu live disk.
Open the terminal and run sudo fdisk -l to identify where Linux is installed. Look for a partition labeled as Linux.
Mount the Linux root partition using sudo mount /dev/sdXY /mnt, replacing sdXY with the appropriate partition (e.g., sda3).
Bind-mount the necessary filesystems using:
sudo mount –bind /dev /mnt/dev
sudo mount –bind /proc /mnt/proc
sudo mount –bind /sys /mnt/sys

Chroot into the mounted Linux installation using sudo chroot /mnt.
Reinstall GRUB using grub-install /dev/sdX (replace sdX with the disk identifier, e.g., sda).
Update GRUB’s configuration file with update-grub.
Exit the chroot environment with exit.
Unmount the partitions with sudo umount -l /mnt/dev; sudo umount -l /mnt/proc; sudo umount -l /mnt/sys; sudo umount /mnt.
Reboot your system, and GRUB should now be restored.

Method 2: Restore GRUB from Windows

Boot into Windows and open an elevated command prompt (run as administrator).
Run the following commands:
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

This command sets GRUB as the default boot loader.
Reboot your system, and GRUB should now appear, allowing you to boot into Linux.

Method 3: Use Boot-Repair Tool

Boot from a live Linux CD or USB drive.
Open the terminal and install the Boot-Repair tool with sudo apt install -y boot-repair.
Run boot-repair and follow the on-screen instructions to restore GRUB.
When prompted, select the recommended repair option.
Reboot your system, and GRUB should now be restored.

admin

Recent Posts

California Cracks Down: Can Doctors Accept Gifts from Big Pharma?

The New California Legislation California has taken a bold step to address the controversial issue…

2 months ago

How Much Does It Cost to Replace a Watch Crystal? A Guide to Watch Glass Repair

Understanding Watch Crystal Replacement Costs Watch crystals, the protective glass covering the watch face, can…

2 months ago

Is an Exercise Bike Better Than Walking for Weight Loss?

Comparing Calorie Burn: Exercise Bike vs Walking When it comes to weight loss, burning calories…

2 months ago

How to Split Rental Expenses: A Guide for Mixed-Use Properties

Understanding Mixed-Use Properties Mixed-use properties are dwellings that serve dual purposes - personal residence and…

2 months ago

Can You Access Private GitHub Repositories? A Comprehensive Guide

Understanding Private GitHub Repositories Private repositories on GitHub are designed to protect sensitive code and…

2 months ago

How to Create and Use a Windows 10 Repair Disk for Another Computer

Creating a Windows 10 Repair Disk Creating a Windows 10 repair disk for another computer…

2 months ago

This website uses cookies.