GRUB Corruption: Causes and How to Repair It

If Linux does not boot properly, one possible cause is corruption of GRUB (the bootloader). When GRUB has a problem, the system may stop at grub rescue, remain on a black screen, or fail to boot the OS entirely.

In this article, we will explain the common symptoms of a broken GRUB, the main causes, and the basic steps to repair it using a Live USB.


1. What symptoms appear when GRUB is corrupted?

  • Only grub rescue is displayed at startup
  • Errors such as no such partition appear
  • Linux does not boot and the screen stays black
  • The system suddenly becomes unbootable after an update

If you are seeing symptoms like these, GRUB itself or a partition related to booting may be damaged.


2. Common causes

  • A system update was interrupted partway through
  • The disk partition layout was changed
  • Boot information was overwritten in a Windows and Linux dual-boot environment
  • The EFI partition or the /boot partition was damaged
  • Boot files were lost due to disk failure

In particular, this type of issue is more likely to occur after adjusting partitions, reinstalling an OS, or updating the kernel.


3. First, boot from a Live USB

If the system does not boot normally, the safest method is to start the computer using a Linux Live USB. After booting, open a terminal and first check the state of the partitions.

lsblk -f

Check which devices correspond to the Linux root partition and the EFI partition.


4. Mount the system and repair GRUB

Below is an example of a general repair procedure. Replace the device names with the ones that match your environment.

sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi   # Required only on UEFI systems

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

Once inside the chroot environment, reinstall GRUB.

grub-install /dev/sda

On UEFI systems, you may instead use a command like this.

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

Then regenerate the boot configuration.

update-grub

When finished, exit and reboot.

exit
sudo reboot

5. If update-grub is not available

On distributions such as Fedora, you may need to use grub2-mkconfig instead. For example:

grub2-mkconfig -o /boot/grub2/grub.cfg

On UEFI systems, the output path may be different, so make sure to check the correct path for your distribution.


Summary

GRUB corruption is one of the most common reasons why Linux becomes unbootable. Even if this happens, you do not necessarily need to reinstall the OS right away. In many cases, you can try recovery in the following order:

  • Boot from a Live USB
  • Check the Linux partition and EFI partition
  • Mount the system and enter a chroot environment
  • Reinstall GRUB
  • Regenerate the boot configuration

As long as the disk itself does not have a serious hardware failure, the above steps can restore bootability in many cases.

Leave a Reply

Your email address will not be published. Required fields are marked *