"error: no such partition." and "grub rescue

From Useful Data
Jump to navigation Jump to search

On deleting a partition on a PC with five operating systems on it, on rebooting I got:

error: no such partition.
Entering rescue mode...
grub rescue > _

I know there is a complicated way to fix this from this prompt because I've done it before. Here is an easier way: use Boot Repair to fix the bootloader.

  • Boot a Ubuntu-based Linux from a LiveCD or Live USB.
  • Connect to the internet.
  • Open a terminal, and add the Boot Repair PPA:
 sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
  • Install and run Boot Repair:
sudo apt-get install -y boot-repair && boot-repair
  • Pick 'Recommended Repair'

At one point I needed to open another terminal session and run some extra commands which it provided. And then again for some more.