How to Restore GRUB in My Case? - Tech Support Guide

Abstract: Restore a corrupted or overwritten GRUB bootloader to fix dual-boot failures and regain access to Linux.

Created: 2026-08-28 by
Restoring the GRand Unified Bootloader (GRUB) is a critical task when dual-booting Linux and Windows, as it manages the transition between operating systems. If your system fails to boot or defaults directly to Windows, the bootloader configuration is likely corrupted or overwritten. This guide provides a step-by-step method to recover GRUB using a live environment, ensuring you regain control over your multi-boot setup without losing data.

Assessing the Boot Failure

Before attempting any repairs, it is essential to understand why GRUB failed. Common symptoms include the system skipping the menu entirely and launching Windows immediately, or displaying a "grub rescue>" prompt with errors about missing partitions. These issues typically arise after installing Windows, which often overwrites the Master Boot Record (MBR) or EFI System Partition (ESP), effectively erasing the Linux bootloader entries. In some cases, a failed update or manual modification of /boot/grub/grub.cfg can also cause this state. Understanding the specific error message helps determine whether you need to repair the MBR/ESP or simply regenerate the configuration file. For more complex configuration issues, you might find our article on Linux Boots Grub - How to Fix a Broken grub.cfg helpful for understanding how to manually edit boot parameters if automatic restoration fails.

Preparing a Live Environment

To restore GRUB, you must boot from an external source since the installed OS is not accessible. You will need a Linux Live USB created with tools like Rufus, Etcher, or the dd command. Any standard distribution such as Ubuntu, Fedora, or Arch Linux works, provided it includes the grub-install utility. Insert the USB drive and restart your computer. Access the BIOS/UEFI settings by pressing the appropriate key during startup, typically F2, F12, Del, or Esc. Change the boot order to prioritize the USB drive. Save changes and exit; the system should boot into the live environment. Once loaded, open a terminal window to begin the diagnostic process. Ensure your system is connected to the internet, as some recovery steps may require downloading additional packages or kernel modules.

Identifying Partitions

Accurate partition identification is the most crucial step in restoring GRUB. Use the lsblk or fdisk -l command to list all block devices and their mount points. Look for your primary Linux root partition, which is usually formatted as ext4 or btrfs, and identify the EFI System Partition (ESP) if you are using UEFI mode. The ESP is typically a small FAT32 partition, around 100-500 MB, marked with the "boot" or "efi" flag. In legacy BIOS mode, GRUB installs to the MBR of the disk itself, while in UEFI mode, it installs to the ESP. Misidentifying these partitions can lead to further boot failures. Note down the device names, such as /dev/sda1 or /dev/nvme0n1p2, as you will need them for mounting.

Mounting the System

Once you have identified the correct partitions, you must mount them to make the installed system accessible. Start by mounting your root partition to /mnt. For example, if your root partition is /dev/sda2, run sudo mount /dev/sda2 /mnt. If you have separate partitions for /boot or /home, mount them to /mnt/boot and /mnt/home respectively. Next, mount the EFI partition if applicable. Create a directory for the ESP, such as sudo mkdir /mnt/boot/efi, and then mount the EFI partition to it, for instance, sudo mount /dev/sda1 /mnt/boot/efi. Finally, bind the necessary virtual filesystems to allow the chroot environment to function correctly. Run sudo mount --bind /dev /mnt/dev, sudo mount --bind /proc /mnt/proc, and sudo mount --bind /sys /mnt/sys. This prepares the environment for chrooting into your installed system.

Restoring GRUB via Chroot

Enter the chroot environment by running sudo chroot /mnt. This command changes the root directory to your mounted Linux installation, allowing you to run commands as if you were inside the broken system. Inside the chroot, reinstall GRUB using the grub-install command. For UEFI systems, specify the target directory and the EFI path: grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB. For legacy BIOS systems, simply point to the disk device: grub-install /dev/sda. After installation, update the GRUB configuration file by running update-grub or grub-mkconfig -o /boot/grub/grub.cfg. This regenerates the menu based on the current kernels and operating systems detected. Exit the chroot with exit, unmount the partitions in reverse order, and reboot. Your system should now display the GRUB menu, allowing you to select between Linux and Windows.

Frequently Asked Questions

Will restoring GRUB delete my files?

No, restoring GRUB only affects the bootloader configuration and does not touch your personal data or installed applications. However, always ensure you have backups before modifying boot partitions to prevent accidental data loss due to user error.

Why does Windows still boot automatically after fixing GRUB?

This happens because GRUB detects Windows but may default to it if the timeout is short or if the entry order is changed. You can edit /etc/default/grub to change the GRUB_DEFAULT setting and increase GRUB_TIMEOUT to give yourself more time to choose.

Can I fix GRUB without a Live USB?

It is highly unlikely unless you have access to a recovery console that supports GRUB utilities. Most modern systems do not include GRUB tools in the Windows recovery environment, making a Linux Live USB the standard and most reliable solution.

What if I get a "device not found" error during grub-install?

This error usually indicates that the target partition or disk is incorrect. Double-check your partition layout using lsblk and ensure you are pointing to the correct disk (e.g., /dev/sda instead of /dev/sda1) for BIOS installations.

Is it safe to install GRUB alongside Windows Boot Manager?

Yes, GRUB can coexist with Windows Boot Manager, especially in UEFI mode where each OS has its own entry in the NVRAM. However, always let GRUB handle the initial boot sequence to maintain a unified menu interface.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More