1.4 KiB
1.4 KiB
GRUB Repair Quick Reference
Essential Commands
1. System Detection
sudo ./grub-repair.sh detect
2. Complete Boot Repair (Recommended)
sudo ./grub-repair.sh -d /dev/sda -p 1 -b fix-boot
3. Check Status
sudo ./grub-repair.sh status
4. Clean Up
sudo ./grub-repair.sh clean
Common Scenarios
Fresh Boot Repair
# Detect your system first
sudo ./grub-repair.sh detect
# Then repair (replace /dev/sda with your device)
sudo ./grub-repair.sh -d /dev/sda -p 1 -b fix-boot
GRUB Reinstall Only
# Mount system
sudo ./grub-repair.sh -d /dev/sda -p 1 mount
# Install GRUB
sudo ./grub-repair.sh install-grub
# Update config
sudo ./grub-repair.sh update-grub
# Unmount
sudo ./grub-repair.sh unmount
EFI Partition Check and Repair
sudo ./grub-repair.sh -d /dev/sda check-efi
Device Identification
- Find your disk:
lsblkorfdisk -l - EFI partition: Usually the first partition (e.g.,
/dev/sda1) - Root partition: Usually the second partition (e.g.,
/dev/sda2)
Safety Tips
- Always use
-bflag for backup - Test on non-critical systems first
- Keep live ISO handy for recovery
- Document your partition layout
Troubleshooting
- Permission denied: Use
sudo - Device not found: Check with
lsblk - Mount fails: Use
cleancommand first - Verbose output: Add
-vflag