Ways To Rescue Grub Or Recover Grub Menu
Table of Contents
You started your laptop this fine morning, and Bam! You will see a black screen with the message “Unknown Filesystem” and grub rescue. You’ve arrived at LinuxAndUbunu to learn how to solve this problem, save your valuable data, and boot into Linux normally once more. Let’s go over some grub rescue commands.
Ways To Rescue Or Recover Grub
You might be wondering what happened to the distro. There could be several explanations for this. You may have installed some software, experimented with GRUB2, or used another distro to try dual booting, among other things. Whatever the reason, the GRUB is usually the source of the problem. The methods listed below can help you get your distribution back from the Grub Rescue screen.
Before we continue, we’d like to tell you about Contabo. We host LinuxAndUbuntu on Contabo VPS. Check them out if you need web hosting. Prices start at $6.99 per month for an 8GB RAM and 4 Core CPU VPS.
Method 1 To Rescue Grub
- Type ls and hit enter.
- You will now see many partitions which are present on your PC. [e.g. (hd0),(hd0,msdos1)(hd0,msdos2)]. Select the partition in which your Linux distro is installed.
- Assuming that you have installed distro in 2nd option, enter this command set prefix=(hd0,msdos1)/boot/grub (Tip: – if you don’t remember the partition, try entering the command with every option. If wrong you will get an error message. If right you will proceed)
- After you’ve found the drive, enter this command insmod normal and then normal.
Now your PC/Laptop will reboot, and you will be on your desktop. Now hit Ctrl+Alt+T
and open the terminal and type sudo update-grub
and then sudo grub-install /dev/sda
. You may be asked for your password; type it, the password will remain invisible, which is normal.
You may be asked for a data connection if GRUB files are lost and the system wants to download them. Your error is fixed, and the distro is back.
Method 2 To Rescue Grub
- Get a Live USB stick. I will prefer the Ubuntu Live USB stick.
- Open terminal after booting up into the live desktop.
- Mount the root partition by typing /mnt and boot to /mnt/boot and hit enter. [e.g. sudo grub-install –root-directory=/mnt –boot-directory=/mnt/boot /dev/sda]
You should replace /dev/sda with the correct partition or disk. Now update grub by typing sudo update-grub
. It can take some time, so wait. After a successful update, reboot, and voila problem was solved.
Method 3 To Rescue Grub
If you have dual boot and any of the above steps aren’t working, this might come in handy for you.
- Get a Windows OS installation DVD, borrow it from your friend or anyone. (Don’t get Windows XP or Vista DVD.)
- Launch it on your PC and run the installer. This can be done by selecting a boot medium either by pressing F12 or by setting boot order in your bootloader. It can be accessed by pressing F2 or Del. or any key your manufacturer suggests.
- After all your Windows files are loaded then select repair your computer. Usually, this option appears at bottom of dialog box after selecting a couple of options.
- If prompted select OS, then in system recovery option choose command prompt. Now enter this command one by one –
bootrec /fixboot
bootrec /fixmbr
- Now quit setup and reboot the PC/Laptop. The window is restored and has overridden GRUB.
Still, your Linux distro is present there. Only GRUB has overridden. You may again get back it by following method 2 above.
Method 4 To Rescue Grub
- Get Ubuntu live USB/DVD stick and boot into the live desktop.
- Connect to the Internet and then open your terminal.
- Install Boot Repair Tool by entering these commands –
sudo add-apt-repository -y ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
- Boot repair tool will appear. Select the recommended option and follow all steps exactly as it says. Your PC will be repaired and Nothing will be lost.
Remember, repair speed will vary according to your internet connection.
Pro Tips:-
If you are wondering where to get a Live USB stick, you can visit your friend and download Ubuntu iso and create a bootable USB stick with Rufus and bootable DVD using PowerISO.
You can visit a public place if you need WiFi. There are many places like Airports, Railway Stations, Hospitals offering open wifi. It only helps if you have a Laptop.
If your PC does not support booting from a USB stick and the DVD drive is toasted, you can use Plop boot manager to boot from a USB stick forcefully.
Recommended discussions
https://askubuntu.com/questions/493826/grub-rescue-problem-after-deleting-ubuntu-partition
https://ubuntuforums.org/showthread.php?t=1359802
Conclusion
I’m always here to assist you with your computer. If you encounter any difficulties, please join discord server or leave a comment below. Also, if you have a great approach to recover from this circumstance, please leave a comment; I would love to include it in the article. However, despite your best efforts, if you are unable to rescue your laptop or your data is corrupted, we at LinuxAndUbuntu will not be held liable for Angry Mother, Furious Dad, Dead Kitten, or Nuclear War.
LinuxAndUbuntu Newsletter
Join the newsletter to receive the latest updates in your inbox.