Lets go over Grub Rescue and repairing your bootloader. This is a very misunderstood topic and by learn basic syntax you will be able to repair your GRUB very easily. Here are 4 methods of doing a GRUB Rescue.
Find your Hard drivels
Output Example:
(hd0) (hd0,msdos2) (hd0,msdos1)
List Root partition on each drive til you find your Installls (hd0,msdos2)/
Check for the directory listing, if nothing, move to next
Now that we have found the proper drive lets boot to itgrub> set root=(hd0,msdos2)
grub> linux /boot/vmlinu (tab complete) root=/dev/sda1 (or the root linux partition)
grub> initrd /boot/initrd (tab complete)
grub> boot
Find your Hard drivels
Output Example:
(hd0) (hd0,msdos2) (hd0,msdos1)
List Root partition on each drive til you find your Installls (hd0,msdos2)/
Check for the directory listing, if nothing, move to next
Now that we have found the proper drive lets boot to it
grub rescue> set prefix=(hd0,msdos2)/boot/grub
grub rescue> set root=(hd0,msdos2)
grub rescue> insmod normal
grub rescue> normal
grub rescue> insmod linux
grub rescue> linux /boot/vmlinu (tab complete) root=/dev/sda1 (or the root linux partition)
grub rescue> initrd /boot/initrd (tab complete)
grub rescue> boot
Now that we are booted in from GRUB Rescue, we can begin work with repairing our grub permanently. First we rebuild the /boot/grub/grub.cfg file:
Debian-based Distributions use update-grub
Other Distributions use grub-mkconfig -o /boot/grub/grub.cfg
With the Configuration rebuilt, we now simply need to reinstall grub
grub-install /dev/sda
Note: /dev/sda is the DEVICE…NOT THE PARTITION.