Tried to boot Ubuntu, but the GRUB rescue prompt shows up instead [duplicate]

Tried to boot Ubuntu, but this shows up instead:

grub rescue>

Solution 1:

If you were able to boot Ubuntu in the past, but not now, follow these steps to solve the problem.

  • First type ls command and Press Enter to see all the available partitions. The entries will be shown as (hd0,msdos1) (hd0,msdos2) (hd0,msdos5) etc.

  • Then type ls (hd0,msdos1)/ to see the content of the drive. if you see entries like vmliuz or initrd, it is your Linux partition. If you fail with (hd0,msdos1), try with (hd0,msdos2) and so on, until you recognize your Ubuntu partition.

  • When you correctly identify your Ubuntu partition, type root=(hdX,msdosX) , replace the X with correct identified number. For example, if you see vmlinuz and initrd entries by entering ls (hd0,msdos5), the command will be root=(hd0,msdos5).

  • then type configfile /boot/grub/grub.cfg and type Enter. This will bring you Previous Ubuntu grub menu.

  • Then choose the entry to boot Ubuntu.

  • After you booted up, Open a terminal and type sudo update-grub and press Enter. This will update the grub menu and prevent future problems.

In the case that you are not able to boot to Ubuntu after installation, re-installing Ubuntu is the best option. You can check this question:

  • How to install Ubuntu OS Having already installed Windows OS