Do you have a dual boot setup of Ubuntu & Windows? Did you update your Windows 10, then suddenly you're encountering grub rescue where the error is no partition found? Just like that, BOOM! Your computer is not working.

Scary ha? Don't worry there still hope - thanks to TestDisk & Christophe Grenier who created it.

Here are the steps you can do:

Checking Bootable Partitions

  1. Restart your computer
  2. In the Grub rescue, type ls. This will list all of the partitions in your computer.
  3. Check each one, Ex: ls (hd0,msdo6)
  4. If you found a partition with extension File Ext4, its the bootable partition. If not, then skip to Restoring bootable partition.
  5. Set the bootable partition. Ex: (hd0,msdos6) is the bootable partition.
- set prefix=(hd0,msdos6)/boot/grub
- set root=(hd0,msdos6)
- set boot=(hd0,msdos6)
- insmod normal
- normal

Restoring Bootable Partition

  1. Boot using your Ubuntu USB
  2. Go to Software & Updates
  3. Make sure to check open-source software (universe)
  4. Install Testdisk sudo apt install testdisk
  5. Open it sudo testdisk

Testdisk is an awesome tool that detects and fixes partitions.

  1. Create log
  2. Select Analyse. This will scan your hard disk for partitions
  3. It will then produce a summary result of the fix. Review it carefully. Take note of the D marked in your partitions. That will DELETE your partition. You can change the mark of the partition by <- and -> arrow keys.
  4. If you're happy with the result, press Enter then reboot your computer
  5. You'll still get grub rescue, but this time you'll find a bootable partition. Do the Checking bootable partition steps.

Fixing Grub

You'll notice that you're still getting grub rescue every time you reboot. To fix this, you need to boot to your Ubuntu USB installation.

  1. Open your terminal
  2. Mount ubuntu partition: sudo mount /dev/sd** /mnt
  3. Reinstall grub: sudo grub-install --boot-directory=/mnt/boot /dev/sd*
  4. Restart

Take Note:

  • sd* = disk Ex. sda
  • sd** = partition Ex. sda5
  • Use gparted to see the partition for Ubuntu. It has Ext4 extension.

That's it. I hope that fixes your computer.