Restore GRUB After Windows Install. When you install Windows alongside Linux, the Windows bootloader overwrites GRUB, preventing you from booting into Linux. This guide explains how to restore or repair GRUB and finally regain access to your Linux system.
How to Restore GRUB after Windows Installation
Here I'll be covering two methods of restoring GRUB:
- Manual Restoration (a hands on process)
- Automated Restoration (with the help of Boot Repair)
Both methods of restoring GRUB are reliable and work with Windows 10 and Windows 11 installations.
Why Is Reinstalling GRUB Necessary?
When you install Windows, its installer assumes it’s the only operating system on your machine. As a result, it overwrites the GRUB bootloader with the Windows bootloader, which cannot detect Linux systems. Restoring GRUB is necessary to regain access to your Linux partition and enable dual-boot functionality.
Manual GRUB Restoration
Prerequisites: A Live Linux USB drive (e.g., Ubuntu, Fedora, or Debian). You can create this using YUMI, a preferred tool for creating multiboot bootable USB drives.
Steps to Manually Restore GRUB:
- Create a Live USB with YUMI
- Download YUMI.
- Run YUMI and follow these steps:
- Select your USB drive from the dropdown menu.
- Choose a Linux distribution from the list (e.g., Ubuntu or Fedora).
- Browse to the Linux ISO file you’ve downloaded (e.g., from Ubuntu Downloads).
- Click "Create" to write the ISO to the USB.
- Once completed, you'll have a bootable Live USB ready for use.
- Boot into the Live Linux Environment
- Insert your YUMI created Live USB and restart your computer.
- Ensure the system boots from the USB drive (you may need to access the BIOS or UEFI boot menu by pressing keys like
F2
,F10
, orDEL
). - Select the "Try Ubuntu" (or equivalent) boot option to access a temporary Linux environment.
- Open a terminal using
Ctrl+Alt+T
or your distribution’s terminal shortcut.
- Identify the Linux Partition
Run the following command to list your system's partitions:sudo fdisk -l
Look for the partition where Linux is installed (e.g.,
/dev/sda1
). - Mount the Linux Partition
Replacesdx1
with your actual Linux partition name:sudo mount /dev/sdx1 /mnt
- Mount Essential System Directories
sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys
- Chroot into the Linux Environment
sudo chroot /mnt
- Reinstall the GRUB Bootloader
Install GRUB to your hard drive. Replacesdx
with your actual device name (e.g.,/dev/sda
):sudo grub-install /dev/sdx
- Update the GRUB Configuration
sudo update-grub
- Exit the Chroot Environment
exit
- Unmount Partitions
sudo umount /mnt/dev sudo umount /mnt/proc sudo umount /mnt/sys sudo umount /mnt
- Reboot the System
sudo reboot
Automated GRUB Restoration Using Boot Repair
If you prefer an easier method, you can use the Boot Repair tool, which simplifies the process of fixing boot issues like a missing GRUB bootloader.
Restoring GRUB Using Boot Repair:
- Create a Bootable Boot Repair USB Using YUMI
To create a bootable USB with Boot Repair, follow these steps:- Download YUMI from the official YUMI website.
- Run YUMI and do the following:
- Select your USB drive from the dropdown menu.
- From the list of distributions, choose Boot Repair ISO or select "Try Unlisted ISO/IMG" if it isn't listed.
- Download the Boot Repair ISO from SourceForge.
- Browse to the Boot Repair ISO file you downloaded and select it.
- Click Create to write the Boot Repair ISO to the USB drive.
- Once the process is complete, your Boot Repair USB will be ready.
- Boot from the Boot Repair USB
- Insert the USB drive and restart your computer.
- Access your BIOS/UEFI settings (press keys like
F2
,F12
, orDEL
during startup). - Set the USB drive as the first boot device and boot into the Boot Repair environment.
- Launch Boot Repair
- When the Boot Repair environment loads, you’ll see an option to launch the Boot Repair tool.
- Click on the Recommended Repair option to allow Boot Repair to automatically scan and fix your GRUB installation.
Once Boot Repair has finished restoring GRUB, you should be able to boot into both Linux and Windows after restarting your computer.
Frequently Asked Questions
- Why does Windows overwrite GRUB?
- Windows assumes it’s the only OS on the system and replaces GRUB with its own bootloader.
- What happens if I reinstall GRUB on the wrong drive?
- You may encounter boot errors or overwrite another OS's bootloader. Double check the drive name before running
grub-install
.
Final Thoughts
It is often necessary to reinstall or restore GRUB after Windows installation if you still want to maintain a dual boot system. Whether you prefer a manual method or the simplicity of using Boot Repair, both approaches are effective for regaining access to Linux. Creating a Live USB with YUMI for Boot Repair makes the process even easier by providing a portable and reliable tool for fixing bootloader issues.
If you follow these steps carefully, you should have no problem restoring GRUB and booting into both Windows and Linux without issues. Feel free to reach out if there's anything I've missed. Happy dual booting!