Ahmed x86 - GRUB Fixer 🛠️

Automated, secure Universal (UEFI & Legacy BIOS) bootloader rescue suite with intelligent Dual-Boot detection, execution speed tracking, and Local In-Situ Repair.

Version V16 Bash Linux Dual Boot Ready UEFI & BIOS Support

About the Project

GRUB Fixer (V16 - Ultimate Automation, Legacy BIOS, OS Prober, Universal UEFI & In-Situ Repair) is an automated, bulletproof Bash script designed to repair the GRUB bootloader on both UEFI and Legacy BIOS Linux systems. V16 transforms the script into a true "Universal Rescue Weapon," bringing In-Situ (Local) Repair capabilities, Dynamic 32-bit/64-bit UEFI Detection, a dynamic execution timer with gamer-style human responses, intelligent dual-boot detection (OS Prober), and the powerful Zero-Interaction "Pro Mode" that parses /etc/fstab to map and mount complex layouts (like Btrfs subvolumes) in seconds.

🚀 New in V16: The script now features In-Situ (Local) Mode Detection! It intelligently detects if it's being run directly from your installed OS (e.g., booted via Super GRUB2 Disk) rather than a Live USB. It safely bypasses the complex chroot environment and repairs GRUB locally in seconds.

✨ New in V16 (The In-Situ Update)

⚙️ Key Additions in V15, V14, V13 & V12

🧠 Core Features (From V11 & V10)

💎 Advanced Rescue Tech


🛠️ Usage

You can choose between the quick one-liner or the manual download method depending on your environment.

Option 1: Quick One-Liner (Recommended)

Run the script directly from your terminal in any Live Linux environment (or booted broken OS) without downloading. (Note: sudo is required):

curl -sL https://raw.githubusercontent.com/ahmed-x86/grub-fixer/main/grub-fixer.sh | sudo bash

Option 2: Manual Download & Execute

If you prefer to have the file locally or want to audit the code before running:

curl -O https://raw.githubusercontent.com/ahmed-x86/grub-fixer/main/grub-fixer.sh
chmod +x grub-fixer.sh
sudo ./grub-fixer.sh

📜 Version History

Click to view full version history
Version Major Changes
V1Initial manual chroot logic.
V2Input validation and device checks.
V3Automatic /mnt cleanup (umount -R).
V4Failsafe mode, OS detection, and EOF automation.
V5VM/NVRAM Rescue and TTY Pipeline support.
V6Smart Auto-Detection & UX Proposal Flow.
V7Dynamic Custom Volumes Support (The Rescue Update).
V8Smart EFI Validation, Logging & Root Checks (Smart & Secure Update).
V9Dynamic Btrfs subvolumes support with smart routing.
V10Dynamic EFI Mount Logic, Forced Validation Loop, and Improved Auto-Detection.
V11Zero-Interaction Mode (fstab parser), 3-Tier Fallback System.
V12Added Legacy BIOS (i386-pc) support, auto-detection, and Target Disk extraction.
V13Added OS Prober support to automatically detect dual-boot systems (e.g., Windows).
V14Added Dynamic Execution Timer with gamer-style human responses (The Speedrun Update).
V15Added Universal UEFI Support (32-bit/i386-efi) with dynamic bitness detection.
V16Current: Added In-Situ (Local) Mode to repair GRUB directly from the running system without Live USB/chroot.

📋 System Requirements

⚠️ Disclaimer

While highly automated, GRUB repair touches critical system files. Always verify the auto-detected partitions, fstab layout, and subvolumes before confirming the repair process, especially on dual-boot systems.

⚠️ Planned for V17: Researching automated LUKS Encryption support for repairing encrypted partitions.
⭐ Star on GitHub