Header Ads

Grub Rescue : Repair, Restore Ubuntu | Kali Linux Grub Bootloader using Live CD



Are you facing any of the following Problems-

1. Seeing nothing but the grub rescue prompt.


2. Grub Menu not detecting Windows Os.




3. There is no Grub Menu directly Windows OS starting.



If you are facing any of stated problem then this post is for you. Did Windows mess up your Master Boot Record? Doing Partitioning for resizing or dual booting Ubuntu/Kali, GRUB 2 got you down? Let's see how to fix these cramp breaking issues using Ubuntu/Kali Linux Live C.D.


Typically GRUB boot-loader gets overridden if you install Windows after Ubuntu and some other reasons include adding or removing a Hard Drive or messing up Hard drive partitions settings.

Common Problem: You install Windows after you install Ubuntu. That erases the GRUB loader, and instead of being able to switch between Ubuntu and Windows, Windows will boot automatically.

How to Fix this ?



Well the solution is pretty simple, all you need is ISO file of any Debian based O.S like Ubuntu, Elementary OS, Kali Linux & need to follow step by step instructions given below:

Steps:

1) Create a bootable USB Flash Drive of Ubuntu | Kali Linux

Download Ubuntu ISO

- Download win32 DiskImager

- Create bootable USB flash drive of Ubuntu | Kali Linux



2) Now select Live CD, Open Terminal & type the following commands :

sudo mount /dev/sdaX /mnt                     -replace X with your drive number on which Ubuntu | Kali (Linux OS) Installed

Now bind the directories that grub needs access to to detect other operating systems, like so.

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

Now we jump into that using chroot.

sudo chroot /mnt
Now install, check, and update grub.

This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install –recheck /dev/sda.

grub-install /dev/sdX
grub-install --recheck /dev/sdX
update-grub

Now grub is back, all that is left is to exit the chrooted system and unmount everything.
exit &&
sudo umount /mnt/sys &&
sudo umount /mnt/proc &&
sudo umount /mnt/dev/pts &&
sudo umount /mnt/dev &&
sudo umount /mnt
Shut down and turn your computer back on, and you will be met with the default Grub2 screen.

You may want to update grub or re-install burg however you like it.

Congratulations, you have just Repaired/Restored/Reinstalled Grub 2 with a Ubuntu/Kali Live CD!

4 comments:

  1. Nice post thanks a lot

    ReplyDelete
  2. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... www.repairloader.com

    ReplyDelete

Powered by Blogger.