2

I am a newbie to Ubuntu, on the top of that I am facing the following issue:

I recently deleted a 3GB partition on my Windows (which was empty), after which when I rebooted, I could not get to grub, instead I was landed at an Error:

Error: No such partition
Grub Rescue>

I immediately searched YouTube and accordingly enetered the following in the rescue CLI:

ls
ls (hd0,msdos7)
>>ext2 File System 
set boot=(hd0,msdos7)
set prefix=(hd0,msdos7)/boot/grub
insmod normal
normal

I now landed in grub bootloader!! and selected Windows 10, it successfully booted. I rebooted again to check if Ubuntu is booting... I again landed on the Grub Rescue CLI, did the same process again, and I was again in grub bootloader and I booted Ubuntu.

EVERYTHING IS WORKING FINE but I am landing at the GRUB RESCUE CLI each time I boot my Laptop.

Please Help, ASAP!

2 Answers2

2

Well, It looks awkward to answer my own question, but for others who have the same problem, this is how I tackled the problem: I booted into Ubuntu, in the terminal I wrote:
sudo update-grub
and hit the enter key, then the following command:
sudo grub-install yourhd where yourhd refers to your hard disk location for example:

  • For `hd0`, `yourhd` = `/dev/sda`
  • For `hd1`, `yourhd` = `/dev/sdb`
  • For `hd2`, `yourhd` = `/dev/sdc`
  • And so on...

In my case the code is hence:
sudo grub-install /dev/sda

Then just reboot your PC and Good Day!

Reference: grub rescue shows every time I open the pc

0

For others who are facing the same issue, but the above fix doesn't work: Another (different) reason that you might be getting this issue is that your BIOS might be trying to boot from the wrong drive. Changing the BIOS to boot from the drive that has grub installed should fix that.

DinoM
  • 1