This page looks best with JavaScript enabled

Grub Rescue | Repairing your Bootloader

 ·  β˜• 2 min read  ·  ✍️ Chris Titus

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.

Repairing from a GRUB > Prompt

Find your Hard drive
ls
Output Example:
(hd0) (hd0,msdos2) (hd0,msdos1)

List Root partition on each drive til you find your Install
ls (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> 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

Repairing from a GRUB Rescue > Prompt

Find your Hard drive
ls
Output Example:
(hd0) (hd0,msdos2) (hd0,msdos1)

List Root partition on each drive til you find your Install
ls (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

grub

Fix GRUB Permanently

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.

Other Methods of Repairing GRUB

Video Walkthroughs

grub-yt
Note: YouTube Video - Hold Ctrl + Left Click to open in new window

Chris Titus Tech

Social

Exclusive Content

  • ChrisTitus.com Members Section (CC Only)
    • Digital Downloads with Guides and Pre-Built Images
    • Monthly Members Only Video
    • $5 Per Month (100% of Proceeds goes to Chris Titus Tech)
  • YouTube Chris Titus Tech Membership (All Payments Accepted)
    • Monthly Members Only Video
    • YouTube Emojis for Comments and Live Chat
    • YouTube Badges that changes based on membership time for comments and chat.
    • All YouTube comments are highlighted when I review comments daily.
    • $4.99 Per Month (70% of the Proceeds goes to Chris Titus Tech)

Chris Titus
WRITTEN BY
Chris Titus
Tech Content Creator