The boot loader (such as Grand Unified Bootloader or GRUB) is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software. The kernel, in turn, initializes the rest of the operating system.
GRUB 2 has replaced what was formerly known as GRUB, which has, in turn, become GRUB Legacy.
If GRUB is corrupted the system might become unbootable.
One of my Debian servers wasn’t booting after an important update. I got the following error at the startup.
From the rescue mode, I run ls to see all my drives and partitions.
The server wasn’t installed by me but I supposed the boot partition was probably (vg-root). I run ls (vg-root)/ to check by supposition. And I was rightJ.
I run the ls (vg-root)/boot to check the root partition architecture. It is an amd64 here.
After that I booted the system using the install CD. Select rescue mode under Advanced options. And execute a shell on the root partition.
Now run the following commands to update the GRUB.
Grub-mkdevicemap
Grub-install /dev/hda (this is my boot device)
Update-grub
Restart the server.
That’s it.
Be the first to comment on "Repair damaged Linux GRUB loader"